[PATCH] D149800: [WIP][PGO] Add ability to mark cold functions as optsize/minsize/optnone

2023-05-11 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi added a comment. In D149800#4330831 , @davidxl wrote: > This patch uses a cleaner method than the previous effort. There is some > differences: > > 1. yamauchi's patch works for both iFDO and autoFDO, while this patch limits > to iFDO > 2. yama

[clang] 62c4c61 - Remove outdated sentence in SourceBasedCodeCoverage.rst

2023-05-11 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2023-05-11T17:17:57-04:00 New Revision: 62c4c614eea8078918d04cb33ce54ef8f9987766 URL: https://github.com/llvm/llvm-project/commit/62c4c614eea8078918d04cb33ce54ef8f9987766 DIFF: https://github.com/llvm/llvm-project/commit/62c4c614eea8078918d04cb33ce54ef8f9987766.diff LOG

[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); + } jyu2 wrote: > efriedma wrote: > > Do we need to make the same change

[PATCH] D150403: [clang-format] Adjust braced list detection (try 2)

2023-05-11 Thread Galen Elias via Phabricator via cfe-commits
galenelias created this revision. galenelias added reviewers: cpplearner, HazardyKnusperkeks, MyDeveloperDay. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, owenpan. galenelias requested review of this revision. This is a re

