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

Recent Activity

Fri, Apr 20

mgrang added a comment to D39053: [Bitfield] Add more cases to making the bitfield a separate location.

Here is a test case which improves with this patch (for RISCV target). It is able to detect load/store halfword for size 16 bitfields.

Fri, Apr 20, 12:17 PM

Thu, Apr 19

mgrang created D45831: [docs] Add a note on non-deterministic sorting order of equal elements.
Thu, Apr 19, 11:54 AM

Wed, Apr 18

mgrang added a comment to D39053: [Bitfield] Add more cases to making the bitfield a separate location.

With this patch we get ~1800 bytes improvement on one of our internal codebases. I also ran spec2000/spec2006 validations (for RISCV) and there were no regressions. There were also no code size improvements seen in spec.

Wed, Apr 18, 11:28 AM

Tue, Apr 17

mgrang added a comment to D39053: [Bitfield] Add more cases to making the bitfield a separate location.

Added @apazos and myself a reviewers since this is something we would be interested in getting to work.

Tue, Apr 17, 6:01 PM
mgrang added reviewers for D39053: [Bitfield] Add more cases to making the bitfield a separate location: apazos, mgrang.
Tue, Apr 17, 6:00 PM

Mon, Apr 16

mgrang committed rL330148: [RISCV] Fix assert message operator.
[RISCV] Fix assert message operator
Mon, Apr 16, 11:59 AM
mgrang closed D45660: [RISCV] Fix assert message operator.
Mon, Apr 16, 11:59 AM

Sat, Apr 14

mgrang created D45660: [RISCV] Fix assert message operator.
Sat, Apr 14, 8:53 PM

Fri, Apr 13

mgrang abandoned D44363: [llvm] Change std::sort to llvm::sort in response to r327219.

All the smaller llvm patches are now merged. We can abandon this patch.

Fri, Apr 13, 12:55 PM
mgrang committed rL330061: [DebugInfo] Change std::sort to llvm::sort in response to r327219.
[DebugInfo] Change std::sort to llvm::sort in response to r327219
Fri, Apr 13, 12:54 PM
mgrang committed rL330059: [Transforms] Change std::sort to llvm::sort in response to r327219.
[Transforms] Change std::sort to llvm::sort in response to r327219
Fri, Apr 13, 12:51 PM
mgrang closed D45142: [Transforms] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 13, 12:51 PM
mgrang committed rL330058: [MC] Change std::sort to llvm::sort in response to r327219.
[MC] Change std::sort to llvm::sort in response to r327219
Fri, Apr 13, 12:50 PM
mgrang closed D45138: [MC] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 13, 12:50 PM
mgrang committed rL330057: [ProfileData] Change std::sort to llvm::sort in response to r327219.
[ProfileData] Change std::sort to llvm::sort in response to r327219
Fri, Apr 13, 12:50 PM
mgrang closed D45139: [ProfileData] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 13, 12:49 PM
mgrang committed rL330053: [LTO] Change std::sort to llvm::sort in response to r327219.
[LTO] Change std::sort to llvm::sort in response to r327219
Fri, Apr 13, 12:17 PM
mgrang closed D45137: [LTO] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 13, 12:17 PM

Thu, Apr 12

mgrang committed rC329941: [RISCV] Fix logic to check if frame pointer should be used.
[RISCV] Fix logic to check if frame pointer should be used
Thu, Apr 12, 12:36 PM
mgrang committed rL329941: [RISCV] Fix logic to check if frame pointer should be used.
[RISCV] Fix logic to check if frame pointer should be used
Thu, Apr 12, 12:36 PM
mgrang closed D45237: [RISCV] Fix logic to check if frame pointer should be used.
Thu, Apr 12, 12:36 PM

Mon, Apr 9

mgrang added a comment to D45138: [MC] Change std::sort to llvm::sort in response to r327219.

I'm not familiar with r327219, but if a decision to use randomized sort has been made, why don't you replace all occurrences of std::sort with llvm::sort in a single patch? I don't think that an author of each file don't have to understand this kind of change and approve individually.

