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 (190 w, 1 d)

Recent Activity

Thu, Sep 6

mgrang added inline comments to D51744: [WIP] Early ThinLTOLayer2 prototype.
Thu, Sep 6, 11:38 AM

Wed, Sep 5

mgrang updated the diff for D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

Enabled checker only for C++.

Wed, Sep 5, 11:21 AM · Restricted Project
mgrang added a comment to D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

From this little information I have hear are my thoughts:

match callExpr(allOf (callee(functionDecl(hasName("std::sort"))), hasArgument(0, hasDescendant(declRefExpr(to(fieldDecl(hasName("value_type"))))))))))

I think this is a good direction, but keep in mind that value_type is a typedef, thus you should use the typedefNameDecl matcher instead of the fieldDecl.

Wed, Sep 5, 11:09 AM · Restricted Project
mgrang added inline comments to D51695: [MC] [AsmParser]: Ensure a new CFI frame is not opened within an existing one when using cc1as (causing a crash due to failed assert)..
Wed, Sep 5, 11:03 AM

Tue, Sep 4

mgrang added a comment to D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

This is my first time with ASTMatchers and I am not sure how to get the value_type from hasType (I don't see a matcher for value_types in ASTMatchers.h). Would I end up using a visitor for that? If yes, then maybe the entire check for pointer types needs to be done via visitors? Sorry for the newbie questions :)

I played around for a bit, my clang-query is a little out of date, but here's what I found: You can match typedefs with typedefDecl(), and using by typeAliasDecl(), and then add hasName("value_type") as a parameter. As to how to check whether a type has any of these, I'm a little unsure myself, but you could use hasDescendant, and narrow down the matches.

I'm not sure whether this checks inherited type declarations, and it sure doesn't check template specializations of std::iterator_traits, but it is a good start :) I'll revisit this when I have a little more time on my hand.

