[PATCH] D103184: Reland "[AArch64] handle -Wa,-march="

2021-06-23 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2831542 , @nickdesaulniers wrote: > Thanks for following up on a fix! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/

[PATCH] D103184: Reland "[AArch64] handle -Wa,-march="

2021-06-23 Thread Jian Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0eac975b51cc: Reland [AArch64] handle -Wa,-march= (authored by jcai19). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353440. jcai19 added a comment. After chatting with @nickdesaulniers, we have decided to abondoned D104656 in favor of keeping all the updates to this differential review for consistency. Appologies for any inconvenience

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D104656#2831034 , @nickdesaulniers wrote: >> This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931 >> > > Shouldn't that be `This relands commit >

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353431. jcai19 added a comment. Add comments explaning the difference with D103184 . The implementation in D103184 unconditionally calls getAArch64ArchFeaturesFromMarch, which returns

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353427. jcai19 added a comment. Use the original flawed code for future reference. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files:

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 closed this revision. jcai19 added a comment. Sorry it's probably clearer to use a new differential review for relanding. I've created https://reviews.llvm.org/D104656. Sorry for the noises. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: danielkiss, kristof.beyls. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353410. jcai19 edited the summary of this revision. jcai19 added a comment. The original implementation was indeed flawed. The failed test does not specify target triple so on X86 machines the issue won't happen unless I explicitly specify "-target aarch64".

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-07 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2803768 , @thakis wrote: > FWIW the failure goes away locally if I revert this change here, so it's > definitely due to this change here. > > Things have been red for a while, probably good to revert while you >

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-07 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2803513 , @thakis wrote: > This breaks tests on arm macs: http://45.33.8.238/macm1/10931/step_7.txt > > Please take a look and revert for now if it takes a while to fix. Thanks, will address the breakage ASAP.

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-07 Thread Jian Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfd11a26d368c: [AArch64] handle -Wa,-march= (authored by jcai19). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2799732 , @nickdesaulniers wrote: > That looks better, thanks @jcai19 . Based on @DavidSpickett 's LGTM I think > this is now ready to land. > > @DavidSpickett did ask: > >> Also please include in the commit message

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349938. jcai19 marked an inline comment as done. jcai19 added a comment. Update test cases based on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files:

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2798398 , @DavidSpickett wrote: >> LGTM; any additional thoughts @DavidSpickett ? > > A couple of additional tests just to be safe but otherwise LGTM. > > Also please include in the commit message the "rules" that

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349912. jcai19 added a comment. Address the comments and add more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files:

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-02 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349450. jcai19 marked an inline comment as done. jcai19 added a comment. Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files:

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-02 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added a comment. In D103184#2793055 , @DavidSpickett wrote: > $ cat /tmp/test.s > irg x0, x0 > $ aarch64-unknown-linux-gnu-as -march=armv8.5-a+memtag -march=armv8.1-a > /tmp/test.s -o /dev/null >

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: clang/test/Driver/aarch64-target-as-march.s:4 + +/// The last -march wins, and is handled before -Wa,march. All the values of -Wa,march options are added. +// RUN: %clang

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349150. jcai19 added a comment. Limit the change to assembler files, and add more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files:

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. Thanks for the comments. Please see my replies inlined. In D103184#2790486 , @DavidSpickett wrote: > Thanks for taking this up! I never got the time for it. > > I'd like to see the test check that there are no unused argument

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-05-27 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:217 + // after -march. And while only using the the value of last -march, it + // includes all the options passed via -Wa,-march. + success = true; joerg wrote: > This

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-05-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: danielkiss, kristof.beyls. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixed PR#48894 for AArch64. The issue has been fixed for Arm in https://reviews.llvm.org/D95872

[PATCH] D99556: Add support to -Wa,--version in clang

