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 (149 w, 4 d)

Recent Activity

Thu, Dec 7

mgrang added a comment to D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.

@probinson and @echristo Thanks a lot for your review! I will go ahead and commit this.

Thu, Dec 7, 8:50 PM · debug-info
mgrang added a comment to D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.

@echristo does it make sense to emit aranges without the symbols being emitted yet?

Everything needs to be laid out already - so we have to basically be ready to emit asm before we can build the aranges table. Forward references are likely OK, but nothing can change any offsets. The way this is currently written also means that the order needs to be set before we can emit aranges too. I -think- that's the case, but verifying would be useful.

In retrospect, I think a lot of how we emit aranges can be better done. That said, I think using a stable_sort here isn't going to hurt anything.

@mgrang has a good point above that the "no order assigned" symbols also don't seem to be well defined. Hopefully there's only going to be one per section, but not necessarily and we don't verify that anywhere.

-eric

Thu, Dec 7, 9:32 AM · debug-info

Wed, Dec 6

mgrang added a comment to D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.

@echristo does it make sense to emit aranges without the symbols being emitted yet?

Wed, Dec 6, 11:01 AM · debug-info

Mon, Dec 4

mgrang added inline comments to D40808: [RISCV] Implement branch analysis.
Mon, Dec 4, 4:10 PM

Fri, Dec 1

mgrang added a comment to D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.

This seems to be the last outstanding issue uncovered by D39245. I have already fixed all the other failures. Getting this patch in would unblock me to get D39245 (and subsequent patches to convert std::sort to llvm::sort) merged. Could the reviewers please review this patch? Thanks!

Fri, Dec 1, 11:42 AM · debug-info

Thu, Nov 30

mgrang added inline comments to D39963: [RISCV][RFC] Add initial RISC-V target and driver support.
Thu, Nov 30, 8:12 AM

Wed, Nov 29

mgrang committed rC319357: [SourceLocations] Use stronger sort predicate to remove non-deterministic….
[SourceLocations] Use stronger sort predicate to remove non-deterministic…
Wed, Nov 29, 12:55 PM
mgrang committed rL319357: [SourceLocations] Use stronger sort predicate to remove non-deterministic….
[SourceLocations] Use stronger sort predicate to remove non-deterministic…
Wed, Nov 29, 12:55 PM
mgrang closed D40618: [SourceLocations] Use stronger sort predicate to remove non-deterministic ordering by committing rC319357: [SourceLocations] Use stronger sort predicate to remove non-deterministic….
Wed, Nov 29, 12:55 PM
mgrang closed D40618: [SourceLocations] Use stronger sort predicate to remove non-deterministic ordering by committing rL319357: [SourceLocations] Use stronger sort predicate to remove non-deterministic….
Wed, Nov 29, 12:55 PM
mgrang added inline comments to D40618: [SourceLocations] Use stronger sort predicate to remove non-deterministic ordering.
Wed, Nov 29, 12:02 PM
mgrang created D40618: [SourceLocations] Use stronger sort predicate to remove non-deterministic ordering.
Wed, Nov 29, 12:01 PM

Tue, Nov 28

mgrang added a comment to D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.

The results suggest a different problem. Emitting the aranges section should happen after the "kittens" and "rainbows" symbols are emitted. If the symbols were emitted, they should have nonzero and unique order. I don't see how shuffling the list can result in a different result for the aranges section.
Although MCStreamer::AssignFragment looks like it might be a victim of unspecified order-of-evaluation, still I would think the assigned orders remain nonzero and unique per symbol, and that's all that matters here.

Tue, Nov 28, 7:16 PM · debug-info
mgrang committed rL319223: [Hexagon] Use stable sort for HexagonShuffler to remove non-deterministic….
[Hexagon] Use stable sort for HexagonShuffler to remove non-deterministic…
Tue, Nov 28, 12:48 PM
mgrang closed D40227: [Hexagon] Use stable sort for HexagonShuffler to remove non-deterministic ordering by committing rL319223: [Hexagon] Use stable sort for HexagonShuffler to remove non-deterministic….
Tue, Nov 28, 12:48 PM
mgrang committed rL319222: [OpenMP] Stable sort Privates to remove non-deterministic ordering.
[OpenMP] Stable sort Privates to remove non-deterministic ordering
Tue, Nov 28, 12:41 PM
mgrang closed D39947: [OpenMP] Stable sort Privates to remove non-deterministic ordering by committing rL319222: [OpenMP] Stable sort Privates to remove non-deterministic ordering.
Tue, Nov 28, 12:41 PM · Restricted Project
mgrang committed rL319210: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic….
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic…
Tue, Nov 28, 11:56 AM
mgrang closed D40541: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering by committing rL319210: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic….
Tue, Nov 28, 11:56 AM

