majnemer (David Majnemer)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 15 2013, 2:02 AM (270 w, 1 d)

Recent Activity

Fri, Jun 8

majnemer accepted D47875: [MS ABI] Mangle unnamed empty enums (PR37723).

LGTM

Fri, Jun 8, 4:36 PM

Thu, Jun 7

majnemer added inline comments to D47875: [MS ABI] Mangle unnamed empty enums (PR37723).
Thu, Jun 7, 7:54 AM

Thu, May 31

majnemer accepted D47611: Change ambiguous uses of term 'funclet' to 'EH scopes'. NFC..

LGTM

Thu, May 31, 4:59 PM

Tue, May 22

majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
Tue, May 22, 8:49 AM

Mon, May 21

majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
Mon, May 21, 8:39 AM
majnemer accepted D47005: [WebAssembly] Add functions for EHScopes.

LGTM

Mon, May 21, 8:35 AM

Sun, May 20

majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
Sun, May 20, 10:38 PM
majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
Sun, May 20, 10:22 PM
majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
Sun, May 20, 12:00 PM
majnemer added inline comments to D44931: [WebAssembly] Use Windows EH instructions for Wasm EH.
Sun, May 20, 11:50 AM

May 18 2018

majnemer added inline comments to D43746: [WebAssembly] Add Wasm exception handling prepare pass.
May 18 2018, 8:45 AM

May 17 2018

majnemer added inline comments to D43746: [WebAssembly] Add Wasm exception handling prepare pass.
May 17 2018, 4:36 PM
majnemer accepted D47005: [WebAssembly] Add functions for EHScopes.

LGTM

May 17 2018, 4:07 PM

May 16 2018

majnemer accepted D45559: [WebAssembly] Add Wasm personality and isScopedEHPersonality().

LGTM with that final nit fixed.

May 16 2018, 9:45 PM
majnemer added inline comments to D44090: [WebAssembly] Support instruction selection for catching exceptions.
May 16 2018, 3:28 PM
majnemer added inline comments to D45559: [WebAssembly] Add Wasm personality and isScopedEHPersonality().
May 16 2018, 3:24 PM
majnemer added inline comments to D44931: [WebAssembly] Use Windows EH instructions for Wasm EH.
May 16 2018, 3:20 PM

May 9 2018

majnemer added a comment to D45559: [WebAssembly] Add Wasm personality and isScopedEHPersonality().

As I said above, the term 'funclet' seems to be used pretty everywhere including clang. To summarize its usage,

  1. Small outlined functions themselves
  2. Funcletpad instructions, such as catchpad or cleanuppad
  3. The structure of BBs starting from catchpad/cleanuppad and ending with catchret/cleanupret, which can be nested
  4. This Windows IR -based EH itself

    Now I'm thinking that maybe we should use isFuncletEHPersonality for the use cases here I replaced with usesWindowsEHInstructions, and come up with a new name to give to the use cases that pertain to real outlined small functions.
May 9 2018, 3:37 PM

Apr 20 2018

majnemer added inline comments to D45839: [analyzer] Add support for WebKit "unified sources"..
Apr 20 2018, 3:34 PM

Apr 17 2018

majnemer accepted D45738: Add Microsoft mangling for _Float16, similar to technique used for _Complex.

LGTM

Apr 17 2018, 2:33 PM

Apr 2 2018

majnemer added a comment to D45174: non-zero-length bit-fields should make a class non-empty.

I wonder if we can delete the getNonVirtualSize() check now -- I don't see any way that an empty class can have a nonzero nvsize except by this nonempty anonymous bit-fields situation.

