[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I wonder why this flag is called -flto-visibility-public-std. It has nothing to do with -flto. While we are at it, does it make sense to rename this flag? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55229/new/ https://reviews.llvm.org/D

[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D55229#1317232 , @pcc wrote: > The reason why it has that name is that it was originally added to support > the logic here: > http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/CGVTables.cpp#991 > > It looks like it was later rep

[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D55229#1317333 , @rnk wrote: > I think @compnerd arranged things this way. I don't know why > -flto-visibility-public-std is involved, I have no idea what that does. I > think we should do what MSVC does here, which is to leave

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 176693. mgrang retitled this revision from "[COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag" to "[COFF] Statically link certain runtime library functions". mgrang edited the summary of this revision. CHANGES SINCE LAST ACTION https://re

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added inline comments. Comment at: CodeGenObjC/gnu-init.m:103 +// Make sure we do not have dllimport on the load function +// CHECK-WIN: declare dso_local void @__objc_load I had to remove dllimport in this and th

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-10 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55229/new/ https://reviews.llvm.org/D55229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-02-28 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188824. mgrang retitled this revision from "[ProfileData] Remove non-determinism: Change DenseMap to MapVector" to "[ProfileData] Sort FuncData before iteration to remove non-determinism". mgrang added a reviewer: dblaikie. Herald added a subscriber: jdoerfert

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-02-28 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188843. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 Files: lib/ProfileData/InstrProfWriter.cpp Index: lib/ProfileData/InstrProfWriter.cpp

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1409565 , @mgrang wrote: > In D50488#1407975 , @Szelethus wrote: > > > But, as a work-in-progress alpha checker, the direction is set and looks > > great. Please let @NoQ have the

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-03-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188951. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 Files: lib/ProfileData/InstrProfWriter.cpp Index: lib/ProfileData/InstrProfWriter.cpp

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-03-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 189002. mgrang added a comment. Addressed comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 Files: lib/ProfileData/InstrProfWriter.cpp Index: lib/ProfileData/InstrProfWriter.cpp ==

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-03-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355252: [ProfileData] Sort FuncData before iteration to remove non-determinism (authored by mgrang, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. @NoQ Ping 2 for reviews please. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D39050: Add index-while-building support to Clang

2019-03-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/Index/FileIndexData.cpp:31 + std::vector Sorted(Decls); + std::sort(Sorted.begin(), Sorted.end()); + return Sorted; Please use range-based llvm::sort instead of std::sort: ``` llvm::sort(Sorted); ``` See https://

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 189905. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL355720: [Analyzer] Checker for non-determinism caused by sorting of pointer-like… (authored by mgrang, committed by ). Her

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: NoQ, george.karpenkov, whisperity, Szelethus. mgrang added a project: clang. Herald added subscribers: Charusso, jdoerfert, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, mgorny. Added a check

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Following are the assumptions/limitations of this patch: 1. The assumption is that iteration of ordered containers of pointers is not non-deterministic. 2. Currently we only detect std::unordered_set. Detection of unordered_map can be added later. 3. Currentl

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 190453. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/ https://reviews.llvm.org/D59279 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Also, what is the difference between these two: https://clang.llvm.org/docs/analyzer/checkers.html, https://clang-analyzer.llvm.org/available_checks.html. It seems they document similar stuff. Should we add the doc for each new checker in both of these? CHANGES SINCE L

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > The obvious question, why not implement this in clang-tidy? Going forward I would like to make these non-determinism checks more precise by reasoning about what happens inside the loop, for example. I am not sure if clang-tidy has support for such deeper reasoning. I t

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > Could you please add a commit that changes the top of the file on your > previous commit? Feel free to do that without review (I can't commit it > myself atm). Done in https://reviews.llvm.org/rC356086. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 190472. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/ https://reviews.llvm.org/D59279 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I was trying to write another checker for hashing of pointers. Basically, I wanted to match all instances where the keys of std::map are pointers. Writing an AST matcher for std::map is straightforward. However, I am not sure how to check for pointer keys after matching

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/ https://reviews.llvm.org/D59279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-21 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D59279#1438500 , @rnkovacs wrote: > In D59279#1427017 , @mgrang wrote: > > > Following are the assumptions/limitations of this patch: > > > > 1. The assumption is that iteration of order

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D59279#1439014 , @Szelethus wrote: > In D59279#1438514 , @mgrang wrote: > > > Although, as you rightly pointed out that //ordered// sets of pointers are > > as non-deterministic as //unor

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, efriedma, TomTan, ssijaric. Herald added subscribers: kristof.beyls, javed.absar. Herald added a project: clang. Related llvm patch: D60348 . Repository: rC Clang https://reviews.llvm.org/D60349 Files

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Got rid of the confusing SuppressSRet logic. The "inreg" attribute is now used to indicate sret returns in X0. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 ___

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 194954. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGen/arm64-microsoft-arguments.cpp I

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added a comment. In D60349#1462638 , @ostannard wrote: > The document you linked in the LLVM change > (https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#return-values) >

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 195932. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDeclCXX.cpp test/CodeGen/arm64

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196109. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDeclCXX.cpp test/CodeGen/arm64

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196144. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDeclCXX.cpp test/CodeGen/arm64

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-23 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196341. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-23 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196342. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196774. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-26 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196894. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-29 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 197158. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-29 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Thanks @richard.townsend.arm . I have updated the patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-30 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 197436. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-05-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 197831. mgrang edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/C

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-05-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D60349#1488411 , @efriedma wrote: > LGTM, assuming it passes testing on electron Thanks Eli. @richard.townsend.arm Can you please confirm whether Electron works with this patch and D60348 ? C

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-05-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC359932: [COFF, ARM64] Fix ABI implementation of struct returns (authored by mgrang, committed by ). Repository: rC Clan

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2018-10-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D50488#1246321, @whisperity wrote: > Hey @mgrang! Let's see some results on some projects and answer NoQ's > comment, then I think we can put this in for all the world to see. Was busy with CppCon 2018 in the past couple of weeks so could not

[PATCH] D52800: Java import sorting in clang-format

2018-10-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/Format/Format.cpp:1856 + } + std::sort(Indices.begin(), Indices.end(), [&](unsigned LHSI, unsigned RHSI) { +// Negating IsStatic to push static imports above non-static imports. Please use llvm::sort instead

[PATCH] D51204: [COFF, ARM64] Add MS intrinsics: __getReg, _ReadStatusReg, _WriteStatusReg

2018-10-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang abandoned this revision. mgrang added a comment. Will abandon this patch since I have implementations of these which I will upstream soon. https://reviews.llvm.org/D51204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, mstorsjo, compnerd, TomTan, haripul. Herald added subscribers: jfb, chrib, kristof.beyls. Repository: rC Clang https://reviews.llvm.org/D52807 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/ms-intr

[PATCH] D52809: [COFF, ARM64] Add _ReadWriteBarrier intrinsic

2018-10-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, mstorsjo, compnerd, TomTan, haripul. Herald added a reviewer: javed.absar. Herald added subscribers: jfb, chrib, kristof.beyls. Repository: rC Clang https://reviews.llvm.org/D52809 Files: include/clang/Basic/BuiltinsAArch64.def lib

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, mstorsjo, compnerd, TomTan, haripul. Herald added subscribers: jfb, chrib, kristof.beyls. Repository: rC Clang https://reviews.llvm.org/D52811 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/ms-intr

[PATCH] D52809: [COFF, ARM64] Add _ReadWriteBarrier intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343699: [COFF, ARM64] Add _ReadWriteBarrier intrinsic (authored by mgrang, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52809?vs=168048&id=

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:3003 + case Builtin::BI_InterlockedCompareExchangePointer: + case Builtin::BI_InterlockedCompareExchangePointer_nf: { llvm::Type *RTy; rnk wrote: > Is the no fence version really equivalen

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, mstorsjo, compnerd, TomTan, haripul. Herald added a reviewer: javed.absar. Herald added subscribers: chrib, kristof.beyls. Repository: rC Clang https://reviews.llvm.org/D52838 Files: include/clang/Basic/BuiltinsAArch64.def lib/Code

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I have some questions about the behavior of getReg: __getReg ultimately invokes AArch64TargetLowering::getRegisterByName in llvm/lib/Target/AArch64/AArch64ISelLowering.cpp. You can __getReg only those registers which appear in the switch-case inside that function. Even t

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168192. https://reviews.llvm.org/D52838 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h lib/Sema/SemaChecking.cpp test/CodeGen/arm64-microsoft-intrinsics.c Index: test/CodeGen/arm64-microsoft-intrinsics

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168353. https://reviews.llvm.org/D52838 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h lib/Sema/SemaChecking.cpp test/CodeGen/arm64-microsoft-intrinsics.c Index: test/CodeGen/arm64-microsoft-intrinsics

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168368. https://reviews.llvm.org/D52838 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h lib/Sema/SemaChecking.cpp test/CodeGen/arm64-microsoft-intrinsics.c test/Sema/builtins-microsoft-arm64.c Index: t

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168371. https://reviews.llvm.org/D52838 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h lib/Sema/SemaChecking.cpp test/CodeGen/arm64-microsoft-intrinsics.c test/Sema/builtins-microsoft-arm64.c Index: t

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. MSVC seems to generate ldaxr/stlxr (as well as dmb) for InterlockedCompareExchangePointer and ldxr/stxr for InterlockedCompareExchangePointer_nf. void *test_InterlockedCompareExchangePointer(void * volatile *Destination, v

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. AArch64 Psuedo Expansion does not seem to honor AtomicOrdering types (SequentiallyConsistent/Monotonic). It seems to always generate LDAXRX/STLXRX for 64-bit Cmp_Xchg. Repository: rC Clang https://reviews.llvm.org/D52807 ___

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343824: [COFF, ARM64] Add __getReg intrinsic (authored by mgrang, committed by ). Repository: rC Clang https://reviews.llvm.org/D52838 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CG

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D52807#1255835, @efriedma wrote: > How are you testing? > > You might see different behavior at -O0. Yes, I was testing at -O0. At -O2 I can see monotonic ordering affect the choice of LD/ST insts used. https://reviews.llvm.org/D52807 __

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168403. https://reviews.llvm.org/D52807 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/ms-intrinsics.c Index: test/CodeGen/ms-intrinsics.c === --- test/Code

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343881: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic (authored by mgrang, committed by ). Repository: rC Clang https://reviews.llvm.org/D52807 Files: include/clang/Basic/Builti

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168517. mgrang added a comment. Herald added a reviewer: javed.absar. Limited the intrinsic only for AArch64 and fixed the implementation to return the sum instead of the old value of the Addend. Thanks @efriedma for the pointers. https://reviews.llvm.org/D

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168518. https://reviews.llvm.org/D52811 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h test/CodeGen/arm64-microsoft-intrinsics.c Index: test/CodeGen/arm64-microsoft-intrinsics.c =

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343894: [COFF, ARM64] Add _InterlockedAdd intrinsic (authored by mgrang, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52811?vs=168518&id=16

[PATCH] D57986: [ProfileData] Remove non-determinism: Change DenseMap to MapVector

2019-02-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rsmith, bogner. Herald added a project: clang. Repository: rC Clang https://reviews.llvm.org/D57986 Files: include/llvm/ProfileData/InstrProfWriter.h Index: include/llvm/ProfileData/InstrProfWriter.h

[PATCH] D57986: [ProfileData] Remove non-determinism: Change DenseMap to MapVector

2019-02-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. tools/llvm-profdata/instr-remap.test is failing in the reverse iteration bot. See http://lab.llvm.org:8011/builders/reverse-iteration/builds/10546/steps/check_all/logs/stdio. This is because FunctionData is iterated in InstrProfWriter to output function counts, etc. But

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 186549. Herald added subscribers: jdoerfert, baloghadamsoftware. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLis

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Reviving this now that I have some cycles to work on this. So I tried running this on csa-testbench projects but I didn't have much success. I always run into a bunch of build/env related errors: 15:05:20 [libcxx] Checking out project... [ERROR] Unknown option: json

[PATCH] D57986: [ProfileData] Remove non-determinism: Change DenseMap to MapVector

2019-02-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1397721 , @xazax.hun wrote: > In D50488#1395483 , @mgrang wrote: > > > Reviving this now that I have some cycles to work on this. > > > > So I tried running this on csa-testbench pr

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I guess I hadn't sourced the CodeChecker venv correctly. Now that I did source it and started the CodeChecker server I seem to be progressing. The error I get now is compiler related (which I will dig into). 12:51:35 [bitcoin] Checking out project... [ERROR] Unknown

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-15 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. The error I now get is: clang is not able to compile a simple test program. /usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om i386pep i386pe This is because

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-15 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I hacked around the run_experiments.py to set CMAKE_C_FLAGS and now I see the following error in stats.html. Note: I see the same error with an existing checker like PointerArithmChecker. And I do not hit this assert when I run the checker outside of csa-testbench. As

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 187418. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/PointerSortingChecke

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1400823 , @whisperity wrote: > Yeah, it seems upstream has moved away due to @Szelethus' implementation of a > much more manageable "checker dependency" system. You most likely will have > to rebase your patch first, the

[PATCH] D58065: [analyzer] Document the frontend library

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: docs/analyzer/developer-docs/FrontendLibrary.rst:12 +This document will describe the frontend of the Static Analyzer, basically +everything from compiling the analyzer from source, through it's invocation up +to the beginning of the analy

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 187466. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > It's because it invokes CodeChecker, which by default enables > valist.Uninitialized, but not ValistBase. Do you have assert failures after > my hotfix? @Szelethus Thanks. I run into this assert when run through CodeChecker: Assertion `CheckerTags.count(tag) != 0 &&

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Also I don't see the helptext for PointerSorting when I run: clang -cc1 -analyzer-checker-help | grep Pointer alpha.core.PointerArithmCheck for pointer arithmetic on locations other than array elements alpha.core.PointerSub Check for pointer

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > There is a revision to solve this problem here: D58065 > . I guess your input, as someone who didn't > participate in the checker dependency related patch reviews would be > invaluable, in terms of whether my description is understandab

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 187695. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1403653 , @Szelethus wrote: > In D50488#1403197 , @mgrang wrote: > > > > It's because it invokes CodeChecker, which by default enables > > > valist.Uninitialized, but not ValistBas

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. So I was able compile a couple of C++ code bases through csa-testbench. I built cppcheck and tinyxml2 without any problems. cppcheck has one invocation std::sort but the keys are not pointers whereas tinyxml2 does not use std::sort. I tried bitcoin, rtags, xerces but run

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1405094 , @mgrang wrote: > So I was able compile a couple of C++ code bases through csa-testbench. I > built cppcheck and tinyxml2 without any problems. cppcheck has one invocation > std::sort but the keys are not pointe

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407695 , @Charusso wrote: > bitcoin: > > sudo apt-get install build-essential libtool autotools-dev automake > pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-all-dev > software-properties-common libm

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188232. mgrang set the repository for this revision to rC Clang. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checke

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407884 , @Szelethus wrote: > In D50488#1405094 , @mgrang wrote: > > > So I was able compile a couple of C++ code bases through csa-testbench. I > > built cppcheck and tinyxml2 wit

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:97 +def NonDeterminismAlpha : Package<"nondeterminism">, ParentPackage; + Szelethus wrote: > Hmmm, okay, so your checker ks C++

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407975 , @Szelethus wrote: > But, as a work-in-progress alpha checker, the direction is set and looks > great. Please let @NoQ have the final say. Thanks a lot @Szelethus! I will wait for @NoQ 's comments. Repository

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. This fixes failures seen in the reverse iteration builder: http://lab.llvm.org:8011/builders/reverse-iteration/builds/26 Failing Tests (4): Clang :: Analysis/MisusedMovedObject.cpp Clang :: Analysis/keychainAPI.m Clang :: Analysis/loop-unrolling.cpp Clang ::

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. The thing I am concerned with here is whether changing SmallPtrSet to a SetVector can potentially slow down the Static Analyzer? ExplodedNode seem to be used heavily in the analyzer and I can see it being iterated upon in several places. https://reviews.llvm.org/D37400

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 113718. mgrang added a comment. NFC. Made the static_assert the first statement in the test. Repository: rL LLVM https://reviews.llvm.org/D37400 Files: unittests/Support/ReverseIterationTest.cpp Index: unittests/Support/ReverseIterationTest.cpp ==

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 113720. mgrang added a comment. I had accidentally pushed a wrong patch to this commit. Fixed it now. https://reviews.llvm.org/D37400 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h Index: include/clang/StaticAnalyzer/Core/PathSens

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. https://reviews.llvm.org/D37400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 114089. mgrang added a comment. Addressed comments. https://reviews.llvm.org/D37400 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h Index: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:407 class ExplodedNodeSet { - typedef llvm::SmallPtrSet ImplTy; + typedef llvm::SmallSetVector ImplTy; ImplTy Impl; SmallSetVector size has to be a pow

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312677: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode (authored by mgrang). Changed prior to commit: https://reviews.llvm.org/D37400?vs=114089&id=114091#toc Repository: rL

<    1   2   3   4   >