[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

2023-08-18 Thread Qizhi Hu via Phabricator via cfe-commits
jcsxky added a comment. In D156693#4584657 , @balazske wrote: > A simple test should be added to StructuralEquivalenceTest.cpp too to check > if ignore (and not ignore) depth works. > > I think this solution is not always correct, but is still an

[clang] df8d33f - [OpenMP][AMDGPU] Add "amdgpu-flat-work-group-size" for known thread counts

2023-08-18 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2023-08-18T21:47:57-07:00 New Revision: df8d33fa7a22df3be34da5c6837031d897fa479b URL: https://github.com/llvm/llvm-project/commit/df8d33fa7a22df3be34da5c6837031d897fa479b DIFF:

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-08-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 551705. yaxunl marked 3 inline comments as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158247/new/ https://reviews.llvm.org/D158247 Files: clang/include/clang/Sema/Sema.h

[libunwind] 22a8402 - MIPS: unwind, don't save/restore hi/lo for R6

2023-08-18 Thread Brad Smith via cfe-commits
Author: YunQiang Su Date: 2023-08-19T00:35:25-04:00 New Revision: 22a84020d2324ac1f753705497a40c43d8284d94 URL: https://github.com/llvm/llvm-project/commit/22a84020d2324ac1f753705497a40c43d8284d94 DIFF: https://github.com/llvm/llvm-project/commit/22a84020d2324ac1f753705497a40c43d8284d94.diff

[PATCH] D158247: [CUDA][HIP] Fix overloading resolution in global variable initializer

2023-08-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Sema/Sema.h:4753 + /// Otherwise, use \p D to determiine the host/device target. bool CheckCallingConvAttr(const ParsedAttr , CallingConv , +

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-08-18 Thread Wang Pengcheng via Phabricator via cfe-commits
wangpc updated this revision to Diff 551702. wangpc added a comment. - Rebase. - Remove abilist changes. - Add clang-18. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112921/new/ https://reviews.llvm.org/D112921 Files:

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13277 +llvm::Value * +CodeGenFunction::EmitX86CpuSupports(const uint32_t FeaturesMask[4]) { Value *Result = Builder.getTrue(); Can this be a std::array instead? The C array is

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target/target_clones attributes

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: craig.topper, FreddyYe, pengfei, RKSimon, skan. Herald added subscribers: Enna1, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers:

[PATCH] D158249: [clangd] Parameter hints for calls through function pointers

2023-08-18 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. nridge marked an inline comment as done. Closed by commit rG8ee710a40cc5: [clangd] Parameter hints for calls through function pointers (authored by nridge).

[clang-tools-extra] 8ee710a - [clangd] Parameter hints for calls through function pointers

2023-08-18 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2023-08-18T23:40:59-04:00 New Revision: 8ee710a40cc51098e6d1249afe9af0e64150f308 URL: https://github.com/llvm/llvm-project/commit/8ee710a40cc51098e6d1249afe9af0e64150f308 DIFF: https://github.com/llvm/llvm-project/commit/8ee710a40cc51098e6d1249afe9af0e64150f308.diff

[PATCH] D158249: [clangd] Parameter hints for calls through function pointers

2023-08-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/InlayHints.cpp:508 + // Only one of Callee or ProtoTypeLoc is set. + const FunctionDecl *Callee = nullptr; + FunctionProtoTypeLoc ProtoTypeLoc;

[PATCH] D158249: [clangd] Parameter hints for calls through function pointers

2023-08-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 551696. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158249/new/ https://reviews.llvm.org/D158249 Files: clang-tools-extra/clangd/InlayHints.cpp

[PATCH] D149236: [clangd] Bail gracefully if given an assembly or IR source file

2023-08-18 Thread Nathan Ridge 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 rG744b111434b2: [clangd] Bail gracefully if given an assembly or IR source file (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES

[clang-tools-extra] 744b111 - [clangd] Bail gracefully if given an assembly or IR source file

2023-08-18 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2023-08-18T23:26:32-04:00 New Revision: 744b111434b25b1259308050c59062dc4f38a589 URL: https://github.com/llvm/llvm-project/commit/744b111434b25b1259308050c59062dc4f38a589 DIFF: https://github.com/llvm/llvm-project/commit/744b111434b25b1259308050c59062dc4f38a589.diff

[PATCH] D149236: [clangd] Bail gracefully if given an assembly or IR source file

2023-08-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 551694. nridge added a comment. Address review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149236/new/ https://reviews.llvm.org/D149236 Files: clang-tools-extra/clangd/ParsedAST.cpp

[PATCH] D157953: [CGCall][RISCV] Handle function calls with parameter of RVV tuple type

2023-08-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5278 + for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { +llvm::Value *LI = Builder.CreateExtractValue( +StoredStructValue, i, Src.getName() +

[PATCH] D158248: [clangd] Fix incorrect RecursiveASTVisitor usage in summarizeExpr()

2023-08-18 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3e69886dd012: [clangd] Fix incorrect RecursiveASTVisitor usage in summarizeExpr() (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 3e69886 - [clangd] Fix incorrect RecursiveASTVisitor usage in summarizeExpr()

2023-08-18 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2023-08-18T23:02:48-04:00 New Revision: 3e69886dd012fb446936760f0946db4df5223c48 URL: https://github.com/llvm/llvm-project/commit/3e69886dd012fb446936760f0946db4df5223c48 DIFF: https://github.com/llvm/llvm-project/commit/3e69886dd012fb446936760f0946db4df5223c48.diff

[PATCH] D158158: [clang] Set FP options in Sema when instantiating CompoundStmt

2023-08-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158158/new/ https://reviews.llvm.org/D158158

[PATCH] D157565: [CodeGen] Add AArch64 behavior to existing MFS tests

2023-08-18 Thread Han Shen 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 rGb9d079d6188b: [clang][test] Refine clang machine-function-split tests. (authored by shenhan). Herald added subscribers: cfe-commits, mattd,

[clang] b9d079d - [clang][test] Refine clang machine-function-split tests.

2023-08-18 Thread Han Shen via cfe-commits
Author: Han Shen Date: 2023-08-18T18:05:47-07:00 New Revision: b9d079d6188b50730e0a67267b7fee36008435ce URL: https://github.com/llvm/llvm-project/commit/b9d079d6188b50730e0a67267b7fee36008435ce DIFF: https://github.com/llvm/llvm-project/commit/b9d079d6188b50730e0a67267b7fee36008435ce.diff

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-08-18 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 551687. gulfem added a comment. Remove hyphen between "single counter" for consistency Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126586/new/ https://reviews.llvm.org/D126586 Files:

[PATCH] D126586: [InstrProf] Single byte counters in coverage

2023-08-18 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 551686. gulfem added a comment. Ensure the correct traversal order for loops in CodeGenPGO to fix the profile test failures (Profile/cxx-hash-v2.cpp and Profile/cxx-rangefor.cpp) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D156762: [-Wunsafe-buffer-usage][NFC] Refactor `getFixIts`---where fix-its are generated

2023-08-18 Thread Ziqing Luo 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 rGacc8a33b257f: [-Wunsafe-buffer-usage][NFC] Refactor `getFixIts`---where fix-its are generated (authored by ziqingluo-90). Changed prior to commit:

[clang] acc8a33 - [-Wunsafe-buffer-usage][NFC] Refactor `getFixIts`---where fix-its are generated

2023-08-18 Thread via cfe-commits
Author: ziqingluo-90 Date: 2023-08-18T17:44:22-07:00 New Revision: acc8a33b257f8176fae1bae929ff9da7ed2cbad5 URL: https://github.com/llvm/llvm-project/commit/acc8a33b257f8176fae1bae929ff9da7ed2cbad5 DIFF: https://github.com/llvm/llvm-project/commit/acc8a33b257f8176fae1bae929ff9da7ed2cbad5.diff

[PATCH] D157579: [clang][ExtractAPI] Add support for C++ global function templates

2023-08-18 Thread Erick Velez 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 rG80b787e80329: [clang][ExtractAPI] Add support for C++ global function templates (authored by evelez7). Repository: rG LLVM Github Monorepo

[clang] 80b787e - [clang][ExtractAPI] Add support for C++ global function templates

2023-08-18 Thread Erick Velez via cfe-commits
Author: Erick Velez Date: 2023-08-18T17:42:05-07:00 New Revision: 80b787e803292119f30da2e1e95acff5beea61db URL: https://github.com/llvm/llvm-project/commit/80b787e803292119f30da2e1e95acff5beea61db DIFF: https://github.com/llvm/llvm-project/commit/80b787e803292119f30da2e1e95acff5beea61db.diff

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 551680. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158231/new/ https://reviews.llvm.org/D158231 Files: clang/test/CodeGen/fsplit-machine-functions.c

[PATCH] D158293: [NFC][CLANG] Fix potential dereferencing of null return values

2023-08-18 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2009-2010 (Line.MightBeFunctionDecl || Line.InPPDirective) && - Current.NestingLevel == 0 && + Current.NestingLevel == 0 && Current.Previous &&

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D156821#4600550 , @MaskRay wrote: >> Currenly both Clang and GCC support the following set of flags that control > > code gen of signed overflow: > >> [...] >> Howerver, clang ignores these flags for __builtin_abs(int)

[PATCH] D158244: [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression

2023-08-18 Thread Congcong Cai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9be33de4f397: [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression (authored by HerrCai0907). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 9be33de - [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression

2023-08-18 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2023-08-19T08:13:00+08:00 New Revision: 9be33de4f39713c2deb7cc262b4dd4e50dc8349d URL: https://github.com/llvm/llvm-project/commit/9be33de4f39713c2deb7cc262b4dd4e50dc8349d DIFF: https://github.com/llvm/llvm-project/commit/9be33de4f39713c2deb7cc262b4dd4e50dc8349d.diff

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Currenly both Clang and GCC support the following set of flags that control code gen of signed overflow: > [...] > Howerver, clang ignores these flags for __builtin_abs(int) and its > higher-width versions, so passing minimum integer value always causes poison.

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-18 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D157757#4600357 , @ldionne wrote: > This is going to be really naive, but can someone explain why we need these > `__need_X` macros? Why doesn't `` simply always declare what it > should declare? Also, does anybody

[PATCH] D158008: [AArch64] Add patterns for FMADD, FMSUB

2023-08-18 Thread Vladislav Dzhidzhoev via Phabricator via cfe-commits
dzhidzhoev added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:5418 + (EXTRACT_SUBREG V128:$Rn, dsub), FPR64:$Rm, FPR64:$Ra)>; } Is it possible to use extractelt here? Since vector_extract is marked as deprecated in

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 551662. akhuang added a comment. address small fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157762/new/ https://reviews.llvm.org/D157762 Files: clang/include/clang/Basic/Attr.td

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked 2 inline comments as done. akhuang added a comment. I'm still trying to figure out the MSVC layouts. I used the EmptySubobjects class for a lot of the logic, which is not always the same as what MSVC does. (some examples of differences in https://godbolt.org/z/6cP554ddb)

[PATCH] D158008: [AArch64] Add patterns for FMADD, FMSUB

2023-08-18 Thread Vladislav Dzhidzhoev via Phabricator via cfe-commits
dzhidzhoev added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:5393 + (EXTRACT_SUBREG V128:$Rn, hsub), FPR16:$Rm, FPR16:$Ra)>; + } + BTW, these lines add some patterns for fnmadd. Could you add some tests for them? Or

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:1787 +if (!VCI->isMinSignedValue()) { + return EmitAbs(CGF, ArgValue, true); +} MaskRay wrote: > nit: we delete braces in this cascading case > >

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: compiler-rt/test/ubsan/TestCases/Misc/abs.cpp:11 +int main() { + // ABORT: abs.cpp:[[@LINE+3]]:17: runtime error: negation of -{{[0-9]+}} cannot be

[PATCH] D158257: [RISCV] Add feature checks for vector crypto C intrinsics

2023-08-18 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/D158257/new/ https://reviews.llvm.org/D158257

[PATCH] D158255: [RISCV][NFC] Update compile options for some vector crypto C intrinsics

2023-08-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper requested changes to this revision. craig.topper added inline comments. This revision now requires changes to proceed. Comment at: clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vcpopv.c:4 +// RUN: %clang_cc1 -triple riscv64

[PATCH] D158298: [OpenMP] Always pass the optimization level to the linker wrapper

2023-08-18 Thread Joseph Huber 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 rG4ab4e40fa294: [OpenMP] Always pass the optimization level to the linker wrapper (authored by jhuber6). Repository: rG LLVM Github Monorepo

[clang] 4ab4e40 - [OpenMP] Always pass the optimization level to the linker wrapper

2023-08-18 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-08-18T17:10:13-05:00 New Revision: 4ab4e40fa2944bfd2ed44c63027e7a838043e0fd URL: https://github.com/llvm/llvm-project/commit/4ab4e40fa2944bfd2ed44c63027e7a838043e0fd DIFF: https://github.com/llvm/llvm-project/commit/4ab4e40fa2944bfd2ed44c63027e7a838043e0fd.diff

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-18 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. This is going to be really naive, but can someone explain why we need these `__need_X` macros? Why doesn't `` simply always declare what it should declare? Also, does anybody understand the expected relationship between the C Standard Library headers and these

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Artem Labazov via Phabricator via cfe-commits
artem added inline comments. Comment at: clang/test/ubsan/TestCases/Misc/abs.cpp:1 +// REQUIRES: arch=x86_64 +// MaskRay wrote: > Did you mean compiler-rt/ instead of clang/? > > `// REQUIRES: arch=x86_64` is legacy style. > > New style uses `// REQUIRES:

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Artem Labazov via Phabricator via cfe-commits
artem updated this revision to Diff 551656. artem marked 2 inline comments as done. artem added a comment. Fixed the comments. I do not have commit rights CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156821/new/ https://reviews.llvm.org/D156821 Files: clang/docs/ReleaseNotes.rst

[PATCH] D158318: [Sema] tolerate more promotion matches in format string checking

2023-08-18 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier created this revision. fcloutier added a reviewer: aaron.ballman. Herald added a project: All. fcloutier requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. It's been reported that when using __attribute__((format)) on non-variadic

[clang] 3364d76 - [clang-format][doc] Don't use the ".0" suffix on version numbers

2023-08-18 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-08-18T14:57:43-07:00 New Revision: 3364d7620ef78c6e9f04c63e62ac6b0801090ea5 URL: https://github.com/llvm/llvm-project/commit/3364d7620ef78c6e9f04c63e62ac6b0801090ea5 DIFF: https://github.com/llvm/llvm-project/commit/3364d7620ef78c6e9f04c63e62ac6b0801090ea5.diff

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D153156#4600270 , @rupprecht wrote: > of which there's an example in LLVM itself: > https://github.com/llvm/llvm-project/blob/6a0e536ccfef1f7bd64ee4153b4efc0aeecf28d4/clang/test/SemaCXX/cxx11-compat.cpp#L38 Sorry, I don't

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. The other common breakage I'm seeing is code that hasn't yet migrated from the "PRI" format macros, of which there's an example in LLVM itself: https://github.com/llvm/llvm-project/blob/6a0e536ccfef1f7bd64ee4153b4efc0aeecf28d4/clang/test/SemaCXX/cxx11-compat.cpp#L38

[PATCH] D158238: Implement __builtin_fmaximum/fminimum*

2023-08-18 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 551646. tra added a comment. Fixed test RUN lines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158238/new/ https://reviews.llvm.org/D158238 Files: clang/include/clang/Basic/Builtins.def

[PATCH] D158293: [NFC][CLANG] Fix potential dereferencing of null return values

2023-08-18 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2009-2010 (Line.MightBeFunctionDecl || Line.InPPDirective) && - Current.NestingLevel == 0 && + Current.NestingLevel == 0 && Current.Previous &&

[PATCH] D157579: [clang][ExtractAPI] Add support for C++ global function templates

2023-08-18 Thread Erick Velez via Phabricator via cfe-commits
evelez7 updated this revision to Diff 551642. evelez7 added a comment. Formatting changes, keep GlobalFunction has templates together and revert extraneous formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157579/new/

[PATCH] D158008: [AArch64] Add patterns for FMADD, FMSUB

2023-08-18 Thread Vladislav Dzhidzhoev via Phabricator via cfe-commits
dzhidzhoev added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:5381-5393 + let Predicates = [HasFullFP16] in { + def : Pat<(f16 (node (f16 FPR16:$Rn), + (f16 (vector_extract (v8f16 V128:$Rm), (i64 0))), +

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Thurston Dang via Phabricator via cfe-commits
thurston added a comment. In D156821#4600086 , @MaskRay wrote: > Failed Tests (4): > LLVM :: CodeGen/RISCV/rvv/fixed-vectors-int.ll > LLVM :: CodeGen/SystemZ/ctpop-01.ll > LLVM :: MC/ARM/basic-thumb2-instructions.s > LLVM ::

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 551634. shenhan marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158231/new/ https://reviews.llvm.org/D158231 Files: clang/test/CodeGen/fsplit-machine-functions.c

[PATCH] D157350: [clang][ExtractAPI] Add support for C++ variable templates

2023-08-18 Thread Erick Velez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8d8c8981cac0: [clang][ExtractAPI] Add support for C++ variable templates (authored by evelez7). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157350/new/

[clang] 8d8c898 - [clang][ExtractAPI] Add support for C++ variable templates

2023-08-18 Thread Erick Velez via cfe-commits
Author: Erick Velez Date: 2023-08-18T13:57:02-07:00 New Revision: 8d8c8981cac0e548f0fca1268d6e501431564f66 URL: https://github.com/llvm/llvm-project/commit/8d8c8981cac0e548f0fca1268d6e501431564f66 DIFF: https://github.com/llvm/llvm-project/commit/8d8c8981cac0e548f0fca1268d6e501431564f66.diff

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Han Shen via Phabricator via cfe-commits
shenhan added inline comments. Comment at: clang/test/CodeGen/fsplit-machine-functions.c:1 +// REQUIRES: system-linux +// REQUIRES: x86-registered-target MaskRay wrote: > Any reason `system-linux` is needed? Deleted. Also deleted "REQUIRES: system-linux" from

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 551632. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158231/new/ https://reviews.llvm.org/D158231 Files: clang/test/CodeGen/fsplit-machine-functions.c

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 551630. shenhan marked 3 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158231/new/ https://reviews.llvm.org/D158231 Files: clang/test/CodeGen/fsplit-machine-functions.c

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:145 +for (Function : llvm::make_early_inc_range(M)) + if (Apply || canTransformFunctionInIsolation(F)) +Changed |= runOnFunction(F); I think you need to guard

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156821#4599471 , @thurston wrote: > This patch might have broke the buildbots, starting with when it was first > built in https://lab.llvm.org/buildbot/#/builders/85/builds/18390 > > >

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay reopened this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:1787 +if (!VCI->isMinSignedValue()) { + return EmitAbs(CGF, ArgValue, true); +} nit: we

[PATCH] D157076: [clang][ExtractAPI] Add support for C++ class templates and concepts

2023-08-18 Thread Erick Velez 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 rG7ba37f4e46a5: [clang][ExtractAPI] Add support for C++ class templates and concepts (authored by evelez7). Repository: rG LLVM Github Monorepo

[clang] 7ba37f4 - [clang][ExtractAPI] Add support for C++ class templates and concepts

2023-08-18 Thread Erick Velez via cfe-commits
Author: Erick Velez Date: 2023-08-18T13:40:22-07:00 New Revision: 7ba37f4e46a5bbb1dc42f1ea1722296ea32034d5 URL: https://github.com/llvm/llvm-project/commit/7ba37f4e46a5bbb1dc42f1ea1722296ea32034d5 DIFF: https://github.com/llvm/llvm-project/commit/7ba37f4e46a5bbb1dc42f1ea1722296ea32034d5.diff

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:296 +// Note - same attribute handling as DeadArgumentElimination +NF->copyAttributesFrom(); +NF->setComdat(F.getComdat()); This might be missing copying the linkage

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:74-77 +Value *Mask = ConstantInt::get(IntPtrTy, ~(DataAlignMinusOne)); +Value *vaListAligned = Builder.CreateIntToPtr( +Builder.CreateAnd(Builder.CreatePtrToInt(Incr, IntPtrTy),

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. Name candidates - expand - lower - desugar - transform Lowering probably makes the most sense for the abi level apply to all functions, I like desugar to cover rewriting a subset of the graph Comment at: libc/config/gpu/entrypoints.txt:84-85

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:297 +NF->copyAttributesFrom(); +NF->setComdat(F.getComdat()); +F.getParent()->getFunctionList().insert(F.getIterator(), NF); Test the comdat? Weird that

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:208-209 + +StructType *VarargsTy = StructType::create( +Ctx, LocalVarTypes, (Twine(NF->getName()) + ".vararg").str()); + Should we go for a packed struct forced to align

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield removed subscribers: kristof.beyls, wangpc, jdoerfert. JonChesterfield added inline comments. Comment at: llvm/lib/CodeGen/ExpandVAIntrinsics.cpp:215-217 +auto alloced = Builder.Insert( +new AllocaInst(VarargsTy, DL.getAllocaAddrSpace(), nullptr, +

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/DesugarVariadics.cpp:22 +// 5/ Delete the remaining parts of the original functions +// +//===--===// Can you expand on the ABI

[PATCH] D158104: [clang-format][NFC] Simplify getFirstNonComment() in the annotator

2023-08-18 Thread Owen Pan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG07181e289e3c: [clang-format][NFC] Simplify getFirstNonComment() in the annotator (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 07181e2 - [clang-format][NFC] Simplify getFirstNonComment() in the annotator

2023-08-18 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-08-18T13:23:47-07:00 New Revision: 07181e289e3c6296ed5e982dca0764b91acbb8e6 URL: https://github.com/llvm/llvm-project/commit/07181e289e3c6296ed5e982dca0764b91acbb8e6 DIFF: https://github.com/llvm/llvm-project/commit/07181e289e3c6296ed5e982dca0764b91acbb8e6.diff

[clang] 472a510 - Re-land "[-Wunsafe-buffer-usage][NFC] Slightly refactor and optimize the code"

2023-08-18 Thread via cfe-commits
Author: ziqingluo-90 Date: 2023-08-18T13:22:01-07:00 New Revision: 472a510bbc0325eb8e5920845e7c8d1a6a28a387 URL: https://github.com/llvm/llvm-project/commit/472a510bbc0325eb8e5920845e7c8d1a6a28a387 DIFF: https://github.com/llvm/llvm-project/commit/472a510bbc0325eb8e5920845e7c8d1a6a28a387.diff

[PATCH] D158293: [NFC][CLANG] Fix potential dereferencing of null return values

2023-08-18 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2009-2010 (Line.MightBeFunctionDecl || Line.InPPDirective) && - Current.NestingLevel == 0 && + Current.NestingLevel == 0 && Current.Previous &&

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: libc/config/gpu/entrypoints.txt:84-85 # stdio.h entrypoints +libc.src.stdio.snprintf +libc.src.stdio.vsnprintf libc.src.stdio.puts Split of the libc stuff into a separate patch, the lowering pass should

[PATCH] D158309: [flang][driver] Mark -Wl as visible in Flang

2023-08-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. awarzynski added a reviewer: kiranchandramohan. Herald added a reviewer: sscalpone. Herald added projects: Flang, All. awarzynski requested review of this revision. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. Repository: rG

[PATCH] D157157: [clang] Add clang support for Machine Function Splitting on AArch64

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5852 options::OPT_fno_split_machine_functions)) { -// This codegen pass is only available on x86-elf targets. -if (Triple.isX86() &&

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/test/CodeGenCUDA/amdgpu-code-object-version-linking.cu:40-43 +__device__ void bar(int *out) +{ + *out = __builtin_amdgcn_workgroup_size_x(); +} test all the builtins? Repository: rG LLVM Github Monorepo

[PATCH] D157157: [clang] Add clang support for Machine Function Splitting on AArch64

2023-08-18 Thread Mingming Liu via Phabricator via cfe-commits
mingmingl accepted this revision. mingmingl added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/fsplit-machine-functions.c:4 // RUN: %clang -### -target x86_64 -fprofile-use=default.profdata -fsplit-machine-functions

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-08-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:17057 + Constant *Offset, *OffsetOld; + Value *DP, *DP1; + Spell out to DispatchPtr? Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1206-1208 +

[clang] fc06cce - Revert "Respect integer overflow handling in abs builtin"

2023-08-18 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2023-08-18T19:59:34Z New Revision: fc06cce30d2b7d49778b9a27420ca239e0c49856 URL: https://github.com/llvm/llvm-project/commit/fc06cce30d2b7d49778b9a27420ca239e0c49856 DIFF: https://github.com/llvm/llvm-project/commit/fc06cce30d2b7d49778b9a27420ca239e0c49856.diff

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: sbc100. MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files

[PATCH] D158246: [amdgpu] WIP variadics

2023-08-18 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 551616. JonChesterfield added a comment. - Rename ExpandVAIntrinsics to DesugarVariadics Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158246/new/ https://reviews.llvm.org/D158246 Files:

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to

[PATCH] D158307: [flang][driver] Disable Clang options in Flang

2023-08-18 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski created this revision. Herald added a reviewer: sscalpone. Herald added a project: All. awarzynski requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Restore the desired setting that was reverted in

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/fsplit-machine-functions.c:1 +// REQUIRES: system-linux +// REQUIRES: x86-registered-target Any reason `system-linux` is needed? Comment at:

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Brian Cain via Phabricator via cfe-commits
bcain added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to specify

[PATCH] D157331: [clang] Implement C23

2023-08-18 Thread Zijun Zhao via Phabricator via cfe-commits
ZijunZhao added a comment. Reformat clang/lib/Lex/PPDirectives.cpp. I use git-clang-format due to previous pre-check failure but lots of modifications in clang/lib/Lex/ directory. Should I keep running git-clang-format if the pre-check fails again? Repository: rG LLVM Github Monorepo

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/AST/Decl.cpp:4523-4524 bool FieldDecl::isPotentiallyOverlapping() const { - return hasAttr() && getType()->getAsCXXRecordDecl(); + return (hasAttr() || + hasAttr()) && + getType()->getAsCXXRecordDecl();

[PATCH] D157331: [clang] Implement C23

2023-08-18 Thread Zijun Zhao via Phabricator via cfe-commits
ZijunZhao updated this revision to Diff 551607. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157331/new/ https://reviews.llvm.org/D157331 Files: clang/docs/ReleaseNotes.rst clang/lib/Headers/CMakeLists.txt clang/lib/Headers/stdckdint.h

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to

[PATCH] D157762: [WIP] Implement [[msvc::no_unique_address]]

2023-08-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1409 + + On Windows targets, ``[[no_unique_address]]`` is ignored; use + ``[[msvc::no_unique_address]]`` instead. On MSVC targets, `[[no_unique_address]]` is ignored - it's not

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. I’ll see what I can do regarding reviving the string concat behavior. It feels like that a more refined treatment than before can be achieved. Maybe adds an imaginary preceding whitespace only when we can find a macro with the same name. Repository: rG LLVM Github

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I just put up a patch for RISC-V failure related to this https://reviews.llvm.org/D158304 change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156821/new/ https://reviews.llvm.org/D156821

[PATCH] D158296: [NFC][Clang] Add assertion to check the value of NumSubExprs/ResultIndex does not overflow

2023-08-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Hopefully my clarification on https://reviews.llvm.org/D154784#inline-1531176 makes it clear that assertions aren't necessarily the right tool here - as this path is reachable with actual code & I don't think we should allow that code to reach UB in the compiler in a

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-18 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 551600. AntonRydahl added a comment. CI tests failed on the built-bot, but that was not related to this patch. I patched the file that made the built-bot fail and rebased this differential after the patch. Repository: rG LLVM Github Monorepo

  1   2   3   >