Mon, Apr 9, 3:13 PM
mgrang committed rL329607: [WebAssembly] Change std::sort to llvm::sort in response to r327219.
[WebAssembly] Change std::sort to llvm::sort in response to r327219
Mon, Apr 9, 12:41 PM
mgrang closed D44873: [WebAssembly] Change std::sort to llvm::sort in response to r327219.
Mon, Apr 9, 12:41 PM
mgrang added a comment to D45140: [Support] Change std::sort to llvm::sort in response to r327219.

Exactly that's what I thought too, and llvm::sort already accepts a range (Container.begin(), Container.end()). In that case, could you please clarify what exactly do you mean by a "range-based variant" and its use cases in LLVM?

Ah, sorry! A "range-based" collection algorithm means one that takes a "range" as an argument instead of a pair of iterators. The "range" is anything that has begin and end iterators. ("Container-based algorithm" might have been a better name, since usually the "range" you pass is the entire container, but "range" is already an accepted term in C++ language and library discussions.)

So in this case, the call would look like this:

llvm::sort(TimersToPrint);

You can check out the implementation of llvm::none_of in include/llvm/ADT/STLExtras.h to see how this works. It just forwards on to the regular implementation.

None of this is related to your shuffling work, by the way; it's just odd and a bit inconsistent that there's an llvm:: algorithm that only takes iterators.

Mon, Apr 9, 11:46 AM
mgrang added a comment to D45140: [Support] Change std::sort to llvm::sort in response to r327219.

Are there instances in llvm where we perform range-based sorting? I see that std has an experimental range-based sort (std::experimental::ranges::sort) which I don't see being used in llvm.

I think in practice almost *every* sort we do would be range-based (i.e. we almost always sort an entire container). We generally don't use std::experimental things in LLVM because they're not reliably present across platforms, but that doesn't mean we don't provide our own implementations for good ideas.

Also what should be the semantics of a range-based shuffle sort? Will it just shuffle the given range? Or should it shuffle the entire container but just sort the range?

I don't understand this question. You can't get to the entire container from a range.

Mon, Apr 9, 11:31 AM
mgrang added a comment to D44873: [WebAssembly] Change std::sort to llvm::sort in response to r327219.

Ping for reviews please.

Mon, Apr 9, 10:28 AM
mgrang added a comment to D45137: [LTO] Change std::sort to llvm::sort in response to r327219.

Ping for reviews please.

Mon, Apr 9, 10:28 AM
mgrang added a comment to D45138: [MC] Change std::sort to llvm::sort in response to r327219.

Ping for reviews please.

Mon, Apr 9, 10:28 AM
mgrang added a comment to D45139: [ProfileData] Change std::sort to llvm::sort in response to r327219.

Ping for reviews please.

Mon, Apr 9, 10:28 AM
mgrang added a comment to D45142: [Transforms] Change std::sort to llvm::sort in response to r327219.

Ping for reviews please.

Mon, Apr 9, 10:27 AM

Sun, Apr 8

mgrang updated the diff for D45237: [RISCV] Fix logic to check if frame pointer should be used.

Added unit tests.

Sun, Apr 8, 9:35 PM
mgrang committed rL329536: [Support] Change std::sort to llvm::sort in response to r327219.
[Support] Change std::sort to llvm::sort in response to r327219
Sun, Apr 8, 9:50 AM
mgrang closed D45140: [Support] Change std::sort to llvm::sort in response to r327219.
Sun, Apr 8, 9:50 AM
mgrang committed rL329535: [PowerPC] Change std::sort to llvm::sort in response to r327219.
[PowerPC] Change std::sort to llvm::sort in response to r327219
Sun, Apr 8, 9:48 AM
mgrang closed D44870: [PowerPC] Change std::sort to llvm::sort in response to r327219.
Sun, Apr 8, 9:48 AM
mgrang closed D44874: [X86] Change std::sort to llvm::sort in response to r327219.
Sun, Apr 8, 9:46 AM
mgrang committed rL329534: [X86] Change std::sort to llvm::sort in response to r327219.
[X86] Change std::sort to llvm::sort in response to r327219
Sun, Apr 8, 9:46 AM
mgrang added a comment to D44363: [llvm] Change std::sort to llvm::sort in response to r327219.

What is left to do in this patch?

Sun, Apr 8, 9:32 AM

Sat, Apr 7

mgrang added inline comments to D45395: [RISCV] Implement tail call optimization.
Sat, Apr 7, 12:51 PM

Fri, Apr 6