[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 updated this revision to Diff 521465. jyu2 added a comment. Address Eli's comment. Thanks for review!. :-( Sorry, You are right!! It is seems EmitSehTryScopeBegin is not called anywhere. Changed. Thanks for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[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 accepted this revision. Maetveis added a comment. This revision is now accepted and ready to land. I don't see anything in here that would block later extension for supporting offloading, so LGTM from my POV. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

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

2023-05-11 Thread Pranav Kant via Phabricator via cfe-commits
pranavk planned changes to this revision. pranavk marked 2 inline comments as done. pranavk added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:14343 +// passed to this function. Starting pattern matching with any other +// instruction (such

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

2023-05-11 Thread Pranav Kant via Phabricator via cfe-commits
pranavk updated this revision to Diff 521474. pranavk edited the summary of this revision. pranavk added a comment. Address reviewer comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147266/new/ https://reviews.llvm.org/D147266 Files: llvm/

[PATCH] D149809: [Clang][Docs] Fix man page build

2023-05-11 Thread Aiden Grossman via Phabricator via cfe-commits
aidengrossman added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149809/new/ https://reviews.llvm.org/D149809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-11 Thread Roy Sundahl via Phabricator via cfe-commits
rsundahl updated this revision to Diff 521479. rsundahl added a comment. Added testing. Removed asan_abi_shim.h. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143675/new/ https://reviews.llvm.org/D143675 Files: clang/include/clang/Driver/Options

[PATCH] D149809: [Clang][Docs] Fix man page build

2023-05-11 Thread Tom Stellard via Phabricator via cfe-commits
tstellar accepted this revision. tstellar 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/D149809/new/ https://reviews.llvm.org/D149809 __

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

2023-05-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Ok looks great to me now! Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2364 + Node->getBeginLoc())) { + UnsafeBufferUsageReporter R(S); +

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-11 Thread Roy Sundahl via Phabricator via cfe-commits
rsundahl updated this revision to Diff 521482. rsundahl added a comment. Fixed nits (missing newlines at end of files) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143675/new/ https://reviews.llvm.org/D143675 Files: clang/include/clang/Driver/O

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

2023-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148490#4334476 , @shchenz wrote: >> 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

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

2023-05-11 Thread Pranav Kant via Phabricator via cfe-commits
pranavk added a comment. tests coming Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147266/new/ https://reviews.llvm.org/D147266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-11 Thread Roy Sundahl via Phabricator via cfe-commits
rsundahl added a comment. In D143675#4310903 , @eugenis wrote: > I'm fine with it in general. Is asan_abi.cpp meant as a temporary stub? It's > not even link anywhere in the current version. We now use it during testing to close the loop on the question

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-11 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: compiler-rt/lib/asan_abi/asan_abi_shim.cpp:62 +void __asan_init(void) { +assert(sizeof(uptr) == 8); +assert(sizeof(u64) == 8); static_assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-05-11 Thread Pranav Kant via Phabricator via cfe-commits
pranavk updated this revision to Diff 521505. pranavk added a comment. add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147266/new/ https://reviews.llvm.org/D147266 Files: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/test/CodeGen

[clang] ba566ff - [NFC][AST] Return void from setUseQualifiedLookup

2023-05-11 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2023-05-11T17:13:19-07:00 New Revision: ba566fffb205a338c0a6e382b64d84b3a1e21fb6 URL: https://github.com/llvm/llvm-project/commit/ba566fffb205a338c0a6e382b64d84b3a1e21fb6 DIFF: https://github.com/llvm/llvm-project/commit/ba566fffb205a338c0a6e382b64d84b3a1e21fb6.diff L

[PATCH] D150226: [Clang] Remove ability to downgrade warning on the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2023-05-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 521507. shafik added a comment. - Adding release note CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150226/new/ https://reviews.llvm.org/D150226 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticASTKinds.td clang/lib/AST/E

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/asan_abi/asan_abi_shim.cpp:14 +extern "C" { +// Globals +void __asan_register_image_globals(uptr *flag) { Comments are usually a complete sentence with a period. There are exceptions, but a "Globals" nee

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

2023-05-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:8 + + static_assert(__builtin_strcmp("abab", "abab") == 0); + static_assert(__builtin_strcmp("abab", "abba") == -1); Both empty strings `""` would be good as well. CHANGES S

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

2023-05-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149816/new/ https://reviews.llvm.org/D149816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

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

2023-05-11 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:2537 -TEST(TransferTest, DerefDependentPtr) { std::string Code = R"( This `DerefDependentPtr` test was originally added in https://reviews.llvm.org/D117567

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D143675#4336365 , @rsundahl wrote: > In D143675#4310903 , @eugenis wrote: > >> I'm fine with it in general. Is asan_abi.cpp meant as a temporary stub? It's >> not even link anywhere in

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D143675#4310904 , @vitalybuka wrote: > In D143675#4310734 , @rsundahl > wrote: > >> @kcc @eugenis @MaskRay @vitalybuka Ok to go with this? All new functionality >> is under the added

[PATCH] D150411: [NFC][Clang] Fix Static Code Analysis Concerns

2023-05-11 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Manna added a reviewer: tahonermann. Herald added subscribers: steakhal, arphaman. Herald added a reviewer: NoQ. Herald added a project: All. Manna requested review of this revision. Herald added a project: clang. This patch adds missing assignment operator to the clas

[PATCH] D139837: [Clang] Implements CTAD for aggregates P1816R0 and P2082R1

2023-05-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Sorry for the long delay guys. I'll update the patch this weekend. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139837/new/ https://reviews.llvm.org/D139837 ___ cfe-commits mailin

[PATCH] D150411: [NFC][Clang] Fix Static Code Analysis Concerns

2023-05-11 Thread Soumi Manna via Phabricator via cfe-commits
Manna abandoned this revision. Manna added a comment. Wrong patch. Closing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150411/new/ https://reviews.llvm.org/D150411 ___ cfe-commits mailing list cfe-comm

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-11 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 521525. oskarwirga added a comment. clang-format 😺 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGen/bound

[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

2023-05-11 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon updated this revision to Diff 521528. agozillon added a comment. - [Clang][OpenMP][IRBuilder] Tidy up function calls with helpful reviewer advice - [Clang][OpenMP][IRBuilder] Replace all getTargetEntryUniqueInfo with IRBuilder version - [Clang][OpenMP][IRBuilder] Run clang-format and ti

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2023-05-11 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. The patch will continue to be updated by @SixWeining . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/ https://reviews.llvm.org/D136436 ___ cfe-commits mailing list

[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

2023-05-11 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. In the last commit I believe I addressed the last review comments and I added an OMPIRBuilderTest testing some of the functionality of the registerTargetGlobalVariable and getAddrOfDeclareTargetVar functionality! Just to maintain the standard of making tests for thing

[PATCH] D150411: [NFC][Clang] Fix Static Code Analysis Concerns

2023-05-11 Thread Soumi Manna via Phabricator via cfe-commits
Manna updated this revision to Diff 521529. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150411/new/ https://reviews.llvm.org/D150411 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/Analysis/Analyses/Consumed.h clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.

[PATCH] D150226: [Clang] Remove ability to downgrade warning on the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2023-05-11 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. We're still using `-Wno-enum-constexpr-conversion`, although I'm not sure if we need that or if we just forgot to remove it after doing some cleanup. I'm trying it out now. (Sorry, I'm not sure we were aware that having a way to turn this off was just temporary). BTW

[PATCH] D150411: [NFC][Clang][Coverity] Fix Static Code Analysis Concerns with copy without assign

2023-05-11 Thread Soumi Manna via Phabricator via cfe-commits
Manna added inline comments. Comment at: clang/include/clang/Sema/Sema.h:1789-1791 +SemaDiagnosticBuilder &operator=(SemaDiagnosticBuilder &&D) = delete; SemaDiagnosticBuilder(const SemaDiagnosticBuilder &) = default; +SemaDiagnosticBuilder &operator=(const SemaDiagn

[PATCH] D150226: [Clang] Remove ability to downgrade warning on the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2023-05-11 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. We also use Wno-enum-constexpr-conversion in ChromeOS. There are many packages that break with this warning. One of them is boost which is used in many other packages. The errors in boost were: ./boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 i

[clang] 2ed7784 - This patch adds doc for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-05-11 Thread via cfe-commits
Author: jinge90 Date: 2023-05-12T11:12:36+08:00 New Revision: 2ed77846a9161106a26d1efa9b68a3122856b434 URL: https://github.com/llvm/llvm-project/commit/2ed77846a9161106a26d1efa9b68a3122856b434 DIFF: https://github.com/llvm/llvm-project/commit/2ed77846a9161106a26d1efa9b68a3122856b434.diff LOG:

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-05-11 Thread xiongji90 via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. xiongji90 marked an inline comment as done. Closed by commit rG2ed77846a916: This patch adds doc for __builtin_flt_rounds and __builtin_set_flt_rounds (authored by xiongji90). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2023-05-11 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 521541. SixWeining added a comment. Only allow non-prefixed names for GPRs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/ https://reviews.llvm.org/D136436 Files: clang/lib/Basic/Targets/LoongA

[PATCH] D150226: [Clang] Remove ability to downgrade warning on the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2023-05-11 Thread Sam James via Phabricator via cfe-commits
thesamesam added a comment. Adding to the concerns raised above, I don't think we're there yet. See https://bugs.gentoo.org/buglist.cgi?quicksearch=enum-constexpr-conversion&list_id=6843355 and keep in mind that a bunch of stuff isn't buildable with Clang 16 yet anyway so I expect a bunch more

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-11 Thread Brittany Blue Gaston via Phabricator via cfe-commits
thetruestblue added inline comments. Comment at: compiler-rt/test/asan_abi/lit.cfg.py:83 +# Only run the tests on supported OSs. +if config.host_os not in ['Darwin']: + config.unsupported = True MaskRay wrote: > `!=` The thought here was to leave basic lit patte

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

2023-05-11 Thread Pranav Kant via Phabricator via cfe-commits
pranavk updated this revision to Diff 521545. pranavk added a comment. More concise pattern matching Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147266/new/ https://reviews.llvm.org/D147266 Files: llvm/lib/Target/AArch64/AArch64ISelLowering.cp

[PATCH] D136436: [Clang][LoongArch] Add GPR alias handling without `$` prefix

2023-05-11 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n accepted this revision. xen0n added a comment. This revision is now accepted and ready to land. LGTM now, thanks for updating this patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/ https://reviews.llvm.org/D136436

[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#4335282 , @aaron.ballman wrote: > In D150364#4335261 , @tbaeder wrote: > >> In D150364#4335221 , >> @aaron.ballman wrote: >> >>> "Uns

[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 521568. tbaeder marked an inline comment as done. 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/In

[clang] cf47e9f - [Serialization] Don't try to complete the redeclaration chain in

2023-05-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-05-12T14:28:58+08:00 New Revision: cf47e9fe86aa65b74b0476a5ad4d036dd7463bfb URL: https://github.com/llvm/llvm-project/commit/cf47e9fe86aa65b74b0476a5ad4d036dd7463bfb DIFF: https://github.com/llvm/llvm-project/commit/cf47e9fe86aa65b74b0476a5ad4d036dd7463bfb.diff LO

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-11 Thread Vikram Hegde via Phabricator via cfe-commits
vikramRH created this revision. vikramRH added reviewers: sameerds, b-sumner, yaxunl, arsenm. Herald added subscribers: hoy, kerbowa, hiraditya, Anastasia, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. vikramRH requested review of this revision. Herald added subscribers: llvm-com

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

2023-05-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/records.cpp:341 + +/// FIXME: Wrong source location below. +return 12; // expected-note {{in call to '&S{}->~S()'}} aaron.ballman wrote: > Oh interesting -- does the old constexpr interprete

[PATCH] D150124: [index][clangd] Consider labels when indexing function bodies

2023-05-11 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. In D150124#4329163 , @ilya-biryukov wrote: > In `clangd` we also have `findExplicitReferences` and `targetDecl` functions > that seem to handle the `GoToStmt`. According to the commit message of the patch that added this, it

<    1   2