[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4218 + // DISubprogram's retainedNodes in the subsequent finalizeSubprogram call. + if (IsDeclForCallSite && CGM.getTarget().getTriple().isBPF()) { +if (auto *FD = dyn_cast(D)) {

[PATCH] D139458: [clangd] Full support for #import insertions

2023-01-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/AST.h:122 +/// Returns the Include Directive which should be used for include insertions +/// for the given main file.

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Please separate the patch to clang and llvm part. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4218 + // DISubprogram's retainedNodes in the subsequent finalizeSubprogram call. + if (IsDeclForCallSite && CGM.getTarget().getTriple().isBPF()) { +

[PATCH] D140954: [WIP][7/7][Clang][RISCV][NFC] Remove attribute `IsPrototypeDefaultTU`

2023-01-03 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 486174. eopXD added a comment. Bump CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140954/new/ https://reviews.llvm.org/D140954 Files: clang/include/clang/Basic/riscv_vector.td clang/include/clang/Support

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread serge via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3677ee65d192: Move from llvm::makeArrayRef to ArrayRef deduction g

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 486172. serge-sans-paille added a comment. Split the original patch in pieces: first just introduce the deduction guide. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140896/new/ https://reviews.llvm.org/D140896 Files: llvm/include/llvm

[PATCH] D140954: [WIP][7/7][Clang][RISCV][NFC] Remove attribute `IsPrototypeDefaultTU`

2023-01-03 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 486170. eopXD added a comment. Bump CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140954/new/ https://reviews.llvm.org/D140954 Files: clang/include/clang/Basic/riscv_vector.td clang/include/clang/Support

[PATCH] D138807: [RISCV] Support vector crypto extension ISA string and assembly

2023-01-03 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat updated this revision to Diff 486169. 4vtomat added a comment. Address Eric's comments! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138807/new/ https://reviews.llvm.org/D138807 Files: clang/test/Preprocessor/riscv-target-features.c l

[PATCH] D140954: [WIP][7/7][Clang][RISCV][NFC] Remove attribute `IsPrototypeDefaultTU`

2023-01-03 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sab

[PATCH] D140950: [X86] Support -march=emeraldrapids

2023-01-03 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 486163. FreddyYe marked 4 inline comments as done. FreddyYe added a comment. Address comments. Thanks for review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140950/new/ https://reviews.llvm.org/D140950 Fil

[PATCH] D140685: [LoongArch] Add intrinsics for MOVFCSR2GR and MOVGR2FCSR instructions

2023-01-03 Thread Xiaodong 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 rG63d46869ea57: [LoongArch] Add intrinsics for MOVFCSR2GR and MOVGR2FCSR instructions (authored by XiaodongLoong). Repository: rG LLVM Github Monore

[clang] 63d4686 - [LoongArch] Add intrinsics for MOVFCSR2GR and MOVGR2FCSR instructions

2023-01-03 Thread Xiaodong Liu via cfe-commits
Author: Xiaodong Liu Date: 2023-01-04T14:11:30+08:00 New Revision: 63d46869ea5769693f7895be066f042929512e06 URL: https://github.com/llvm/llvm-project/commit/63d46869ea5769693f7895be066f042929512e06 DIFF: https://github.com/llvm/llvm-project/commit/63d46869ea5769693f7895be066f042929512e06.diff

[PATCH] D140950: [X86] Support -march=emeraldrapids

2023-01-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/docs/ReleaseNotes.rst:810 - Support intrinsics of ``_mm(256)_reduce_(max|min)_ep[i|u]8/16``. +- ``-march=emeraldrapids`` is now supported. Can this be on the same link as the other CPUs above? ===

[PATCH] D140950: [X86] Support -march=emeraldrapids

2023-01-03 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: Enna1, pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits. Repository: rG LLVM Githu

[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache

2023-01-03 Thread Ravi Ramaseshan via Phabricator via cfe-commits
ravi-ramaseshan requested changes to this revision. ravi-ramaseshan added inline comments. Comment at: clang/tools/clang-stat-cache/clang-stat-cache.cpp:28 +#include +#include + Some of these includes may not be available on a platform like Windows. Can you pl

[PATCH] D139458: [clangd] Full support for #import insertions

2023-01-03 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.h:88 /// (These should be const, but RecursiveASTVisitor requires Decl*). - ArrayRef getLocalTopLevelDecls(); + ArrayRef getLocalTopLevelDecls() const; kadircet wrote: > can you

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-03 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:568 -def : ProcessorModel<"generic-rv32", NoSchedModel, [Feature32Bit]>; -def : ProcessorModel<"generic-rv64", NoSchedModel, [Feature64Bit]>; +class RISCVProcessorModelPROCRISCVProcessorModel? RISCVP

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > I'm getting confused by the semantics of --p1689-targeted-output=. In D137527 > , it's used to populate > CompilerCommand::Output which is supposed to be the main compiler output (.o > file). Is that correct? If that's not the case

[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check

2023-01-03 Thread Lounarok via Phabricator via cfe-commits
Lounarok added a comment. > (//data member// is a variable inside a struct/class, but not a > "freestanding" one) Thanks for pointing that out. I misunderstood what //data member// is... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118743/new/ h

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added a comment. In D135488#4024713 , @paulkirth wrote: > @arsenm @thegameg @nickdesaulniers @dblaikie @phosek Can we reach a consensus > here on how to output this kind of information? I feel like I've been told to > move towards remarks as th

[PATCH] D140941: [WIP][4/6][Clang][RISCV] Remove default tail-undisturbed for multiply-add intrinsics

2023-01-03 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sab

[PATCH] D140937: [WIP][3/6][Clang][RISCV] Remove default tail-undisturbed for vslidedown intrinsics

2023-01-03 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 486137. eopXD added a comment. Bump CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140937/new/ https://reviews.llvm.org/D140937 Files: clang/include/clang/Basic/riscv_vector.td clang/test/CodeGen/RISCV/rv

[PATCH] D140937: [WIP][3/6][Clang][RISCV] Remove default tail-undisturbed for vslidedown intrinsics

2023-01-03 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sab

[PATCH] D137058: [Driver] [Modules] Support -fmodule-output (1/2)

2023-01-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 486132. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137058/new/ https://reviews.llvm.org/D137058 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Options.td

[PATCH] D136554: Implement CWG2631

2023-01-03 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D136554#4024628 , @rupprecht wrote: > I still see one behavior change (actually it was there before, but I missed > it in the test results), but as far as I can tell, it's a good one? If I > reduce it too much, I get the wa

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. @arsenm @thegameg @nickdesaulniers @dblaikie @phosek Can we reach a consensus here on how to output this kind of information? I feel like I've been told to move towards remarks as the output method, but that the current diagnostic that tries to lay out the stack visua

[PATCH] D140936: [WIP][2/6][RISCV][Clang] Remove default tail-undisturbed for vslideup intrinsics

2023-01-03 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD created this revision. Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sab

[PATCH] D140927: [C++20][Modules] Fix named module import diagnostics.

2023-01-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. [module.import]p1 says: > In a module unit, all module-import-declarations and export-declarations > exporting module-import-declarations shall appear before all other > declarations in the declaration-seq of the translation-unit and of the > private-module-fragment

[PATCH] D136554: Implement CWG2631

2023-01-03 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht accepted this revision. rupprecht added a comment. I still see one behavior change (actually it was there before, but I missed it in the test results), but as far as I can tell, it's a good one? If I reduce it too much, I get the warning with the baseline toolchain, so it's not erroneo

[PATCH] D140584: [Clang] Refactor "Designators" into a unified implementation [NFC]

2023-01-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/Designator.h:87-92 +/// Refers to the index expression. +Expr *IndexExpr; + +/// Location of the first index expression within the designated +/// initializer expression's list of subexpressions. +

[PATCH] D140433: [Clang] Add `nvptx-arch` tool to query installed NVIDIA GPUs

2023-01-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/tools/nvptx-arch/NVPTXArch.cpp:34 + const char *ErrStr = nullptr; + CUresult Result = cuGetErrorString(Err, &ErrStr); + if (Result != CUDA_SUCCESS) jhuber6 wrote: > tra wrote: > > One problem with this approach is t

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added inline comments. Comment at: llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp:92 + &MF.front()) + << "FunctionName: " << ore::NV("FunctionName", MF.getName()); +}); Why are we emitting

[PATCH] D139564: clang: Don't emit "frame-pointer"="none"

2023-01-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. ce6ae0b2a26b1ec2f770b2b9474cc4486d60c586 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139564/new/ https://reviews.llvm.org/D139564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] ce6ae0b - clang: Don't emit "frame-pointer"="none"

2023-01-03 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2023-01-03T19:42:46-05:00 New Revision: ce6ae0b2a26b1ec2f770b2b9474cc4486d60c586 URL: https://github.com/llvm/llvm-project/commit/ce6ae0b2a26b1ec2f770b2b9474cc4486d60c586 DIFF: https://github.com/llvm/llvm-project/commit/ce6ae0b2a26b1ec2f770b2b9474cc4486d60c586.diff

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-03 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added a subscriber: hiraditya. Herald added a project: All. eddyz87 retitled this revision from "This series of patches adds support for "btf_decl_tag" annotations for arguments of extern functions. Patch descriptions follow. [BPF] Triple::isBPF() utility met

[PATCH] D140433: [Clang] Add `nvptx-arch` tool to query installed NVIDIA GPUs

2023-01-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/nvptx-arch/CMakeLists.txt:19 +if (NOT CUDA_FOUND OR NOT cuda-library) + message(STATUS "Not building nvptx-arch: cuda runtime not found") + return() tra wrote: > Nit: libcuda.so is part of the NVIDIA driver

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 486112. paulkirth added a comment. Identify the stack protector in output Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135488/new/ https://reviews.llvm.org/D135488 Files: clang/test/Frontend/stack-layout-

[PATCH] D139458: [clangd] Full support for #import insertions

2023-01-03 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 486111. dgoldman marked 7 inline comments as done. dgoldman added a comment. Minor fixes for review, moving stuff around Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139458/new/ https://reviews.llvm.org/D1394

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. LGTM if `makeArrayRef` is kept in this patch. Do we foresee compiler bugs (for supported compilers) in this area? If there may be a risk, consider migrate a part of the code base first. CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D140433: [Clang] Add `nvptx-arch` tool to query installed NVIDIA GPUs

2023-01-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/tools/nvptx-arch/CMakeLists.txt:19 +if (NOT CUDA_FOUND OR NOT cuda-library) + message(STATUS "Not building nvptx-arch: cuda runtime not found") + return() Nit: libcuda.so is part of the NVIDIA driver which provides N

[PATCH] D140925: [CMake] Use Clang to infer the target triple

2023-01-03 Thread Tamás Szelei via Phabricator via cfe-commits
tamas added inline comments. Comment at: runtimes/CMakeLists.txt:168 +if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(CXX_TARGET_TRIPLE ${CMAKE_CXX_COMPILER} --target=${LLVM_RUNTIME_TRIPLE} -print-target-triple) + execute_process(COMMAND ${CXX_TARGET_TRIPLE} ---

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-03 Thread Arsenović Arsen via Phabricator via cfe-commits
ArsenArsen added a comment. It'd appear that GCC merges them here: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c/c-typeck.cc;h=e06f052eb46a72d3d50835330c5af975e7c52084;hb=HEAD#l708 /* For function types do not merge const qualifiers, but drop them if used inconsistently. The middle-e

[PATCH] D140664: [Sema] Don't mark deleted special member functions as non-trivial

2023-01-03 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 486105. royjacobson edited the summary of this revision. royjacobson added a comment. Rebase + remove extra class Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140664/new/ https://reviews.llvm.org/D140664

[PATCH] D140584: [Clang] Refactor "Designators" into a unified implementation [NFC]

2023-01-03 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Friendly ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140584/new/ https://reviews.llvm.org/D140584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D140927: [C++20][Modules] Fix named module import diagnostics.

2023-01-03 Thread Iain Sandoe via Phabricator via cfe-commits
iains created this revision. Herald added a subscriber: ChuanqiXu. Herald added a project: All. iains added reviewers: ChuanqiXu, dblaikie. iains added a subscriber: clang-modules. iains published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. We h

[PATCH] D131594: WORK IN PROGRESS Add Clang UEFI target to support "x86_64-unknown-uefi" triple

2023-01-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/UEFI.cpp:41-45 +bool UEFI::IsUnwindTablesDefault(const ArgList &Args) const { + // TODO(prabhukr):: What about x86_32? + return getArch() == llvm::Triple::x86_64 || getArch() == llvm::Triple::arm || +

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-03 Thread Arsenović Arsen via Phabricator via cfe-commits
ArsenArsen added a comment. noreturn is a bit special among the attributes, perhaps it'd be worthwhile altering the standard to say that a composite is noreturn only of all of it's types are. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140868/ne

[PATCH] D140250: Define NULL in its own header

2023-01-03 Thread Ian Anderson via Phabricator via cfe-commits
iana planned changes to this revision. iana added a comment. I think this should be all we need, but I'm still running tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 __

[PATCH] D140250: Define NULL in its own header

2023-01-03 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 486100. iana added a comment. Herald added subscribers: llvm-commits, Sanitizers, Enna1, kadircet, arphaman. Herald added projects: Sanitizers, LLVM, clang-tools-extra. Add a module for __stddef_null.h and give it the same special treatment as __stddef_max_align

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 486095. paulkirth added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135488/new/ https://reviews.llvm.org/D135488 Files: clang/test/Frontend/stack-layout-remark.c llvm/include/llvm/Cod

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 486094. paulkirth added a comment. Remove unnecesary null pointer check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135488/new/ https://reviews.llvm.org/D135488 Files: clang/test/Frontend/stack-layout-r

[PATCH] D133392: [MTE] Add AArch64GlobalsTagging Pass

2023-01-03 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 486093. hctim added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133392/new/ https://reviews.llvm.org/D133392 Files: clang/test/CodeGen/memtag-globals-asm.cpp llvm/lib/CodeGen/GlobalMerge

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. @thegameg Maybe? It seems straightforward, but I'll need take a look. If it's easy(which I think it willbe), I'll try to update this patch, if it's more complex, I'll probably do a separate patch to add that feature. Comment at: llvm/lib/CodeGen/Sta

[PATCH] D140925: [CMake] Use Clang to infer the target triple

2023-01-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: smeenai, ldionne, mstorsjo, mgorny. Herald added subscribers: Enna1, abrachet. Herald added a project: All. phosek requested review of this revision. Herald added projects: clang, Sanitizers, libc++, libc++abi. Herald added subscribers: libcxx-c

[PATCH] D139564: clang: Don't emit "frame-pointer"="none"

2023-01-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Seems fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139564/new/ https://reviews.llvm.org/D139564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D137534#4024178 , @ben.boeckel wrote: > In D137534#4024022 , @jansvoboda11 > wrote: > >> While I was not suggesting using compilation database instead of the >> approach taken b

[PATCH] D140250: Define NULL in its own header

2023-01-03 Thread Ian Anderson via Phabricator via cfe-commits
iana planned changes to this revision. iana added a comment. This needs a bit more work, it looks like it's not enough to just add a header. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140250/new/ https://reviews.llvm.org/D140250 ___

[PATCH] D140921: [clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor.

2023-01-03 Thread Yitzhak Mandelbaum 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 rG0086a3555ac6: [clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor. (authored by ymandel). Changed prior to commit: htt

[clang] 0086a35 - [clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor.

2023-01-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-03T21:57:39Z New Revision: 0086a3555ac6cd76bb637252a0ba17c06c9b869b URL: https://github.com/llvm/llvm-project/commit/0086a3555ac6cd76bb637252a0ba17c06c9b869b DIFF: https://github.com/llvm/llvm-project/commit/0086a3555ac6cd76bb637252a0ba17c06c9b869b.diff

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-03 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. I believe you are arguing for a JSON file. The complexity of flags that want to pass to clang-scan-deps is too high. You even get some benefit of caching if you create a JSON file with several targets. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137534/new/

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-03 Thread Ben Boeckel via Phabricator via cfe-commits
ben.boeckel added a comment. In D137534#4024022 , @jansvoboda11 wrote: > While I was not suggesting using compilation database instead of the approach > taken by this patch, I appreciate your explanation. But it still leaves me > wondering whether gene

[PATCH] D136031: [DirectX backend] support ConstantBuffer to DXILResource.h

2023-01-03 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 486070. python3kgae added a comment. Use llvm::TypeSize and uint32_t instead of unsigned. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136031/new/ https://reviews.llvm.org/D136031 Files: llvm/lib/Target

[PATCH] D139233: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

2023-01-03 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. LGTM! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:383 + // FIXME: pointer adding zero should be fine + //FIXME: this gadge will need a fix-it +}; It's p

[PATCH] D138329: [-Wunsafe-buffer-usage] Add a new recursive matcher to replace `forEachDescendant` in unsafe buffer check

2023-01-03 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 LGTM! I hope we'll get a chance to implement a reusable solution later🤞 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138329/new/ https://reviews.llvm.org/D138329 __

[PATCH] D108265: .clang-tidy: Push variable related readability-identifier-naming options down to projects

2023-01-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I'll wait a bit and land this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108265/new/ https://reviews.llvm.org/D108265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 5)

2023-01-03 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. The Discourse proposal is available: RFC Load Instruction: Uninitialized Memory Semantics Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D140868#4024087 , @rjmccall wrote: > Isn't the C feature not technically part of the type? I thought Clang was > fairly unique in modeling `noreturn` the way we do. That's true, I just verified I didn't change that as

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Isn't the C feature not technically part of the type? I thought Clang was fairly unique in modeling `noreturn` the way we do. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140868/new/ https://reviews.llvm.org/D140868 __

[PATCH] D140921: [clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor.

2023-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, gribozavr2. Herald added subscribers: martong, rnkovacs. Herald added a reviewer: NoQ. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Currently, the checker only recognizes th

[PATCH] D140773: [WebAssembly] Use `shufflevector` for shuffle

2023-01-03 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively added a comment. This revision is now accepted and ready to land. LGTM % comment. Thanks for taking this! Comment at: llvm/test/CodeGen/WebAssembly/simd-intrinsics.ll:159-160 ; CHECK-NEXT: return $pop[[R]]{{$}} -declare <16 x i8> @llvm.w

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. C2x clarified the behavior of *standard* attributes when determining a composite type, and this particular case really straddles that boundary. We support `[[noreturn]]` and `_Noreturn` as standard attributes in C as well as `__attribute__((noreturn))` (as a nonst

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 486061. MaskRay marked an inline comment as done. MaskRay added a comment. use @rjmccall's comment (thanks a lot!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140868/new/ https://reviews.llvm.org/D140868 Fil

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. While I was not suggesting using compilation database instead of the approach taken by this patch, I appreciate your explanation. But it still leaves me wondering whether generating one compilation database per file-to-be-scanned would be a reasonable strategy? Tha

[PATCH] D140868: [C] Make (c ? e1 : e2) noreturn only if both e1 and e2 are noreturn

2023-01-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. LGTM, but I have a suggested elaboration for the comment. Comment at: clang/lib/AST/ASTContext.cpp:10258 - // FIXME: some uses, e.g. conditional exprs, really want this to be 'both'. - bool NoReturn = lbaseInfo.getNoReturn() || rbaseInfo.getNoRetur

[PATCH] D140423: [WIP][clang] Add PrintingPolicy callback for identifying default template arguments

2023-01-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/include/clang/AST/PrettyPrinter.h:52 + + enum class TriState : int { kYes, kNo, kUnknown }; + We don't usually use the `k` prefix for enums (the style guide mentions using an acronym like `TS_` - though even tha

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 486050. paulkirth added a comment. Avoid problems with path separators on windows, and ignore path prefix in diagnostic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135488/new/ https://reviews.llvm.org/D135

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 486049. serge-sans-paille added a comment. + keep deprecated version, flagged appropriately CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140896/new/ https://reviews.llvm.org/D140896 Files: bolt/tools/bat-dump/bat-dump.cpp bolt/tools/

[PATCH] D140711: [clang] Fix unused variable warning in SemaConcept.cpp

2023-01-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. nit: I think that's a cleaner fix :) Comment at: clang/lib/Sema/SemaConcept.cpp:1348 bool &Result) { if (const auto *FD1 = dyn_cast(D1)) { auto IsExpectedEntity = [](const FunctionDecl *FD) {

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm sympathetic to the problem you're trying to solve (not having to set environment variable for the temp directory), but I'm also not convinced this is the correct way to approach it. This feels like a configuration property of the libclang execution -- so it'd

[PATCH] D139889: [Clang] Fix a crash when encountering an ill-formed delimited UCN.

2023-01-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @tahonermann Thanks :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139889/new/ https://reviews.llvm.org/D139889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] 9ab0d4d - [OpenMP][2/2] Make device functions have hidden visibility

2023-01-03 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2023-01-03T12:18:30-08:00 New Revision: 9ab0d4d66fa14a9c57864fea72590886ace6d9ee URL: https://github.com/llvm/llvm-project/commit/9ab0d4d66fa14a9c57864fea72590886ace6d9ee DIFF: https://github.com/llvm/llvm-project/commit/9ab0d4d66fa14a9c57864fea72590886ace6d9ee.d

[PATCH] D136031: [DirectX backend] support ConstantBuffer to DXILResource.h

2023-01-03 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. It is probably worth adding some unit tests to test the `CBufferDataLayout` class. I think the meat of this change is fine. This code mixes `unsigned` and `uint32_t` interchangeably. They aren't required by the language to be the same. I have a general preference toward

[PATCH] D140915: [clangd] Fix getQueryScopes for using-directive with inline namespace

2023-01-03 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. tom-anders added reviewers: nridge, kadircet. Herald added a subscriber: arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra.

[PATCH] D139889: [Clang] Fix a crash when encountering an ill-formed delimited UCN.

2023-01-03 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0d6b26b4d3e3: [Clang] Fix a crash when encountering an ill-formed delimited UCN. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139889

[clang] 0d6b26b - [Clang] Fix a crash when encountering an ill-formed delimited UCN.

2023-01-03 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2023-01-03T20:57:52+01:00 New Revision: 0d6b26b4d3e3991da16f5b7f53e397b0051e8598 URL: https://github.com/llvm/llvm-project/commit/0d6b26b4d3e3991da16f5b7f53e397b0051e8598 DIFF: https://github.com/llvm/llvm-project/commit/0d6b26b4d3e3991da16f5b7f53e397b0051e8598.diff

[PATCH] D140857: Fix Fuchsia dyld in asan-ubsan variant

2023-01-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. I don't think we want this in the generic compiler behavior. It would only make sense if the toolchain runtimes have extra versions, and I don't think we want that many extra versions. It may be worthwhile to change the asan multilib builds to enable ubsan checks too,

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added a comment. This is great! Any chance we can use `MachineFrameInfo::StackProtectorIdx` to annotate the slot that is reserved for the stack protector? Comment at: llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp:84 +ORE = &getAnalysis().getORE(); +if (!OR

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2023-01-03 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 486039. tom-anders added a comment. Add test for expression, improve presentation for signature with unnamed parameter Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140775/new/ https://reviews.llvm.org/D140

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread Jacques Pienaar via Phabricator via cfe-commits
jpienaar added inline comments. Comment at: llvm/include/llvm/ADT/ArrayRef.h:502 + /// Deduction guide to construct an ArrayRef from a C array. + template ArrayRef(const T (&Arr)[N]) -> ArrayRef; mehdi_amini wrote: > Can we keep the makeArrayRef functions fo

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2023-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127762#3960906 , @rsandifo-arm wrote: > Thanks @aaron.ballman for the feedback about spellings. I've gone with the > lower-case names like `__arm_streaming` in what follows, as a plausible > strawman. > > My main con

[PATCH] D138807: [RISCV] Support vector crypto extension ISA string and assembly

2023-01-03 Thread Eric Gouriou via Phabricator via cfe-commits
ego added a comment. FYI, more issues with v0 not being accepted as an operand with unmasked instructions. Comment at: llvm/test/MC/RISCV/rvv/rv64zvkns.s:59 + +vaeskf1.vi v10, v9, 1 +# CHECK-INST: vaeskf1.vi v10, v9, 1 ego wrote: > craig.topper wrote: > > ego

[PATCH] D140814: [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-03 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdde8a0fe91cc: [clangd] show underlying type in type hint for `decltype(expr)` (authored by v1nh1shungry, committed by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[clang-tools-extra] dde8a0f - [clangd] show underlying type in type hint for `decltype(expr)`

2023-01-03 Thread Nathan Ridge via cfe-commits
Author: v1nh1shungry Date: 2023-01-03T13:58:39-05:00 New Revision: dde8a0fe91ccd4b54d5bd0c18043e0dd35652e47 URL: https://github.com/llvm/llvm-project/commit/dde8a0fe91ccd4b54d5bd0c18043e0dd35652e47 DIFF: https://github.com/llvm/llvm-project/commit/dde8a0fe91ccd4b54d5bd0c18043e0dd35652e47.diff

[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

2023-01-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 486030. paulkirth added a comment. Herald added subscribers: kosarev, kerbowa, jvesely, nemanjai. Add missing pipline test updates for PowerPC and AMDGPU Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135488/ne

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2023-01-03 Thread Dani Ferreira Franco Moura via Phabricator via cfe-commits
merrymeerkat added a comment. Thanks for clarifying! I've gone ahead and landed the change. At least this should reduce the number of false negatives we get (hopefully without introducing too much complexity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D140696: [clang][dataflow] Treat unions as structs.

2023-01-03 Thread Dani Ferreira Franco Moura 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 rGd862f66221de: [clang][dataflow] Treat unions as structs. (authored by merrymeerkat). Changed prior to commit: https://reviews.llvm.org/D140696?vs=

[clang] d862f66 - [clang][dataflow] Treat unions as structs.

2023-01-03 Thread Dani Ferreira Franco Moura via cfe-commits
Author: Dani Ferreira Franco Moura Date: 2023-01-03T18:36:24Z New Revision: d862f66221de1463ee7c92fe2e78445edb30a601 URL: https://github.com/llvm/llvm-project/commit/d862f66221de1463ee7c92fe2e78445edb30a601 DIFF: https://github.com/llvm/llvm-project/commit/d862f66221de1463ee7c92fe2e78445edb30a6

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. As far as teh fix itself, I think this is fine. BUT i think there is value in waiting for Aaron to see if there is a deeper issue here. Comment at: clang/lib/Sema/SemaInit.cpp:3863 + SourceLocation EndLoc = VD->getEndLoc(); + if (const auto *VT

[PATCH] D140876: [clang][C++20] Non-dependent access checks in requires expression.

2023-01-03 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D140876#4023286 , @ilya-biryukov wrote: > Should access checks should happen in the context where `concept` is written > or where it's used? Is there a standard wording around it? Unfortunately, only a standard wording i

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:572 + string default_march = "", + list tunef = []> : ProcessorModel { + string DefaultMarch = default_march; 80 columns

  1   2   >