Mon, Nov 27

mgrang created D40541: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering.
Mon, Nov 27, 11:23 PM
mgrang added inline comments to D40512: [Debugify] Add a pass to test debug info preservation.
Mon, Nov 27, 4:10 PM · debug-info
mgrang added a comment to D40227: [Hexagon] Use stable sort for HexagonShuffler to remove non-deterministic ordering.

Ping for reviews please.

Mon, Nov 27, 10:52 AM

Tue, Nov 21

mgrang abandoned D40318: [RISCV] Define PendingArgFlags function in CallingConvLower.h.

This is fixed in D39898. Abandoning this.

Tue, Nov 21, 12:23 PM
mgrang added a comment to D39898: [RISCV] Add custom CC_RISCV calling convention and improved call support.
In D39898#932050, @asb wrote:

@mgrang: Apologies, that hunk was accidentally dropped when I refreshed the patch. Updated to include the CallingConvLower.h changes.

Tue, Nov 21, 12:22 PM
mgrang added inline comments to D39898: [RISCV] Add custom CC_RISCV calling convention and improved call support.
Tue, Nov 21, 12:22 PM
mgrang created D40318: [RISCV] Define PendingArgFlags function in CallingConvLower.h.
Tue, Nov 21, 12:15 PM
mgrang added inline comments to D39898: [RISCV] Add custom CC_RISCV calling convention and improved call support.
Tue, Nov 21, 11:54 AM
mgrang accepted D39849: [RISCV] Implement prolog and epilog insertion.

LGTM.

Tue, Nov 21, 10:57 AM
mgrang accepted D39898: [RISCV] Add custom CC_RISCV calling convention and improved call support.

LGTM.

Tue, Nov 21, 10:54 AM

Mon, Nov 20

mgrang added inline comments to D40023: [RISCV] Implement ABI lowering.
Mon, Nov 20, 5:02 PM
mgrang added inline comments to D39352: [SimplifyCFG] Don't do if-conversion if there is a long dependence chain.
Mon, Nov 20, 4:47 PM
mgrang added inline comments to D39898: [RISCV] Add custom CC_RISCV calling convention and improved call support.
Mon, Nov 20, 4:16 PM
mgrang committed rL318686: Revert "[SelectionDAG] Make sorting predicate stronger to remove non….
Revert "[SelectionDAG] Make sorting predicate stronger to remove non…
Mon, Nov 20, 11:17 AM
mgrang added a comment to D39947: [OpenMP] Stable sort Privates to remove non-deterministic ordering.

Ping for reviews please.

Mon, Nov 20, 10:56 AM · Restricted Project
mgrang added a comment to D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.

I am no longer able to reproduce this failure. Probably got fixed sometime last week. Maybe in D38830?

Mon, Nov 20, 10:56 AM · debug-info
mgrang committed rL318681: [AutoComplete] Use stronger sort predicate for autocomplete candidates to….
[AutoComplete] Use stronger sort predicate for autocomplete candidates to…
Mon, Nov 20, 10:50 AM
mgrang closed D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering by committing rL318681: [AutoComplete] Use stronger sort predicate for autocomplete candidates to….
Mon, Nov 20, 10:50 AM · Restricted Project
mgrang committed rL318680: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic….
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic…
Mon, Nov 20, 10:46 AM
mgrang closed D39995: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering by committing rL318680: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic….
Mon, Nov 20, 10:46 AM
mgrang added a comment to D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering.
In D40234#929943, @ruiu wrote:

Perhaps, this is a bit more straightforward.

if (int X = A.compare_lower(B))
  return X < 0;
return A.compare(B) < 0;
Mon, Nov 20, 12:10 AM · Restricted Project
mgrang updated the diff for D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering.
Mon, Nov 20, 12:10 AM · Restricted Project
mgrang updated the diff for D39995: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering.

