majnemer added inline comments.
Comment at: clang/lib/Headers/intrin.h:345-347
+ _BitBase += (_BitPos / 32);
+ _BitPos %= 32;
return (*_BitBase >> _BitPos) & 1;
`_bittest` seems to expand to `(((unsigned char const *)_BitBase)[_BitPos >>
3] >> (_BitPos &
majnemer accepted this revision.
majnemer added a comment.
LGTM
https://reviews.llvm.org/D33616
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
majnemer added a comment.
In https://reviews.llvm.org/D33616#768287, @hans wrote:
> From looking in the Intel manual (Table 3-2, in 3.1.1.9 about
> Bit(BitBase,BitOffset)) it does sound like the bit offset can be negative
> *shudder*, so I suppose this is necessary and explains why the type is
majnemer added a comment.
Do you really want to be doing signed division here? Because it is signed, it
won't turn into the simple bitshifts and masks that one might expect.
https://reviews.llvm.org/D33616
___
cfe-commits mailing list
majnemer added inline comments.
Comment at: include/support/win32/msvc_builtin_support.h:33
+
+_LIBCPP_ALWAYS_INLINE int __builtin_popcount(unsigned int x)
+{
compnerd wrote:
> I think I prefer the following implementation:
>
> _LIBCPP_ALWAYS_INLINE int
majnemer requested changes to this revision.
majnemer added a comment.
This revision now requires changes to proceed.
I don't think this is correct. GDR (of Microsoft) says the behavior is
different:
majnemer added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:85
+ unsigned No = 0;
+ StringRef AwaitKindStr = 0;
+ switch (Kind) {
I'd just let the default constructor do its thing.
https://reviews.llvm.org/D30809
majnemer added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:85
+ unsigned No = 0;
+ const char* AwaitKindStr = 0;
+ switch (Kind) {
I'd use a StringRef here.
https://reviews.llvm.org/D30809
___
majnemer added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:26
+enum class AwaitKind { Init, Normal, Yield, Final };
+char const *AwaitKindStr[] = {"init", "await", "yield", "final"};
+}
I'd move this into buildSuspendSuffixStr.
majnemer added inline comments.
Comment at: lib/AST/ASTContext.cpp:8786
+if (OverrideNonnull && OverrideNonnullArgs)
+ *OverrideNonnullArgs |= 1 << ArgTypes.size();
+
`1U` to avoid overflow UB?
Comment at: lib/CodeGen/CGCall.cpp:2082
majnemer added inline comments.
Comment at: lib/CodeGen/CGDebugInfo.cpp:2479
+case Type::DeducedTemplateSpecialization: {
+ QualType DT = dyn_cast(T)->getDeducedType();
+ assert(!DT.isNull() && "Undeduced types shouldn't reach here.");
You are
majnemer added inline comments.
Comment at: include/clang/Basic/TokenKinds.def:418
TYPE_TRAIT_N(__is_nothrow_constructible, IsNothrowConstructible, KEYCXX)
+TYPE_TRAIT_N(__is_direct_constructible, IsDirectConstructible, KEYCXX)
Should this trait be grouped
This revision was automatically updated to reflect the committed changes.
Closed by commit rL295010: [MS ABI] Correctly mangling vbase destructors
(authored by majnemer).
Changed prior to commit:
https://reviews.llvm.org/D29912?vs=88258=88280#toc
Repository:
rL LLVM
majnemer added inline comments.
Comment at: lib/Parse/ParseDecl.cpp:2989
+
+ Diag(Loc, diag::err_ms_attributes_not_enabled);
+ continue;
aaron.ballman wrote:
> majnemer wrote:
> > aaron.ballman wrote:
> > > compnerd wrote:
> > > > aaron.ballman
majnemer added inline comments.
Comment at: lib/Parse/ParseDecl.cpp:2989
+
+ Diag(Loc, diag::err_ms_attributes_not_enabled);
+ continue;
aaron.ballman wrote:
> compnerd wrote:
> > aaron.ballman wrote:
> > > compnerd wrote:
> > > > I think that
majnemer created this revision.
They are a little bit of a special case in the mangling. They are always
mangled without taking into account their virtual-ness of the
destructor. They are also mangled to return void, unlike the actual
destructor.
This fixes PR31931.
This revision was automatically updated to reflect the committed changes.
Closed by commit rL292194: [AST] AttributedType should derive type properties
from the EquivalentType (authored by majnemer).
Changed prior to commit:
https://reviews.llvm.org/D28788?vs=84609=84625#toc
Repository:
rL
majnemer created this revision.
Using the canonical type instead of the equivalent type can result in
insufficient template instantiations.
This fixes PR31656.
https://reviews.llvm.org/D28788
Files:
include/clang/AST/Type.h
test/CodeGenCXX/microsoft-abi-default-cc.cpp
Index:
majnemer added inline comments.
Comment at: include/__threading_support:29-30
+#include
+#define WIN32_LEAN_AND_MEAN
+#include
+#include
EricWF wrote:
> I think we agreed that we cannot use this macro.
Can we do as Reid suggests and not expose users to
majnemer added a comment.
Why isn't this equivalent to `_MSC_VER` ?
Repository:
rL LLVM
https://reviews.llvm.org/D28383
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
majnemer added a comment.
In https://reviews.llvm.org/D28226#634282, @compnerd wrote:
> The dynamic behavior only is used for Windows, not pthreads. So, we dont see
> it here, but it becomes apparent in the windows support. I was trying to
> minimize the changes to libc++ itself to avoid
majnemer added a comment.
Is `__libcpp_mutex_reference` all that useful? There is no real dynamism for
these mutexes. I'd just add functions for the recursive locks just like we have
a separate function for `__libcpp_recursive_mutex_init`
Repository:
rL LLVM
https://reviews.llvm.org/D28226
majnemer added inline comments.
Comment at: include/__threading_support:300-305
+int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m)
+{
+ InitializeSRWLock(__m);
+ return 0;
+}
+
compnerd wrote:
> majnemer wrote:
> > I don't think you can use slim rw
majnemer added a comment.
In https://reviews.llvm.org/D28220#633622, @compnerd wrote:
> @majnemer Im using the Fls* APIs since they provide the thread termination
> callback, which Tls* doesn't. Good point about the SRW. Those are newer,
> but, we can always provide a fallback later.
I
majnemer added a comment.
slim reader-writer locks are faster than critical sections, I'd recommend your
implementation switch to those.
Also, why do you use Fls instead of Tls?
Repository:
rL LLVM
https://reviews.llvm.org/D28220
___
majnemer added inline comments.
Comment at: src/typeinfo.cpp:28-29
+#if defined(_WIN64)
+ static constexpr const size_t fnv_offset_basis = 14695981039346656037;
+ static constexpr const size_t fnv_prime = 10995116282110;
+#else
majnemer wrote:
> Why make these
majnemer added inline comments.
Comment at: lib/CodeGen/CGDebugInfo.cpp:433-434
void CGDebugInfo::CreateCompileUnit() {
+ SmallString<32> Checksum;
+ llvm::DIFile::ChecksumKind CSKind = llvm::DIFile::CSK_None;
Formatting looks wrong
majnemer added a comment.
My 2 cents: If making this a target-specific default is not OK, why not turn on
-fno-strict-return if -fapple-kext is specified? I believe that would cover the
critical use case in question.
Repository:
rL LLVM
https://reviews.llvm.org/D27163
majnemer added inline comments.
Comment at: lib/CodeGen/CodeGenFunction.h:619
+bool hasLabel(const LabelDecl *LD) const {
+ return std::find(Labels.begin(), Labels.end(), LD) != Labels.end();
+}
This can be written as `llvm::is_contained(Labels,
majnemer added inline comments.
Comment at: lib/Sema/SemaTemplate.cpp:2355
Converted, nullptr);
+ if (auto *attr = ClassTemplate->getTemplatedDecl()
+ ->getAttr())
Please
majnemer added inline comments.
Comment at: lib/CodeGen/TargetInfo.cpp:3871
+for (auto : FI.arguments()) {
+ if (Count < 6)
+I.info = classify(I.type, FreeSSERegs, false, IsVectorCall, IsRegCall);
erichkeane wrote:
> majnemer wrote:
> >
majnemer added inline comments.
Comment at: lib/CodeGen/TargetInfo.cpp:1688
+for (auto : FI.arguments()) {
+ if(Count < 6)
+I.info = reclassifyHvaArgType(I.type, State, I.info);
erichkeane wrote:
> majnemer wrote:
> > Formatting.
> I don't see
majnemer added inline comments.
Comment at: lib/CodeGen/TargetInfo.cpp:1688
+for (auto : FI.arguments()) {
+ if(Count < 6)
+I.info = reclassifyHvaArgType(I.type, State, I.info);
Formatting.
Comment at:
majnemer added a comment.
This LGTM but Aaron should give the go ahead.
Repository:
rL LLVM
https://reviews.llvm.org/D26846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL288826: [MS ABI] Implement more of the Itanium mangling
rules (authored by majnemer).
Changed prior to commit:
https://reviews.llvm.org/D27226?vs=80096=80437#toc
Repository:
rL LLVM
majnemer updated this revision to Diff 80096.
majnemer added a comment.
- Simplify the mangling a little bit
https://reviews.llvm.org/D27226
Files:
lib/AST/MicrosoftMangle.cpp
test/CodeGenCXX/mangle-ms-cxx11.cpp
Index: test/CodeGenCXX/mangle-ms-cxx11.cpp
majnemer updated this revision to Diff 79848.
majnemer marked an inline comment as done.
majnemer added a comment.
- Address review comments
https://reviews.llvm.org/D27226
Files:
lib/AST/MicrosoftMangle.cpp
test/CodeGenCXX/mangle-ms-cxx11.cpp
Index: test/CodeGenCXX/mangle-ms-cxx11.cpp
majnemer updated this revision to Diff 79837.
majnemer added a comment.
- Address review comments
https://reviews.llvm.org/D27226
Files:
lib/AST/MicrosoftMangle.cpp
test/CodeGenCXX/mangle-ms-cxx11.cpp
Index: test/CodeGenCXX/mangle-ms-cxx11.cpp
majnemer created this revision.
majnemer added a reviewer: rnk.
majnemer added a subscriber: cfe-commits.
We didn't implement one of the corner cases: a lambda which belongs to
an initializer for a field. In this case, we need to mangle the field
name into the lambda.
This fixes PR31197.
101 - 139 of 139 matches
Mail list logo