mgrang (Mandeep Singh Grang)
http://livgently.com

Projects

User does not belong to any projects.

User Details

User Since
Jan 28 2015, 2:26 PM (133 w, 3 d)

Recent Activity

Thu, Aug 17

mgrang abandoned D36846: [polly] Define PointerLikeTypeTraits as struct in response to related llvm change.

I see this has already been done in https://reviews.llvm.org/rL310667. My sources seem to have been outdated. Abandoning this one.

Thu, Aug 17, 1:39 PM
mgrang created D36846: [polly] Define PointerLikeTypeTraits as struct in response to related llvm change.
Thu, Aug 17, 1:26 PM
mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.

Adopted @dblaikie 's changes for pointer-like traits.

Thu, Aug 17, 1:23 PM
mgrang updated the diff for D36386: [clang] Remove unit test which uses reverse-iterate flag.
Thu, Aug 17, 1:23 PM

Sat, Aug 12

mgrang added a comment to D35043: [ADT] Enable reverse iteration for DenseMap.

Probably a layering violation to include this here. Also seems like a narrow solution - would require more special casing here for other types that are like these two whenever they might get used in a map eventually, etc.

Yes, this is true. But I cannot think of a way of overcoming this.

Sat, Aug 12, 1:15 PM
mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.

Addressed comments in the unit test.
Moved unittests/ADT/ReverseIteration.cpp to unittests/Support/ReverseIteration.cpp.

Sat, Aug 12, 1:09 PM

Wed, Aug 9

mgrang committed rL310502: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.
[COFF, ARM64] Add MS builtins __dmb, __dsb, __isb
Wed, Aug 9, 10:59 AM
mgrang closed D36110: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb by committing rL310502: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.
Wed, Aug 9, 10:59 AM
mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.

Addressed comments.
Checked if type is pointer-like without adding a new trait. Instead used PointerLikeTypeTraits::NumLowBitsAvailable.

Wed, Aug 9, 1:40 AM

Mon, Aug 7

mgrang added a comment to D36386: [clang] Remove unit test which uses reverse-iterate flag.

This patch does 3 things:

Mon, Aug 7, 12:08 PM
mgrang added a comment to D36105: [AArch64] Ignore stdcall and similar on aarch64/windows.

Ping @mgrang, can you check the above with MSVC? I'd like to move forward with this in one form or another.

Mon, Aug 7, 11:42 AM

Sun, Aug 6

mgrang added a comment to D35043: [ADT] Enable reverse iteration for DenseMap.

We removed -reverse-iterate flag and the base definition for PointerLikeTypeTraits here, we need https://reviews.llvm.org/D36386
which removes clang unit test which used -reverse-iterate and marks member functions of PointerLikeTypeTraits
as public to get past a compilation error.

Sun, Aug 6, 10:43 PM
mgrang created D36386: [clang] Remove unit test which uses reverse-iterate flag.
Sun, Aug 6, 10:39 PM
mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.
Sun, Aug 6, 10:26 PM
mgrang added inline comments to D35043: [ADT] Enable reverse iteration for DenseMap.
Sun, Aug 6, 11:52 AM
mgrang added inline comments to D35043: [ADT] Enable reverse iteration for DenseMap.
Sun, Aug 6, 2:16 AM
mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.
Sun, Aug 6, 2:11 AM
mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.

Addressed comments.

Sun, Aug 6, 2:09 AM
mgrang accepted D36363: [test] Remove an unintentional -x cl flag in an aarch64-windows test.

LGTM.

Sun, Aug 6, 12:03 AM

Wed, Aug 2

mgrang accepted D36203: [zorg] Add buildbot with reverse iteration enabled.
Wed, Aug 2, 12:26 PM

Tue, Aug 1

mgrang added a comment to D36203: [zorg] Add buildbot with reverse iteration enabled.

LGTM. However, I would wait for someone more aware of buildbots to +1 this.

Tue, Aug 1, 6:22 PM
mgrang added a comment to D36203: [zorg] Add buildbot with reverse iteration enabled.

Added Victor Leschuk as reviewer since Galina is on vacation.