mgrang closed D45143: [unittests] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 6, 6:49 PM
mgrang added a comment to D45140: [Support] Change std::sort to llvm::sort in response to r327219.

I'm a little disappointed that llvm::sort got added without providing a range-based variant, the way we did for llvm::none_of and llvm::find and others. (I wasn't watching the original thread.) I see no problem with these changes, though!

Fri, Apr 6, 6:48 PM
mgrang added inline comments to D44874: [X86] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 6, 6:38 PM
mgrang updated the diff for D44874: [X86] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 6, 6:36 PM
mgrang committed rL329475: [unittests] Change std::sort to llvm::sort in response to r327219.
[unittests] Change std::sort to llvm::sort in response to r327219
Fri, Apr 6, 6:32 PM
mgrang added inline comments to D45395: [RISCV] Implement tail call optimization.
Fri, Apr 6, 6:21 PM
mgrang created D45395: [RISCV] Implement tail call optimization.
Fri, Apr 6, 4:09 PM
mgrang added a comment to D44874: [X86] Change std::sort to llvm::sort in response to r327219.

@craig.topper I have changed the sort functions for pod containers to array_pod_sort. Could you please review?

Fri, Apr 6, 2:12 PM
mgrang committed rL329451: [TableGen] Change std::sort to llvm::sort in response to r327219.
[TableGen] Change std::sort to llvm::sort in response to r327219
Fri, Apr 6, 1:21 PM
mgrang closed D45144: [TableGen] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 6, 1:21 PM
mgrang committed rL329435: [CodeGen] Change std::sort to llvm::sort in response to r327219.
[CodeGen] Change std::sort to llvm::sort in response to r327219
Fri, Apr 6, 11:14 AM
mgrang closed D45133: [CodeGen] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 6, 11:14 AM
mgrang closed D45136: [IR] Change std::sort to llvm::sort in response to r327219.
Fri, Apr 6, 11:07 AM

Thu, Apr 5

mgrang committed rL329353: [IR] Change std::sort to llvm::sort in response to r327219.
[IR] Change std::sort to llvm::sort in response to r327219
Thu, Apr 5, 2:55 PM
mgrang committed rL329334: [Bitcode] Change std::sort to llvm::sort in response to r327219.
[Bitcode] Change std::sort to llvm::sort in response to r327219
Thu, Apr 5, 12:30 PM
mgrang closed D45132: [Bitcode] Change std::sort to llvm::sort in response to r327219.
Thu, Apr 5, 12:30 PM
mgrang committed rL329329: [ARM] Change std::sort to llvm::sort in response to r327219.
[ARM] Change std::sort to llvm::sort in response to r327219
Thu, Apr 5, 11:35 AM
mgrang closed D44855: [ARM] Change std::sort to llvm::sort in response to r327219.
Thu, Apr 5, 11:34 AM
mgrang added inline comments to D45181: [RISCV] Add diff relocation support for RISC-V.
Thu, Apr 5, 8:15 AM

Wed, Apr 4

mgrang added inline comments to D44885: [RISCV] Expand function call to "call" pseudoinstruction.
Wed, Apr 4, 11:40 AM
mgrang committed rL329216: [AArch64] Change std::sort to llvm::sort in response to r327219.
[AArch64] Change std::sort to llvm::sort in response to r327219
Wed, Apr 4, 11:23 AM
mgrang closed D44853: [AArch64] Change std::sort to llvm::sort in response to r327219.
Wed, Apr 4, 11:23 AM

Tue, Apr 3

mgrang added a comment to D45237: [RISCV] Fix logic to check if frame pointer should be used.

@asb Should we keep frame pointer enabled for debug builds? Internally, for ARM/Thumb we leave frame pointer ON if debug is enabled.

Tue, Apr 3, 4:15 PM
mgrang added a reviewer for D45237: [RISCV] Fix logic to check if frame pointer should be used: apazos.
Tue, Apr 3, 4:09 PM
mgrang created D45237: [RISCV] Fix logic to check if frame pointer should be used.
Tue, Apr 3, 4:05 PM
mgrang added a comment to D44853: [AArch64] Change std::sort to llvm::sort in response to r327219.

Ping for review please.

Tue, Apr 3, 12:03 PM
mgrang added a comment to D44855: [ARM] Change std::sort to llvm::sort in response to r327219.