Fixed another instance of non-deterministic ordering causing failure in CodeGen/X86/switch.ll.

Mon, Nov 20, 12:03 AM

Sun, Nov 19

mgrang updated the diff for D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering.

Added a stronger sorting predicate instead of stable sort.

Sun, Nov 19, 10:21 PM · Restricted Project
mgrang added a comment to D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering.
In D40234#929919, @ruiu wrote:

Maybe we should do case-insensitive string comparison first, and if two strings are considered the same, try again in case-sensitive manner? Otherwise, even though the output is now deterministic, the output order is still dependent on the order of input strings.

Sun, Nov 19, 10:21 PM · Restricted Project
mgrang added a comment to D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering.

This is the order of options observed when the candidates are randomly shuffled:

Sun, Nov 19, 9:13 PM · Restricted Project
mgrang created D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering.
Sun, Nov 19, 9:10 PM · Restricted Project
mgrang added a comment to D40227: [Hexagon] Use stable sort for HexagonShuffler to remove non-deterministic ordering.

In HexagonShuffler.h, the lessCore and lessCVI comparators sort insts based on the number of units set. Now, two insts can have the same units set so their relative ordering is not defined.
We could add an index field as a tie-breaker but that would mean changes to function APIs which I felt could be an overkill. Hence, I went with the simpler approach to just use stable_sort instead.
Please let me know your thoughts on this.

Sun, Nov 19, 12:03 PM
mgrang created D40227: [Hexagon] Use stable sort for HexagonShuffler to remove non-deterministic ordering.
Sun, Nov 19, 11:58 AM

Sat, Nov 18

mgrang updated the diff for D39995: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering.
Sat, Nov 18, 10:58 AM
mgrang added inline comments to D39995: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering.
Sat, Nov 18, 10:55 AM
mgrang updated the diff for D39995: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering.

Added comment to explain what's going on.

Sat, Nov 18, 10:50 AM

Fri, Nov 17

mgrang added a comment to D40177: performance improvements for ThunderX2 T99.

Could you please add a few tests? Also please remember to add llvm-commits as subscriber to your patches.

Fri, Nov 17, 11:58 AM
mgrang edited reviewers for D40177: performance improvements for ThunderX2 T99, added: t.p.northover; removed: llvm-commits.
Fri, Nov 17, 11:56 AM
mgrang added inline comments to D38894: [RFC][Tablegen] Add CCIfSplitFrom and CCPassIndirectBySamePointer Calling Convention Interfaces.
Fri, Nov 17, 10:59 AM
mgrang added inline comments to D40001: [RISCV] MC layer support for the load/store instructions of standard compress instruction set.
Fri, Nov 17, 10:56 AM
mgrang added a reviewer for D40002: [RISCV] MC layer support for the jump/branch instructions of standard compress instruction set: mgrang.
Fri, Nov 17, 10:49 AM
mgrang added inline comments to D40002: [RISCV] MC layer support for the jump/branch instructions of standard compress instruction set.
Fri, Nov 17, 10:48 AM

Thu, Nov 16

mgrang committed rL318487: [PredicateInfo] Add comment about why we require stable sort.
[PredicateInfo] Add comment about why we require stable sort
Thu, Nov 16, 4:43 PM
mgrang added inline comments to D39963: [RISCV][RFC] Add initial RISC-V target and driver support.
Thu, Nov 16, 1:09 PM
mgrang committed rL318454: [RISCV] Fix 64-bit data layout mismatch between backend and target description.
[RISCV] Fix 64-bit data layout mismatch between backend and target description
Thu, Nov 16, 12:31 PM
mgrang closed D40145: [RISCV] Fix 64-bit data layout mismatch between backend and target description by committing rL318454: [RISCV] Fix 64-bit data layout mismatch between backend and target description.
Thu, Nov 16, 12:30 PM
mgrang added inline comments to D39963: [RISCV][RFC] Add initial RISC-V target and driver support.
Thu, Nov 16, 12:20 PM
mgrang created D40145: [RISCV] Fix 64-bit data layout mismatch between backend and target description.
Thu, Nov 16, 12:19 PM
mgrang accepted D40139: Fix RISCV build after r318352.

Thanks! LGTM.

Thu, Nov 16, 10:26 AM

Wed, Nov 15