Tue, Aug 1, 6:22 PM
mgrang added a reviewer for D36203: [zorg] Add buildbot with reverse iteration enabled: vleschuk.
Tue, Aug 1, 6:21 PM
mgrang accepted D35919: [AArch64] Rewrite stack frame handling for win64 vararg functions.

LGTM.

Tue, Aug 1, 11:58 AM
mgrang added a comment to D35919: [AArch64] Rewrite stack frame handling for win64 vararg functions.

@mgrang does this version fix all your issues with vararg functions, or are there still issues that can be traced back to this? With this in place, all of the test code I've tried to build seems to work. (Also, have you tried using lld-link for linking? It seems complete enough for coff/arm64 for me now.)

Ping @mgrang - did this solve your issues with vararg functions, or is there still some case that I've missed?

Tue, Aug 1, 11:58 AM

Mon, Jul 31

mgrang added a comment to D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.

@mstorsjo I see that spec2000/eon calls __getReg, _ReadStatusReg and _WriteStatusReg intrinsics for ARM64. I think I would need to implement them in llvm. Do you know where can I find a doc explaining their behavior?

Mon, Jul 31, 5:32 PM
mgrang added inline comments to D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.
Mon, Jul 31, 2:04 PM
mgrang added inline comments to D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.
Mon, Jul 31, 1:48 PM
mgrang added a comment to D36110: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.

Related clang patch: https://reviews.llvm.org/D36111

Mon, Jul 31, 1:30 PM
mgrang added a comment to D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.

Related llvm patch: https://reviews.llvm.org/D36110

Mon, Jul 31, 1:29 PM
mgrang created D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.
Mon, Jul 31, 1:28 PM
mgrang created D36110: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb.
Mon, Jul 31, 1:27 PM
mgrang accepted D36098: [AArch64] Don't define __LP64__ when targeting Windows.

LGTM.

Mon, Jul 31, 12:25 PM

Sun, Jul 30

mgrang added inline comments to D35043: [ADT] Enable reverse iteration for DenseMap.
Sun, Jul 30, 7:18 PM
mgrang added a comment to D35043: [ADT] Enable reverse iteration for DenseMap.

I still wonder if it'd be better if this was not mutable - a compile time constant, this would also potentially remove the need for all the preprocessor work. It could rely on the reverse iteration being a constant (not a command line arg, or mutable internally) and rely on the compiler doing dead code elimination to remove the unnecessary code instead of #if.

Sun, Jul 30, 7:14 PM
mgrang added a comment to D35043: [ADT] Enable reverse iteration for DenseMap.

Was it not possible to use something more like what I'd suggested - that would've worked (I think) with PointerLikeTypeTraits? Or did that not seem to work out?

Sounded like Richard had an idea of how to do it even more simply than my suggestion, maybe... (if we removed the base definition of PointerLikeTypeTraits & were able to test on the completeness of the class, rather than checking for the specific member as I'd done)

Sun, Jul 30, 7:06 PM
mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.

Addressed comments.

Sun, Jul 30, 6:58 PM
mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.

Addressed comments.

Sun, Jul 30, 12:07 AM

Fri, Jul 28

mgrang added a comment to D35919: [AArch64] Rewrite stack frame handling for win64 vararg functions.

@mstorsjo Could you please add me as subscriber to your COFF ARM64 patches? We are trying to build spec2k/spec2k6 for COFF and running into issues with vararg functions. Some of your patches have fixed our issues :)

Fri, Jul 28, 11:46 AM

Thu, Jul 27

mgrang accepted D35934: [Headers] Add a test for arm64intr.h.

LGTM.

Thu, Jul 27, 11:10 AM

Tue, Jul 25

mgrang committed rL309081: [clang] Add ARM64 support to armintr.h for MSVC compatibility.
[clang] Add ARM64 support to armintr.h for MSVC compatibility
Tue, Jul 25, 10:31 PM
mgrang closed D35862: [clang] Add ARM64 support to armintr.h for MSVC compatibility by committing rL309081: [clang] Add ARM64 support to armintr.h for MSVC compatibility.
Tue, Jul 25, 10:31 PM
mgrang updated the diff for D35862: [clang] Add ARM64 support to armintr.h for MSVC compatibility.
Tue, Jul 25, 9:21 PM
mgrang added a comment to D35862: [clang] Add ARM64 support to armintr.h for MSVC compatibility.