Ping for reviews please.

Tue, Apr 3, 12:03 PM

Sun, Apr 1

mgrang committed rL328943: [tools] Change std::sort to llvm::sort in response to r327219.
[tools] Change std::sort to llvm::sort in response to r327219
Sun, Apr 1, 2:30 PM
mgrang closed D45141: [tools] Change std::sort to llvm::sort in response to r327219.
Sun, Apr 1, 2:30 PM
mgrang committed rL328940: [include] Change std::sort to llvm::sort in response to r327219.
[include] Change std::sort to llvm::sort in response to r327219
Sun, Apr 1, 11:42 AM
mgrang closed D45135: [include] Change std::sort to llvm::sort in response to r327219.
Sun, Apr 1, 11:42 AM
mgrang committed rL328935: [DebugInfo] Change std::sort to llvm::sort in response to r327219.
[DebugInfo] Change std::sort to llvm::sort in response to r327219
Sun, Apr 1, 9:21 AM
mgrang closed D45134: [DebugInfo] Change std::sort to llvm::sort in response to r327219.
Sun, Apr 1, 9:21 AM

Sat, Mar 31

mgrang updated the diff for D44874: [X86] Change std::sort to llvm::sort in response to r327219.

Changed std::sort to array_pod_sort for containers with pod keys, and llvm::sort for container with StringRef key.

Sat, Mar 31, 8:38 PM
mgrang created D45144: [TableGen] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:54 PM
mgrang created D45143: [unittests] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:48 PM
mgrang created D45142: [Transforms] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:45 PM
mgrang created D45141: [tools] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:33 PM
mgrang created D45140: [Support] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:27 PM
mgrang created D45139: [ProfileData] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:27 PM
mgrang created D45138: [MC] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:22 PM
mgrang created D45137: [LTO] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:15 PM
mgrang created D45136: [IR] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:13 PM
mgrang created D45135: [include] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:11 PM
mgrang created D45134: [DebugInfo] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:07 PM
mgrang created D45133: [CodeGen] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 7:05 PM
mgrang created D45132: [Bitcode] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 6:56 PM
mgrang committed rL328925: [Analysis] Change std::sort to llvm::sort in response to r327219.
[Analysis] Change std::sort to llvm::sort in response to r327219
Sat, Mar 31, 6:49 PM
mgrang closed D44944: [Analysis] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 31, 6:49 PM

Thu, Mar 29

mgrang committed rL328815: [Mips] Change std::sort to llvm::sort in response to r327219.
[Mips] Change std::sort to llvm::sort in response to r327219
Thu, Mar 29, 12:09 PM
mgrang closed D44362: [clang] Change std::sort to llvm::sort in response to r327219.
Thu, Mar 29, 12:09 PM · Restricted Project
mgrang closed D44869: [Mips] Change std::sort to llvm::sort in response to r327219.
Thu, Mar 29, 12:09 PM

Wed, Mar 28

mgrang added inline comments to D44986: Initialize Elf header to Zero.
Wed, Mar 28, 10:31 AM

Tue, Mar 27

mgrang added inline comments to D44848: Align stubs for external and common global variables to pointer size..
Tue, Mar 27, 5:27 PM
mgrang created D44944: [Analysis] Change std::sort to llvm::sort in response to r327219.
Tue, Mar 27, 10:00 AM
mgrang committed rL328636: [clang] Change std::sort to llvm::sort in response to r327219.
[clang] Change std::sort to llvm::sort in response to r327219
Tue, Mar 27, 9:53 AM
mgrang committed rC328636: [clang] Change std::sort to llvm::sort in response to r327219.
[clang] Change std::sort to llvm::sort in response to r327219
Tue, Mar 27, 9:53 AM

Mon, Mar 26

mgrang committed rL328564: [XCore] Change std::sort to llvm::sort in response to r327219.
[XCore] Change std::sort to llvm::sort in response to r327219
Mon, Mar 26, 11:14 AM
mgrang closed D44875: [XCore] Change std::sort to llvm::sort in response to r327219.
Mon, Mar 26, 11:14 AM

Sat, Mar 24

mgrang created D44875: [XCore] Change std::sort to llvm::sort in response to r327219.
Sat, Mar 24, 11:46 AM