mgrang added inline comments to D40023: [RISCV] Implement ABI lowering.
Wed, Nov 15, 4:36 PM
mgrang added inline comments to D29938: [RISCV 16/n] Support and tests for a variety of additional LLVM IR constructs.
Wed, Nov 15, 4:00 PM
mgrang added a comment to D39845: [TableGen] Give the option of tolerating duplicate register names.

Could you please add some tests?

Wed, Nov 15, 3:07 PM
mgrang added inline comments to D39963: [RISCV][RFC] Add initial RISC-V target and driver support.
Wed, Nov 15, 2:58 PM
mgrang added a comment to D39963: [RISCV][RFC] Add initial RISC-V target and driver support.

@asb I cherry-picked this patch and was able to compile a simple program for elf triple. By manually adding a few libs on the link line I was also able to make it link for linux triple.
Could you please respond to the comment about risv32-ld? Other than that this patch LGTM!

Wed, Nov 15, 2:50 PM

Tue, Nov 14

mgrang committed rL318165: [PredicateInfo] Stable sort ValueDFS to remove non-deterministic ordering.
[PredicateInfo] Stable sort ValueDFS to remove non-deterministic ordering
Tue, Nov 14, 10:23 AM
mgrang closed D39630: [PredicateInfo] Stable sort ValueDFS to remove non-deterministic ordering by committing rL318165: [PredicateInfo] Stable sort ValueDFS to remove non-deterministic ordering.
Tue, Nov 14, 10:22 AM
mgrang committed rL318163: [XRay] Stable sort XRayRecord to remove non-deterministic ordering.
[XRay] Stable sort XRayRecord to remove non-deterministic ordering
Tue, Nov 14, 10:11 AM
mgrang closed D39943: [XRay] Stable sort XRayRecord to remove non-deterministic ordering by committing rL318163: [XRay] Stable sort XRayRecord to remove non-deterministic ordering.
Tue, Nov 14, 10:11 AM
mgrang added inline comments to D39995: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering.
Tue, Nov 14, 10:03 AM

Mon, Nov 13

mgrang created D39995: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering.
Mon, Nov 13, 6:20 PM
mgrang added inline comments to D39906: [InstCombine] Allowing GEP Instructions with loop Invariant operands to combine.
Mon, Nov 13, 5:19 PM
mgrang added a comment to D39947: [OpenMP] Stable sort Privates to remove non-deterministic ordering.

Although this patches fixes the above unit test failures, the generated code is very different from the one that the tests expect. As a result, these tests need to be adjusted. Could the reviewers please comment/suggest on whether it is ok to fix the tests as a result of this change?

The other way of obtaining deterministic ordering for privates with the same alignment is to use an index for each item inserted into Privates and use it as a tie-breaker. But even in that case the generated code is quite different and tests still need to be adjusted.

Fixing the tests may be acceptable. Can you give an example of the difference between the old and new test outputs?

Please see https://www.diffchecker.com/7V2XFbk4 for the difference in output for the following test before and after my change:

clang -cc1 -internal-isystem <MYDIR>/build/llvm/lib/clang/6.0.0/include -nostdsysteminc -verify -fopenmp -x c++ -triple x86_64-apple-darwin10 -emit-llvm <MYDIR>/src/llvm/tools/clang/test/OpenMP/task_firstprivate_codegen.cpp -o -

Does your diff have shuffling enabled on both sides? Neither layout for %struct..kmp_privates.t.3 seems to match the test's match for PRIVATES_TMAIN_TY, so I'm not completely sure which is supposed to be which. Assuming that the right diff is with your patch, something seems quite wrong, because the capture for t_var is being sorted to the end, which is producing a really terrible layout.

I think you might actually have accidentally inverted the order: a qsort comparator is supposed to return positive if `LHS > RHS, so the fact that it's returning 1 when P1->first < P2->first` means that it's actually a reversed comparison. Would you mind fixing that and then letting us know what test changes remain?

Cou

Mon, Nov 13, 5:11 PM · Restricted Project
mgrang updated the diff for D39947: [OpenMP] Stable sort Privates to remove non-deterministic ordering.

Fixed the sorting order for stable_sort.

Mon, Nov 13, 5:08 PM · Restricted Project
mgrang added inline comments to D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.
Mon, Nov 13, 4:54 PM · debug-info
mgrang added a comment to D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.

