[clang] 25063be - [RISCV] Replace Zvbb with Zvkb in the Zvk* combine tests in riscv-target-features.c. NFC

2024-01-21 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2024-01-21T21:18:43-08:00 New Revision: 25063bedb596943e546994a45710c79fdd6539e8 URL: https://github.com/llvm/llvm-project/commit/25063bedb596943e546994a45710c79fdd6539e8 DIFF: https://github.com/llvm/llvm-project/commit/25063bedb596943e546994a45710c79fdd6539e8.diff

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Craig Hesling via cfe-commits
linux4life798 wrote: Thanks! https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

2024-01-21 Thread Zoltán Böszörményi via cfe-commits
https://github.com/zboszor updated https://github.com/llvm/llvm-project/pull/78884 From 26e8eaaa9b0be1fdc146b5b4e8d285a2e8a2edbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Sun, 21 Jan 2024 07:59:02 +0100 Subject: [PATCH 1/3] libclc: add some missi

[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

2024-01-21 Thread Zoltán Böszörményi via cfe-commits
@@ -154,6 +154,46 @@ if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "6.99.99" ) set( tahiti_aliases ${tahiti_aliases} gfx904 gfx906 ) endif() +# Support for gfx909, gfx1010, gfx1011 and gfx1012 was added in LLVM 10 (r345120) +if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "9