Yup, looks like:

   if (!FoundBase) {
-    if (MDCUsesEBO && BaseDecl->isEmpty() &&
-        BaseLayout.getNonVirtualSize() == CharUnits::Zero()) {
+    if (MDCUsesEBO && BaseDecl->isEmpty()) {
+      assert(BaseLayout.getNonVirtualSize() == CharUnits::Zero());
       BaseOffset = CharUnits::Zero();
     } else {

Zero test failures.

Apr 2 2018, 7:12 PM

Mar 30 2018

majnemer added a comment to D45112: [MS] Emit vftable thunks for functions with incomplete prototypes.

Does this help PR25641?

Mar 30 2018, 4:45 PM

Mar 27 2018

majnemer added a comment to D44931: [WebAssembly] Use Windows EH instructions for Wasm EH.

Some quick first pass comments.

Mar 27 2018, 3:15 PM

Mar 22 2018

majnemer added inline comments to D44810: [PDB] Make LLD PDBs look a little more like Microsoft PDBs.
Mar 22 2018, 8:07 PM
majnemer added inline comments to D44810: [PDB] Make LLD PDBs look a little more like Microsoft PDBs.
Mar 22 2018, 7:03 PM

Mar 20 2018

majnemer accepted D44641: [ObjCARC] Add funclet token to ARC marker.

LGTM

Mar 20 2018, 1:40 PM

Mar 19 2018

majnemer added inline comments to D44626: [InstCombine] Fold (A OR B) AND B code sequence over Phi node .
Mar 19 2018, 8:59 AM

Mar 14 2018

majnemer added a comment to D44504: COFF: Implement string tail merging..

Do you have a test to make sure that a wide string literal doesn't point into a misaligned offset into a narrow string literal?

Mar 14 2018, 6:53 PM

Mar 13 2018

majnemer added a comment to D44406: [CodeView] Emit HasConstructorOrDestructor class option for non-trivial constructors.

Even for something like:

Mar 13 2018, 9:54 PM

Mar 9 2018

majnemer accepted D44327: ObjCARC: teach the cloner about funclets.

LGTM

Mar 9 2018, 5:20 PM
majnemer added inline comments to D44327: ObjCARC: teach the cloner about funclets.
Mar 9 2018, 2:35 PM
majnemer accepted D44308: [ConstantFold] fp_binop AnyConstant, undef --> NaN.

LGTM

Mar 9 2018, 8:55 AM

Mar 6 2018

majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
Mar 6 2018, 10:36 PM
majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
Mar 6 2018, 9:20 PM

Mar 5 2018

majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
Mar 5 2018, 10:21 PM

Feb 25 2018

majnemer added inline comments to D43746: [WebAssembly] Add Wasm exception handling prepare pass.
Feb 25 2018, 8:07 PM

Feb 22 2018

majnemer added a comment to D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid).

Do we need to also track whether the argument is a pointer or reference to a UUID (and also the cv-qualifiers)? For the Declaration case, we track this by tracking the corresponding parameter type; the same thing would presumably work here.

We should really, really avoid making this sort of change without first trying to desugar uuidof into a reference to a variable. That would solve a ton of problems, problems like this one.

This desugaring approach is not how we generally do things in Clang. The fact that MS exposes a variable that can be named from user code is, in my opinion, simply a bug in their implementation -- their implementation details are leaking -- and not part of the actual semantics here. I view this as exactly analogous to typeid (which would have exactly the same problems if its result could be used as a non-type template parameter); as with typeid, __uuidof notionally produces a global object not corresponding to any variable. If we want to model this as a declaration, we could add a new Decl subclass for these uuid objects (and eventually also for objects produced by typeid). But I don't think we should model them as variables unless that's actually part of their intended semantics.

Feb 22 2018, 2:53 PM
majnemer added a comment to D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid).

We should really, really avoid making this sort of change without first trying to desugar uuidof into a reference to a variable. That would solve a ton of problems, problems like this one.

Not sure I fully understand what you are proposing?

Are you proposing that generated symbols like this:
??4?$A@$E?_GUID_ddb47a6a_0f23_11d5_9109_00e0296b75d3@@3U__s_GUID@@B@@QEAAAEAV0@AEBV0@@Z
Be de-sugared? Wouldn't that be different that what MS is doing?
Can you please give me more details about what you are thinking of?
Thanks.

Feb 22 2018, 2:04 PM
majnemer added inline comments to D43639: [llvm-pdbdump] Dump restrict type qualifier.
Feb 22 2018, 1:13 PM
majnemer added a comment to D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid).

