[PATCH] D149986: AMDGPU: Force sc0 and sc1 on stores for gfx940 and gfx941

2023-05-11 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh added a comment. I think that if this is a new property of the GFX940/941 targets, and turning it off shouldn't be possible, we shouldn't even bother with a feature and just set a bool in the ST for those targets Comment at: llvm/lib/Target/AMDGPU/SIMemoryLegalizer.

[PATCH] D146023: [AMDGPU] Remove Code Object V2

2023-05-11 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh removed a reviewer: jdoerfert. Pierre-vh added a comment. Herald added a reviewer: jdoerfert. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146023/new/ https://reviews.llvm.org/D146023 ___

[PATCH] D149158: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-05-11 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added inline comments. Comment at: clang/test/Analysis/Inputs/std-c-library-functions.h:1-2 +typedef typeof(sizeof(int)) size_t; +typedef signed long ssize_t; +typedef struct { balazske wrote: > steakhal wrote: > > balazske wrote: > > > steakhal wrote:

[PATCH] D149562: [clang-format] Stop comment disrupting indentation of Verilog ports

2023-05-11 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D149562#4332188 , @sstwcw wrote: >> IMO a trailing comment (empty or not) belongs to the code before it. > > There is only a parenthesis before it. It doesn't usually need a comment. > It is like in 5a61139. One doesn't ten

[PATCH] D150139: [clang-repl] Enable basic multiline support.

2023-05-11 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/test/Interpreter/multiline.cpp:12-17 +void f(int x) \ +{ \ + printf("x=\ + %d", x); \ +} +f(i); aaron.ballman wrote: > Another fun test case: > ``` > //

[PATCH] D150181: [XCOFF][DWARF] XCOFF64 should be able to select the dwarf version under intergrated-as mode.

2023-05-11 Thread Esme Yi via Phabricator via cfe-commits
Esme updated this revision to Diff 521229. Esme added a comment. Herald added a subscriber: nemanjai. Update test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150181/new/ https://reviews.llvm.org/D150181 Files: clang/lib/Driver/ToolChain

[PATCH] D149158: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-05-11 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/Inputs/std-c-library-functions.h:1-2 +typedef typeof(sizeof(int)) size_t; +typedef signed long ssize_t; +typedef struct { donat.nagy wrote: > balazske wrote: > > steakhal wrote: > > > balazske wrote:

[PATCH] D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes

2023-05-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/ObjCPropertyAttributeOrderFixerTest.cpp:77 + verifyFormat("@property(a, b, c) int p;", "@property(b, a, c) int p;", Style); + verifyFormat("@property(a, b, c) int p;", "@property(c, b, a) int p;", Style)

[PATCH] D148490: [AIX] use system assembler for assembly files

2023-05-11 Thread ChenZheng via Phabricator via cfe-commits
shchenz updated this revision to Diff 521233. shchenz added a comment. update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148490/new/ https://reviews.llvm.org/D148490 Files: clang/lib/Driver/ToolChain.cpp clang/test/Driver/target-as.s

[PATCH] D148490: [AIX] use system assembler for assembly files

2023-05-11 Thread ChenZheng via Phabricator via cfe-commits
shchenz added a comment. > I am not sure you need 6 RUN lines to test this. Whether a target uses > integrated assembler has an existing test file and you can reuse that. I don't have strong prefer which one we should use, a new file or reuse file. Since you point out, I change to reuse a legac

[PATCH] D150191: [clang][Diagnostics] Provide a source range for 'use of undeclared identifier' diagnostics

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 521236. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150191/new/ https://reviews.llvm.org/D150191 Files: clang/include/clang/Sema/Lookup.h clang/lib/Sema/SemaExpr.cpp clang/test/Misc/reduced-diags-macros-backtrace.cpp Index: clang/test/Misc/r

[PATCH] D150209: [clang][Interp] Add more shift error checking

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 521237. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150209/new/ https://reviews.llvm.org/D150209 Files: clang/lib/AST/Interp/Integral.h clang/lib/AST/Interp/Interp.h clang/test/AST/Interp/shifts.cpp

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D143334: [clang][Interp] Fix diagnosing uninitialized ctor record arrays

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143334/new/ https://reviews.llvm.org/D143334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D149816: [clang][Interp] Implement __builtin_strcmp

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:22-23 + +static bool interp__builtin_strcmp(InterpState &S, CodePtr OpPC, + InterpFrame *Frame) { + const Pointer &A = ge

[PATCH] D149816: [clang][Interp] Implement __builtin_strcmp

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 521239. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149816/new/ https://reviews.llvm.org/D149816 Files: clang/lib/AST/Interp/ByteCodeEmitter.cpp clang/lib/AST/Interp/Function.cpp clang/lib/AST/Interp/Function.h clang/lib/AST/Interp/Interp.h

[PATCH] D144457: [clang][Interp] Handle global composite temporaries

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144457/new/ https://reviews.llvm.org/D144457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D144943: [clang][Interp] Implement bitcasts (WIP)

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Pig CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144943/new/ https://reviews.llvm.org/D144943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D148614: [clang][Interp] Add frame depth checking

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148614/new/ https://reviews.llvm.org/D148614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D149158: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-05-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/test/Analysis/Inputs/std-c-library-functions.h:1-2 +typedef typeof(sizeof(int)) size_t; +typedef signed long ssize_t; +typedef struct { steakhal wrote: > donat.nagy wrote: > > balazske wrote: > > > steakhal wrote:

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Attempting to analyze templated code doesn't hav

[PATCH] D149158: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-05-11 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/Inputs/std-c-library-functions.h:1-2 +typedef typeof(sizeof(int)) size_t; +typedef signed long ssize_t; +typedef struct { balazske wrote: > steakhal wrote: > > donat.nagy wrote: > > > balazske wrote:

[PATCH] D150354: [OpenMP][MLIR][Flang][bbc][Driver] Add fopenmp-version and generate corresponding MLIR attribute

2023-05-11 Thread Dominik Adamski via Phabricator via cfe-commits
domada created this revision. domada added reviewers: kiranchandramohan, kiranktp, dpalermo, NimishMishra, skatrak, agozillon, raghavendhra. domada added projects: Flang, OpenMP, MLIR. Herald added subscribers: bviyer, sunshaoce, Moerafaat, zero9178, bzcheeseman, sdasgup3, wenzhicui, wrengr, cota

[PATCH] D150354: [OpenMP][MLIR][Flang][bbc][Driver] Add fopenmp-version and generate corresponding MLIR attribute

2023-05-11 Thread Dominik Adamski via Phabricator via cfe-commits
domada updated this revision to Diff 521251. domada added a comment. Patch rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150354/new/ https://reviews.llvm.org/D150354 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp flang/include/flang/Fro

[PATCH] D148663: [RFC][clangd] Use interpolation for CDB pushed via LSP protocol

2023-05-11 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. In D148663#4318907 , @kadircet wrote: > I agree with Ilya's concerns here. > > We deliberately don't mess with compile flags pushed over LSP. These are > "overrides" to whatever information we have from other sources, turn

[PATCH] D144654: [Lex] Warn when defining or undefining any builtin macro

2023-05-11 Thread John Brawn via Phabricator via cfe-commits
john.brawn updated this revision to Diff 521263. john.brawn added a comment. Rebasing now that the patches this depends on have been committed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144654/new/ https://reviews.llvm.org/D144654 Files: clang/docs/ReleaseNotes.rst clang/lib/Le

[PATCH] D149986: AMDGPU: Force sc0 and sc1 on stores for gfx940 and gfx941

2023-05-11 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl marked an inline comment as done. kzhuravl added a comment. In D149986#4334274 , @Pierre-vh wrote: > I think that if this is a new property of the GFX940/941 targets, and turning > it off shouldn't be possible, we shouldn't even bother with a fe

[PATCH] D149838: [clang][dataflow] Eliminate `SkipPast::ReferenceThenPointer`.

2023-05-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 521269. mboehme added a comment. Rebase to head Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149838/new/ https://reviews.llvm.org/D149838 Files: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironmen

[PATCH] D150358: [clang][Interp] Remove args from called functions in more cases

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When calling functions in the checkingPotentialCo

[PATCH] D148793: [WIP][clang-tidy] Implement an include-cleaner check.

2023-05-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks, mostly LG at the high level i think one thing we're missing is the ability to suppress analysis for certain headers, similar to what we have in clangd config options. can you add a check option for that? Comment at: clang-tools-extra/clang-ti

[PATCH] D150354: [OpenMP][MLIR][Flang][bbc][Driver] Add fopenmp-version and generate corresponding MLIR attribute

2023-05-11 Thread Dominik Adamski via Phabricator via cfe-commits
domada updated this revision to Diff 521282. domada added a comment. Patch rebased + clang format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150354/new/ https://reviews.llvm.org/D150354 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp flang/in

[clang] 9dd2af0 - Fix CRTP partial specialization instantiation crash.

2023-05-11 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2023-05-11T06:11:43-07:00 New Revision: 9dd2af0b4caeaa3d19d9f48891e59bc5e0877544 URL: https://github.com/llvm/llvm-project/commit/9dd2af0b4caeaa3d19d9f48891e59bc5e0877544 DIFF: https://github.com/llvm/llvm-project/commit/9dd2af0b4caeaa3d19d9f48891e59bc5e0877544.diff L

[PATCH] D150285: Fix CRTP partial specialization instantiation crash.

2023-05-11 Thread Erich Keane 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 rG9dd2af0b4cae: Fix CRTP partial specialization instantiation crash. (authored by erichkeane). Herald added a project: clang. Changed prior to commit:

[PATCH] D149838: [clang][dataflow] Eliminate `SkipPast::ReferenceThenPointer`.

2023-05-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:840 +return nullptr; + } else { +return cast(Loc); nit: no need for `else` since `if` branch always returns Repository:

[clang] 4bc75f0 - Fixed NATVIS debug visualizers for Clang

2023-05-11 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-05-11T09:28:57-04:00 New Revision: 4bc75f046018bcc81ede90d548f95da8ed14f1a9 URL: https://github.com/llvm/llvm-project/commit/4bc75f046018bcc81ede90d548f95da8ed14f1a9 DIFF: https://github.com/llvm/llvm-project/commit/4bc75f046018bcc81ede90d548f95da8ed14f1a9.diff

[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As discussed the other day. This fixes the diagnost

[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

2023-05-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I've unfortunately not caught up enough to comment on the approach, but 'inline assembly' has the same restriction, so you might find `MsAsmStmt` and `GCCAsmStmt` to be equally as easy 'wins'. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150013/new/ https://reviews.llvm.org/D150013 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D127910: [Clang][AArch64][SME] Add vector load/store (ld1/st1) intrinsics

2023-05-11 Thread Bryan Chan via Phabricator via cfe-commits
bryanpkc added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:726 -if (Feature == "+sme") { - HasSME = true; sdesmalen wrote: > Why did you remove this? The `Feature == "+sme"` case is also handled below on line 782. Perhaps we shoul

[PATCH] D150282: [Driver] -ftime-trace: derive trace file names from -o and -dumpdir

2023-05-11 Thread Mészáros Gergely via Phabricator via cfe-commits
Maetveis added a comment. LGTM, but I don't feel like I have the experience to "formally" approve. I left a nice-to have suggestion too, but feel free to ignore, if you feel its out of scope. Comment at: clang/lib/Driver/Driver.cpp:5514 BaseInput); +

[PATCH] D150321: [clang] Document extensions from later standards

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! Just a few questions, but in general, this is looking good. Comment at: clang/docs/LanguageExtensions.rst:1386 +Relaxed constexpr __cpp_constexpr C++14 C++11 +Designated i

[PATCH] D147266: [AArch64] Sink operands to allow for bitselect instructions

2023-05-11 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. Thanks for working on this. I noticed there was another instance of vbsl being reported recently in https://github.com/llvm/llvm-project/issues/62642. Hopefully it can be addresses via extra optimizations too. Can you add a testcase for the issues in https://github.com

[PATCH] D150321: [clang] Document extensions from later standards

2023-05-11 Thread Hristo Hristov via Phabricator via cfe-commits
H-G-Hristov added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1398 +``static operator()`` __cpp_static_call_operator C++23 C++03 +Strucuted bindings __cpp_structured_bindingsC++17 C++03 +template te

[PATCH] D150321: [clang] Document extensions from later standards

2023-05-11 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1386 +Relaxed constexpr __cpp_constexpr C++14 C++11 +Designated initializers __cpp_designated_initializersC++20 C++03 +Attributes on e

[PATCH] D149986: AMDGPU: Force sc0 and sc1 on stores for gfx940 and gfx941

2023-05-11 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl added inline comments. Comment at: llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp:524 + SIAtomicAddrSpace::NONE) + return enableSC0Bit(MI) | enableSC1Bit(MI); +return false; Pierre-vh wrote: > kzhuravl wrote: > > jmmartinez wrote: > > > NI

[PATCH] D149158: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-05-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 521326. balazske added a comment. Change of some type definitions, using `restrict` again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149158/new/ https://reviews.llvm.org/D149158 Files: clang/test/Analys

[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

2023-05-11 Thread NagaChaitanya Vellanki via Phabricator via cfe-commits
chaitanyav updated this revision to Diff 521330. chaitanyav added a comment. Rebase with upstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147844/new/ https://reviews.llvm.org/D147844 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/Sema

[PATCH] D150321: [clang] Document extensions from later standards

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1386 +Relaxed constexpr __cpp_constexpr C++14 C++11 +Designated initializers __cpp_designated_initializersC++20 C++03 +Attribute

[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. "Unsupported" is a bit of a loaded term -- it could mean "this operation is not supported, YET" or it could mean "this operation is not and will not be supported, EVER". Perhaps something more like "InvalidInConstantExpr" would be more descriptive?

[PATCH] D150326: [WPD] Update llvm.public.type.test after importing functions

2023-05-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/test/ThinLTO/X86/public-type-test.ll:31 ; HIDDEN-NOT: call {{.*}}@llvm.public.type.test ; HIDDEN: call {{.*}}@llvm.type.test aeubanks wrote: > should this be checked

[PATCH] D150326: [WPD] Update llvm.public.type.test after importing functions

2023-05-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 521340. tejohnson marked an inline comment as done. tejohnson added a comment. Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150326/new/ https://reviews.llvm.org/D150326 Files: clang/test/C

[PATCH] D150326: [WPD] Update llvm.public.type.test after importing functions

2023-05-11 Thread Teresa Johnson 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 rGa40b0c3e77a2: [WPD] Update llvm.public.type.test after importing functions (authored by tejohnson). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D150364#4335221 , @aaron.ballman wrote: > "Unsupported" is a bit of a loaded term -- it could mean "this operation is > not supported, YET" or it could mean "this operation is not and will not be > supported, EVER". Perhaps

[PATCH] D149816: [clang][Interp] Implement __builtin_strcmp

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:22-23 + +static bool interp__builtin_strcmp(InterpState &S, CodePtr OpPC, + InterpFrame *Frame) { + const Pointer &A = getParam(Frame, 0); t

[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 521346. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150364/new/ https://reviews.llvm.org/D150364 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/lib/AST/I

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added subscribers: lenary, foad. tahonermann added a comment. > I was following the LLVM contribution guidelines to use git clang-format, but > I understand the importance of maintaining existing code styles that may be > altered by git-clang format. The guidelines are slightly in c

[PATCH] D149816: [clang][Interp] Implement __builtin_strcmp

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:22-23 + +static bool interp__builtin_strcmp(InterpState &S, CodePtr OpPC, + InterpFrame *Frame) { + const Pointer &A = getParam(Frame, 0); aaron.b

[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D150364#4335261 , @tbaeder wrote: > In D150364#4335221 , @aaron.ballman > wrote: > >> "Unsupported" is a bit of a loaded term -- it could mean "this operation is >> not supporte

[PATCH] D149816: [clang][Interp] Implement __builtin_strcmp

2023-05-11 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 Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:22-23 + +static bool interp__builtin_strcmp(InterpState &S, CodePtr OpPC, +

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a subscriber: clang-vendors. tahonermann added a comment. Heads up @clang-vendors. This patch changes the names of many internal identifiers for enumerators, class data members, and functions (including virtual functions) that are related to support for the `__bf16` type. The

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 521353. codemzs marked 2 inline comments as done. codemzs set the repository for this revision to rG LLVM Github Monorepo. codemzs added a comment. Update comments as per feedback from @tahonermann Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/AST/Type.cpp:2187 + BT->getKind() <= BuiltinType::Ibm128 && + BT->getKind() != BuiltinType::BF16; if (const auto *ET = dyn_cast(CanonicalType)) Looks like another clang-format qu

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. This revision is now accepted and ready to land. Thanks for all the updates @codemzs! I'm going to go ahead and accept. But please wait a few days for recently subscribed folks to have a chance to comment before landing this. Rep

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. The summary as it is will be hard to read in git log. Please split it into multiple lines 72~80 chars each. https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D150318: [clang][deps] NFC: Pass around the whole scanning service

2023-05-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningService.h:69 + /// The preprocessing mode used for scanning. + ScanningMode Mode; + /// The output format. benlangmuir wrote: > Why drop `const`?

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs marked an inline comment as done. codemzs added a comment. In D150291#4335360 , @barannikov88 wrote: > The summary as it is will be hard to read in git log. Please split it into > multiple lines 72~80 chars each. > https://tbaggery.com/2008/04/1

[PATCH] D150318: [clang][deps] NFC: Pass around the whole scanning service

2023-05-11 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningService.h:69 + /// The preprocessing mode used for scanning. + ScanningMode Mode; + /// The output format. jansvoboda11 wrote: > benlangmuir wrote:

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D150291#4335414 , @codemzs wrote: > I've provided the git log message that I see on my end below. I ensured that > it is split into multiple lines, with each line not exceeding the character > limit. Please let me know i

[PATCH] D144943: [clang][Interp] Implement bitcasts (WIP)

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D144943#4334500 , @tbaeder wrote: > Pig 🐷 Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:74 + // FIXME: Diagnostics. + if (ToType->isArrayType() || ToType->isPointerType()) +return false;

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs updated this revision to Diff 521363. codemzs marked an inline comment as done. codemzs added a comment. Addressing feedback from @barannikov88 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150291/new/ https://reviews.llvm.org/D150291 Files: clang/include/clang-c/Index.h cl

[PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-11 Thread M. Zeeshan Siddiqui via Phabricator via cfe-commits
codemzs added a comment. In D150291#4335352 , @tahonermann wrote: > Thanks for all the updates @codemzs! I'm going to go ahead and accept. But > please wait a few days for recently subscribed folks to have a chance to > comment before landing this. Th

[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147844#4333407 , @ldionne wrote: > Code changes in libc++ and libc++abi LGTM. I am neutral on whether the > diagnostic is worth adding, but don't consider libc++ and libc++abi as > blockers for this patch. Thank you @

[PATCH] D150209: [clang][Interp] Add more shift error checking

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/shifts.cpp:165-171 + constexpr int negativeShift() { // cxx17-error {{never produces a constant expression}} \ + // ref-cxx17-error {{never produces a constant expression}}

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-05-11 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a added a subscriber: efriedma. bolshakov-a added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:4397 +// argument. +// As proposed in https://github.com/itanium-cxx-abi/cxx-abi/issues/111. +auto *SNTTPE = cast(E); erichkeane w

[PATCH] D150282: [Driver] -ftime-trace: derive trace file names from -o and -dumpdir

2023-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. In D150282#4334927 , @Maetveis wrote: > LGTM, but I don't feel like I have the experience to "formally" approve. I > left a nice-to have suggestion too, but feel free to ignore, if you fe

[PATCH] D150321: [clang] Document extensions from later standards

2023-05-11 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 521375. philnik marked 5 inline comments as done. philnik added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150321/new/ https://reviews.llvm.org/D150321 Files: clang/docs/Langua

[PATCH] D150191: [clang][Diagnostics] Provide a source range for 'use of undeclared identifier' diagnostics

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:2187 else - SemaRef.Diag(TypoLoc, DiagnosticID) << Typo; + SemaRef.Diag(TypoRange.getEnd(), DiagnosticID) << Typo; return; tbaeder wrote: > I'm not passing the `TypoR

[PATCH] D150282: [Driver] -ftime-trace: derive trace file names from -o and -dumpdir

2023-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 521379. MaskRay marked an inline comment as done. MaskRay edited the summary of this revision. MaskRay added a comment. Add a warning test. Report -Wunused-command-line-argument warning for -ftime-trace-granularity=0 if unused as well. Repository: rG LLVM

[PATCH] D150282: [Driver] -ftime-trace: derive trace file names from -o and -dumpdir

2023-05-11 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. Does GCC have the same `-ftime-trace=` option? It seems like it doesn't, as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92396 is still open? If so, I am happy with unifying more of the dump/aux handling, and I imagine when/if GCC adds the option it will behave sim

[PATCH] D149642: [RISCV] Support vreinterpret intrinsics between vector boolean type and m1 vector integer type

2023-05-11 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/include/clang/Basic/riscv_vector.td:2042 + + SmallVector Operands; + if (ResultType->isIntOrIntVectorTy(1)) { This SmallVector is unused Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D150139: [clang-repl] Enable basic multiline support.

2023-05-11 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! Comment at: clang/test/Interpreter/multiline.cpp:12-17 +void f(int x) \ +{ \ + printf("x=\ + %d",

[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

2023-05-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D147844#4329497 , @aaron.ballman wrote: > In general, I think this is incremental progress on the diagnostic behavior. > However, it's clear that there is room for interpretation on what is or is > not a false positive diag

[PATCH] D149158: [clang][analyzer] Cleanup tests of StdCLibraryFunctionsChecker (NFC)

2023-05-11 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. LGTM, premerge checks are green AFAICT. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149158/new/ https://reviews.llvm.org/D149158

[PATCH] D149986: AMDGPU: Force sc0 and sc1 on stores for gfx940 and gfx941

2023-05-11 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added inline comments. Comment at: llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp:517-529 + bool tryForceStoreSC0SC1(const SIMemOpInfo &MOI, + MachineBasicBlock::iterator &MI) const override { +if (ST.hasForceStoreSC0SC1() && +(MO

[PATCH] D150321: [clang] Document extensions from later standards

2023-05-11 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, this is awesome -- thank you for the improved docs! Comment at: clang/docs/LanguageExtensions.rst:1373 +Language extensions back-ported to previous stan

[PATCH] D145343: [AMDGPU] Emit predefined macro `__AMDGCN_CUMODE__`

2023-05-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 521396. yaxunl retitled this revision from "[AMDGPU] Emit predefined macro `__AMDGCN_CUMODE`" to "[AMDGPU] Emit predefined macro `__AMDGCN_CUMODE__`". yaxunl edited the summary of this revision. yaxunl added a comment. rename the macro to be consistent with mo

[clang] b09fad7 - [clang] Document extensions from later standards

2023-05-11 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-05-11T11:54:46-07:00 New Revision: b09fad7f8e9ce5b88fb467be012ea379efa3659d URL: https://github.com/llvm/llvm-project/commit/b09fad7f8e9ce5b88fb467be012ea379efa3659d DIFF: https://github.com/llvm/llvm-project/commit/b09fad7f8e9ce5b88fb467be012ea379efa3659d.dif

[PATCH] D150321: [clang] Document extensions from later standards

2023-05-11 Thread Nikolas Klauser via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. philnik marked an inline comment as done. Closed by commit rGb09fad7f8e9c: [clang] Document extensions from later standards (authored by philnik). Changed prior to com

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-05-11 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 521406. void added a comment. Use strings for the attribute argument. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Basic/Attr.td clang/

[PATCH] D146342: [-Wunsafe-buffer-usage] Move the whole analysis to the end of a translation unit

2023-05-11 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 521409. ziqingluo-90 added a comment. Address comments: refactor the callable-definition visitor to take a lambda Callback, who calls various analyses that need whole-TU information.If one needs to add a new such analysis later, just add a call i

[PATCH] D150258: [clang][parser] Fix namespace dropping after malformed declarations

2023-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! FWIW, I verified that the precommit CI failures are unrelated to this patch. Can you add a release note to `clang/docs/ReleaseNotes.rst` about the fix? Comment at: clang/lib/Parse/ParseDecl.cpp:2179-2180 -

[PATCH] D150340: [SEH]:Fix assertion when try is used inside catch(...) block with /EHa

2023-05-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGException.cpp:650 +llvm::FunctionCallee SehCppScope = getSehTryBeginFn(CGM); +EmitSehScope(SehCppScope); + } Do we need to make the same change in EmitSEHTryStmt/ExitSEHTryStmt?

[PATCH] D150352: [clang][dataflow] Don't analyze templated declarations.

2023-05-11 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:36 + /// `S` resides. `D.isTemplated()` must be false. + static llvm::Expected build(const Decl &D, Stmt &S, +

[PATCH] D150282: [Driver] -ftime-trace: derive trace file names from -o and -dumpdir

2023-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 521427. MaskRay marked an inline comment as done. MaskRay edited the summary of this revision. MaskRay added a comment. add an assert to addTimeTraceFile. improve a -dumpdir test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check

2023-05-11 Thread Mike Crowe via Phabricator via cfe-commits
mikecrowe added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst:117 + +.. option:: PrintFunction + Is `PrintFunction` (and the soon-to-arrive `PrintlnFunction`) distinct enough from `PrintfLikeFunctions` and `Fp

[PATCH] D150282: [Driver] -ftime-trace: derive trace file names from -o and -dumpdir

2023-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D150282#4335568 , @scott.linder wrote: > Does GCC have the same `-ftime-trace=` option? It seems like it doesn't, as > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92396 is still open? You found it! I am trying to collect o

[PATCH] D150340: [SEH]:Fix assertion when try is used inside catch(...) block with /EHa

2023-05-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/CodeGen/CGException.cpp:650 +llvm::FunctionCallee SehCppScope = getSehTryBeginFn(CGM); +EmitSehScope(SehCppScope); + } efriedma wrote: > Do we need to make the same change in EmitSEHTryStmt/Ex

[clang] 027aeec - [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-11 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-05-11T16:02:54-05:00 New Revision: 027aeec7da67afe33b159f5e42dec57488897454 URL: https://github.com/llvm/llvm-project/commit/027aeec7da67afe33b159f5e42dec57488897454 DIFF: https://github.com/llvm/llvm-project/commit/027aeec7da67afe33b159f5e42dec57488897454.diff

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-11 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG027aeec7da67: [Clang] Respect `-L` options when compiling directly for AMDGPU (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150013/new

[PATCH] D150282: [Driver] -ftime-trace: derive trace file names from -o and -dumpdir

2023-05-11 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added inline comments. Comment at: clang/include/clang/Driver/Compilation.h:279 + void addTimeTraceFile(const char *Name, const JobAction *JA) { +TimeTraceFiles[JA] = Name; + } MaskRay wrote: > scott.linder wrote: > > If this is overriding prev

  1   2   >