Patch updated as per comments.

Tue, Jul 25, 9:21 PM
mgrang committed rL309049: [clang] Add abi-breaking-checks support to clang.
[clang] Add abi-breaking-checks support to clang
Tue, Jul 25, 4:00 PM
mgrang closed D35426: [clang] Add abi-breaking-checks support to clang by committing rL309049: [clang] Add abi-breaking-checks support to clang.
Tue, Jul 25, 4:00 PM
mgrang added a comment to D35862: [clang] Add ARM64 support to armintr.h for MSVC compatibility.

Refer http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053c/IHI0053C_acle_2_0.pdf for memory barriers.

Tue, Jul 25, 4:00 PM
mgrang created D35862: [clang] Add ARM64 support to armintr.h for MSVC compatibility.
Tue, Jul 25, 3:55 PM
mgrang added a comment to D35791: [COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations.

I was able to build the entire spec2000 suite with this patch. So looks fine to me.

Tue, Jul 25, 1:03 PM

Mon, Jul 24

mgrang added a comment to D35791: [COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations.

LGTM. We recently encountered the "fixup out of range" for temporary symbols. We worked around this by turning off temporary symbols for COFF. Thanks for fixing this!

Mon, Jul 24, 1:01 PM
mgrang added a comment to D35426: [clang] Add abi-breaking-checks support to clang.

Ping 2 for reviews please!

Mon, Jul 24, 1:01 PM

Jul 20 2017

mgrang committed rL308665: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF.
[COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF
Jul 20 2017, 1:20 PM
mgrang closed D35518: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF by committing rL308665: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF.
Jul 20 2017, 1:20 PM
mgrang updated the diff for D35518: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF.

Reverted the change in AsmPrinter.cpp.

Jul 20 2017, 12:48 PM
mgrang added a comment to D35426: [clang] Add abi-breaking-checks support to clang.

Ping for reviews please.

Jul 20 2017, 10:41 AM

Jul 18 2017

mgrang abandoned D35529: [COFF, ARM64] Make +reserve-x18 the default.
Jul 18 2017, 1:43 PM
mgrang committed rL308358: [COFF, ARM64] Reserve X18 register by default.
[COFF, ARM64] Reserve X18 register by default
Jul 18 2017, 1:42 PM
mgrang closed D35531: [COFF, ARM64] Reserve X18 register by default by committing rL308358: [COFF, ARM64] Reserve X18 register by default.
Jul 18 2017, 1:42 PM
mgrang updated the diff for D35531: [COFF, ARM64] Reserve X18 register by default.

Removed isOSBinFormatCOFF().
Removed extra check label CHECK-RESERVE-X18-COFF.

Jul 18 2017, 12:45 PM
mgrang added inline comments to D35518: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF.
Jul 18 2017, 11:07 AM
mgrang added inline comments to D35531: [COFF, ARM64] Reserve X18 register by default.
Jul 18 2017, 11:06 AM
mgrang added inline comments to D35544: [AArch64] Force relocations for all ADRP instructions.
Jul 18 2017, 11:01 AM
mgrang added a comment to D35529: [COFF, ARM64] Make +reserve-x18 the default.

I pushed a new patch D35531. This implements the logic in llvm AArch64SubTarget which seems to be the proper place to do this.
Once that patch is reviewed/accepted, I will abandon this one.

Jul 18 2017, 12:36 AM
mgrang created D35531: [COFF, ARM64] Reserve X18 register by default.
Jul 18 2017, 12:34 AM
mgrang added a comment to D35529: [COFF, ARM64] Make +reserve-x18 the default.

Wouldn't it make more sense to set this by default within LLVM, where it's already enabled by default for darwin?

Currently there's this code there:

AArch64Subtarget::AArch64Subtarget(const Triple &TT, const std::string &CPU,
                                   const std::string &FS,
                                   const TargetMachine &TM, bool LittleEndian)
    : AArch64GenSubtargetInfo(TT, CPU, FS), ReserveX18(TT.isOSDarwin()),
Jul 18 2017, 12:05 AM

Jul 17 2017

mgrang created D35529: [COFF, ARM64] Make +reserve-x18 the default.
Jul 17 2017, 6:57 PM
mgrang added a comment to D35518: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF.

>> The old way of doing this supported emitting both dwarf and CV, which we briefly considered to be interesting. There isn't any real use case for it, but I think I'd prefer it if these things were independent. We shouldn't have a dwarf version flag if the frontend wants us to emit codeview.

Jul 17 2017, 6:27 PM
mgrang updated the diff for D35518: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF.

Addressed comment.

Jul 17 2017, 4:43 PM
mgrang added a comment to D35518: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF.

I have a related question: Does it make sense to make -gcodeview the default for Windows COFF targets (both arm/arm64)? ie: clang would internally add -gcodeview if -g is passed.

Jul 17 2017, 4:37 PM
mgrang created D35518: [COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF.
Jul 17 2017, 4:34 PM
mgrang closed D34858: [COFF, ARM64] Correct the data layout string for COFF ARM64 target.
Jul 17 2017, 2:29 PM
mgrang added a comment to D34858: [COFF, ARM64] Correct the data layout string for COFF ARM64 target.

Committed here: https://reviews.llvm.org/rL308223

Jul 17 2017, 2:28 PM
mgrang committed rL308223: [COFF, ARM64] Correct the data layout string for COFF ARM64 target.
[COFF, ARM64] Correct the data layout string for COFF ARM64 target
Jul 17 2017, 2:26 PM
mgrang committed rL308222: [COFF, ARM64] Set the data type widths and the data layout string.
[COFF, ARM64] Set the data type widths and the data layout string
Jul 17 2017, 2:11 PM
mgrang closed D34859: [COFF, ARM64] Set the data type widths and the data layout string by committing rL308222: [COFF, ARM64] Set the data type widths and the data layout string.
Jul 17 2017, 2:11 PM
mgrang updated the diff for D34859: [COFF, ARM64] Set the data type widths and the data layout string.
Jul 17 2017, 1:07 PM
mgrang committed rL308193: [llvm] Remove redundant check-prefix=CHECK from tests. NFC..
[llvm] Remove redundant check-prefix=CHECK from tests. NFC.
Jul 17 2017, 10:33 AM
mgrang closed D35466: [llvm] Remove redundant check-prefix=CHECK from tests. NFC. by committing rL308193: [llvm] Remove redundant check-prefix=CHECK from tests. NFC..
Jul 17 2017, 10:33 AM
mgrang committed rL308192: [clang] Remove redundant check-prefix=CHECK from tests. NFC..
[clang] Remove redundant check-prefix=CHECK from tests. NFC.
Jul 17 2017, 10:32 AM
mgrang closed D35465: [clang] Remove redundant check-prefix=CHECK from tests. NFC. by committing rL308192: [clang] Remove redundant check-prefix=CHECK from tests. NFC..
Jul 17 2017, 10:32 AM

Jul 16 2017

mgrang created D35469: [AArch64] Make "Unkown Fixup" error msg more useful by giving Fixup Kind Name.
Jul 16 2017, 6:40 PM
mgrang added a dependent revision for D34859: [COFF, ARM64] Set the data type widths and the data layout string: D34858: [COFF, ARM64] Correct the data layout string for COFF ARM64 target.
Jul 16 2017, 5:07 PM
mgrang added a dependency for D34858: [COFF, ARM64] Correct the data layout string for COFF ARM64 target: D34859: [COFF, ARM64] Set the data type widths and the data layout string.
Jul 16 2017, 5:07 PM
mgrang committed rL308154: [COFF, ARM64] Add initial relocation types.
[COFF, ARM64] Add initial relocation types
Jul 16 2017, 5:06 PM
mgrang closed D34857: [COFF, ARM64] Add initial relocation types by committing rL308154: [COFF, ARM64] Add initial relocation types.
Jul 16 2017, 5:05 PM
mgrang added a comment to D34857: [COFF, ARM64] Add initial relocation types.

I have addressed comments, and my previous patch was accepted by @compnerd. So unless someone has any more comments I will go ahead and commit this.

Jul 16 2017, 5:01 PM
mgrang updated the diff for D34857: [COFF, ARM64] Add initial relocation types.

Addressed comments.

Jul 16 2017, 4:58 PM
mgrang created D35466: [llvm] Remove redundant check-prefix=CHECK from tests. NFC..
Jul 16 2017, 4:44 PM
mgrang created D35465: [clang] Remove redundant check-prefix=CHECK from tests. NFC..
Jul 16 2017, 4:20 PM
mgrang updated the diff for D34858: [COFF, ARM64] Correct the data layout string for COFF ARM64 target.

Matched the data layout string to the one in D34859

Jul 16 2017, 11:10 AM
mgrang updated the diff for D34859: [COFF, ARM64] Set the data type widths and the data layout string.

Fixed typo.
Added size for long double.
Added test cases.

Jul 16 2017, 11:06 AM
mgrang added a comment to D34857: [COFF, ARM64] Add initial relocation types.

I see that IMAGE_REL_ARM64_SECTION is generated only on Windows with dumpbin (and not on Linux with llvm-objdump). Does it make sense to limit this unit test only for Windows?

I'd rather have a look at llvm-objdump and see if it can easily be fixed to show what you want.

Unit tests for IMAGE_REL_ARM64_PAGEOFFSET_12A and IMAGE_REL_ARM64_PAGEOFFSET_12L not added as llvm-mc currently cannot parse the assembly for these. Here is my code for the above two relocations:

adrp x0, foo
add x0, x0, foo

The correct syntax that llvm-mc should accept is this:

add x0, x0, :lo12:foo

IIRC this should also work with ldr/str:

ldr x0, [x0, :lo12:foo]
Jul 16 2017, 10:19 AM
mgrang updated the diff for D34857: [COFF, ARM64] Add initial relocation types.

Added test cases for all the implemented relocation types.

Jul 16 2017, 10:17 AM
mgrang updated the diff for D34857: [COFF, ARM64] Add initial relocation types.

Changed unit test to .s according to comments.
Unit tests for IMAGE_REL_ARM64_PAGEOFFSET_12A and IMAGE_REL_ARM64_PAGEOFFSET_12L not added as llvm-mc currently cannot parse the assembly for these. Here is my code for the above two relocations:

Jul 16 2017, 12:07 AM

Jul 15 2017

mgrang added a comment to D34857: [COFF, ARM64] Add initial relocation types.

@rnk Got it! Thanks. Will push an updated patch.

Jul 15 2017, 3:12 PM
mgrang updated the diff for D34857: [COFF, ARM64] Add initial relocation types.

Added more relocations.
Could not find a test case for IMAGE_REL_ARM64_ADDR32NB.
I see that IMAGE_REL_ARM64_SECTION is generated only on Windows with dumpbin (and not on Linux with llvm-objdump). Does it make sense to limit this unit test only for Windows?

Jul 15 2017, 2:46 PM

Jul 14 2017

mgrang updated the diff for D35043: [ADT] Enable reverse iteration for DenseMap.

Further cleaned up the code by moving the ReverseIteration code out of CommandLine.cpp and into its own class.
Added set/get functions instead of directly modifying the variable.

Jul 14 2017, 11:27 AM
mgrang added a comment to D35426: [clang] Add abi-breaking-checks support to clang.

The test clang/test/Rewriter/objc-modern-metadata-visibility2.mm is listed as UNSUPPORTED since the test contains REQUIRES:abi-breaking-checks but clang does not support this yet.

Jul 14 2017, 11:14 AM
mgrang created D35426: [clang] Add abi-breaking-checks support to clang.
Jul 14 2017, 11:12 AM

Jul 12 2017

mgrang added inline comments to D35043: [ADT] Enable reverse iteration for DenseMap.
Jul 12 2017, 1:27 PM