We should really, really avoid making this sort of change without first trying to desugar uuidof into a reference to a variable. That would solve a ton of problems, problems like this one.

Feb 22 2018, 11:34 AM
majnemer updated subscribers of D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid).
Feb 22 2018, 11:29 AM

Feb 16 2018

majnemer added inline comments to D42926: [CodeView] Initial support for emitting S_BLOCK32 symbols for lexical scopes.
Feb 16 2018, 9:18 AM

Feb 12 2018

majnemer accepted D42833: [LICM] update BlockColors after splitting predecessors.

LGTM

Feb 12 2018, 8:23 AM
majnemer added a comment to D43184: [WIP] [ItaniunCXXABI] Add an option for loading the type info vtable with dllimport.

Do I understand correctly that this workarounds a feature missing in lld? Does MinGW emit the same sorts of object files as clang in these scenarios?

Feb 12 2018, 8:20 AM

Feb 8 2018

majnemer accepted D43052: [ValueTracking] don't crash when assumptions conflict (PR36270).

LGTM

Feb 8 2018, 1:11 AM

Feb 7 2018

majnemer accepted D43033: [WinEH] Put funclet bundles on inline asm calls.

LGTM

Feb 7 2018, 11:43 PM

Feb 5 2018

majnemer added a comment to D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF.

docs/LanguageExtensions.html should be updated to mention that we support this extension on all ELF targets.

Feb 5 2018, 10:15 AM

Feb 3 2018

majnemer added inline comments to D42833: [LICM] update BlockColors after splitting predecessors.
Feb 3 2018, 12:44 AM

Feb 2 2018

majnemer added inline comments to D42833: [LICM] update BlockColors after splitting predecessors.
Feb 2 2018, 2:41 PM

Jan 29 2018

majnemer added inline comments to D42641: [MinGW] Emit typeinfo locally for dllimported classes without key functions.
Jan 29 2018, 8:53 AM

Jan 25 2018

majnemer accepted D42508: AST: support protocol conformances on id/class/interfaces in MS ABI.

LGTM

Jan 25 2018, 4:15 PM
majnemer accepted D42248: Always allow "#pragma region"..

LGTM

Jan 25 2018, 10:13 AM

Jan 24 2018

majnemer added inline comments to D42508: AST: support protocol conformances on id/class/interfaces in MS ABI.
Jan 24 2018, 4:20 PM

Jan 23 2018