Tue, Sep 4, 11:20 AM · Restricted Project
mgrang added a comment to D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.
Tue, Sep 4, 11:13 AM · Restricted Project
mgrang retitled D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements from [Analyzer] Checker for non-determinism caused by sorting of pointer-like keys to [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.
Tue, Sep 4, 11:10 AM · Restricted Project
mgrang updated the diff for D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

Addressed comments.

Tue, Sep 4, 11:10 AM · Restricted Project

Fri, Aug 31

mgrang added inline comments to D51524: [ARM64] [Windows] Handle funclets.
Fri, Aug 31, 10:43 AM

Thu, Aug 30

mgrang added inline comments to D51524: [ARM64] [Windows] Handle funclets.
Thu, Aug 30, 6:24 PM

Mon, Aug 27

mgrang added inline comments to D51144: Implemented Protobuf fuzzer for LLVM MC Assembler.
Mon, Aug 27, 12:55 PM
mgrang added inline comments to D51144: Implemented Protobuf fuzzer for LLVM MC Assembler.
Mon, Aug 27, 12:44 PM
mgrang added inline comments to D51144: Implemented Protobuf fuzzer for LLVM MC Assembler.
Mon, Aug 27, 10:31 AM

Fri, Aug 24

mgrang added inline comments to D51144: Implemented Protobuf fuzzer for LLVM MC Assembler.
Fri, Aug 24, 4:41 PM
mgrang added a comment to D51144: Implemented Protobuf fuzzer for LLVM MC Assembler.

Please remove all paths pointing to /prj/...

Fri, Aug 24, 4:35 PM
mgrang added a comment to D51204: [COFF, ARM64] Add MS intrinsics: __getReg, _ReadStatusReg, _WriteStatusReg.

Thanks @mstorsjo. I have addressed your comments.

Fri, Aug 24, 11:25 AM
mgrang updated the diff for D51204: [COFF, ARM64] Add MS intrinsics: __getReg, _ReadStatusReg, _WriteStatusReg.
Fri, Aug 24, 11:24 AM

Thu, Aug 23

mgrang created D51204: [COFF, ARM64] Add MS intrinsics: __getReg, _ReadStatusReg, _WriteStatusReg.
Thu, Aug 23, 6:11 PM

Aug 17 2018

mgrang added inline comments to D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.
Aug 17 2018, 1:15 PM · Restricted Project
mgrang added a comment to D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

I think testcases for non-class iterator objects would be valuable.

Aug 17 2018, 1:13 PM · Restricted Project

Aug 16 2018

mgrang updated the diff for D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

Added checks for more algorithms: stable_sort, is_sorted, partial_sort, partition, stable_partition, nth_element.

Aug 16 2018, 10:12 PM · Restricted Project
mgrang added a comment to D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

This was my first time using AST matchers so it took me a while to figure out how exactly to get this right. clang-query helped a lot. Backspace seems to be a problem with clang-query though.

Aug 16 2018, 5:46 PM · Restricted Project
mgrang updated the diff for D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

Changed patch to use AST Matchers.

Aug 16 2018, 5:44 PM · Restricted Project

Aug 10 2018

mgrang added a comment to D50559: [gnu-objc] Make selector order deterministic..
got a build failure with this patch added onto 6.0.1
Aug 10 2018, 12:49 PM
mgrang added a comment to D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.

Thanks for all your review comments. I will try to address them soon.

Aug 10 2018, 11:11 AM · Restricted Project
mgrang added a comment to D50559: [gnu-objc] Make selector order deterministic..

Does the error show up if you build llvm with -DLLVM_REVERSE_ITERATION:ON?

Aug 10 2018, 10:27 AM

Aug 8 2018

mgrang created D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements.
Aug 8 2018, 7:30 PM · Restricted Project
mgrang added inline comments to D50144: Add Windows support for the GNUstep Objective-C ABI V2..
Aug 8 2018, 10:23 AM

Aug 3 2018

mgrang added a comment to D50284: [COFF, ARM64] Recognize the .hidden directive.
In D50284#1188307, @pcc wrote:

I don't think the .hidden directive is meaningful in COFF, is it?

Aug 3 2018, 5:12 PM
mgrang created D50284: [COFF, ARM64] Recognize the .hidden directive.
Aug 3 2018, 5:04 PM

Aug 2 2018

mgrang added a comment to D50218: [OpenMP] Encode offload target triples into comdat key for offload initialization code.

Please add some unit tests.

Aug 2 2018, 8:55 PM
mgrang added a reviewer for D50166: [ARM64] [Windows] MCLayer support for exception handling: mgrang.
Aug 2 2018, 11:31 AM

Aug 1 2018

mgrang added inline comments to D50152: [CodeGen] Merge equivalent block copy/helper functions.
Aug 1 2018, 12:19 PM

Jul 31 2018

mgrang accepted D50123: [OpenEmbedded] Explicitly specify -stdlib and -rtlib in tests.

LGTM.

Jul 31 2018, 7:28 PM
mgrang closed D45395: [RISCV] Lower the tail pseudoinstruction.
Jul 31 2018, 11:19 AM
mgrang committed rC338405: [COFF, ARM64] Enable SEH for ARM64 Windows.
[COFF, ARM64] Enable SEH for ARM64 Windows
Jul 31 2018, 10:42 AM
mgrang committed rL338405: [COFF, ARM64] Enable SEH for ARM64 Windows.
[COFF, ARM64] Enable SEH for ARM64 Windows
Jul 31 2018, 10:42 AM
mgrang closed D50029: [COFF, ARM64] Enable SEH for ARM64 Windows.
Jul 31 2018, 10:42 AM

Jul 30 2018

mgrang updated the diff for D50029: [COFF, ARM64] Enable SEH for ARM64 Windows.

Addressed comments.

Jul 30 2018, 5:53 PM
mgrang added inline comments to D50029: [COFF, ARM64] Enable SEH for ARM64 Windows.
Jul 30 2018, 5:07 PM
mgrang created D50029: [COFF, ARM64] Enable SEH for ARM64 Windows.
Jul 30 2018, 5:05 PM
mgrang committed rC338294: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.
[OpenEmbedded] Fix lib paths for OpenEmbedded targets
Jul 30 2018, 12:45 PM
mgrang committed rL338294: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.
[OpenEmbedded] Fix lib paths for OpenEmbedded targets
Jul 30 2018, 12:44 PM
mgrang closed D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.
Jul 30 2018, 12:44 PM
mgrang added a comment to D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

I would commit this today unless there any comments. Thanks.

Jul 30 2018, 12:40 PM

Jul 26 2018

mgrang added a comment to D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

@rsmith Could you please take a look at the updated patch? I would like to commit this. Thanks.

Jul 26 2018, 11:09 AM
mgrang committed rC338050: [COFF, ARM64] Decide when to mark struct returns as SRet.
[COFF, ARM64] Decide when to mark struct returns as SRet
Jul 26 2018, 11:08 AM
mgrang committed rL338050: [COFF, ARM64] Decide when to mark struct returns as SRet.
[COFF, ARM64] Decide when to mark struct returns as SRet
Jul 26 2018, 11:08 AM
mgrang closed D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.
Jul 26 2018, 11:08 AM

Jul 25 2018

mgrang updated the diff for D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

Rebased patch and fixed unit test on Windows.

Jul 25 2018, 4:25 PM

Jul 24 2018

mgrang updated the diff for D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.

Addressed Eli's comments.

Jul 24 2018, 4:22 PM
mgrang updated the diff for D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

Thanks @rsmith. I have addressed your comments.

Jul 24 2018, 12:44 PM
mgrang added a comment to D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.

@TomTan @haripul As Reid pointed out, MS ARM64 seems to use X1 for returning POD struct address. See https://godbolt.org/g/jQVW78.
However, the doc at https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions#return-values only mentions the following:

Jul 24 2018, 12:11 PM
mgrang added a comment to D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.
In D49464#1172767, @rnk wrote:

The ABI doc just distinguishes between POD and non-POD types.

The address of the memory block shall be passed as an additional argument to the function in x8 for POD type, or in x0 (or x1 if $this is passed in x0) for non-POD type.

So even for instance methods returning PODs, X8 should be used.

Experimentation shows otherwise: https://godbolt.org/g/jQVW78 X1 is used to pass the sret parameter. Trust but verify. :)

Jul 24 2018, 12:09 PM
mgrang updated the diff for D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.
Jul 24 2018, 12:06 PM

Jul 23 2018

mgrang added a comment to D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.
In D49464#1170710, @rnk wrote:

Reid, are you okay with merging something like the current patch for now, and implementing returning the value as a followup?

Yeah.

Please add some test cases that verify that the right thing happens for instance methods returning POD structs. Should the sret parameter be in X1 or X8? Looks like you want X1, so isPOD isn't the right check.

struct IsPOD { int x; };
struct Foo {
  IsPOD foo() { return IsPOD{3}; }
};
int main() {
  return Foo().foo().x;
}
Jul 23 2018, 5:00 PM
mgrang updated the diff for D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.

Addressed comments.

Jul 23 2018, 4:56 PM

Jul 21 2018

mgrang added a reviewer for D49640: [ARM64][Windows] Create COMDAT symbols for sections containing constants: mgrang.
Jul 21 2018, 8:27 PM

Jul 19 2018

mgrang committed rL337479: [OpenEmbedded] Add a unittest for aarch64-oe-linux.
[OpenEmbedded] Add a unittest for aarch64-oe-linux
Jul 19 2018, 11:15 AM
mgrang closed D49314: [OpenEmbedded] Add a unittest for aarch64-oe-linux.
Jul 19 2018, 11:15 AM

Jul 18 2018

mgrang updated the diff for D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.

Moved the check for NonPODStructRet to CGFunctionInfo.

Jul 18 2018, 7:32 PM
mgrang added a comment to D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

Ping 3 for reviews please.

Jul 18 2018, 10:38 AM
mgrang added inline comments to D49493: [DebugInfo] Reduce debug_str_offsets section size.
Jul 18 2018, 10:37 AM

Jul 17 2018

mgrang created D49464: [COFF, ARM64] Decide when to mark struct returns as SRet.
Jul 17 2018, 6:12 PM
mgrang committed rC337327: [COFF] Add more missing MSVC ARM64 intrinsics.
[COFF] Add more missing MSVC ARM64 intrinsics
Jul 17 2018, 3:08 PM
mgrang committed rL337327: [COFF] Add more missing MSVC ARM64 intrinsics.
[COFF] Add more missing MSVC ARM64 intrinsics
Jul 17 2018, 3:08 PM
mgrang closed D49445: [COFF] Add more missing MSVC ARM64 intrinsics.
Jul 17 2018, 3:08 PM
mgrang updated the diff for D49445: [COFF] Add more missing MSVC ARM64 intrinsics.

Thanks @mstorsjo. Changed _M_ARM64 checks to aarch64 checks.

Jul 17 2018, 1:07 PM
mgrang created D49445: [COFF] Add more missing MSVC ARM64 intrinsics.
Jul 17 2018, 12:12 PM

Jul 16 2018

mgrang committed rL337192: [llvm] Change 2 instances of std::sort to llvm::sort.
[llvm] Change 2 instances of std::sort to llvm::sort
Jul 16 2018, 10:31 AM
mgrang added a comment to D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

Ping 2 for reviews please.

Jul 16 2018, 10:30 AM

Jul 13 2018

mgrang retitled D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets from Fix lib paths for OpenEmbedded targets to [OpenEmbedded] Fix lib paths for OpenEmbedded targets.
Jul 13 2018, 12:12 PM
mgrang created D49314: [OpenEmbedded] Add a unittest for aarch64-oe-linux.
Jul 13 2018, 12:10 PM

Jul 11 2018

mgrang updated the diff for D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

Added tests for C++ headers search.

Jul 11 2018, 9:14 PM
mgrang added inline comments to D44824: [Spectre] Introduce a new pass to do speculative load hardening to mitigate Spectre variant #1 for x86..
Jul 11 2018, 11:03 AM

Jul 10 2018

mgrang added a comment to D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

Ping for reviews, please.

Jul 10 2018, 9:32 AM

Jul 6 2018

mgrang added a comment to D49030: Add OrderedSet, with constant-time insertion and removal, and random access iteration..

Some nits.

Jul 6 2018, 11:09 AM

Jul 5 2018

mgrang added a comment to D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.

The prerequisite llvm patch has been committed: r336401

Jul 5 2018, 4:47 PM
mgrang committed rL336401: [OpenEmbedded] Add OpenEmbedded vendor.
[OpenEmbedded] Add OpenEmbedded vendor
Jul 5 2018, 4:46 PM
mgrang closed D48861: Add OpenEmbedded vendor.
Jul 5 2018, 4:46 PM

Jul 2 2018

mgrang updated the diff for D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.
Jul 2 2018, 6:40 PM
mgrang added a comment to D48861: Add OpenEmbedded vendor.

Here is the follow-up clang patch: D48862

Jul 2 2018, 6:36 PM
mgrang created D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets.
Jul 2 2018, 6:35 PM
mgrang created D48861: Add OpenEmbedded vendor.
Jul 2 2018, 6:26 PM

Jun 29 2018

mgrang abandoned D44360: [compiler-rt] Change std::sort to llvm::sort in response to r327219.

Need to abandon this since compiler-rt cannot depend on llvm includes.

Jun 29 2018, 10:51 AM

Jun 13 2018

mgrang committed rC334639: [COFF] Add ARM64 intrinsics: __yield, __wfe, __wfi, __sev, __sevl.
[COFF] Add ARM64 intrinsics: __yield, __wfe, __wfi, __sev, __sevl
Jun 13 2018, 11:54 AM
mgrang committed rL334639: [COFF] Add ARM64 intrinsics: __yield, __wfe, __wfi, __sev, __sevl.
[COFF] Add ARM64 intrinsics: __yield, __wfe, __wfi, __sev, __sevl
Jun 13 2018, 11:54 AM
mgrang closed D48132: [COFF] Add ARM64 intrinsics: __yield, __wfe, __wfi, __sev, __sevl.
Jun 13 2018, 11:54 AM
mgrang created D48132: [COFF] Add ARM64 intrinsics: __yield, __wfe, __wfi, __sev, __sevl.
Jun 13 2018, 9:32 AM

May 30 2018

mgrang added inline comments to D46653: Start support for linking object files with split stacks.
May 30 2018, 6:37 PM

May 29 2018

mgrang added inline comments to D47511: [AMDGPU] Construct memory clauses before RA.
May 29 2018, 8:54 PM
mgrang added inline comments to D47474: Implement cpu_dispatch/cpu_specific Multiversioning.
May 29 2018, 1:53 PM

May 24 2018

mgrang added inline comments to D47329: [llvm-exegesis] Analysis: Display idealized sched class port pressure..
May 24 2018, 8:05 AM

May 23 2018

mgrang added a comment to D45395: [RISCV] Lower the tail pseudoinstruction.

This is merged in rL333137.

May 23 2018, 5:21 PM
mgrang committed rL333137: [RISCV] Lower the tail pseudoinstruction.
[RISCV] Lower the tail pseudoinstruction
May 23 2018, 3:51 PM
mgrang added a comment to D45395: [RISCV] Lower the tail pseudoinstruction.

Thanks for the pointer Alex. I guess what I was doing incorrect was specifying GPRTC as the reg class in the PseudoInstExpansion which made the tablegen trip.

May 23 2018, 1:24 PM
mgrang updated the diff for D45395: [RISCV] Lower the tail pseudoinstruction.

Added a PseudoInstExpansion rule for PseudoTAILIndirect as per Alex's suggestion.

May 23 2018, 1:22 PM
mgrang accepted D46822: [RISCV] Add driver for riscv32-unknown-elf baremetal target.

LGTM.

May 23 2018, 10:52 AM

May 22 2018

mgrang updated the diff for D45395: [RISCV] Lower the tail pseudoinstruction.
  1. Lowered PseudoTAILIndirect in AsmPrinter (similar to AArch64 TCRETURNri pseudo).
  2. Added test cases for tail call on external symbols and indirect tail call.
  3. Addressed other comments.
May 22 2018, 1:38 PM
mgrang added inline comments to D47196: [Time-report ](2): Recursive timers in Clang.
May 22 2018, 10:52 AM