[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > So xorl %ecx, %edx doesn't zero out all 64-bits of %rcx and %rdx? That's two > 32-bit writes to two different registers, isn't it? `xorl %ecx, %edx` only zero out bit 63:32 of `rdx`. 1. There's only 1 write to register in the instruction, i.e. `%edx`; 2. As a src, non

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-07 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds created this revision. Herald added subscribers: sdasgup3, wenzhicui, wrengr, Chia-hungDuan, foad, dcaballe, cota, teijeong, rdzhabarov, tatianashp, okura, jdoerfert, msifontes, jurahul, kuter, Kayjukh, grosul1, uenoku, Joonsoo, kerbowa, liufengdb, aartbik, mgester, arpith-jacob, csigg,

[PATCH] D119207: [CUDA][SPIRV] Convert CUDA kernels to SPIR-V kernels

2022-02-07 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > [CUDA][SPIRV] Convert CUDA kernels to SPIR-V kernels Rephrase this? This patch is about kernel *arguments*, right? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119207/new/ https://reviews.llvm.org/D119207 _

[PATCH] D119215: [clang] Properly cache member pointer LLVM types

2022-02-07 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 406705. aeubanks added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119215/new/ https://reviews.llvm.org/D119215 Files: clang/lib/CodeGen/CodeGenTypes.cpp clang/lib/CodeGen/CodeGenTypes

[PATCH] D119215: [clang] Properly cache member pointer LLVM types

2022-02-07 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When not going through the main Clang->LLVM type cache, we'd accidentally create multiple different opaque types for a member pointer type. This allow

[PATCH] D119124: Removing unnecessary condition

2022-02-07 Thread harish via Phabricator via cfe-commits
harishch4 updated this revision to Diff 406691. harishch4 added a comment. - Remove unnecessary condition - missed return Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119124/new/ https://reviews.llvm.org/D119124 Files: clang/lib/Frontend/Compil

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG3504937dfb2b: [C++20] [Modules] Don't create multiple global module fragment (authored by ChuanqiXu). Repository: rG LL

[clang] 3504937 - [C++20] [Modules] Don't create multiple global module fragment

2022-02-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-02-08T11:52:09+08:00 New Revision: 3504937dfb2b7d90b2c3b3c7b28c472d31489007 URL: https://github.com/llvm/llvm-project/commit/3504937dfb2b7d90b2c3b3c7b28c472d31489007 DIFF: https://github.com/llvm/llvm-project/commit/3504937dfb2b7d90b2c3b3c7b28c472d31489007.diff LO

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Although this wasn't accepted formally, both @urnathan and @rsmith says this looks good to them. So I guess it might not be bad to land this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115610/new/ https://reviews.llvm.org/D115610 _

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe39ba0461757: [C++20] [Coroutines] Warning for always_inline coroutine (authored by ChuanqiXu). Changed prior to commit: https://reviews.llvm.org/D115867?vs=406314&id=406684#toc Repository: rG LLVM G

[clang] e39ba04 - [C++20] [Coroutines] Warning for always_inline coroutine

2022-02-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-02-08T11:43:42+08:00 New Revision: e39ba0461757339f7172f6bc3882f41116bb7c13 URL: https://github.com/llvm/llvm-project/commit/e39ba0461757339f7172f6bc3882f41116bb7c13 DIFF: https://github.com/llvm/llvm-project/commit/e39ba0461757339f7172f6bc3882f41116bb7c13.diff LO

[PATCH] D119210: [RISCV] Recover the implication between Zve* extensions and the V extension.

2022-02-07 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan created this revision. jacquesguan added reviewers: eopXD, kito-cheng. Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, jdoerfert, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehou

[PATCH] D118437: [NFC] [Modules] Refactor ODR checking for default template argument in ASTReader

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTReader.cpp:10176-10184 +if (auto *TTP = dyn_cast(D)) + return TTP->hasDefaultArgument() && + !TTP->defaultArgumentWasInherited(); +if (auto *NTTP = dy

[PATCH] D118744: [clang] Fix some clang->llvm type cache invalidation issues

2022-02-07 Thread Arthur Eubanks 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 rG45084eab5e63: [clang] Fix some clang->llvm type cache invalidation issues (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SIN

[clang] 45084ea - [clang] Fix some clang->llvm type cache invalidation issues

2022-02-07 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-02-07T18:59:09-08:00 New Revision: 45084eab5e63550bf2fdbf325d8fa5498263130d URL: https://github.com/llvm/llvm-project/commit/45084eab5e63550bf2fdbf325d8fa5498263130d DIFF: https://github.com/llvm/llvm-project/commit/45084eab5e63550bf2fdbf325d8fa5498263130d.diff

[PATCH] D119201: [clang][Fuchsia] Ensure static sanitizer libs are only linked in after the -nostdlib check

2022-02-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Have you checked if all the tests are still passing? Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:160 +AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA); +ToolChain.addProfileRTLibs(Args, CmdArgs); This shouldn't mov

[PATCH] D119209: Implement -mctor_dtor_return_this ABI option.

2022-02-07 Thread Shu-Chun Weng via Phabricator via cfe-commits
scw created this revision. Herald added subscribers: dexonsmith, dang, kristof.beyls. scw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This option forces constructors and non-deleting destructors to return `this` pointer. This is simila

[PATCH] D119207: [CUDA][SPIRV] Convert CUDA kernels to SPIR-V kernels

2022-02-07 Thread Shangwu Yao via Phabricator via cfe-commits
shangwuyao created this revision. Herald added subscribers: carlosgalvezp, ThomasRaoux, Anastasia, yaxunl. shangwuyao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch converts CUDA pointer kernel arguments with default address spa

[PATCH] D118608: [NFC] Increase initial size of FoldingSets used in ASTContext and CodeGenTypes

2022-02-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu 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/D118608/new/ https://reviews.llvm.org/D118608

[PATCH] D119051: Fix pod-packed functionality to use the C++11 definition of pod-ness

2022-02-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D119051#3302125 , @rnk wrote: > Looks like the test fails on the Windows pre-merge bot: > https://buildkite.com/llvm-project/premerge-checks/builds/77696#1836f181-a998-4695-b587-a83239ea > > The debian bot seems to be fai

[PATCH] D119201: [clang][Fuchsia] Ensure static sanitizer libs are only linked in after the -nostdlib check

2022-02-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 406664. leonardchan marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119201/new/ https://reviews.llvm.org/D119201 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/li

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. In D110869#3302625 , @nickdesaulniers wrote: > All built+boot. I know @nathanchance pointed out an issue with some already > complex code, but I'm of the opinion that fn should be attributed in kernel > sources. Aside fro

[PATCH] D115403: [clang][driver] update the darwin driver to point to correct macho_embedded path

2022-02-07 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb58bf76f97f4: [clang][driver] update the darwin driver to point to correct macho_embedded path (authored by arphaman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[clang] b58bf76 - [clang][driver] update the darwin driver to point to correct macho_embedded path

2022-02-07 Thread Alex Lorenz via cfe-commits
Author: Alex Lorenz Date: 2022-02-07T16:50:58-08:00 New Revision: b58bf76f97f4bffe91bcf673dcc1231c0cfc0921 URL: https://github.com/llvm/llvm-project/commit/b58bf76f97f4bffe91bcf673dcc1231c0cfc0921 DIFF: https://github.com/llvm/llvm-project/commit/b58bf76f97f4bffe91bcf673dcc1231c0cfc0921.diff L

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/test/CodeGen/X86/zero-call-used-regs.ll:287 +entry: + store volatile i32 2, i32* @result, align 4 + ret i32 0 void wrote: > nickdesaulniers wrote: > > necessary? > It's main. Of course it's necessary. :-)

[PATCH] D119199: replace clang LLVM_ENABLE_PLUGINS -> CLANG_PLUGIN_SUPPORT in tests

2022-02-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny accepted this revision. mgorny added a comment. This revision is now accepted and ready to land. LLVMHello part LGTM. Dunno about the other part. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119199/new/ https://reviews.llvm.org/D119199 ___

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-07 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D118804#3302675 , @rsmith wrote: > I support this revert. Having received enough support, I'll go ahead and commit, and then propose backport to llvm 14 branch. But -- > - `malloc` always returns storage whose alignment is

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3296047 , @craig.topper wrote: > In D110869#3296031 , @void wrote: > >> In D110869#3295912 , @craig.topper >> wrote: >> >>> In D110869#3

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 406646. void marked 4 inline comments as done. void added a comment. General updates NFC.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files: clang/include/clang/B

[PATCH] D119201: [clang][Fuchsia] Ensure static sanitizer libs are only linked in after the -nostdlib check

2022-02-07 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:157 if (NeedsSanitizerDeps) linkSanitizerRuntimeDeps(ToolChain, CmdArgs); This function is a no-op because it tests for fuchsia targets. So it probably makes more

[PATCH] D119201: [clang][Fuchsia] Ensure static sanitizer libs are only linked in after the -nostdlib check

2022-02-07 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:130 - bool NeedsSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs); bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs); AddLinkerInputs(ToolChain, Inputs, Args, Cmd

[PATCH] D119201: [clang][Fuchsia] Ensure static sanitizer libs are only linked in after the -nostdlib check

2022-02-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added projects: clang, Sanitizers. Herald added a subscriber: abrachet. leonardchan requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D119201 Files: cla

[PATCH] D118744: [clang] Fix some clang->llvm type cache invalidation issues

2022-02-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk 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/D118744/new/ https://reviews.llvm.org/D118744 ___ cfe-c

[PATCH] D111100: enable plugins for clang-tidy

2022-02-07 Thread Jameson Nash via Phabricator via cfe-commits
vtjnash accepted this revision. vtjnash added a comment. Fixed by D119199 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D00/new/ https://reviews.llvm.org/D00 ___

[PATCH] D119199: replace clang LLVM_ENABLE_PLUGINS -> CLANG_PLUGIN_SUPPORT in tests

2022-02-07 Thread Jameson Nash via Phabricator via cfe-commits
vtjnash created this revision. Herald added a subscriber: mgorny. vtjnash requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. Fixes an issue noted in D00 . Repository: rG LLVM Github M

[PATCH] D119051: Fix pod-packed functionality to use the C++11 definition of pod-ness

2022-02-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 406628. dblaikie added a comment. Remove FieldClass check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119051/new/ https://reviews.llvm.org/D119051 Files: clang/lib/AST/RecordLayoutBuilder.cpp clang/test

[PATCH] D118511: Add a warning for not packing non-POD members in packed structs

2022-02-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie marked an inline comment as done. dblaikie added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:2029-2036 // The align if the field is not packed. This is to check if the attribute // was unnecessary (-Wpacked). CharUnits UnpackedFieldAlign =

[PATCH] D111100: enable plugins for clang-tidy

2022-02-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. In D00#3302396 , @vtjnash wrote: > It is a somewhat worthless test IMO, and might belong better in LLVM itself > (where this functionality is defined), but there does not appear to be any > other like it currently, and it was

[PATCH] D118511: Add a warning for not packing non-POD members in packed structs

2022-02-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 406626. dblaikie added a comment. Refactor the max/min/preferred alignment calculations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118511/new/ https://reviews.llvm.org/D118511 Files: clang/include/clang

[PATCH] D118350: [Clang][Sema][AIX][PowerPC] Emit byval alignment warning only when struct member is passed to a function

2022-02-07 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA marked 4 inline comments as done. ZarkoCA added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5220-5221 + Context.toCharUnitsFromBits(AA->getAlignment(Context)); + if (Alignment.getQuantity() >= 16) +Diag(Loc, diag::warn_no

[PATCH] D118350: [Clang][Sema][AIX][PowerPC] Emit byval alignment warning only when struct member is passed to a function

2022-02-07 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 406620. ZarkoCA added a comment. - Add note for diagnostic pointing to declaration of the struct member - cleaned up use of unneeded variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118350/new/ https://re

[PATCH] D111100: enable plugins for clang-tidy

2022-02-07 Thread Jameson Nash via Phabricator via cfe-commits
vtjnash added a comment. Ah, this looks annoying: there are apparently two flags, CLANG_PLUGIN_SUPPORT and LLVM_ENABLE_PLUGINS, but the existing build for clang uses CLANG_PLUGIN_SUPPORT to turn off the build support and LLVM_ENABLE_PLUGINS to turn off the tests (you might not have noticed this

[PATCH] D118744: [clang] Fix some clang->llvm type cache invalidation issues

2022-02-07 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D118744#3301977 , @rnk wrote: > This seems unfortunately complex, but I think we can live with it for a year > or two. > > Is it possible to use the compile time tracker to benchmark if this > clang->LLVM type cache actually

[PATCH] D119026: [HIP] Emit amdgpu_code_object_version module flag

2022-02-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 406605. yaxunl marked 2 inline comments as done. yaxunl added a comment. fix comments and add a driver test for -cc1as CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119026/new/ https://reviews.llvm.org/D119026 Files: clang/include/clang/Basic/Targ

[PATCH] D119026: [HIP] Emit amdgpu_code_object_version module flag

2022-02-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1166 CmdArgs.insert(CmdArgs.begin() + 1, "-mllvm"); +// -cc1as does not need -mcode-object-version option. +if (!IsCC1As) tra wro

[PATCH] D118632: [Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-07 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6041 + llvm::Value *EVal = CGF.EmitScalarExpr(E->IgnoreImpCasts()); + llvm::Value *DVal = D ? CGF.EmitScalarExpr(D->IgnoreImpCasts()) : nullptr; + Using `D->IgnoreImpCasts()` c

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I support this revert. `malloc`, `operator new`, and `operator new[]` (by the latter two I mean the usual global allocation functions, not user-provided ones) follow these rules: - `malloc` always returns storage whose alignment is at least the largest fundamental align

[PATCH] D118632: [Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-07 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/test/OpenMP/atomic_compare_codegen.cpp:1990 +// CHECK-NEXT:[[DD:%.*]] = alloca double, align 8 +// CHECK-NEXT:[[TMP0:%.*]] = load i8, i8* [[CE]], align 1 +// CHECK-NEXT:[[TMP1:%.*]] = atomicrmw umin i8* [[CX]], i

[PATCH] D118632: [Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-07 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/test/OpenMP/atomic_compare_codegen.cpp:1990 +// CHECK-NEXT:[[DD:%.*]] = alloca double, align 8 +// CHECK-NEXT:[[TMP0:%.*]] = load i8, i8* [[CE]], align 1 +// CHECK-NEXT:[[TMP1:%.*]] = atomicrmw umin i8* [[CX]], i

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. I tested the following linux-next configs with CONFIG_ZERO_CALL_USED_REGS enabled: - x86_64 defconfig - x86_64 defconfig + thin LTO - x86_64 defconfig + full LTO - i386 defco

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 406596. void marked an inline comment as done. void added a comment. Better define what we mean by "call-used". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files:

[PATCH] D119184: [clang] [concepts] Check constrained-auto return types for void-returning functions

2022-02-07 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Quuxplusone added reviewers: sammccall, saar.raz, rsmith, mizvekov, majnemer, riccibruno. Quuxplusone added a project: clang. Quuxplusone requested review of this revision. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues

[PATCH] D119094: [clang] Don't emit redundant warnings for 'return;'

2022-02-07 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 406585. Quuxplusone added a comment. This revision is now accepted and ready to land. Fix the two failing test cases (in one case by fixing what seems to have been a typo in the test). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119094/new/ h

[PATCH] D111100: enable plugins for clang-tidy

2022-02-07 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This is still breaking tests on our bots: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8822909450036830977/+/u/package_clang/stdout?format=raw FAIL: Clang Tools :: clang-tidy/CTTestTidyModule.cpp (17913 of 89667) TEST 'Clang

[PATCH] D117091: [Clang] Add attributes alloc_size and alloc_align to mm_malloc

2022-02-07 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Thanks! @jdoerfert ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117091/new/ https://reviews.llvm.org/D117091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D117091: [Clang] Add attributes alloc_size and alloc_align to mm_malloc

2022-02-07 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 406583. xbolva00 added a comment. protect against user macros CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117091/new/ https://reviews.llvm.org/D117091 Files: clang/lib/Headers/mm_malloc.h clang/test/Headers/Inputs/include/malloc.h clang/te

[PATCH] D119045: Fix address space for function types with AS qualifier

2022-02-07 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. In D119045#3302129 , @aaron.ballman wrote: > LGTM aside from some nits Thanks! Fixed the nits in commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119045/new/ https://review

[PATCH] D111100: enable plugins for clang-tidy

2022-02-07 Thread Jameson Nash via Phabricator via cfe-commits
vtjnash added a comment. It is a somewhat worthless test IMO, and might belong better in LLVM itself (where this functionality is defined), but there does not appear to be any other like it currently, and it was requested by a previous reviewer. Comparing to the code in LLVMTestingSupport, does

[PATCH] D119045: Fix address space for function types with AS qualifier

2022-02-07 Thread Elizabeth Andrews 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 rGed5b42b74188: Fix address space for function pointers with qualifier (authored by eandrews). Herald added a project: clang. Changed prior to commit:

[clang] ed5b42b - Fix address space for function pointers with qualifier

2022-02-07 Thread Elizabeth Andrews via cfe-commits
Author: Elizabeth Andrews Date: 2022-02-07T12:53:24-08:00 New Revision: ed5b42b741881a0a94e65999f0c785ec53b46511 URL: https://github.com/llvm/llvm-project/commit/ed5b42b741881a0a94e65999f0c785ec53b46511 DIFF: https://github.com/llvm/llvm-project/commit/ed5b42b741881a0a94e65999f0c785ec53b46511.d

[PATCH] D118437: [NFC] [Modules] Refactor ODR checking for default template argument in ASTReader

2022-02-07 Thread Nathan Sidwell via Phabricator via cfe-commits
urnathan added a comment. Looks like a good cleanup. Let me know what you think about the idea of retaining the switch. Comment at: clang/lib/Serialization/ASTReader.cpp:10176-10184 +if (auto *TTP = dyn_cast(D)) + return TTP->hasDefaultArgument() && +

[PATCH] D119178: Add support for generating debug-info for structured bindings of structs and arrays

2022-02-07 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: aprantl, dblaikie. shafik requested review of this revision. Currently we are not emitting debug-info for all cases of structured bindings a C++17 feature which allows us to bind names to subobjects in an initializer. A structured binding is

[PATCH] D118070: Make lld-link work in a non-MSVC shell

2022-02-07 Thread Peter Kasting via Phabricator via cfe-commits
pkasting updated this revision to Diff 406570. pkasting marked 2 inline comments as done. pkasting added a comment. Review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118070/new/ https://reviews.llvm.org/D118070 Files: clang/docs/too

[clang] 5c9ee35 - [Clang][Docs] Fix some typos in offloading design documentation

2022-02-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-02-07T15:24:17-05:00 New Revision: 5c9ee3513870cc597d50ba6145d6c2e60cdddb67 URL: https://github.com/llvm/llvm-project/commit/5c9ee3513870cc597d50ba6145d6c2e60cdddb67 DIFF: https://github.com/llvm/llvm-project/commit/5c9ee3513870cc597d50ba6145d6c2e60cdddb67.diff

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-02-07 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin updated this revision to Diff 406560. DiggerLin added a comment. run git format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119147/new/ https://reviews.llvm.org/D119147 Files: clang/include/clang/Driver/Job.h clang/lib/Driver/Job.c

[clang] 7ee8bd6 - [OpenMP] Use executable path when searching for lld

2022-02-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-02-07T15:09:51-05:00 New Revision: 7ee8bd60f225b36623114f52103b0ecb91e2fb64 URL: https://github.com/llvm/llvm-project/commit/7ee8bd60f225b36623114f52103b0ecb91e2fb64 DIFF: https://github.com/llvm/llvm-project/commit/7ee8bd60f225b36623114f52103b0ecb91e2fb64.diff

[PATCH] D118977: [NVPTX] Add more FMA intriniscs/builtins

2022-02-07 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D118977#3299974 , @jchlanda wrote: >> Target ISA Notes >> Requires sm_53 or higher. I think we do need this constraint applied to the new builtins, too. Right now nothing stops using them on a GPU where they do not exist and that

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think LLVM already doesn't do some tail merging optimizations on inline asm, but allowing the use of the attribute is more principled, and will block more optimizations (CSE). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84

[PATCH] D116221: [AArch64][ARM][Clang] Unaligned Access Warning Added

2022-02-07 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:223-224 const llvm::Triple &Triple, const ArgList &Args, + llvm::opt::ArgStr

[PATCH] D119157: [NVPTX] Add ex2 f16 support

2022-02-07 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Is the patch is ready for review? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119157/new/ https://reviews.llvm.org/D119157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D119045: Fix address space for function types with AS qualifier

2022-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some nits Comment at: clang/lib/AST/ASTContext.cpp:11962-11963 unsigned ASTContext::getTargetAddressSpace(QualType T) const { - return T->isFu

[PATCH] D119051: Fix pod-packed functionality to use the C++11 definition of pod-ness

2022-02-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Looks like the test fails on the Windows pre-merge bot: https://buildkite.com/llvm-project/premerge-checks/builds/77696#1836f181-a998-4695-b587-a83239ea The debian bot seems to be failing for unrelated (clang tooling) reasons. Comment at: clang/lib/AS

[PATCH] D118196: [syntax][pseudo] Implement LR parsing table.

2022-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked 11 inline comments as done. hokein added a comment. comments around LRAutomaton should be addressed in the separate patch, https://reviews.llvm.org/D119172. Comment at: clang/include/clang/Tooling/Syntax/Pseudo/LRAutomaton.h:32 +public: + Item(RuleID ID, uint8_t

[PATCH] D119026: [HIP] Emit amdgpu_code_object_version module flag

2022-02-07 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1166 CmdArgs.insert(CmdArgs.begin() + 1, "-mllvm"); +// -cc1as does not need -mcode-object-version option. +if (!

[PATCH] D119172: [pseudo] Implement LRGraph

2022-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: mgrang, mgorny. hokein requested review of this revision. Herald added a project: clang. LRGraph is the key component of the clang pseudo parser, it is a deterministic handle-finding finite-state machine, w

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-07 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 406546. tianshilei1992 added a comment. fix clang crash and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118632/new/ https://reviews.llvm.org/D118632 Files: clang/include/clang/AST/StmtOpenMP.

[PATCH] D118744: [clang] Fix some clang->llvm type cache invalidation issues

2022-02-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This seems unfortunately complex, but I think we can live with it for a year or two. Is it possible to use the compile time tracker to benchmark if this clang->LLVM type cache actually saves compile time? This change disables the cache pretty often, and I'm wondering if "p

[PATCH] D119026: [HIP] Emit amdgpu_code_object_version module flag

2022-02-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 406536. yaxunl marked 2 inline comments as done. yaxunl added a comment. add a test for -cc1as CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119026/new/ https://reviews.llvm.org/D119026 Files: clang/include/clang/Basic/TargetOptions.h clang/incl

[PATCH] D119166: [clang][ARM] Re-word PACBTI warning.

2022-02-07 Thread Momchil Velikov via Phabricator via cfe-commits
chill added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:149 +def warn_incompatible_branch_protection_option: Warning < + "'-mbranch-protection=' option incompatible with the '%0' architecture">, InGroup; "is incompatible"

[PATCH] D119166: [clang][ARM] Re-word PACBTI warning.

2022-02-07 Thread Amilendra Kodithuwakku via Phabricator via cfe-commits
amilendra created this revision. amilendra added reviewers: chill, stuij. Herald added a subscriber: kristof.beyls. amilendra requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The original warning added in D115501

[PATCH] D119165: [clang-tidy] Add processing lambda captures at bugprone-use-after-move check

2022-02-07 Thread Ivan Murashko via Phabricator via cfe-commits
ivanmurashko created this revision. ivanmurashko added reviewers: alexfh, sammccall, mboehme, aaron.ballman. ivanmurashko added projects: clang, clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. ivanmurashko requested review of this revision. Herald added a subscriber: cfe-comm

[PATCH] D118070: Make lld-link work in a non-MSVC shell

2022-02-07 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. I think this looks great. maskray, I kind of see where you're coming from. And I'm _very_ sympathetic to keeping Support small(er). On the other hand, this is a single file that doesn't requi

[PATCH] D119026: [HIP] Emit amdgpu_code_object_version module flag

2022-02-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Driver/Options.td:3445 def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group, - HelpText<"Specify code object ABI version. Defaults to 4. (AMDGPU only)"

[PATCH] D118070: Make lld-link work in a non-MSVC shell

2022-02-07 Thread Peter Kasting via Phabricator via cfe-commits
pkasting updated this revision to Diff 406526. pkasting added a comment. This fixes a failing test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118070/new/ https://reviews.llvm.org/D118070 Files: clang/docs/tools/clang-formatted-files.txt cl

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-07 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Also, __builtin_malloc(...) can be used to avoid any alignment assumptions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118804/new/ https://reviews.llvm.org/D118804 ___ cfe-co

[PATCH] D118755: [clangd] Crash in __memcmp_avx2_movbe

2022-02-07 Thread Ivan Murashko via Phabricator via cfe-commits
ivanmurashko added a comment. In D118755#3301776 , @sammccall wrote: > Do you have access to commit this or should I land it for you? I would appreciate your assistance in the land. You can use the following email address: `ivan.murashko at gmail.com`

[PATCH] D119026: [HIP] Emit amdgpu_code_object_version module flag

2022-02-07 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Driver/Options.td:3445 def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group, - HelpText<"Specify code object ABI version. Defaults to 4. (AMDGPU only)">, - MetaVarName<"">, Values<"2,3,4,5">; +

[PATCH] D118755: [clangd] Crash in __memcmp_avx2_movbe

2022-02-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Do you have access to commit this or should I land it for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118755/new/ https://reviews.llvm.org/D118755 ___ cfe-commits mailin

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-07 Thread Alex Lapenkov via Phabricator via cfe-commits
Lapenkov added a comment. In D118804#3301753 , @jyknight wrote: > In D118804#3301746 , @Lapenkov > wrote: > >> Is it hard to retrofit this diff into LLVM 13? > > It would be easy to backport this change into LLVM

[PATCH] D119162: [Pseudo] Token/TokenStream, PP directive parser.

2022-02-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 406521. sammccall added a comment. doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119162/new/ https://reviews.llvm.org/D119162 Files: clang/include/clang/Tooling/Syntax/Pseudo/Preprocess.h clang/inclu

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-07 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D118804#3301746 , @Lapenkov wrote: > Is it hard to retrofit this diff into LLVM 13? It would be easy to backport this change into LLVM 13, but the problem is that there are no more releases planned on the LLVM 13 branch. R

[PATCH] D119162: [Pseudo] Token/TokenStream, PP directive parser.

2022-02-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This needs some more detailed unittests than the smoke lex.test added so far. But I wanted to get a bit of feedback first on whether the general scope/layout is reasonable. It'd be very possible to split off the PP support out of this patch, I just wasn't sure if what

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-07 Thread Alex Lapenkov via Phabricator via cfe-commits
Lapenkov added a comment. Frankly, sounds quite inconvenient. This means that the default behavior changes for LLVM 13 and then changes back for LLVM 14. Everyone using a custom allocator with weak alignment will need to know about this caveat and be really wary of this additional flag to ensure

[PATCH] D119162: [Pseudo] Token/TokenStream, PP directive parser.

2022-02-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a subscriber: mgorny. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The TokenStream class is the representation of the source code that will be fe

[PATCH] D119004: [NFC][analyzer] Allow CallDescriptions to be matched with CallExprs

2022-02-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. It's definitely a bug-prone scenario. I can totally see people stuffing whatever happens to be more readily available in the code into the API without thinking too much about the pros and cons. The difference between `CallExpr` and `CallEvent` is large in general but with r

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-07 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. llvm 14 - yes llvm 13.0.2 is not planned. If you need a workaround, use -fno-builtin-malloc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118804/new/ https://reviews.llvm.org/D118804 ___

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-07 Thread Alex Lapenkov via Phabricator via cfe-commits
Lapenkov added a comment. Do you think it should be ported to release/13.x too? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118804/new/ https://reviews.llvm.org/D118804 ___ cfe-commits mailing list cfe

[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction

2022-02-07 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. @aaron.ballman Thanks for the valuable feedback! > Assuming that the `to_lvalue_ref(A{})` case should diagnose, then yes, I > agree, I think the `ret_a()` portion should as well. My primary focus is not to make sure Clang follows the standard closely for `consteval`, but

[PATCH] D119117: [clang-format] Fix formatting of the array form of delete.

2022-02-07 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:94 +TEST_F(TokenAnnotatorTest, UnderstandsNewAndDelete) { + auto Tokens = annotate("delete (void *)p;"); The test name contains “new” and “

[PATCH] D117898: [Clang] Add elementwise saturated add/sub builtins

2022-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:549 + T __builtin_elementwise_add_sat(T x, T y) return the sum of x and y, clamped to the range of signed or integer types + values representable by t

  1   2   3   >