[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:564 + if (HasLAHFSAHF) +Builder.defineMacro("__LAHF_SAHF__"); if (HasLZCNT) craig.topper wrote: > MaskRay wrote: > > craig.topper wrote: > > > craig.topper wrote: > > > > It looks

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297441. MaskRay edited the summary of this revision. MaskRay added a comment. Always define __LAHF_SAHF__ in 32-bit mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89198/new/ https://reviews.llvm.org/D89198

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-10-10 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-hungarian-notation.cpp:25 +// RUN: {key: readability-identifier-naming.FunctionCase , value: CamelCase }, \ +// RUN: {key:

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:564 + if (HasLAHFSAHF) +Builder.defineMacro("__LAHF_SAHF__"); if (HasLZCNT) MaskRay wrote: > craig.topper wrote: > > craig.topper wrote: > > > It looks like gcc may define

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:564 + if (HasLAHFSAHF) +Builder.defineMacro("__LAHF_SAHF__"); if (HasLZCNT) craig.topper wrote: > craig.topper wrote: > > It looks like gcc may define this always in 32-bit mode?

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2020-10-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 297434. njames93 added a comment. FixIt now properly generated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89065/new/ https://reviews.llvm.org/D89065 Files: clang/lib/Parse/ParseDeclCXX.cpp Index:

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:564 + if (HasLAHFSAHF) +Builder.defineMacro("__LAHF_SAHF__"); if (HasLZCNT) craig.topper wrote: > It looks like gcc may define this always in 32-bit mode? More confusingly,

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:564 + if (HasLAHFSAHF) +Builder.defineMacro("__LAHF_SAHF__"); if (HasLZCNT) It looks like gcc may define this always in 32-bit mode? Repository: rG LLVM Github Monorepo

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Don't we need a change to X86.td too? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89197/new/ https://reviews.llvm.org/D89197 ___ cfe-commits mailing list

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:504 Finder->addMatcher( - functionDecl( - allOf(isDefinition(), unless(anyOf(isDefaulted(), isDeleted(), -

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Preprocessor/predefined-arch-macros-x86.c:20 + +/// TODO: __LAHF_SAHF__ +// X86_64_V2: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1 I'll add it after D89198 is accepted. Repository: rG LLVM Github

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: craig.topper, dim, fweimer. Herald added subscribers: cfe-commits, pengfei. Herald added a project: clang. MaskRay requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D89198 Files:

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: craig.topper, efriedma, fweimer, RKSimon, spatel. Herald added subscribers: llvm-commits, cfe-commits, pengfei, jfb, hiraditya. Herald added projects: clang, LLVM. MaskRay requested review of this revision. PR47686. These micro-architecture

[PATCH] D88645: [Annotation] Allows annotation to carry some additional constant arguments.

2020-10-10 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:2229-2233 + SmallVector Args = { + AnnotatedVal, + Builder.CreateBitCast(CGM.EmitAnnotationString(AnnotationStr), Int8PtrTy), + Builder.CreateBitCast(CGM.EmitAnnotationUnit(Location),

[PATCH] D88645: [Annotation] Allows annotation to carry some additional constant arguments.

2020-10-10 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added a comment. @erichkeane @alexandre.isoard @Naghasan: any feedback in the context of SYCL & HLS C++ about this feature extension? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88645/new/ https://reviews.llvm.org/D88645

[PATCH] D88659: [FE]Split SuitableAlign into two parts

2020-10-10 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D88659#2323631 , @jyknight wrote: > ISTM that comment may be incorrect. At least, the precedent set by GCC > appears to be that BIGGEST_ALIGNMENT and alloca _both_ should follow vector > alignment requirements

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87547#2323605 , @mati865 wrote: >> Or maybe even make it into a cmake option? > > I've considered it with default to true for unix and false for others but I'm > not sure if complicating Clang build options like that is

[PATCH] D88659: [FE]Split SuitableAlign into two parts

2020-10-10 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D88659#2319636 , @hubert.reinterpretcast wrote: > In D88659#2318203 , @jyknight wrote: > >> It seems like on AIX, `__BIGGEST_ALIGNMENT__` should just be set to 16, >> then. I'm not

[PATCH] D89177: [cmake] Add support for multiple distributions

2020-10-10 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I've not taken a thorough look at the changes, but I am definitely in favour of this change (conceptually). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89177/new/ https://reviews.llvm.org/D89177

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-10 Thread Mateusz Mikuła via Phabricator via cfe-commits
mati865 added a comment. > Or maybe even make it into a cmake option? I've considered it as default to true for unix and false for others but I'm not sure if complicating Clang build options like that is worth it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-10 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. Looks good to me, @aaron.ballman ? Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-function-cognitive-complexity.cpp:1017 + +static void

[PATCH] D89194: [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs

2020-10-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. Herald added subscribers: cfe-commits, lebedev.ri, xazax.hun. Herald added a reviewer: lebedev.ri. Herald added a project: clang. zinovy.nis requested review of this revision. Assert fires on weak refs like static void dont_crash_on_weak()

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Out of these, the second (only enable on mingw if libllvm is available) sounds sensible to me. Or maybe even make it into a cmake option? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87547/new/

[clang] 666ef0d - [AMDGPU] Add gfx602, gfx705, gfx805 targets

2020-10-10 Thread Tim Renouf via cfe-commits
Author: Tim Renouf Date: 2020-10-10T17:22:22+01:00 New Revision: 666ef0db208bb3880115bdc133e72e954ed55300 URL: https://github.com/llvm/llvm-project/commit/666ef0db208bb3880115bdc133e72e954ed55300 DIFF: https://github.com/llvm/llvm-project/commit/666ef0db208bb3880115bdc133e72e954ed55300.diff

[PATCH] D88916: [AMDGPU] Add gfx602, gfx705, gfx805 targets

2020-10-10 Thread Tim Renouf 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 rG666ef0db208b: [AMDGPU] Add gfx602, gfx705, gfx805 targets (authored by tpr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D78658: [clang][Frontend] Add missing error handling

2020-10-10 Thread LemonBoy via Phabricator via cfe-commits
LemonBoy added a comment. Ping with some more reviewers, hoping to land this in time for LLVM 99. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78658/new/ https://reviews.llvm.org/D78658 ___ cfe-commits mailing list

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2020-10-10 Thread Nathan James via Phabricator via cfe-commits
njames93 planned changes to this revision. njames93 added a comment. Just noticed this doesn't quite work as expected, will update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89065/new/ https://reviews.llvm.org/D89065

[PATCH] D89055: [analyzer] Wrong type cast occures during pointer dereferencing after type punning

2020-10-10 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. If you don't mind I would also request some credit in the summary since I've spent some time on this as well. Besides that I don't have much objection about this patch. It's defenately not my expertiese. Good job coming up with the fix though, I had to focus on other

[PATCH] D88477: [analyzer] Overwrite cast type in getBinding only if that was null originally

2020-10-10 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D88477#2319959 , @ASDenysPetrov wrote: > @NoQ @steakhal > > Hi, guys. > > I've just uploaded a patch for solving this and related D77062 > . Welcome to review D89055 >

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-10 Thread Mateusz Mikuła via Phabricator via cfe-commits
mati865 added a comment. > Older versions of lld didn't error out if exceeding the limit, this is fixed > in D86701 , unfortunately after the 11 > branch. Thanks, I'll backport it for MSYS2 LLVM 11 package. > With -DLLVM_ENABLE_ASSERTIONS=ON

[PATCH] D88645: [Annotation] Allows annotation to carry some additional constant arguments.

2020-10-10 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 297409. Tyker marked 11 inline comments as done. Tyker added a comment. addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88645/new/ https://reviews.llvm.org/D88645 Files:

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-10-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 297407. JonasToth added a comment. - fix test RUN line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54943/new/ https://reviews.llvm.org/D54943 Files:

[clang-tools-extra] 0db08e5 - [clangd] Map bits/stdint-intn.h and bits/stdint-uintn.h to cstdint.

2020-10-10 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2020-10-10T14:13:42+02:00 New Revision: 0db08e59c9d2d3b004ea61f96d823edff283ed25 URL: https://github.com/llvm/llvm-project/commit/0db08e59c9d2d3b004ea61f96d823edff283ed25 DIFF:

[PATCH] D87981: [X86] AMX programming model prototype.

2020-10-10 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87981/new/ https://reviews.llvm.org/D87981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-10-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked an inline comment as done. JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:46 + +void ConstCorrectnessCheck::registerMatchers(MatchFinder *Finder) { + const auto ConstType =

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-10-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 297405. JonasToth added a comment. - no delayed template parsing - adjust release note issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54943/new/ https://reviews.llvm.org/D54943 Files:

[PATCH] D89102: [X86] Add HRESET instruction.

2020-10-10 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 297402. pengfei added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89102/new/ https://reviews.llvm.org/D89102 Files: clang/docs/ClangCommandLineReference.rst

[PATCH] D89148: [SyntaxTree] Artificial use of the Mutations API.

2020-10-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 297398. eduucaldas added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89148/new/ https://reviews.llvm.org/D89148 Files: clang/include/clang/Tooling/Syntax/Mutations.h

[PATCH] D89147: [SyntaxTree] Improve the signature of `replaceChildRangeLowLevel`.

2020-10-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 297396. eduucaldas added a comment. Fix whitespacing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89147/new/ https://reviews.llvm.org/D89147 Files: clang/include/clang/Tooling/Syntax/Tree.h

[PATCH] D89147: [SyntaxTree] Improve the signature of `replaceChildRangeLowLevel`.

2020-10-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 297395. eduucaldas added a comment. Add role sanity-check. Introduce `GetBegin()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89147/new/ https://reviews.llvm.org/D89147 Files:

[PATCH] D89147: [SyntaxTree] Improve the signature of `replaceChildRangeLowLevel`.

2020-10-10 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 297389. eduucaldas added a comment. Add reachability assertions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89147/new/ https://reviews.llvm.org/D89147 Files: clang/include/clang/Tooling/Syntax/Tree.h

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87547#2322900 , @mati865 wrote: > With `-DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang > -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_RANLIB_COMPILER=llvm-ranlib > -DCMAKE_AR_COMPILER=llvm-ar -DCMAKE_LINKER=ld.lld

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-10-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The GCC docs seem pretty clear that `-frounding-math` is meant to allow dynamic access to the FP environment. There might be optimizations that are perfectly legal with a constant but non-default rounding mode, and there might be some flag that only implies that