[PATCH] D154869: [Flang] [FlangRT] Implement FlangRT library as solution to Flang's runtime LLVM integration

2023-07-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: flang-rt/CMakeLists.txt:17-23 +# Check if flang-rt is built as a standalone project. +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR FLANG_RT_STANDALONE_BUILD) + project(FlangRT C CXX) + set(CMAKE_INCLUDE_CURRENT_DIR ON) +

[PATCH] D154596: [RISCV] Fix required features checking with empty string

2023-07-13 Thread Wang Pengcheng via Phabricator via cfe-commits
wangpc accepted this revision. wangpc added a comment. LGTM as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154596/new/ https://reviews.llvm.org/D154596 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D154596: [RISCV] Fix required features checking with empty string

2023-07-13 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/D154596/new/ https://reviews.llvm.org/D154596 ___

[PATCH] D154596: [RISCV] Fix required features checking with empty string

2023-07-13 Thread Jim Lin via Phabricator via cfe-commits
Jim added a comment. In D154596#4499757 , @wangpc wrote: > In D154596#4499718 , @Jim wrote: > >> In D154596#4499647 , @wangpc wrote: >> >>> Can you give an example of intr

[PATCH] D154688: [clang] Show verify prefix in error messages

2023-07-13 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D154688#4498398 , @aaron.ballman wrote: > In D154688#4497967 , @tbaeder wrote: > >> When passing a different prefix via `-verify=foo`, the error messages now >> say "error: 'foo-error

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7226 + } else { +Args.claimAllArgs(options::OPT_fhip_uniform_block, + options::OPT_fno_hip_uniform_block); MaskRay w

[PATCH] D154764: [ASTImporter] Fields are imported first and reordered for correct layout.

2023-07-13 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 540254. danix800 retitled this revision from "[clang] [ASTImporter]: force recomputing ASTRecordLayout when importing" to "[ASTImporter] Fields are imported first and reordered for correct layout.". danix800 edited the summary of this revision. danix800 set

[PATCH] D155145: Add AVX-VNNI-INT16 instructions.

2023-07-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/test/CodeGen/X86/avxvnniint16-intrinsics.ll:3 +; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-unknown-unknown --show-mc-encoding -mattr=+avx2,+avxvnniint16 | FileCheck %s --check-prefixes=X64 +; RUN: llc < %s -verify-machin

[PATCH] D154596: [RISCV] Fix required features checking with empty string

2023-07-13 Thread Wang Pengcheng via Phabricator via cfe-commits
wangpc added a comment. In D154596#4499718 , @Jim wrote: > In D154596#4499647 , @wangpc wrote: > >> Can you give an example of intrinsic that doesn't require any extra >> extension enabled? > > Like read/write cs

[PATCH] D155145: Add AVX-VNNI-INT16 instructions.

2023-07-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/X86InstrSSE.td:8303 + def rr : I("int_x86_avx2_"#OpcodeStr#"_128") + VR128:$src1, VR128:$src2, VR128:$src3)))]>, This needs to be indented 1 character more so that it looks

[PATCH] D155145: Add AVX-VNNI-INT16 instructions.

2023-07-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/test/CodeGen/X86/avxvnniint16-intrinsics.ll:3 +; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-unknown-unknown --show-mc-encoding -mattr=+avx2,+avxvnniint16 | FileCheck %s --check-prefixes=X64 +; RUN: llc < %s -verify-m

[PATCH] D154596: [RISCV] Fix required features checking with empty string

2023-07-13 Thread Jim Lin via Phabricator via cfe-commits
Jim added a comment. In D154596#4499647 , @wangpc wrote: > Can you give an example of intrinsic that doesn't require any extra extension > enabled? Like read/write csr intrinsics that we add for convenient usage doesn't need any extra extension enabled

[clang] 3a9683f - Fix comparison of constrained deduced return types in explicit

2023-07-13 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-07-13T19:59:19-07:00 New Revision: 3a9683fce362ecfd7c4d76d4bf1198b59193e361 URL: https://github.com/llvm/llvm-project/commit/3a9683fce362ecfd7c4d76d4bf1198b59193e361 DIFF: https://github.com/llvm/llvm-project/commit/3a9683fce362ecfd7c4d76d4bf1198b59193e361.diff

[PATCH] D154596: [RISCV] Fix required features checking with empty string

2023-07-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. This seems reasonable to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154596/new/ https://reviews.llvm.org/D154596 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D154596: [RISCV] Fix required features checking with empty string

2023-07-13 Thread Wang Pengcheng via Phabricator via cfe-commits
wangpc added a comment. Can you give an example of intrinsic that doesn't require any extra extension enabled? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154596/new/ https://reviews.llvm.org/D154596

[PATCH] D155146: Add SHA512 instructions.

2023-07-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86.td:243 + "Support SHA512 instructions", + [FeatureAVX]>; // Processor supports CET SHSTK - Control-Flow Enforcement Technology ---

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for the update. Can you add a comment for the `-funified-lto` combination? It's unclear what it does... `clang -flto=thin -ffat-lto-objects -funified-lto -fuse-ld=lld foo.c` I've left some comments about missing test coverage. Comment at: clan

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-13 Thread Limin Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGef33d6cbfc2d: [XRay] Add initial support for loongarch64 (authored by SixWeining, committed by Ami-zhang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1407

[PATCH] D155145: Add AVX-VNNI-INT16 instructions.

2023-07-13 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: llvm/test/CodeGen/X86/avxvnniint16-intrinsics.ll:2 +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-unknown-unknown --show-mc-encoding -mattr=+avx2,+a

[PATCH] D154596: [RISCV] Fix required features checking with empty string

2023-07-13 Thread Jim Lin via Phabricator via cfe-commits
Jim added a comment. Kindly ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154596/new/ https://reviews.llvm.org/D154596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Trevor Gross via Phabricator via cfe-commits
tmgross added a comment. In D86310#4499095 , @rnk wrote: > I still think we're overthinking this, and letting our ABI compat concerns > block us from making progress. Maybe we could do something as simple as > erroring out from the auto-upgrader when the

[PATCH] D154822: [clang] Support '-fgpu-default-stream=per-thread' for NVIDIA CUDA

2023-07-13 Thread Artem Belevich 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 rGf05b58a9468c: [clang] Support '-fgpu-default-stream=per-thread' for NVIDIA CUDA (authored by boxu-zhang, committed by tra). Repository: rG LLVM G

[clang] f05b58a - [clang] Support '-fgpu-default-stream=per-thread' for NVIDIA CUDA

2023-07-13 Thread Artem Belevich via cfe-commits
Author: boxu.zhang Date: 2023-07-13T16:54:57-07:00 New Revision: f05b58a9468cc2990678e06bc51df56b30344807 URL: https://github.com/llvm/llvm-project/commit/f05b58a9468cc2990678e06bc51df56b30344807 DIFF: https://github.com/llvm/llvm-project/commit/f05b58a9468cc2990678e06bc51df56b30344807.diff LO

[PATCH] D154696: [Clang] Diagnose jumps into statement expressions

2023-07-13 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. I suspect this is the same issue but our CI pointed out another instance of this error in some x86 code (https://storage.tuxsuite.com/public/clangbuiltlinux/continuous-integration2/builds/2SW8BY7moEweMJC6DJpzidlGYt8/build.log), which does not appear to use local la

[PATCH] D155241: [Fuchsia] Skip building debuginfod if httplib_ROOT is not specified

2023-07-13 Thread Haowei Wu via Phabricator via cfe-commits
haowei created this revision. haowei added reviewers: phosek, mysterymath. Herald added a subscriber: abrachet. Herald added a project: All. haowei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch skipds building debuginfod if htt

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-13 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added a comment. After doing this, I'm not too sure about the value of keeping the higher-level `CStyleCasts`, `ConditionalStatements`, and `EmptyParentheses` as options to `SpacesInParens`. However, the behavior of `Always` is actually "Always except for `CStyleCasts` and `EmptyParenthe

[PATCH] D153701: [WIP][Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-07-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:8901-8914 + // [P2718R0] Lifetime extension in range-based for loops. + // + // 6.7.7 [class.temporary] p5: + // There are four contexts in which temporaries are destroyed at a different

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

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Changing the default improves GCC compatibility (`Enabled by default under -std=c++14 and above.`) and I think is the right direction. @wangpc You can use your new username to commandeer this revision? To other reviewers, what's still blocked now that the Apple target i

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I'm not personally involved with any workflows that care about autoupgrade, so I'm not really invested in ensuring it's stable. If everyone agrees the impact is small enough that we're willing to just break autoupgrade to the extent it's relevant, I'll withdraw my obj

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-13 Thread Gedare Bloom via Phabricator via cfe-commits
gedare created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. gedare requested review of this revision. This is a refactoring of: - SpacesInConditionalStatement -

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-13 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 540192. paulkirth marked an inline comment as done. paulkirth edited the summary of this revision. paulkirth added a comment. Update summary w/ instructions for using `-ffat-lto-objects` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[clang] 6504d87 - [clang][modules] Deserialize included files lazily

2023-07-13 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-07-13T15:00:11-07:00 New Revision: 6504d87fc0c89fc584c2128355a14a07ed385c5b URL: https://github.com/llvm/llvm-project/commit/6504d87fc0c89fc584c2128355a14a07ed385c5b DIFF: https://github.com/llvm/llvm-project/commit/6504d87fc0c89fc584c2128355a14a07ed385c5b.diff L

[PATCH] D155131: [clang][modules] Deserialize included files lazily

2023-07-13 Thread Jan Svoboda 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 rG6504d87fc0c8: [clang][modules] Deserialize included files lazily (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3594 +TrapCall->addFnAttr(A); + } + TrapCall->setDoesNotReturn(); aeubanks wrote: > oskarwirga wrote: > > vitalybuka wrote: > > > wouldn't be you issues solved with > > >

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D86310#4498575 , @efriedma wrote: > https://reviews.llvm.org/D86310#2231136 has an example where IR generated by > clang breaks. Right, so we'd break LTO of packed structs with i128 members. I still think we're overthinking this,

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3594 +TrapCall->addFnAttr(A); + } + TrapCall->setDoesNotReturn(); oskarwirga wrote: > vitalybuka wrote: > > wouldn't be you issues solved with > > TrapCall->setCannotMerge(

[PATCH] D155081: Specify the developer policy around links to external resources

2023-07-13 Thread Chris Lattner via Phabricator via cfe-commits
lattner requested changes to this revision. lattner added a comment. This revision now requires changes to proceed. Thank you so much for raising this issue Aaron. Documenting the policy in the developer policy is totally the right thing to do given this cross-cuts individual subprojects, but I

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 540181. oskarwirga added a comment. Refactor CodeGen code 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/CodeGe

[PATCH] D153881: Create diagnostic group for definition deprecation warning

2023-07-13 Thread Nuri Amari via Phabricator via cfe-commits
nuriamari added a comment. In D153881#4497041 , @aaron.ballman wrote: > LGTM! Do you need me to land this on your behalf? If so, what name and email > address would you like me to use for patch attribution? (If I'm landing it, I > can fix up the releas

[PATCH] D155234: [SystemZ][z/OS] Forward headers to z/os system headers

2023-07-13 Thread Sean via Phabricator via cfe-commits
SeanP created this revision. SeanP added reviewers: abhina.sreeskantharajan, zibi, fanbo-meng. Herald added a project: All. SeanP requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a project: clang. For the h

[PATCH] D155131: [clang][modules] Deserialize included files lazily

2023-07-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 540174. jansvoboda11 added a comment. Herald added a subscriber: mgrang. Remove dead code, make sure `getFileInfo()` is called in `alreadyIncluded()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155131/ne

[PATCH] D154531: [AMDGPU] Support -mcpu=native for OpenCL

2023-07-13 Thread Yaxun Liu 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 rG91b9bdeb9256: [AMDGPU] Support -mcpu=native for OpenCL (authored by yaxunl). Herald added a subscriber: ldrumm. Herald added a project: clang. Repos

[clang] 91b9bde - [AMDGPU] Support -mcpu=native for OpenCL

2023-07-13 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-07-13T16:21:35-04:00 New Revision: 91b9bdeb92562d3030d834489185a10aa8e241ef URL: https://github.com/llvm/llvm-project/commit/91b9bdeb92562d3030d834489185a10aa8e241ef DIFF: https://github.com/llvm/llvm-project/commit/91b9bdeb92562d3030d834489185a10aa8e241ef.dif

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3576-3597 +if (TrapBBs.size() <= CheckHandlerID) + TrapBBs.resize(CheckHandlerID + 1); +llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + +if (!CGM.getCodeGenOpts().OptimizationLevel

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. In D86310#4498721 , @hvdijk wrote: > In D86310#4498575 , @efriedma wrote: > >> https://reviews.llvm.org/D86310#2231136 has an example where IR generated by >> clang breaks. > > clang bases

[PATCH] D154881: [HIP] Ignore host linker flags for device-only

2023-07-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/Driver/hip-phases.hip:275 // RELOC-DAG: [[P5:[0-9]+]]: offload, "device-[[T]] (amdgcn-amd-amdhsa:[[ARCH]])" {[[P4]]}, object // need to check RELOC-NOT: host Comment at: clang/test/Drive

[PATCH] D153058: [clang][CFG] Support construction of a weak topological ordering of the CFG.

2023-07-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Having (mostly!) understood what this is doing, the algorithm looks like it's doing the right thing. High-level ideas would be: - there are three different representations/sets of APIs exposed: intervals, ordering, and compare. It seems like we only have immediate pl

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-07-13 Thread Guillot Tony via Phabricator via cfe-commits
to268 marked an inline comment as done. to268 added a comment. Thank you for your feedback @aaron.ballman! I really appreciate that you are pointing out all my formatting mistakes, and giving me more guidelines. The direction of the patch is clearer now. In D133289#4489883

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Do we need CodeGen testcases here for full coverage? The testcases from the issue passed with -fsyntax-only. With this patch, the following cases produce errors that don't really make sense to me: consteval int f(int x) { return x; } struct SS {

[PATCH] D154869: [Flang] [FlangRT] Implement FlangRT library as solution to Flang's runtime LLVM integration

2023-07-13 Thread Paul Scoropan via Phabricator via cfe-commits
pscoro added inline comments. Comment at: flang-rt/CMakeLists.txt:17-23 +# Check if flang-rt is built as a standalone project. +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR FLANG_RT_STANDALONE_BUILD) + project(FlangRT C CXX) + set(CMAKE_INCLUDE_CURRENT_DIR ON) +

[PATCH] D154869: [Flang] [FlangRT] Implement FlangRT library as solution to Flang's runtime LLVM integration

2023-07-13 Thread Slava Zakharin via Phabricator via cfe-commits
vzakhari added inline comments. Comment at: flang-rt/CMakeLists.txt:17-23 +# Check if flang-rt is built as a standalone project. +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR FLANG_RT_STANDALONE_BUILD) + project(FlangRT C CXX) + set(CMAKE_INCLUDE_CURRENT_DIR ON) +

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D86310#4498575 , @efriedma wrote: > https://reviews.llvm.org/D86310#2231136 has an example where IR generated by > clang breaks. clang bases it on the data layout, so when the change here is applied, clang already generates co

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > The only problem that approach 2 solves is to ensure that a non-clang > frontend using i128 https://reviews.llvm.org/D86310#2231136 has an example where IR generated by clang breaks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86310/new/ https://reviews.

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D86310#4498551 , @rnk wrote: > Given that most non-clang frontends want the bug fix (ABI break), who exactly > is asking for this level of IR ABI stability? You were, I thought, or at least that's how I interpreted your earlier

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I see two ways forward here: 1. Autoupgrade modules with old datalayout strings by increasing the alignment of i128 & co. This will change LLVM IR struct layouts, argument alignments, etc. As far as native ABI boundaries are concerned, this should be "more correct": Clang

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3576-3597 +if (TrapBBs.size() <= CheckHandlerID) + TrapBBs.resize(CheckHandlerID + 1); +llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + +if (!CGM.getCodeGenOpts().OptimizationLevel

[PATCH] D152770: [clang][ExtractAPI] Add support for Objective-C categories

2023-07-13 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Thanks for the patch! Like I mentioned in the inline comments, I'm not sure I understand the need of the "abstract" (in the sense that it's not really a concrete API) subtype of `APIRecord`. The design doesn't feel right within the existing structure. If I recall the orig

[PATCH] D155146: Add SHA512 instructions.

2023-07-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/X86.td:243 + "Support SHA512 instructions", + [FeatureAVX]>; // Processor supports CET SHSTK - Control-Flow Enforcement Technology --

[clang] d74421a - Remove Clang :: CodeGenCXX/unified-cfi-lto.cpp due to buildbot failures

2023-07-13 Thread Matthew Voss via cfe-commits
Author: Matthew Voss Date: 2023-07-13T11:04:32-07:00 New Revision: d74421a29040d728e43f38ffa003d6cc22fbd0c6 URL: https://github.com/llvm/llvm-project/commit/d74421a29040d728e43f38ffa003d6cc22fbd0c6 DIFF: https://github.com/llvm/llvm-project/commit/d74421a29040d728e43f38ffa003d6cc22fbd0c6.diff

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta marked an inline comment as done. xgupta added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst:52 +.. note:: + Enum types are already covered by compiler warnings when a switch statement + does not handle

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540119. xgupta marked an inline comment as done. xgupta added a comment. Address latest two comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784 Files: clang-tools-e

[PATCH] D155222: [RISCV][AArch64][IRGen] Add scalable->fixed as a special case in CreateCoercedStore.

2023-07-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: bsmith, sdesmalen, c-rhodes, joechrisellis. Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbe

[PATCH] D154869: [Flang] [FlangRT] Implement FlangRT library as solution to Flang's runtime LLVM integration

2023-07-13 Thread Paul Scoropan via Phabricator via cfe-commits
pscoro updated this revision to Diff 540110. pscoro added a comment. Fix build failures Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154869/new/ https://reviews.llvm.org/D154869 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp flang-rt/CMake

[PATCH] D154688: [clang] Show verify prefix in error messages

2023-07-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D154688#4497967 , @tbaeder wrote: > When passing a different prefix via `-verify=foo`, the error messages now say > "error: 'foo-error' diagnostics seen but not expected", etc. > > I'm often working in test files where t

[clang] d212e99 - [RISCV] Update test after the addition for rounding mode to vfadd intrinsic. NFC

2023-07-13 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-07-13T10:45:31-07:00 New Revision: d212e99bc5144696f95f09a573da6ed0d85601a0 URL: https://github.com/llvm/llvm-project/commit/d212e99bc5144696f95f09a573da6ed0d85601a0 DIFF: https://github.com/llvm/llvm-project/commit/d212e99bc5144696f95f09a573da6ed0d85601a0.diff

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > @efriedma would you consider the changes suggested by @hvdijk sufficient > under any circumstances or would you still insist on fully compatible > AutoUpgrade, given the above discussion? If the requirement is "we can mix old and new IR", we have to do it correctly,

[clang] c0de76c - [Driver] Remove unneeded useRelaxRelocations overrides

2023-07-13 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-07-13T10:43:01-07:00 New Revision: c0de76cf9f06ba8356c212420d156d42ad1d15b8 URL: https://github.com/llvm/llvm-project/commit/c0de76cf9f06ba8356c212420d156d42ad1d15b8 DIFF: https://github.com/llvm/llvm-project/commit/c0de76cf9f06ba8356c212420d156d42ad1d15b8.diff

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

2023-07-13 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 540104. rZhBoYao marked an inline comment as done. rZhBoYao edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/ https://reviews.llvm.org/D153156 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Ba

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM assuming precommit CI doesn't find any surprises. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152632/new/ https://reviews.llvm.org/D152632 ___ cfe-commits mailing lis

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 540102. xgupta added a comment. Updated SwitchMissingDefaultCaseCheck.cpp but still WIP Will look again on saturday/sunday Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.llvm.org/D4784

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-13 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone/switch-missing-default-case.rst:52 +.. note:: + Enum types are already covered by compiler warnings when a switch statement + does not handle all enum values. This check focuses on

[PATCH] D155220: [IRGen] Remove 'Sve' from the name of some IR names that are shared with RISC-V now.

2023-07-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: joechrisellis, bsmith, c-rhodes, sdesmalen. Herald added subscribers: VincentWu, vkmr, luismarques, sameer.abuasal, s.egerton, Jim, rogfer01, shiva0217, kito-cheng, simoncook, arichardson. Herald added a project: All. craig.topper r

[PATCH] D149867: [Clang][M68k] Add Clang support for the new M68k_RTD CC

2023-07-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Also, it looks like precommit CI found a relevant failure that should be investigated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149867/new/ https://reviews.llvm.org/D149867 ___ cfe-commits mailing list cfe

[PATCH] D149867: [Clang][M68k] Add Clang support for the new M68k_RTD CC

2023-07-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Sorry for the long delay in review on this, it slipped through the cracks for me. Comment at: clang/lib/AST/TypePrinter.cpp:1861 break; + case attr::M68kRTD: OS << "m68k_rtd"; break; case attr::NoDeref: ==

[PATCH] D155131: [clang][modules] Deserialize included files lazily

2023-07-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D155131#4495489 , @benlangmuir wrote: > Now that it's not eagerly deserialized, should > `Preprocessor::alreadyIncluded` call `HeaderInfo.getFileInfo(File)` to ensure > the information is up to date? It should, but `Pr

[PATCH] D152818: [Clang] Make template instantiations respect pragma FENV_ACCESS state at point-of-definition

2023-07-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D152818#4457013 , @zahiraam wrote: > In D152818#4456872 , @aaron.ballman > wrote: > >> In D152818#4456797 , @zahiraam >> wrote: >> >>>

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7226 + } else { +Args.claimAllArgs(options::OPT_fhip_uniform_block, + options::OPT_fno_hip_uniform_block); yaxunl wrote: > MaskRay wrote: > > Why is the -Wu

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-07-13 Thread Prabhu Karthikeyan Rajasekaran via Phabricator via cfe-commits
Prabhuk updated this revision to Diff 540091. Prabhuk marked 5 inline comments as done. Prabhuk added a comment. Minor formatting changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152206/new/ https://reviews.llvm.org/D152206 Files: clang/li

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-07-13 Thread Prabhu Karthikeyan Rajasekaran via Phabricator via cfe-commits
Prabhuk updated this revision to Diff 540085. Prabhuk marked 6 inline comments as done. Prabhuk added a comment. Added subsystem and entry args. Improved driver test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152206/new/ https://reviews.llvm.or

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-13 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D86310#4496582 , @nikic wrote: > The main problem with that is that we can't have multiple data layouts for > one module, so linking old and new bitcode together would fail. Good point, but it's worth pointing out that this onl

[PATCH] D153701: [WIP][Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-07-13 Thread Yurong via Phabricator via cfe-commits
yronglin marked 2 inline comments as done. yronglin added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:8901-8914 + // [P2718R0] Lifetime extension in range-based for loops. + // + // 6.7.7 [class.temporary] p5: + // There are four contexts in which temporaries

[PATCH] D155217: [clang-tidy][include-cleaner] Don't warn for the same symbol twice

2023-07-13 Thread Alex Brachet via Phabricator via cfe-commits
abrachet created this revision. abrachet added reviewers: VitaNuo, hokein. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. abrachet requested review of this revision. Herald added a project: clang-tools-extra. Herald adde

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-13 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 540072. rZhBoYao marked 6 inline comments as done. rZhBoYao edited the summary of this revision. rZhBoYao added a comment. -Wdeprecated-literal-operator will be on by default in https://reviews.llvm.org/D153156 CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D155215: [clangd] Fix the range for include reference to itself.

2023-07-13 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. VitaNuo requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM Github Monorepo http

[PATCH] D154576: [RISCV] RISCV vector calling convention (1/2)

2023-07-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:3267 case CC_PreserveAll: + case CC_RISCVVectorCall: // FIXME: we should be mangling all of the above. Is it possible to use this calling convention on Windows where we'd hi

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-13 Thread Fangrui Song 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 rGd986462b5053: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain (authored by cwalther, committed by MaskRay). Repository: rG LLVM

[clang] d986462 - [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-13 Thread Fangrui Song via cfe-commits
Author: Christian Walther Date: 2023-07-13T09:19:25-07:00 New Revision: d986462b50536082065a44d12eeed1d0e1539976 URL: https://github.com/llvm/llvm-project/commit/d986462b50536082065a44d12eeed1d0e1539976 DIFF: https://github.com/llvm/llvm-project/commit/d986462b50536082065a44d12eeed1d0e1539976.d

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7226 + } else { +Args.claimAllArgs(options::OPT_fhip_uniform_block, + options::OPT_fno_hip_uniform_block); MaskRay wrote: > Why is the -Wunused-command-line-

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7226 + } else { +Args.claimAllArgs(options::OPT_fhip_uniform_block, + options::OPT_fno_hip_uniform_block); Why is the -Wunused-command-line-argument warning

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, b-sumner, MaskRay, arsenm, scchan. Herald added subscribers: jdoerfert, kerbowa, jvesely. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: wdng. By default, clang assumes HIP kernels are lau

[PATCH] D150221: Add option -fkeep-persistent-storage-variables to emit all variables that have a persistent storage duration

2023-07-13 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. > Furthermore, there is some discussion over covering more than just variables, > but also artifacts with reasonable mangled names such as the symbols for > tem

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-13 Thread Christian Walther via Phabricator via cfe-commits
cwalther added a comment. Christian Walther CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154357/new/ https://reviews.llvm.org/D154357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[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-07-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D150226#4461846 , @efriedma wrote: > The fundamental problem here is the interaction with SFINAE; if we don't > diagnose this as an error, we actually miscompile some cases. Because of > that, a flag wouldn't really be

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D154357#4497973 , @cwalther wrote: > Okay. No, I don’t have write access (as far as I know) and would appreciate > if you (or any other maintainer) could land the patch, with any commit > message you deem appropriate. Happy

[PATCH] D155211: [NVPTX] Add initial support for '.alias' in PTX

2023-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 540062. jhuber6 added a comment. Remove changes in `clang` that I forgot to remove to keep this restricted to the codegen. Afterwards we can remove the sema in clang and test it there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D155211: [NVPTX] Add initial support for '.alias' in PTX

2023-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, arsenm, jlebar, kushanam. Herald added subscribers: mattd, gchakrabarti, asavonic, jeroen.dobbelaere, hiraditya. Herald added a reviewer: aaron.ballman. Herald added a project: All. jhuber6 requested review of this revision. Herald added

[PATCH] D150221: Add option -fkeep-persistent-storage-variables to emit all variables that have a persistent storage duration

2023-07-13 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen updated this revision to Diff 540060. qianzhen added a comment. Add two more test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150221/new/ https://reviews.llvm.org/D150221 Files: clang/include/clang/Basic/CodeGenOptions.def cla

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-13 Thread Christian Walther via Phabricator via cfe-commits
cwalther added a comment. Okay. No, I don’t have write access (as far as I know) and would appreciate if you (or any other maintainer) could land the patch, with any commit message you deem appropriate. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154357/new/ https://reviews.llvm.org

[PATCH] D155195: [include-cleaner] Avoid a caching issue when running --edit mode on multiple files.

2023-07-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155195/new/ https://reviews.llvm.org/D155195

[PATCH] D154688: [clang] Show verify prefix in error messages

2023-07-13 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. When passing a different prefix via `-verify=foo`, the error messages now say "error: 'foo-error' diagnostics seen but not expected", etc. I'm often working in test files where two different prefixes are used and I'm always confused about which one of the two the error

  1   2   >