So there can be multiple symbols with the same offset, in this list? This change implies that the insertion order in the list is important and worth preserving. Why do we know that's true?

Mon, Nov 13, 4:52 PM · debug-info
mgrang added inline comments to D39963: [RISCV][RFC] Add initial RISC-V target and driver support.
Mon, Nov 13, 4:29 PM
mgrang committed rL318121: [Sema] Stable sort OverloadCandidates to remove non-deterministic ordering.
[Sema] Stable sort OverloadCandidates to remove non-deterministic ordering
Mon, Nov 13, 4:22 PM
mgrang closed D39944: [Sema] Stable sort OverloadCandidates to remove non-deterministic ordering by committing rL318121: [Sema] Stable sort OverloadCandidates to remove non-deterministic ordering.
Mon, Nov 13, 4:22 PM · Restricted Project
mgrang committed rL318074: [clang] Remove redundant return [NFC].
[clang] Remove redundant return [NFC]
Mon, Nov 13, 11:30 AM
mgrang closed D39915: [clang] Remove redundant return [NFC] by committing rL318074: [clang] Remove redundant return [NFC].
Mon, Nov 13, 11:30 AM · Restricted Project
mgrang added a comment to D39630: [PredicateInfo] Stable sort ValueDFS to remove non-deterministic ordering.

Ping 2 for reviews please.

Mon, Nov 13, 10:26 AM

Sun, Nov 12

mgrang created D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering.
Sun, Nov 12, 5:29 PM · debug-info
mgrang added a comment to D39947: [OpenMP] Stable sort Privates to remove non-deterministic ordering.

Although this patches fixes the above unit test failures, the generated code is very different from the one that the tests expect. As a result, these tests need to be adjusted. Could the reviewers please comment/suggest on whether it is ok to fix the tests as a result of this change?

The other way of obtaining deterministic ordering for privates with the same alignment is to use an index for each item inserted into Privates and use it as a tie-breaker. But even in that case the generated code is quite different and tests still need to be adjusted.

Fixing the tests may be acceptable. Can you give an example of the difference between the old and new test outputs?

Sun, Nov 12, 4:24 PM · Restricted Project
mgrang added a comment to D39947: [OpenMP] Stable sort Privates to remove non-deterministic ordering.

Although this patches fixes the above unit test failures, the generated code is very different from the one that the tests expect. As a result, these tests need to be adjusted. Could the reviewers please comment/suggest on whether it is ok to fix the tests as a result of this change.

Sun, Nov 12, 12:17 PM · Restricted Project
mgrang created D39947: [OpenMP] Stable sort Privates to remove non-deterministic ordering.
Sun, Nov 12, 12:14 PM · Restricted Project

Sat, Nov 11

mgrang created D39944: [Sema] Stable sort OverloadCandidates to remove non-deterministic ordering.
Sat, Nov 11, 10:37 PM · Restricted Project
mgrang updated the diff for D39943: [XRay] Stable sort XRayRecord to remove non-deterministic ordering.
Sat, Nov 11, 10:34 PM
mgrang created D39943: [XRay] Stable sort XRayRecord to remove non-deterministic ordering.
Sat, Nov 11, 8:36 PM
mgrang committed rL317995: [llvm] Remove redundant return [NFC].
[llvm] Remove redundant return [NFC]
Sat, Nov 11, 7:50 PM
mgrang closed D39917: [llvm] Remove redundant return [NFC] by committing rL317995: [llvm] Remove redundant return [NFC].
Sat, Nov 11, 7:50 PM

Nov 10 2017

mgrang committed rL317922: [polly] Remove redundant return [NFC].
[polly] Remove redundant return [NFC]
Nov 10 2017, 12:33 PM
mgrang closed D39916: [polly] Remove redundant return [NFC] by committing rL317922: [polly] Remove redundant return [NFC].
Nov 10 2017, 12:33 PM · Restricted Project
mgrang created D39917: [llvm] Remove redundant return [NFC].
Nov 10 2017, 12:02 PM
mgrang created D39916: [polly] Remove redundant return [NFC].
Nov 10 2017, 11:52 AM · Restricted Project
mgrang created D39915: [clang] Remove redundant return [NFC].
Nov 10 2017, 11:49 AM · Restricted Project