2021-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. Relanded without -fno-initegrated-as case at https://reviews.llvm.org/rG76d9bc72784d88f4dd57b9939e52c73739438af5. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99556/new/ https://reviews.llvm.org/D99556

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-31 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. We can probably remove the -fno-integraetd-as case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99556/new/ https://reviews.llvm.org/D99556 ___ cfe-commits mailing list

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-31 Thread Jian Cai via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. jcai19 marked an inline comment as done. Closed by commit rG3cc3c0f8352e: Add support to -Wa,--version in clang (authored by jcai19). Changed prior to commit:

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-30 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added inline comments. Comment at: clang/test/Driver/as-version.s:9 +// RUN: | FileCheck --check-prefix=GAS %s +// GAS: GNU assembler nickdesaulniers wrote: > What happens if we run this on windows (where I suspect that GAS isn't > available)? Perhaps

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-30 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 334315. jcai19 marked an inline comment as done. jcai19 added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99556/new/ https://reviews.llvm.org/D99556 Files:

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-30 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 334277. jcai19 marked an inline comment as done. jcai19 added a comment. Update tests to address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99556/new/ https://reviews.llvm.org/D99556 Files:

[PATCH] D99556: Add support to -Wa,--version in clang

2021-03-29 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang currently only supports -Wa,--version when -no-integrated-as is used. This adds support to -Wa,--version with -integrated-as. Link:

[PATCH] D83828: [clang][Driver] update the default location for clang crash diagnostics.

2020-07-14 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. jcai19 planned changes to this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D83828 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/crash-report-header.h

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-06-08 Thread Jian Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4db2b7024868: Add a flag to debug automatic variable initialization (authored by jcai19). Changed prior to commit: https://reviews.llvm.org/D77168?vs=269301=269324#toc Repository: rG LLVM Github

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-06-08 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 2 inline comments as done. jcai19 added a comment. In D77168#2080296 , @jfb wrote: > Two minor corrections, looks good otherwise. Thank you for all the comments and help. I have fixed the issues. Repository: rG LLVM Github Monorepo

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-06-08 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 269301. jcai19 added a comment. Fix typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-06-07 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. > If we have a mechanism bisecting pragmas, this option will not be needed. Yes we would have not had to start to work on this patch if such mechanism had been implemented. We can always migrate to that approach if said mechanism is implemented in the future. I think it

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-06-07 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 269103. jcai19 marked 4 inline comments as done. jcai19 added a comment. Cover VLAs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files:

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-06-07 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D77168#2073736 , @jfb wrote: > Can you add a test for the diagnostic firing after the correct number of > initializations? This should include a few types of auto-init, including VLAs. Thank you for the comments! It turned

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-06-02 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D77168#2069783 , @MaskRay wrote: > Do we have a mechanism bisecting pragmas? If yes, we can let that tool add > `#pragma clang attribute push([[clang::uninitialized]], apply_to = variable)` Not that I am aware of

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-06-02 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. @jfb Does the current implementation look good? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 ___ cfe-commits mailing list

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-20 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. Just want to follow up and see if anything is missing from the latest patch :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 ___

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 261740. jcai19 added a comment. Issue a warning when the proposed flag is used. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files:

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 261597. jcai19 added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang/Driver/Options.td

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1817 + CGM.countAutoVarInit(); +} + jfb wrote: > This isn't the right place to stop auto-init: we can get past this point even > without

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-05-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 261595. jcai19 marked 3 inline comments as done. jcai19 added a comment. Update based on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files:

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-28 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 260796. jcai19 added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/LangOptions.def

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-28 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added a comment. > - Allows bracketing as John suggested (lower / upper bounds where to stop / > start). I have made some updates to this patch based on the comments here. One question I have though is whether we should have another option for

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-28 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 260788. jcai19 added a comment. Update baesd on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/LangOptions.def

[PATCH] D78693: Make "#pragma clang attribute" support uninitialized attribute.

2020-04-23 Thread Jian Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfcbc613ad8b7: Make #pragma clang attribute support uninitialized attribute. (authored by jcai19). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78693/new/

[PATCH] D78693: Make "#pragma clang attribute" support uninitialized attribute.

2020-04-23 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 259652. jcai19 added a comment. Update test cases and documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78693/new/ https://reviews.llvm.org/D78693 Files: clang/docs/LanguageExtensions.rst

[PATCH] D78693: Make "#pragma clang attribute" support uninitialized attribute.

2020-04-23 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. Thank you all for the comments. I just realized I forgot to update clang documentation. Added that too. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78693/new/ https://reviews.llvm.org/D78693

[PATCH] D78693: Make "#pragma clang attribute" support uninitialized attribute.

