[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-08 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D100085#2675965 , @MaskRay wrote: > In D100085#2675919 , @FreddyYe > wrote: > >> Hi @MaskRay, I tried to refactor, but met some difficulties. Since these >> defines are dictionary or

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 336022. SaurabhJha added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 Files: clang/include/clang/AST/OperationKinds.def clang/incl

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1219 + } else { +SrcElementTy = SrcTy; +DstElementTy = DstTy; fhahn wrote: > We should be able to assert here that both types are not matrix types, I > think? I did `!SrcTy

[PATCH] D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast

2021-04-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. This looks amazing, thanks a lot. I have one final question: can we already remove `dispatchCast()`&Co.? I don't see any other call sites anymore. Looks like it becomes dead code after your patch. Which is fairly shocking and mind blowing that we've organically developed t

[PATCH] D88905: [Clang] Allow "ext_vector_type" applied to Booleans

2021-04-08 Thread Simon Moll via Phabricator via cfe-commits
simoll added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88905/new/ https://reviews.llvm.org/D88905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D100092: [clang-tidy] cppcoreguidelines-declare-loop-variable-in-the-initializer: a new check

2021-04-08 Thread Fabian Thurnheer via Phabricator via cfe-commits
DNS320 created this revision. DNS320 added reviewers: aaron.ballman, njames93, alexfh. DNS320 added a project: clang-tools-extra. Herald added subscribers: shchenz, kbarton, xazax.hun, mgorny, nemanjai. DNS320 requested review of this revision. This check implements the ES.74

[clang] 20105b6 - [clang] Speedup line offset mapping computation

2021-04-08 Thread via cfe-commits
Author: serge-sans-paille Date: 2021-04-08T10:11:56+02:00 New Revision: 20105b6b4874a85813f7a4a3d8ad2a0f023dda14 URL: https://github.com/llvm/llvm-project/commit/20105b6b4874a85813f7a4a3d8ad2a0f023dda14 DIFF: https://github.com/llvm/llvm-project/commit/20105b6b4874a85813f7a4a3d8ad2a0f023dda14.d

[PATCH] D99984: [RISCV] Prevent __builtin_riscv_orc_b_64 from being compiled RV32 target.

2021-04-08 Thread Fraser Cormack via Phabricator via cfe-commits
frasercrmck added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:259 .Case("riscv64", Is64Bit) + .Case("64bit", Is64Bit) .Case("m", HasM) What's the difference between this new feature and `riscv64` above? Repository: rG LLV

[PATCH] D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1

2021-04-08 Thread Ten Tzen via Phabricator via cfe-commits
tentzen updated this revision to Diff 336033. tentzen added a comment. fixed command option typos in two test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80344/new/ https://reviews.llvm.org/D80344 Files: clang/include/clang/AST/Stmt.h

[clang] 8fcb114 - [OpenCL] Fix mipmap read_image return types

2021-04-08 Thread Sven van Haastregt via cfe-commits
Author: Sven van Haastregt Date: 2021-04-08T09:51:44+01:00 New Revision: 8fcb114d002bf7cd61309af80b26af68389944d0 URL: https://github.com/llvm/llvm-project/commit/8fcb114d002bf7cd61309af80b26af68389944d0 DIFF: https://github.com/llvm/llvm-project/commit/8fcb114d002bf7cd61309af80b26af68389944d0.

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-08 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: llvm/lib/Target/X86/X86.td:790 + FeatureFSRM]; + list RKLTuning = ICLTuning; + list RKLFeatures = Using ICLTuning suggests we should still be avoiding 512-bit ops (Feat

[PATCH] D97116: Reduce the number of attributes attached to each function

2021-04-08 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:496 //function. - CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(LargestVectorWidth)); + if (LargestVectorWidth) +CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(Largest

[PATCH] D99949: [AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed

2021-04-08 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal updated this revision to Diff 336037. pdhaliwal added a comment. Herald added subscribers: jansvoboda11, dang. - Addressed review comments - Added LIT test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99949/new/ https://reviews.llvm

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Thanks for the latest update! This basically looks good to me, with a few final nits! Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8584 +def err_invalid_conversion_between_matrixes : Error< + "conversion between matrix type%diff{ $ and $

[clang] e81b340 - [flang][driver] Add debug options not requiring semantic checks

2021-04-08 Thread Andrzej Warzynski via cfe-commits
Author: Andrzej Warzynski Date: 2021-04-08T09:44:19Z New Revision: e81b3401177a67481605447ea5250d8345cb4341 URL: https://github.com/llvm/llvm-project/commit/e81b3401177a67481605447ea5250d8345cb4341 DIFF: https://github.com/llvm/llvm-project/commit/e81b3401177a67481605447ea5250d8345cb4341.diff

[PATCH] D99645: [flang][driver] Add debug options not requiring semantic checks

2021-04-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe81b3401177a: [flang][driver] Add debug options not requiring semantic checks (authored by awarzynski). Changed prior to commit: https://reviews.l

[PATCH] D99645: [flang][driver] Add debug options not requiring semantic checks

2021-04-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D99645#2674496 , @kiranchandramohan wrote: > LGTM. > > Might be good to have a test for fdebug-dump-parse-tree-no-sema. Good point, added before merging into main! Thank you for reviewing. Repository: rG LLVM Github Mon

[PATCH] D99501: ignore -flto= options recognized by GCC

2021-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D99501#2668774 , @lebedev.ri wrote: > Tests missing. > This somehow wasn't sent to cfe-commits list @doko could you add a test? e.g. in `clang/test/Driver/clang_f_opts.c`, which already contains a check for `-ffat-lto-objects`

[PATCH] D97116: Reduce the number of attributes attached to each function

2021-04-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:496 //function. - CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(LargestVectorWidth)); + if (LargestVectorWidth) +CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(Lar

[clang] 6e8601f - [OpenCL][Docs] Fix typo in section label

2021-04-08 Thread Anastasia Stulova via cfe-commits
Author: Anastasia Stulova Date: 2021-04-08T10:59:44+01:00 New Revision: 6e8601ff4ae1154e6f7963c70453b4818d7453e0 URL: https://github.com/llvm/llvm-project/commit/6e8601ff4ae1154e6f7963c70453b4818d7453e0 DIFF: https://github.com/llvm/llvm-project/commit/6e8601ff4ae1154e6f7963c70453b4818d7453e0.d

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2021-04-08 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. Thank you all! Incremental change makes sense to me as well. It will help smooth landing without buildbot failures. I'll start writing patches soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82317/new/ https://reviews.l

[PATCH] D99580: [CLANG] [DebugInfo] Convert File name to native format

2021-04-08 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui updated this revision to Diff 336057. kamleshbhalui added a comment. Making changes effective only for windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99580/new/ https://reviews.llvm.org/D99580 Files: clang/lib/CodeGen/CGDebu

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 336058. fhahn added a comment. Change names of loopMustProgress to checkIfLoopMustProgress. Same for functionMustProgress. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96418/new/ https://reviews.llvm.org/D96418

[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Well, that is a nice exercise for "two pointer" problems, but can we please talk about the actual use case for it? Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:136 + +RangeSet RangeSet::Factory::unite(RangeSet LHS, RangeSet R

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:801 + SourceLocToDebugLoc(R.getEnd()), + loopMustProgress(CondIsConst)); lebedev.ri wrote: > fhahn wrote: > > lebedev.ri wrote: > > > Now this doesn't make sen

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-04-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. Seems fine to me. Might be good for someone else (@aaron.ballman ?) to also take a look, not sure. Thank you. Comment at: clang/lib/CodeGen/CGStmt.cpp:801 +

[PATCH] D100054: Handle flags such as -m32 when computing the prefix for programs/runtime libs

2021-04-08 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 336059. arichardson added a comment. Add the raw triple prefix for programs (but prefer the adjusted triple) and always use the adjusted triple for libraries. Should hopefully address the feedback from @joerg. Also improve tests to check that we don't in

[PATCH] D100054: Handle flags such as -m32 when computing the prefix for programs/runtime libs

2021-04-08 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 336061. arichardson added a comment. Drop chunk that is no longer necessary Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100054/new/ https://reviews.llvm.org/D100054 Files: clang/include/clang/Driver/Dr

[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/unittests/StaticAnalyzer/RangeSetTest.cpp:471 + + // RHS adjacent to LHS in between. + // RHS => ___ I guess I also want to have more cases where ranges from RHS are in between ranges from LHS, also i

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-04-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:237 + if (auto Hook = Mod.astHooks()) { +Inputs.PreambleHooks.emplace_back(std::move(Hook)); +Inputs.MainFileHooks.emplace_back(Mod.astHooks()); Now we're

[PATCH] D99995: [OpenMP51] Initial support for masked directive and filter clause

2021-04-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2814 } if (CKind == OMPC_ordered && PP.LookAhead(/*N=*/0).isNot(tok::l_paren)) This can be simplified like this: ``` if (!FirstClause) { Diag(Tok, diag::err_omp_more_

[PATCH] D99353: [driver] Make `clang` warn rather then error on `flang` options

2021-04-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 336075. awarzynski added a comment. Refine comments, remove code for aliases (which didn't work anyway) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99353/new/ https://reviews.llvm.org/D99353 Files: clan

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 336077. vsavchenko added a comment. Require std::data to accept exactly 1 argument Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99260/new/ https://reviews.llvm.org/D99260 Files: clang/lib/StaticAnalyzer/

[clang] 9f0d8ba - [analyzer] Fix dead store checker false positive

2021-04-08 Thread Valeriy Savchenko via cfe-commits
Author: Valeriy Savchenko Date: 2021-04-08T16:12:42+03:00 New Revision: 9f0d8bac144c8eb1ca4aff823b2e2d5a0f990072 URL: https://github.com/llvm/llvm-project/commit/9f0d8bac144c8eb1ca4aff823b2e2d5a0f990072 DIFF: https://github.com/llvm/llvm-project/commit/9f0d8bac144c8eb1ca4aff823b2e2d5a0f990072.d

[PATCH] D99262: [analyzer] Fix dead store checker false positive

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9f0d8bac144c: [analyzer] Fix dead store checker false positive (authored by vsavchenko). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D99949: [AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed

2021-04-08 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/include/clang/Driver/Options.td:921 HelpText<"HIP runtime installation path, used for finding HIP version and adding HIP include path.">; +def amdgpu_arch_tool_path_EQ : Joined<["--"], "amdgpu-arch-tool-path=">, Group,

[PATCH] D99291: [AIX] Support init priority attribute

2021-04-08 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L marked an inline comment as done. Xiangling_L added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:663 + // Create our global prioritized cleanup function. + if (!PrioritizedCXXStermFinalizers.empty()) { jasonliu wrote: > Just noting

[clang] 9229465 - [NFC] Fix warning introduced in 20105b6b4874a85813f7a4a3d8ad2a0f023dda14

2021-04-08 Thread via cfe-commits
Author: serge-sans-paille Date: 2021-04-08T16:11:01+02:00 New Revision: 9229465bad8504190bdfb92be829cb6c1157fea5 URL: https://github.com/llvm/llvm-project/commit/9229465bad8504190bdfb92be829cb6c1157fea5 DIFF: https://github.com/llvm/llvm-project/commit/9229465bad8504190bdfb92be829cb6c1157fea5.d

[PATCH] D100092: [clang-tidy] cppcoreguidelines-declare-loop-variable-in-the-initializer: a new check

2021-04-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/DeclareLoopVariableInTheInitializerCheck.cpp:28 + + diag(MatchedForStmt->getBeginLoc(), + "Prefer to declare a loop variable in the initializer part of a " It

[PATCH] D99526: [RISCV][Clang] Add RVV Widening Integer Add/Subtract intrinsic functions.

2021-04-08 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 336100. khchen added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99526/new/ https://reviews.llvm.org/D99526 Files: clang/include/clang/Basic/riscv_vector.td clang/test/CodeGen/RISCV/rvv-

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:561-568 + for (const auto *A : Attrs) { +if (A->getKind() == attr::MustTail) { + if (!checkMustTailAttr(SubStmt, *A)) { +return SubStmt; + } + setFunctionHasMustTail(); +}

[PATCH] D99668: [RISCV][Clang] Add some RVV Floating-Point intrinsic functions.

2021-04-08 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 336101. khchen added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99668/new/ https://reviews.llvm.org/D99668 Files: clang/include/clang/Basic/riscv_vector.td clang/test/CodeGen/RISCV/rvv-

[PATCH] D97116: Reduce the number of attributes attached to each function

2021-04-08 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:496 //function. - CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(LargestVectorWidth)); + if (LargestVectorWidth) +CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(Largest

[PATCH] D99181: [analyzer] Fix crash on spaceship operator (PR47511)

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 336108. vsavchenko marked 4 inline comments as done. vsavchenko added a comment. Change produced SVal for the spaceship operator from Undefined to Unknown Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99181/n

[PATCH] D99353: [driver] Make `clang` warn rather then error on `flang` options

2021-04-08 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I've just send an RFC for this change to cfe-dev: https://lists.llvm.org/pipermail/cfe-dev/2021-April/067981.html. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99353/new/ https://reviews.llvm.org/D99353 __

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D97669#2665865 , @benshi001 wrote: > In D97669#2661560 , @Anastasia wrote: > >> Is `stdio.h` used by anything? > > No. `stdio.h` is not used. But if I do `#include `, then `-I > /usr/

[PATCH] D99669: [RISCV][Clang] Add more RVV Floating-Point intrinsic functions.

2021-04-08 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 336117. khchen added a comment. rebase. I don't know why `let` cannot overide field when we change instantiate single multiclasses to inheritance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99669/new/ https

[PATCH] D99964: [RISCV][Clang] Add all RVV Reduction intrinsic functions.

2021-04-08 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 336123. khchen added a comment. rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99964/new/ https://reviews.llvm.org/D99964 Files: clang/include/clang/Basic/riscv_vector.td clang/test/CodeGen/RISCV/rvv

[PATCH] D99984: [RISCV] Prevent __builtin_riscv_orc_b_64 from being compiled RV32 target.

2021-04-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:259 .Case("riscv64", Is64Bit) + .Case("64bit", Is64Bit) .Case("m", HasM) frasercrmck wrote: > What's the difference between this new feature and `riscv64` above?

[PATCH] D97116: Reduce the number of attributes attached to each function

2021-04-08 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:496 //function. - CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(LargestVectorWidth)); + if (LargestVectorWidth) +CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(Large

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-08 Thread Josh Haberman via Phabricator via cfe-commits
haberman updated this revision to Diff 336130. haberman added a comment. - Added FIXME for attribute refactoring. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99517/new/ https://reviews.llvm.org/D99517 Files: clang/include/clang/AST/Expr.h cl

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-08 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 336133. FreddyYe added a comment. Herald added a subscriber: jfb. update lit test and clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100085/new/ https://reviews.llvm.org/D100085 Files: clang/lib

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-08 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. Hi @MaskRay , I tried to refactor the test file by assembling the common CHECKs. But I found it will lead to too many check-prefixes ine one RUN line. For example, // RUN: %clang -march=c3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN

[PATCH] D100118: [clang] RFC Support new arithmetic __fence builtin to control floating point optiization

2021-04-08 Thread Melanie Blower via Phabricator via cfe-commits
mibintc created this revision. mibintc added a reviewer: kpn. Herald added a subscriber: jfb. mibintc requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commits. This is a proposal to add a new clang builtin, __arithmetic_fence. The purpose of

[PATCH] D99984: [RISCV] Prevent __builtin_riscv_orc_b_64 from being compiled RV32 target.

2021-04-08 Thread Fraser Cormack via Phabricator via cfe-commits
frasercrmck accepted this revision. frasercrmck added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Basic/Targets/RISCV.cpp:259 .Case("riscv64", Is64Bit) + .Case("64bit", Is64Bit) .Case("m", HasM) craig

[PATCH] D99995: [OpenMP51] Initial support for masked directive and filter clause

2021-04-08 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2814 } if (CKind == OMPC_ordered && PP.LookAhead(/*N=*/0).isNot(tok::l_paren)) ABataev wrote: > This can be simplified like this: > ``` > if (!FirstClause) { > Diag(Tok

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-08 Thread Josh Haberman via Phabricator via cfe-commits
haberman updated this revision to Diff 336141. haberman added a comment. - Factored duplicated code into a method on MustTailAttr. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99517/new/ https://reviews.llvm.org/D99517 Files: clang/include/clan

[PATCH] D99984: [RISCV] Prevent __builtin_riscv_orc_b_64 from being compiled RV32 target.

2021-04-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:259 .Case("riscv64", Is64Bit) + .Case("64bit", Is64Bit) .Case("m", HasM) frasercrmck wrote: > craig.topper wrote: > > frasercrmck wrote: > > > What's the differen

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-08 Thread Josh Haberman via Phabricator via cfe-commits
haberman added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:561-568 + for (const auto *A : Attrs) { +if (A->getKind() == attr::MustTail) { + if (!checkMustTailAttr(SubStmt, *A)) { +return SubStmt; + } + setFunctionHasMustTail(); +}

[PATCH] D99181: [analyzer] Fix crash on spaceship operator (PR47511)

2021-04-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Looks great now! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99181/new/ https://reviews.llvm.org/D99181 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D99593: [Clang][RISCV] Implement vlseg builtins.

2021-04-08 Thread Zakk Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:594 auto PType = Transformer.back(); + static unsigned NFCount = 0; switch (PType) { rogfer01 wrote: > Was this meant to be `static` here? Maybe we can create a new complex ty

[PATCH] D100124: [Clang][NVPTX] Add NVPTX intrinsics and builtins for CUDA PTX redux.sync instructions

2021-04-08 Thread Steffen Larsen via Phabricator via cfe-commits
steffenlarsen created this revision. steffenlarsen added reviewers: jdoerfert, jholewinski. Herald added subscribers: hiraditya, yaxunl. steffenlarsen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Adds NVPTX builtins and

[PATCH] D97462: [clang][cli] Round-trip cc1 arguments in assert builds

2021-04-08 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I just merged this commit into our CHERI fork and noticed some failing tests due to round tripping: We add some additional CodeGenOptions and LangOptions, but are not including those in the generated command line. For example, I added an additional `std::string CHER

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-08 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 336148. jamieschmeiser added a comment. Reformat to satisfy clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 Files: clang/lib/Sema/SemaExpr.cpp clang/test/Sema/pointer-addition.c Ind

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:561-568 + for (const auto *A : Attrs) { +if (A->getKind() == attr::MustTail) { + if (!checkMustTailAttr(SubStmt, *A)) { +return SubStmt; + } + setFunctionHasMustTail(); +}

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks great now, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99260/new/ https://reviews.llvm.org/D99260 ___

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-08 Thread Josh Haberman via Phabricator via cfe-commits
haberman updated this revision to Diff 336153. haberman added a comment. - Moved calling convention check to happen as early as possible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99517/new/ https://reviews.llvm.org/D99517 Files: clang/inclu

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha updated this revision to Diff 336154. SaurabhJha added a comment. Addressed latest round of comments. Also rebased with latest main as the windows build failed for some reason Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ http

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-08 Thread Josh Haberman via Phabricator via cfe-commits
haberman added a comment. In D99517#2667025 , @rjmccall wrote: > You should structure this code so it's easy to add exceptions for certain > calling conventions that can support tail calls with weaker restrictions > (principally, callee-pop conventions).

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added inline comments. Comment at: clang/test/CodeGen/matrix-cast.c:82 + +void cast_unsigned_short_int_to_unsigned_int(unsigned_short_int_5x5 s, unsigned_int_5x5 i) { + // CHECK-LABEL: define{{.*}} void @cast_unsigned_short_int_to_unsigned_int(<25 x i16> %s, <25 x i

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I'm still not satisfied with the `addressof`, but I won't block this either. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99260/new/ https://reviews.llvm.org/D99260 ___ cfe-com

[PATCH] D100120: [RISCV][Clang] Add all RVV Mask intrinsic functions.

2021-04-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. LGTM other than that inheritance question Comment at: clang/include/clang/Basic/riscv_vector.td:247 +list> suffixes_prototypes> { + defm "" : RVVBuiltinSet; +} Can we use inheritance here? Repository:

[PATCH] D100127: [RISCV][Clang] Add some RVV Permutation intrinsic functions.

2021-04-08 Thread Zakk Chen via Phabricator via cfe-commits
khchen created this revision. khchen added reviewers: craig.topper, rogfer01, HsiangKai, evandro, liaolucy, jrtc27. Herald added subscribers: vkmr, frasercrmck, dexonsmith, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/X86.td:767 + // Rocketlake + list RKLAdditionalFeatures = [FeatureAES, + FeatureXSAVEC, FreddyYe wrote: > craig.topper wrote: > > Is this list t

[PATCH] D99877: [Clang] Allow processing of attributes on statements by plugins

2021-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the patch! Btw, can you add more context to the patch when you generate it (I usually use `-U 999` when making patches)? The changes look good so far, but I think `docs\ClangPlugins.rst` should be updated to document the new functionality and it woul

[PATCH] D99995: [OpenMP51] Initial support for masked directive and filter clause

2021-04-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5/new/ https://reviews.llvm.org/D5 ___ c

[clang] 4b958dd - [analyzer] Fix crash on spaceship operator (PR47511)

2021-04-08 Thread Valeriy Savchenko via cfe-commits
Author: Valeriy Savchenko Date: 2021-04-08T20:28:05+03:00 New Revision: 4b958dd6bccab386be432cac99332b867ab9ee22 URL: https://github.com/llvm/llvm-project/commit/4b958dd6bccab386be432cac99332b867ab9ee22 DIFF: https://github.com/llvm/llvm-project/commit/4b958dd6bccab386be432cac99332b867ab9ee22.d

[PATCH] D99181: [analyzer] Fix crash on spaceship operator (PR47511)

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4b958dd6bcca: [analyzer] Fix crash on spaceship operator (PR47511) (authored by vsavchenko). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99181/new/ https:

[clang] 663ac91 - [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Valeriy Savchenko via cfe-commits
Author: Valeriy Savchenko Date: 2021-04-08T20:30:12+03:00 New Revision: 663ac91ed1d6156e848e5f5f00cd7e7dd6cf867f URL: https://github.com/llvm/llvm-project/commit/663ac91ed1d6156e848e5f5f00cd7e7dd6cf867f DIFF: https://github.com/llvm/llvm-project/commit/663ac91ed1d6156e848e5f5f00cd7e7dd6cf867f.d

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG663ac91ed1d6: [analyzer] Fix false positives in inner pointer checker (PR49628) (authored by vsavchenko). Repository: rG LLVM Github Monorepo CHA

[PATCH] D100124: [Clang][NVPTX] Add NVPTX intrinsics and builtins for CUDA PTX redux.sync instructions

2021-04-08 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:460-468 +TARGET_BUILTIN(__nvvm_redux_sync_add_s32, "SiSii", "", SM_80) +TARGET_BUILTIN(__nvvm_redux_sync_min_s32, "SiSii", "", SM_80) +TARGET_BUILTIN(__nvvm_redux_sync_max_s32, "SiSii", "", SM_80)

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Please add a test for `(char*)0-(char*)0`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D100129: Tiny format fix

2021-04-08 Thread Nathan Sidwell via Phabricator via cfe-commits
urnathan created this revision. urnathan added reviewers: rsmith, bruno. urnathan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A mis-indented } in the middle of a function. Repository: rG LLVM Github Monorepo https://reviews.llvm.or

[PATCH] D99683: [HIP] Support ThinLTO

2021-04-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Any other concerns? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99683/new/ https://reviews.llvm.org/D99683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast

2021-04-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > Which is fairly shocking and mind blowing that we've organically developed > two independent implementations of casting, one for RegionStore and one for > everything else. Wait, no, nvm, please disregard this. It wasn't like this forever, i just happened to catch code in

[PATCH] D99675: RFC [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level

2021-04-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In D99675#2672138 , @kbsmith1 wrote: > In D99675#2671924 , @efriedma wrote: > >> How is llvm.arith.fence() different from using "freeze" on a floating-point >> value? The goal isn't reall

[PATCH] D90157: [analyzer] Rework SValBuilder::evalCast function into maintainable and clear way

2021-04-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I'm catching up and these changes look great. In D90157#2433657 , @steakhal wrote: > I've run the baseline and your patch as well on 15 projects, both with and > without Z3 refutation enabled. > (...) > All in all, I'm still in favor

[PATCH] D92024: [clang] Implement P0692R1 from C++20 (access checking on specializations and instantiations)

2021-04-08 Thread Alex Orlov via Phabricator via cfe-commits
aorlov added a comment. @krisb Thank you for your comments. I will consider them. Comment at: clang/test/CXX/temp/temp.spec/func.spec.cpp:105 +template void func10(A::B, int x) {} +template void func11(A::C, A::D, int) {} +template void func12() {} krisb wro

[PATCH] D99877: [Clang] Allow processing of attributes on statements by plugins

2021-04-08 Thread Josh Junon via Phabricator via cfe-commits
Qix- updated this revision to Diff 336172. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99877/new/ https://reviews.llvm.org/D99877 Files: clang/include/clang/Sema/ParsedAttr.h clang/lib/Sema/SemaStmtAttr.cpp Index: clang/lib/Sema/SemaStmtAttr

[PATCH] D99861: [Clang] Record tokens in attribute arguments for user-defined C++/C2x attributes

2021-04-08 Thread Josh Junon via Phabricator via cfe-commits
Qix- updated this revision to Diff 336173. Qix- added a comment. Updated the diff to include a lot more context (-U). Thanks again for the tip :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99861/new/ https://reviews.llvm.org/D99861 Files:

[PATCH] D100057: Remove warning "suggest braces" for aggregate initialization of an empty class with an aggregate base class.

2021-04-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. FWIW, I think this is acceptable, but I think even better would be to make it clear in the Standard that this is acceptable. Having spoken with a few folks about this, it doesn't appear to be specified very clearly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D75844: [clang] Set begin loc on GNU attribute parsed attrs

2021-04-08 Thread Brooks Moses via Phabricator via cfe-commits
brooksmoses added a comment. FWIW, this now causes Clang to produce an error on this code, when it didn't before: using namespace::foo __attribute__((deprecated("message"))); I discussed this with Richard Smith, who points out that GCC does not accept this and it's not permitted according to

[clang] 02ef996 - [RISCV] Prevent __builtin_riscv_orc_b_64 from being compiled RV32 target.

2021-04-08 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2021-04-08T11:34:56-07:00 New Revision: 02ef9963e1ad1e6ded539c830861a074b879dc70 URL: https://github.com/llvm/llvm-project/commit/02ef9963e1ad1e6ded539c830861a074b879dc70 DIFF: https://github.com/llvm/llvm-project/commit/02ef9963e1ad1e6ded539c830861a074b879dc70.diff

[PATCH] D99984: [RISCV] Prevent __builtin_riscv_orc_b_64 from being compiled RV32 target.

2021-04-08 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG02ef9963e1ad: [RISCV] Prevent __builtin_riscv_orc_b_64 from being compiled RV32 target. (authored by craig.topper). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D99037: [Matrix] Implement C-style explicit type conversions for matrix types

2021-04-08 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. The windows build failure is solved by itself and its all passing now! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99037/new/ https://reviews.llvm.org/D99037 ___ cfe-commits

[PATCH] D99994: [CodeView] Add CodeView support for PGO debug information

2021-04-08 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. IMO it's best to avoid adding fields to DICompileUnit if at all possible. It's the "god object" / "katamari damacy" of module debug info. Is there something about the IR module that indicates if PGO data is present or not? We could check that instead. I looked, but I wasn't

[PATCH] D100127: [RISCV][Clang] Add some RVV Permutation intrinsic functions.

2021-04-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100127/new/ https://reviews.llvm.org/D100127 ___

[clang] d508561 - [AIX] Support init priority attribute

2021-04-08 Thread Xiangling Liao via cfe-commits
Author: Xiangling Liao Date: 2021-04-08T15:40:09-04:00 New Revision: d5085617986e8ceabe7af02eb9c50f5350b3f980 URL: https://github.com/llvm/llvm-project/commit/d5085617986e8ceabe7af02eb9c50f5350b3f980 DIFF: https://github.com/llvm/llvm-project/commit/d5085617986e8ceabe7af02eb9c50f5350b3f980.diff

[PATCH] D99291: [AIX] Support init priority attribute

2021-04-08 Thread Xiangling Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Xiangling_L marked an inline comment as done. Closed by commit rGd5085617986e: [AIX] Support init priority attribute (authored by Xiangling_L). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[clang] 189310a - [AMDGPU] Allow -amdgpu-unsafe-fp-atomics to ignore denorm mode

2021-04-08 Thread Stanislav Mekhanoshin via cfe-commits
Author: Stanislav Mekhanoshin Date: 2021-04-08T12:46:36-07:00 New Revision: 189310a140fa1c33f8f4838560f567bab9e99245 URL: https://github.com/llvm/llvm-project/commit/189310a140fa1c33f8f4838560f567bab9e99245 DIFF: https://github.com/llvm/llvm-project/commit/189310a140fa1c33f8f4838560f567bab9e992

  1   2   >