majnemer added inline comments to D42441: IRGen: Emit an inline implementation of __builtin_wmemcmp on MSVCRT platforms..
Jan 23 2018, 4:43 PM
majnemer added inline comments to D42434: [SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it.
Jan 23 2018, 11:28 AM

Jan 20 2018

majnemer added inline comments to D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object..
Jan 20 2018, 7:53 PM

Jan 19 2018

majnemer added inline comments to D41427: [SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it.
Jan 19 2018, 4:55 PM

Jan 18 2018

majnemer added a comment to D42248: Always allow "#pragma region"..

Why not always support the pragma regardless of the compiler mode? Our "support" for it just ignores it anyway...

Jan 18 2018, 10:38 AM

Jan 17 2018

majnemer added inline comments to D42032: [LLVM][PASSES][InstCombine] Fix (a + a + ...) / a cases.
Jan 17 2018, 3:01 PM
majnemer added a comment to D37434: WinEH for unnamed functions.
In D37434#978881, @rnk wrote:

The same logic would need to be applied to the X86ISelLowering call site of MCContext::getOrCreateParentFrameOffsetSymbol. I think it would be preferable to manually number and provide names for nameless functions that use funclet personalities in WinEHPrepare.

Jan 17 2018, 10:38 AM

Jan 4 2018

majnemer added inline comments to D41723: Introduce the "retpoline" x86 mitigation technique for variant #2 of the speculative execution vulnerabilities disclosed today, specifically identified by CVE-2017-5715, "Branch Target Injection", and is one of the two halves to Spectre...
Jan 4 2018, 10:35 AM
majnemer added inline comments to D41723: Introduce the "retpoline" x86 mitigation technique for variant #2 of the speculative execution vulnerabilities disclosed today, specifically identified by CVE-2017-5715, "Branch Target Injection", and is one of the two halves to Spectre...
Jan 4 2018, 10:07 AM

Dec 23 2017

majnemer added inline comments to D41554: [InstSimplify] Missed optimization in math expression: (x+x)/x == 2.
Dec 23 2017, 7:15 PM

Dec 12 2017

majnemer added inline comments to D41032: [CodeGen][X86] Implement _InterlockedCompareExchange128 intrinsic.
Dec 12 2017, 3:48 PM

Dec 5 2017

majnemer added a comment to D40861: [X86] Add support for stack probing on x86_64 Darwin.

I'm a little confused here, is the intent that this will be the default on the platform? If not, can you explain the functional difference between this and just using the "probe-stack" attribute with ___chkstk_darwin?

Dec 5 2017, 3:04 PM
majnemer added inline comments to D40842: [ObjectYAML] Update obj2yaml and yaml2obj for .debug$H section.
Dec 5 2017, 2:52 PM

Dec 4 2017

majnemer added inline comments to D40071: [libcxx] Implement exception_ptr on Windows without msvcprt.dll.
Dec 4 2017, 2:36 PM

Nov 27 2017

majnemer added a comment to D39610: instantiation of uuid with dllexport..
In D39610#936994, @rnk wrote:

I'm not sure the fix is correct, and this seems like a symptom of a deeper problem which is that __uuidof really gives you the name of a compiler-internal global variable, and we should probably model it that way (maybe with sugar).

Nov 27 2017, 3:49 PM

Nov 23 2017

majnemer added inline comments to D40404: [APInt] Don't print debug messages from the APInt knuth division algorithm by default.
Nov 23 2017, 9:56 PM
majnemer accepted D40404: [APInt] Don't print debug messages from the APInt knuth division algorithm by default.

LGTM, this had bugged me too.

Nov 23 2017, 9:55 PM
majnemer added a comment to D40023: [RISCV] Implement ABI lowering.
In D40023#933466, @asb wrote:

So how does something like the following work:

union U { float f; int i; };
void f(union U u);

The flattening described in https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#hardware-floating-point-calling-convention makes sense for arrays and structs but I couldn't find where unions were described.

You're right that's not currently described - I have an issue tracking this here: https://github.com/riscv/riscv-elf-psabi-doc/issues/24. Last time I tried to check gcc behaviour it seemed that such cases would be passed according to the integer calling convention, but I'd be happier if one of the GCC devs would confirm.

Nov 23 2017, 12:57 AM
majnemer added a comment to D40023: [RISCV] Implement ABI lowering.

So how does something like the following work:

union U { float f; int i; };
void f(union U u);
Nov 23 2017, 12:27 AM

Nov 19 2017

majnemer added a comment to D40218: [Clang] Add __builtin_launder.

A test with restrict and __restrict might be interesting.

Nov 19 2017, 12:21 PM

Nov 14 2017

majnemer added inline comments to D39958: [InstCombine] Make foldSelectOpOp able to handle two-operand getelementptr.
Nov 14 2017, 8:41 PM
majnemer accepted D39999: [InstCombine] Simplify binops that are only used by a select and are fed by a select with the same condition..

LGTM

Nov 14 2017, 8:39 PM
majnemer added a comment to D39347: Fix __has_unique_object_representations based on rsmith's input.

It'd be good to have tests which have alignment directives on bitfields.

Nov 14 2017, 11:59 AM

Nov 13 2017

majnemer added inline comments to D39958: [InstCombine] Make foldSelectOpOp able to handle two-operand getelementptr.
Nov 13 2017, 9:14 AM

Oct 26 2017

majnemer added inline comments to D39063: Fix for PR32990..
Oct 26 2017, 2:23 PM

Oct 25 2017

majnemer added inline comments to D38313: [InstCombine] Introducing Aggressive Instruction Combine pass.
Oct 25 2017, 7:54 AM

Oct 23 2017

majnemer accepted D38704: [libunwind] Abstract rwlocks into a class, provide a SRW lock implementation for windows.

LGTM

Oct 23 2017, 9:46 AM

Oct 14 2017

majnemer added a comment to D38704: [libunwind] Abstract rwlocks into a class, provide a SRW lock implementation for windows.

I don't think we should depend on LLVM for the locking stuff. This sort of infrastructure is in the same bucket as the demangler which we haven't really solved.

Oct 14 2017, 9:32 PM

Oct 12 2017

majnemer added inline comments to D38856: [IPSCCP] Remove calls without side effects.
Oct 12 2017, 9:51 PM

Oct 11 2017

majnemer accepted D38776: [codeview] Implement FPO data assembler directives.

LGTM

Oct 11 2017, 12:32 PM
majnemer added inline comments to D38776: [codeview] Implement FPO data assembler directives.
Oct 11 2017, 10:55 AM
majnemer added a comment to D38776: [codeview] Implement FPO data assembler directives.
In D38776#894832, @rnk wrote:

I'd also be interested in seeing a stack frame with spills and stack realignment.

I'll do that, but it's not very interesting because we basically use a normal EBP-based prologue before AND-ing the stack pointer and optionally copying it to ESI. As far as the unwinder is concerned, it's pretty boring.

Oct 11 2017, 10:09 AM

Oct 10 2017

majnemer added a comment to D38776: [codeview] Implement FPO data assembler directives.

I'd also be interested in seeing a stack frame with spills and stack realignment.

Oct 10 2017, 9:35 PM
majnemer added a comment to D38776: [codeview] Implement FPO data assembler directives.

It'd also be nice to have a test showing how it interacts with stack cookies.

Oct 10 2017, 9:10 PM
majnemer added a comment to D38776: [codeview] Implement FPO data assembler directives.

Cool! I've always wondered if we'd end up with an implementation of this :)

Oct 10 2017, 8:05 PM

Oct 9 2017

majnemer added inline comments to D38656: [CGExprScalar] In EmitCompare trunc the result if it has different type as E->getType().
Oct 9 2017, 9:23 AM

Oct 8 2017

majnemer added a reviewer for D38677: [ConstantFold] Fix a crash when folding a GEP that has vector index: davide.
Oct 8 2017, 3:16 PM
majnemer added inline comments to D38677: [ConstantFold] Fix a crash when folding a GEP that has vector index.
Oct 8 2017, 3:16 PM

Oct 5 2017

majnemer added inline comments to D38605: [MC] Move .seh_ directive implementation to MCObjectStreamer.
Oct 5 2017, 6:13 PM

Sep 30 2017

majnemer accepted D38440: [InstCombine] Use APInt for all the math in foldICmpDivConstant.

LGTM

Sep 30 2017, 11:43 PM
majnemer added inline comments to D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file,function}-list=<arg1,arg2,...> to match gcc options..
Sep 30 2017, 7:58 PM
majnemer added inline comments to D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file,function}-list=<arg1,arg2,...> to match gcc options..
Sep 30 2017, 5:44 PM
majnemer added inline comments to D38440: [InstCombine] Use APInt for all the math in foldICmpDivConstant.
Sep 30 2017, 4:05 PM

Sep 27 2017

majnemer accepted D38263: [InstCombine] Gating select arithmetic optimization.

LGTM

Sep 27 2017, 9:30 AM

Sep 26 2017

majnemer added a comment to D34335: Fix invalid ptrtoint in InstCombine.

Your code has no comments. At a glance, I have no idea what it is trying to accomplish.

Sep 26 2017, 8:24 PM
majnemer added inline comments to D34335: Fix invalid ptrtoint in InstCombine.
Sep 26 2017, 8:22 PM

Sep 25 2017

majnemer accepted D38006: [InstCombine] remove extract-of-select vector transform.

LGTM

Sep 25 2017, 9:23 AM