2020-04-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When using -ftrivial-auto-var-init=* options to initiate automatic variables in a file, to disable initialization on some variables, currently we have to manually annotate the variables with

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. > I'd also like to see the pragma attribute approach, as well as byte-pattern > variability as I described. I don't think auto-narrowing is the only approach > we should push people towards. Thank you for all the feedback. I agree, the pragma attribute and the

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-15 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. > Right, support needs to be added, and I was wondering if you'd want to do > this because it seems like a tool that would help you out. Sorry for the delay. Yes the biggest advantage of this option would be to make automating bisection much easier. Or are you

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D77168#1955312 , @jfb wrote: > Do you not think `pragma` is a more general approach? That's what's used in a > bunch of other cases, and I'd like to see it attempted here. Yes I absolutely agree pragma is a great way to

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 4 inline comments as done. jcai19 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1814 +if (StopAfter) { + static unsigned Counter = 0; + if (Counter >= StopAfter) rjmccall wrote: > srhines wrote: > > MaskRay wrote: >

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. > For example, won't you need some way of figuring out what the 1,134th > variable in a file was after you've successfully bisected? Once we know the Xth variable is causing issues, we can compare the IR or assembly of -fvar-auto-init-stop-after=X-1 and

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 254242. jcai19 added a comment. Remove an unnecessary line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/AST/ASTContext.h

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-04-01 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 254240. jcai19 added a comment. Address some of the concerns. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/AST/ASTContext.h

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-03-31 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. Agreed, but having this option may save quite some time when bisecting files with many functions and stack variables, like this one . It will be much easier to write

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-03-31 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 254019. jcai19 added a comment. Add test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 Files: clang/include/clang/Basic/LangOptions.def

[PATCH] D77168: Add a flag to debug automatic variable initialization

2020-03-31 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add -ftrivial-auto-var-init-stop-after= to limit the number of times stack variables are initialized when -ftrivial-auto-var-init= is used to initialize stack variables to zero or a pattern. This

[PATCH] D68884: Add support to -Wa,-W in clang

2019-10-14 Thread Jian Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4ec5205da701: Add support to -Wa,-W in clang (authored by jcai19). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68884/new/ https://reviews.llvm.org/D68884

[PATCH] D68884: Add support to -Wa,-W in clang

2019-10-14 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 224908. jcai19 added a comment. For autogenerated comment log. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68884/new/ https://reviews.llvm.org/D68884 Files: clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D68884: Add support to -Wa,-W in clang

2019-10-11 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 224664. jcai19 added a comment. Update test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68884/new/ https://reviews.llvm.org/D68884 Files: clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D68884: Add support to -Wa,-W in clang

2019-10-11 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. jcai19 added a reviewer: bcain. jcai19 added subscribers: nickdesaulniers, manojgupta, llozano. jcai19 updated this revision to Diff 224663. jcai19 added a comment. Fix typos. Currently clang

[PATCH] D68884: Add support to -Wa,-W in clang

2019-10-11 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 224663. jcai19 added a comment. Fix typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68884/new/ https://reviews.llvm.org/D68884 Files: clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-09-16 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 220393. jcai19 added a comment. Thanks for the confirmation! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files:

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-27 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 3 inline comments as done. jcai19 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- New :doc:`bugprone-posix-return + ` check. Eugene.Zelenko wrote: > Check is not new, just modified. Such check should be after new

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-27 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 217532. jcai19 added a comment. Fix format and test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files:

[PATCH] D66627: [clang-tidy] add checks to bugprone-posix-return

2019-08-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 217236. jcai19 added a comment. Update Release Notes and check documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files:

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 217231. jcai19 added a comment. Add pthread function calls return values check to bugprone-posix-return. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files:

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added a comment. In D66627#1644775 , @gribozavr wrote: > Thanks for the contribution! In abstract, I think it is a good checker, > however, the implementation largely duplicates >

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 7 inline comments as done. jcai19 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PthreadReturnCheck.cpp:2 +//===--- PthreadReturnCheck.cpp - clang-tidy---===//

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 216768. jcai19 added a comment. Fix typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 216765. jcai19 added a comment. Fix format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: cfe-commits, jfb, xazax.hun, mgorny. Herald added a project: clang. Checks if any calls to POSIX pthread functions expect negative return values. These functions return either 0 on success or an errno on failure, which is positive only.

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-16 Thread Jian Cai via Phabricator via cfe-commits
jcai19 closed this revision. jcai19 added a comment. Upsteamed to r369173. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 ___ cfe-commits mailing list

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-16 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 215710. jcai19 added a comment. Fix frontend mcount unit tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files: clang/lib/Basic/Targets/ARM.cpp

[PATCH] D65037: push LR before mcount on ARM

2019-08-16 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 215703. jcai19 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix frontend unit tests for __gnu_mcount_nc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65037/new/

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-16 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. The changes have been upstreamed to r369147. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-16 Thread Jian Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369147: [ARM] push LR before __gnu_mcount_nc (authored by jcai19, committed by ). Changed prior to commit: https://reviews.llvm.org/D65019?vs=214945=215664#toc Repository: rL LLVM CHANGES SINCE

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-14 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D65019#1630354 , @nickdesaulniers wrote: > Great! LGTM and thank you for this patch. Please give 24hrs for > @eli.friedman or @kristof.beyls to leave comments before merging. Sounds good! Thanks for all the comments.

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp:1922 + const bool Thumb = Opcode == ARM::tBL_PUSHLR; + MachineOperand ReturnAddr = MI.getOperand(0); + assert(ReturnAddr.getReg() ==

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214945. jcai19 marked an inline comment as done. jcai19 added a comment. Updates based on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files:

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 2 inline comments as done. jcai19 added inline comments. Comment at: llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp:1931 + +// bl__gnu_mcount_nc +MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(ARM::tBL)); nickdesaulniers wrote: >

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214908. jcai19 added a comment. Fix a typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files: clang/lib/Basic/Targets/ARM.cpp

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214889. jcai19 added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files: clang/lib/Basic/Targets/ARM.cpp

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 4 inline comments as done. jcai19 added inline comments. Comment at: llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp:1927 +.add(predOps(ARMCC::AL)) +.addReg(ARM::LR); + efriedma wrote: > I think you need to ensure that lr

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-13 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214884. jcai19 added a comment. Mark LR as live-in at (t)BL_PUSHLR instruction. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files: clang/lib/Basic/Targets/ARM.cpp

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-12 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214698. jcai19 added a comment. Added back an accidently-deleted blank line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files: clang/lib/Basic/Targets/ARM.cpp

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-12 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D65019#1625780 , @efriedma wrote: > > It seems global-isel does not fall back to DAGISel? > > It does, for targets where it's enabled by default, or if you use the right > flags. I think you want `-global-isel

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-12 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214696. jcai19 added a comment. Add proper instruction selection options to unit test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files:

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-12 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: llvm/test/CodeGen/ARM/gnu_mcount_nc.ll:1-6 +; RUN: llc -mtriple=armv7a-linux-gnueabihf %s -o - | FileCheck %s --check-prefix=CHECK-ARM +; RUN: llc -mtriple=armv7a-linux-gnueabihf %s -o - |

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-09 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214496. jcai19 marked 2 inline comments as done. jcai19 added a comment. clang-format the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files:

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-09 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 4 inline comments as done. jcai19 added a comment. @efriedma I have changed my implementation to lower llvm.gnu.eabi.mcount intrinsic into pseudo instructions directly, instead of first lowering them into SelectionDAG call nodes. Thanks. Comment at:

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-09 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214491. jcai19 added a comment. Lower the intrinsic to pseudo instructions directly, instead of SelectDAG nodes first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-08 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: clang/lib/Basic/Targets/ARM.cpp:325 + ? "llvm.arm.gnu.eabi.mcount" : "\01mcount"; nickdesaulniers wrote: > Doesn't require

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-08 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 214263. jcai19 added a comment. Lower the new intrinsic when legalizing DAGs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65019/new/ https://reviews.llvm.org/D65019 Files: clang/lib/Basic/Targets/ARM.cpp

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-08 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D65019#1621670 , @efriedma wrote: > Yes, it's technically a "call", but you don't need the call lowering code. > That's dedicated to stuff like passing arguments, returning values, checking > whether the function can be

[PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2019-08-07 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added a comment. In D65019#1619511 , @efriedma wrote: > This seems better. > > I'm not sure I follow why this needs special handling in > SelectionDAGBuilder::visitIntrinsicCall, as opposed to just using >

  1   2   >