majnemer (David Majnemer)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 15 2013, 2:02 AM (292 w, 3 d)

Recent Activity

Mon, Nov 12

majnemer added inline comments to D53877: [IR] Strawman for dedicated FNeg IR instruction.
Mon, Nov 12, 8:37 AM

Wed, Oct 31

majnemer added inline comments to D53540: [COFF, ARM64] Implement support for SEH extensions __try/__except/__finally.
Wed, Oct 31, 1:06 PM

Oct 8 2018

majnemer added inline comments to D53000: [Support] exit with custom return code for SIGPIPE.
Oct 8 2018, 3:59 PM

Sep 27 2018

majnemer added inline comments to D52384: [Sema] Fix redeclaration contexts for enumerators in C.
Sep 27 2018, 10:53 PM

Sep 25 2018

majnemer accepted D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074).

FWIW, Microsoft's newest documentation does not say that /O2 and /O1 imply /Gs: https://docs.microsoft.com/en-us/cpp/build/reference/o1-o2-minimize-size-maximize-speed?view=vs-2017

Sep 25 2018, 11:19 AM

Sep 24 2018

majnemer added inline comments to D51524: [ARM64] [Windows] Handle funclets.
Sep 24 2018, 11:50 PM
majnemer added inline comments to D51524: [ARM64] [Windows] Handle funclets.
Sep 24 2018, 8:04 PM
majnemer added inline comments to D51524: [ARM64] [Windows] Handle funclets.
Sep 24 2018, 5:12 PM

Sep 7 2018

majnemer accepted D51820: [COFF] Implement llvm.global_ctors priorities for MSVC COFF targets.

LGTM

Sep 7 2018, 3:49 PM

Aug 22 2018

majnemer accepted D51149: MC: Don't align COFF section contents..

LGTM

Aug 22 2018, 10:10 PM

Aug 16 2018

majnemer added a comment to D50877: [MS] Mangle a hash of the main file path into anonymous namespaces.

How does MSVC handle this case? What mangled name does it generate?

Aug 16 2018, 5:27 PM

Aug 15 2018

majnemer accepted D50806: [MS Demangler] Demangle string literals.

LGTM

Aug 15 2018, 2:25 PM

Aug 7 2018

majnemer added inline comments to D50394: [MS Demangler] Properly handle backreferences of special names.
Aug 7 2018, 10:33 AM
majnemer accepted D50394: [MS Demangler] Properly handle backreferences of special names.

LGTM

Aug 7 2018, 10:33 AM

Aug 5 2018

majnemer added inline comments to D50222: [CodeGen] [SelectionDAG] More efficient code for X % C == 0 (UREM case).
Aug 5 2018, 2:39 PM

Aug 4 2018

majnemer added inline comments to D50222: [CodeGen] [SelectionDAG] More efficient code for X % C == 0 (UREM case).
Aug 4 2018, 10:35 PM

Aug 1 2018

majnemer accepted D50145: [MS Demangler] Demangle templated operator overloads.

LGTM

Aug 1 2018, 11:18 AM

Jul 29 2018

majnemer added inline comments to D49965: [MS Demangler] Demangle symbols in function local scopes.
Jul 29 2018, 7:32 PM
majnemer added a comment to D49965: [MS Demangler] Demangle symbols in function local scopes.

I had thought of a tryDemangleNumber function but it didn’t really fit the
style of code . (Ie I don’t really do that anywhere else so it felt a
little out of place). I can still do that if you think it’s better, I don’t
have a strong preference

Jul 29 2018, 6:09 PM
majnemer accepted D49965: [MS Demangler] Demangle symbols in function local scopes.
Jul 29 2018, 6:09 PM
majnemer added inline comments to D49965: [MS Demangler] Demangle symbols in function local scopes.
Jul 29 2018, 2:33 PM

Jul 25 2018

majnemer added inline comments to D49821: [MC] Add support for the .rva assembler directive for COFF targets.
Jul 25 2018, 2:50 PM

Jul 23 2018

majnemer added inline comments to D49644: [COFF] Hoist constant pool handling from X86AsmPrinter into AsmPrinter.
Jul 23 2018, 12:29 PM

Jul 22 2018

majnemer accepted D49644: [COFF] Hoist constant pool handling from X86AsmPrinter into AsmPrinter.

LGTM

Jul 22 2018, 12:24 PM

Jul 21 2018

majnemer added inline comments to D49630: [MS Demangler] Demangle data member pointers.
Jul 21 2018, 10:49 PM

Jul 19 2018

majnemer accepted D49552: Add a Microsoft Demangler library and utility..

I'm worried about some extreme template stuff (function templates are not considered for back-referencing but other templates and normal functions are OK) but you are gonna work thru the rest of mangle-ms-* so you'll get there ;)

Jul 19 2018, 8:21 PM
majnemer added inline comments to D49552: Add a Microsoft Demangler library and utility..
Jul 19 2018, 9:30 AM

Jul 15 2018

majnemer accepted D49354: [MinGW] Automatically mangle Windows-specific entry points as C.

LGTM

Jul 15 2018, 5:03 PM

Jul 3 2018

majnemer added inline comments to D48841: Add support for __declspec(code_seg("segname")).
Jul 3 2018, 3:46 PM

Jun 8 2018

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

LGTM

Jun 8 2018, 4:36 PM

Jun 7 2018

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

May 31 2018

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

LGTM

May 31 2018, 4:59 PM

May 22 2018

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

May 21 2018

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

LGTM

May 21 2018, 8:35 AM

May 20 2018

majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
May 20 2018, 10:38 PM
majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
May 20 2018, 10:22 PM
majnemer added inline comments to D44134: [WebAssembly] Add WebAssemblyException information analysis.
May 20 2018, 12:00 PM
majnemer added inline comments to D44931: [WebAssembly] Use Windows EH instructions for Wasm EH.
May 20 2018, 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