[clang] [flang] [lld] [clang-tools-extra] [llvm] [libcxx] [lldb] [mlir] [compiler-rt] [clang-format] Add ShortReturnTypeColumn option. (PR #78011)

2024-01-21 Thread Owen Pan via cfe-commits
owenca wrote: > @mydeveloperday, do you have an opinion on this pull request? It addresses > #78010 with minimal changes, or are you interested in exploring other > possibilities? It's weird to add such a top-level option to fix a bug and keep the current behavior. See https://github.com/llv

[clang] 745883b - [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (#69133)

2024-01-21 Thread via cfe-commits
Author: Amir Ayupov Date: 2024-01-21T22:03:39-08:00 New Revision: 745883bba69007f1d2c5135f3d5b0f1efcfc82cd URL: https://github.com/llvm/llvm-project/commit/745883bba69007f1d2c5135f3d5b0f1efcfc82cd DIFF: https://github.com/llvm/llvm-project/commit/745883bba69007f1d2c5135f3d5b0f1efcfc82cd.diff L

[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2024-01-21 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/69133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Fix a crash on attaching doc comments (PR #78716)

2024-01-21 Thread via cfe-commits
https://github.com/chenshanzhi updated https://github.com/llvm/llvm-project/pull/78716 >From dcdf4a5825a402ab1392f61354c604a9cf965bdd Mon Sep 17 00:00:00 2001 From: Shanzhi Chen Date: Thu, 18 Jan 2024 11:40:09 + Subject: [PATCH] [Clang][AST] Fix a crash on attaching doc comments This crash

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-21 Thread Fangrui Song via cfe-commits
@@ -602,6 +602,16 @@ class Driver { // FIXME: This should be in CompilationInfo. std::string GetProgramPath(StringRef Name, const ToolChain &TC) const; + /// GetModuleManifestPath - Lookup the name of the Standard library manifest. + /// + /// \param C - The compilation

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-21 Thread Fangrui Song via cfe-commits
@@ -6135,6 +6141,45 @@ std::string Driver::GetProgramPath(StringRef Name, const ToolChain &TC) const { return std::string(Name); } +std::string Driver::GetStdModuleManifestPath(const Compilation &C, + const ToolChain &TC) const {

[clang] a31a600 - [docs] Update StandardCPlusPlusModules.rst with clang18

2024-01-21 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-22T14:24:33+08:00 New Revision: a31a60074717fc40887cfe132b77eec93bedd307 URL: https://github.com/llvm/llvm-project/commit/a31a60074717fc40887cfe132b77eec93bedd307 DIFF: https://github.com/llvm/llvm-project/commit/a31a60074717fc40887cfe132b77eec93bedd307.diff LO

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-21 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM with a few nits. Can you double check modules.json is inside `lib/` (`usr/lib/x86_64-linux-gnu{{/|\\}}modules.json`) instead of some directory under `include`? https://github.com/llvm/llvm-project/pull/76451 __

[clang-tools-extra] [libunwind] [libcxx] [llvm] [libc] [mlir] [compiler-rt] [lldb] [clang] [flang] [lld] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table a

2024-01-21 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: I created a [branch](https://github.com/minglotus-6/llvm-project/tree/type_profile) and submitted the end-to-end implementation there. Besides (a [squashed version](https://github.com/llvm/llvm-project/commit/de71eacf04a236031be6f1b53168f8f566244297) of) this pull request,

[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2024-01-21 Thread via cfe-commits
dyung wrote: @aaupov I believe this change is somehow causing cmake failures on several bots I oversee, although I cannot explain why it passed when building your commit. For example: https://lab.llvm.org/buildbot/#/builders/139/builds/57628 ``` CMake Error at /home/buildbot/buildbot-root/llv

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > > What is the relationship between this patch, and clangd 17's ["missing > > > include" > > > warning](https://clangd.llvm.org/guides/include-cleaner#missing-include-warning)? > > > Does the quick-fix for the "missing include" warning also respect these > > > config

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -230,7 +230,11 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) { return V->getUnderlyingValue()->getType(); }) .Case( - [](const VPWidenCastRecipe *R) { return R->getResultType(); }); + [](const VPWidenCast

[clang] [llvm] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -164,6 +164,8 @@ bool VPRecipeBase::mayHaveSideEffects() const { auto *R = cast(this); return R->getUnderlyingInstr()->mayHaveSideEffects(); } + case VPScalarCastSC: +return false; ayalz wrote: nit: join the above group known to return false

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[clang-tools-extra] [clang] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang] [llvm] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue {

[llvm] [clang] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -362,6 +362,7 @@ class VPDef { // START: Phi-like recipes. Need to be kept together. VPBlendSC, VPPredInstPHISC, +VPScalarCastSC, ayalz wrote: Placed inside Phi-like recipes interval? https://github.com/llvm/llvm-project/pull/78113

[clang] [llvm] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[llvm] [clang-tools-extra] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. ayalz wrote: ```suggestion /// VPScalarCastRecipe is a r

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1117,13 +1119,7 @@ void VPScalarIVStepsRecipe::execute(VPTransformState &State) { // Ensure step has the same type as that of scalar IV. Type *BaseIVTy = BaseIV->getType()->getScalarType(); - if (BaseIVTy != Step->getType()) { -// TODO: Also use VPDerivedIVRecipe

[llvm] [clang] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -504,6 +504,15 @@ static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, HeaderVPBB->insert(BaseIV->getDefiningRecipe(), IP); } + VPTypeAnalysis TypeInfo(SE.getContext()); + if (TypeInfo.inferScalarType(BaseIV) != TypeInfo.inferScalarType(S

[llvm] [clang-tools-extra] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @HighCommander4 @sam-mccall do you have any capacity to review this change? I'm happy to try and help, but I haven't really been involved in the development of the include-cleaner component, and based on the findings in my previous comment, the patch would benefit from

[llvm] [clang-tools-extra] [clang-tidy] Add AllowImplicitlyDeletedCopyOrMove option to cppcoreguidelines-special-member-functions (PR #71683)

2024-01-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/71683 >From 5c6db0ec4850bed27f94839d0f018d66fa1c57f4 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 8 Nov 2023 13:31:28 + Subject: [PATCH] [clang-tidy] Add AllowImplicitlyDeletedCopyOrMove option to cppcor

[clang-tools-extra] [clang-tidy] Add bugprone-chained-comparison check (PR #76365)

2024-01-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/76365 >From 5ece73a5b14e86172b900f4ae9d63d8fa1590d4a Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Mon, 25 Dec 2023 16:18:45 + Subject: [PATCH 1/7] [clang-tidy] Add bugprone-chained-comparison check Check that

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s cor3ntin wrote: `-fsyntax-only` is suspicious, i would prefer a CodeGenTest that checks the mangle name Maybe moving the test to `test/CodeGenCXX/mangle-lambdas.cpp ` (or one of the other s

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-21 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > > I tried applying this patch to ROOT/Cling and it fails to build because > > > something is of the opinion that `std::is_integral::value` is not > > > true. I don't have time right now to investigate further, but since this > > > is the only change I did it is highly likely

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
cor3ntin wrote: Thanks for this patch. Can you add a release note? Does this fix any of these issues ? (if so, can you add test for them? #76481 #70064 #63271 #61939 #45441 https://github.com/llvm/llvm-project/pull/78896 ___ cfe-commits mailing lis

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s +// expected-no-diagnostics + +auto ICE = [](auto a) { return [=]() { return 1; }; }; cor3ntin wrote: Can you reference the issue number in the test? https://github.com/llvm/llvm-project/pul

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-21 Thread via cfe-commits
cor3ntin wrote: @AaronBallman @erichkeane ping :) https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/78320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-21 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > > I tried applying this patch to ROOT/Cling and it fails to build because > > > > something is of the opinion that `std::is_integral::value` is not > > > > true. I don't have time right now to investigate further, but since > > > > this is the only change I did it is hi

[llvm] [clang] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra edited https://github.com/llvm/llvm-project/pull/72556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra requested changes to this pull request. https://github.com/llvm/llvm-project/pull/72556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -26,28 +26,34 @@ using namespace llvm; #define DEBUG_TYPE "amdgpu-emit-printf" -static Value *fitArgInto64Bits(IRBuilder<> &Builder, Value *Arg) { +static Value *fitArgInto64Bits(IRBuilder<> &Builder, Value *Arg, + bool IsBuffered) { + const

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -4742,6 +4742,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.ClaimAllArgs(options::OPT_gen_cdb_fragment_path); } + if (TC.getTriple().isAMDGPU() && types::isOpenCL(Input.getType())) { +if (Args.getLastArg(options::OPT_mprintf_kind_EQ))

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -170,20 +173,49 @@ static Value *appendString(IRBuilder<> &Builder, Value *Desc, Value *Arg, return callAppendStringN(Builder, Desc, Arg, Length, IsLast); } +static Value *appendVectorArg(IRBuilder<> &Builder, Value *Desc, Value *Arg, + bool

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-01-21 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -168,20 +174,48 @@ static Value *appendString(IRBuilder<> &Builder, Value *Desc, Value *Arg, return callAppendStringN(Builder, Desc, Arg, Length, IsLast); } +static Value *appendVectorArg(IRBuilder<> &Builder, Value *Desc, Value *Arg, + bool

<    1   2   3   4