[clang] [clang][dataflow] Add `Environment::get<>()`. (PR #76027)

2023-12-20 Thread via cfe-commits
@@ -489,8 +489,7 @@ Environment Environment::pushCall(const CallExpr *Call) const { if (const auto *MethodCall = dyn_cast(Call)) { if (const Expr *Arg = MethodCall->getImplicitObjectArgument()) { if (!isa(Arg)) - Env.ThisPointeeLoc = - cast(ge

[clang] [X86] Add ABI handling for __float128 (PR #75156)

2023-12-20 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,35 @@ +// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -target-feature +sse2 < %s | FileCheck %s --check-prefixes=CHECK phoebewang wrote: I decided not to report error for `-sse` after investigating the current diagnosis machinism. We didn't repo

[clang] [clang][dataflow] Add `Environment::get<>()`. (PR #76027)

2023-12-20 Thread via cfe-commits
@@ -489,8 +489,7 @@ Environment Environment::pushCall(const CallExpr *Call) const { if (const auto *MethodCall = dyn_cast(Call)) { if (const Expr *Arg = MethodCall->getImplicitObjectArgument()) { if (!isa(Arg)) - Env.ThisPointeeLoc = - cast(ge

[clang] [clang-tools-extra] [llvm] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-20 Thread via cfe-commits
https://github.com/EsmeYi ready_for_review https://github.com/llvm/llvm-project/pull/74415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ASan][Driver] Add sanitize-target flag to support enabling ASan in device or host compilation (PR #76127)

2023-12-20 Thread via cfe-commits
https://github.com/jinge90 updated https://github.com/llvm/llvm-project/pull/76127 >From 48684cf6397ddc7d1a941fdbfbb9e28591bf0240 Mon Sep 17 00:00:00 2001 From: jinge90 Date: Thu, 21 Dec 2023 15:36:37 +0800 Subject: [PATCH 1/2] [ASan][Driver] Add sanitize-target flag to support enabling ASan i

[clang] [clang][dataflow] Add `Environment::get<>()`. (PR #76027)

2023-12-20 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/76027 >From 9fd1ed96c1b7934754b6fefd7b01a62d4a391d73 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Wed, 20 Dec 2023 10:01:10 + Subject: [PATCH 1/3] [clang][dataflow] Add `Environment::get<>()`. This tem

[clang] [X86] Add ABI handling for __float128 (PR #75156)

2023-12-20 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/75156 >From 9860e5454bdf3ee3a4283ab7102a8d70c3ebcbbc Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Tue, 12 Dec 2023 17:27:33 +0800 Subject: [PATCH 1/2] [X86] Add ABI handling for fp128 Fixes #74601 --- clang/li

[clang] [clang][dataflow] Add `Environment::get<>()`. (PR #76027)

2023-12-20 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/76027 >From 9fd1ed96c1b7934754b6fefd7b01a62d4a391d73 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Wed, 20 Dec 2023 10:01:10 + Subject: [PATCH 1/2] [clang][dataflow] Add `Environment::get<>()`. This tem

[clang] [clang-tools-extra] [llvm] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-20 Thread via cfe-commits
https://github.com/EsmeYi updated https://github.com/llvm/llvm-project/pull/74415 >From 6243b1b8529779f0c09da35c844bd0038d6c4121 Mon Sep 17 00:00:00 2001 From: esmeyi Date: Tue, 12 Dec 2023 01:17:55 -0500 Subject: [PATCH 1/5] Draft. --- llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 86 ++

[llvm] [clang] [ASan][Driver] Add sanitize-target flag to support enabling ASan in device or host compilation (PR #76127)

2023-12-20 Thread via cfe-commits
jinge90 wrote: Hi, @vitalybuka and @bader Recently, we are working to enable address sanitizer for SYCL and OMP offloading compiler. After enabling Asan instrumentation pass, ASanPass will insert "__asan_*" functions into user code in both device and host compilation. Although host code sanit

[llvm] [clang] [ASan][Driver] Add sanitize-target flag to support enabling ASan in device or host compilation (PR #76127)

2023-12-20 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 5e92fa69eaf0a3d18ff9a8ba0fb27726b38ba035 48684cf6397ddc7d1a941fdbfbb9e28591bf0240 --

[llvm] [clang] [ASan][Driver] Add sanitize-target flag to support enabling ASan in device or host compilation (PR #76127)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jinge90) Changes In offloading scenario, the whole compiling process consists of device and host compilation phase, device and host code will be bundled together. Address sanitizer can be enabled in either one or both compilation ph

[llvm] [clang] [ASan][Driver] Add sanitize-target flag to support enabling ASan in device or host compilation (PR #76127)

2023-12-20 Thread via cfe-commits
https://github.com/jinge90 created https://github.com/llvm/llvm-project/pull/76127 In offloading scenario, the whole compiling process consists of device and host compilation phase, device and host code will be bundled together. Address sanitizer can be enabled in either one or both compilatio

[clang] [clang][ASTImporter] add processing of SubstNonTypeTemplateParmExpr in isAncestorDeclContextOf (PR #74991)

2023-12-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/74991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 72e8ab7 - [clang][ASTImporter] add processing of SubstNonTypeTemplateParmExpr in isAncestorDeclContextOf (#74991)

2023-12-20 Thread via cfe-commits
Author: Qizhi Hu Date: 2023-12-21T15:05:33+08:00 New Revision: 72e8ab7d442f57cd65c89a4a99e76acd94788707 URL: https://github.com/llvm/llvm-project/commit/72e8ab7d442f57cd65c89a4a99e76acd94788707 DIFF: https://github.com/llvm/llvm-project/commit/72e8ab7d442f57cd65c89a4a99e76acd94788707.diff LOG:

[llvm] [clang] Recommit [RISCV] Update the interface of sifive vqmaccqoq (#74284) (PR #75768)

2023-12-20 Thread Craig Topper via cfe-commits
@@ -349,16 +349,24 @@ multiclass VPseudoSiFiveVMACC; } -multiclass VPseudoSiFiveVQMACC { +multiclass VPseudoSiFiveVQMACCDOD { foreach m = MxListVF8 in let VLMul = m.value in defm NAME : VPseudoSiFiveVMACC; } +multiclass VPseudoSiFiveVQMACCQOQ { + foreach i = [0

[llvm] [clang] Recommit [RISCV] Update the interface of sifive vqmaccqoq (#74284) (PR #75768)

2023-12-20 Thread Craig Topper via cfe-commits
@@ -349,16 +349,24 @@ multiclass VPseudoSiFiveVMACC; } -multiclass VPseudoSiFiveVQMACC { +multiclass VPseudoSiFiveVQMACCDOD { foreach m = MxListVF8 in let VLMul = m.value in defm NAME : VPseudoSiFiveVMACC; } +multiclass VPseudoSiFiveVQMACCQOQ { + foreach i = [0

[clang] d5c98e7 - [clang][AST][NFC] const-qualify some local references

2023-12-20 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-12-21T06:32:32+01:00 New Revision: d5c98e783779c4e6b26b2010b20cd0ab7210ead3 URL: https://github.com/llvm/llvm-project/commit/d5c98e783779c4e6b26b2010b20cd0ab7210ead3 DIFF: https://github.com/llvm/llvm-project/commit/d5c98e783779c4e6b26b2010b20cd0ab7210ead3.diff LO

[clang-tools-extra] [clangd][RFC] Add container field to remote index Refs grpc method (PR #71605)

2023-12-20 Thread via cfe-commits
https://github.com/tdupes updated https://github.com/llvm/llvm-project/pull/71605 >From 4282c39fd0b40c26c68f57257c150b984264f50b Mon Sep 17 00:00:00 2001 From: dup Date: Fri, 3 Nov 2023 09:03:24 -0700 Subject: [PATCH] Add container field to remote index Refs grpc method --- clang-tools-extra/

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread Fangrui Song via cfe-commits
@@ -6158,12 +6158,24 @@ def err_illegal_initializer_type : Error<"illegal initializer type %0">; def ext_init_list_type_narrowing : ExtWarn< "type %0 cannot be narrowed to %1 in initializer list">, InGroup, DefaultError, SFINAEFailure; +// *_narrowing_const_reference diagn

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2023-12-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2023-12-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once o… (PR #76119)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes …f #import Close https://github.com/llvm/llvm-project/issues/73023 The direct issue of https://github.com/llvm/llvm-project/issues/73023 is that we entered a header which is marked as pragma once s

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once o… (PR #76119)

2023-12-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/76119 …f #import Close https://github.com/llvm/llvm-project/issues/73023 The direct issue of https://github.com/llvm/llvm-project/issues/73023 is that we entered a header which is marked as pragma once since the c

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (Da-Viper) Changes Fixes #75686 --- Full diff: https://github.com/llvm/llvm-project/pull/76117.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp (+9-8) ``diff diff

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2023-12-20 Thread via cfe-commits
https://github.com/Da-Viper created https://github.com/llvm/llvm-project/pull/76117 Fixes #75686 >From 97eeda4684804229d9faad19ea7b7888dcd91786 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Thu, 21 Dec 2023 02:30:34 + Subject: [PATCH] Fix #75686: add iter_swap and iter_move to the matc

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-20 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/74296 >From fbfe3492b66492948c9b0220af38d59345c5a793 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Mon, 4 Dec 2023 15:51:20 +0800 Subject: [PATCH 1/5] [clang][analyzer] Support `fflush` in the StreamChecker --- .../

[clang] 565e5e8 - Recommit [NFC] [Serialization] Packing more bits and refactor AbbrevToUse

2023-12-20 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-21T10:30:12+08:00 New Revision: 565e5e861f64f455ab789bc50840e0be2d33c417 URL: https://github.com/llvm/llvm-project/commit/565e5e861f64f455ab789bc50840e0be2d33c417 DIFF: https://github.com/llvm/llvm-project/commit/565e5e861f64f455ab789bc50840e0be2d33c417.diff LO

[llvm] [clang-tools-extra] [clang] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-20 Thread via cfe-commits
https://github.com/EsmeYi updated https://github.com/llvm/llvm-project/pull/74415 >From 6243b1b8529779f0c09da35c844bd0038d6c4121 Mon Sep 17 00:00:00 2001 From: esmeyi Date: Tue, 12 Dec 2023 01:17:55 -0500 Subject: [PATCH 1/4] Draft. --- llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 86 ++

[llvm] [clang] [SPARC] Support reserving arbitrary general purpose registers (PR #74927)

2023-12-20 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/74927 >From 956ca7e210a438caac7c5dda8c9945305a53de39 Mon Sep 17 00:00:00 2001 From: Koakuma Date: Wed, 29 Nov 2023 08:08:29 +0700 Subject: [PATCH 1/2] [SPARC] Support reserving arbitrary general purpose registers Thi

[llvm] [mlir] [clang-tools-extra] [clang] [emacs] Fix Emacs library formatting (PR #76110)

2023-12-20 Thread via cfe-commits
https://github.com/darkfeline updated https://github.com/llvm/llvm-project/pull/76110 >From e6e31f536b0027f68c86a94d3e0bd29f2f8d946c Mon Sep 17 00:00:00 2001 From: Allen Li Date: Wed, 20 Dec 2023 15:31:42 -0800 Subject: [PATCH] Fix Emacs library formatting This makes it easier to ship/install

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread Shafik Yaghmour via cfe-commits
@@ -6158,12 +6158,24 @@ def err_illegal_initializer_type : Error<"illegal initializer type %0">; def ext_init_list_type_narrowing : ExtWarn< "type %0 cannot be narrowed to %1 in initializer list">, InGroup, DefaultError, SFINAEFailure; +// *_narrowing_const_reference diagn

[clang-tools-extra] Fix #75687: add std::span to the default types. (PR #76116)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (Da-Viper) Changes Fixes #75687 --- Full diff: https://github.com/llvm/llvm-project/pull/76116.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.cpp (+2-1) - (modified)

[clang-tools-extra] Fix #75687: add std::span to the default types. (PR #76116)

2023-12-20 Thread via cfe-commits
https://github.com/Da-Viper created https://github.com/llvm/llvm-project/pull/76116 Fixes #75687 >From 746ee1451cb96a5a320ff2bfbed62c3ad21e7345 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Thu, 21 Dec 2023 01:59:29 + Subject: [PATCH] Fix #75687: add std::span to the default types. ---

[clang] [Clang][Sema] Fix Wswitch-default bad warning in template (PR #76007)

2023-12-20 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/76007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix Wswitch-default bad warning in template (PR #76007)

2023-12-20 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > For now I guess this is Ok, although I think the better fix would be to > diagnose missing or duplicate `default` labels even in the dependent case. > Because `default` labels themselves are never dependent. We should probably add a FIXME for this. https://github.com/llvm/llvm

[clang] [libcxx] [clang-tools-extra] [llvm] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
var-const wrote: > I see @var-const has "requested changes" set, but I feel we've addressed the > one unresolved comment of his. @EricWF In fact, this patch changed quite significantly since I last looked at it (based on your feedback, I believe), so I would have appreciated being able to do

[clang] [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (PR #74926)

2023-12-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. If you have addressed all review comments and no one has asked you to wait to land the PR then you can land once you get an approval. https://github.com/llvm/llvm-project/pull/74926 ___ cfe-commits

[clang] Avoid printing overly large integer. (PR #75902)

2023-12-20 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > I agree with @tbaederr, fixing the underlying issue - either by optimizing > divide (good luck!) or printing in hexadecimal, seems like a better solution. > At the minimum, we should have a fixme comment to explain the restriction > > @tbaederr @erichkeane @shafik opinion? I a

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-20 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/75992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0ea8756 - [clang] Separate Intel ADC instrinsics from ADX intrinsics (#75992)

2023-12-20 Thread via cfe-commits
Author: Max Winkler Date: 2023-12-21T08:43:46+08:00 New Revision: 0ea87560cca4993b89aecf6cd3d93d6d97f2b3fb URL: https://github.com/llvm/llvm-project/commit/0ea87560cca4993b89aecf6cd3d93d6d97f2b3fb DIFF: https://github.com/llvm/llvm-project/commit/0ea87560cca4993b89aecf6cd3d93d6d97f2b3fb.diff L

[clang] [SystemZ][z/OS] Add guard for dl_info and dladdr (PR #75637)

2023-12-20 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: Could we take other ways? I think they don't affect external API. 1. Detect stuff in `clang/Config/config.h` 2. Migrate the special logic to `llvm/Support`. https://github.com/llvm/llvm-project/pull/75637 ___ cfe-commits mailing list cf

[clang] [llvm] Use llvm-config.h in CIndexer.cpp instead of private header (PR #75928)

2023-12-20 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: We should not expose prefix-less MACROs. https://github.com/llvm/llvm-project/pull/75928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [clang] [clang-tools-extra] [emacs] Fix Emacs library formatting (PR #76110)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir Author: None (darkfeline) Changes This makes it easier to ship/install these using the builtin Emacs package format (in particular, a Version is required). --- Full diff: https://github.com/llvm/llvm-project/pull/76110.diff 5 Files Affected: -

[clang-tools-extra] [clang] [mlir] [emacs] Fix Emacs library formatting (PR #76110)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (darkfeline) Changes This makes it easier to ship/install these using the builtin Emacs package format (in particular, a Version is required). --- Full diff: https://github.com/llvm/llvm-project/pull/76110.diff 5 Files Affected: -

[mlir] [clang] [clang-tools-extra] [emacs] Fix Emacs library formatting (PR #76110)

2023-12-20 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

[mlir] [clang] [clang-tools-extra] [emacs] Fix Emacs library formatting (PR #76110)

2023-12-20 Thread via cfe-commits
https://github.com/darkfeline created https://github.com/llvm/llvm-project/pull/76110 This makes it easier to ship/install these using the builtin Emacs package format (in particular, a Version is required). >From 302e410d6185f02ec6a9113a70ed489415e5c208 Mon Sep 17 00:00:00 2001 From: Allen Li

[clang-tools-extra] [clang] [llvm] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[clang-tools-extra] [clang] [llvm] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[llvm] [clang] [TargetParser] Define AEK_FCMA and AEK_JSCVT for tsv110 (PR #75516)

2023-12-20 Thread Bryan Chan via cfe-commits
@@ -81,6 +81,15 @@ static bool DecodeAArch64Features(const Driver &D, StringRef text, else return false; +// +jsconv and +complxnum implies +neon and +fp-armv8 bryanpkc wrote: @momchil-velikov Thank you for your answer. It is strange that the w

[clang] [clang] Differentiate between identifier and string EnumArgument (PR #68550)

2023-12-20 Thread Alexander Richardson via cfe-commits
@@ -886,7 +893,7 @@ def ARMInterrupt : InheritableAttr, TargetSpecificAttr { // MSP430Interrupt's, MipsInterrupt's and AnyX86Interrupt's spellings // must match. let Spellings = [GCC<"interrupt">]; - let Args = [EnumArgument<"Interrupt", "InterruptType", + let Args = [

[clang-tools-extra] [llvm] [clang] [PowerPC][CodeGen] Exploit STMW and LMW in 32-bit big-endian mode. (PR #74415)

2023-12-20 Thread via cfe-commits
https://github.com/EsmeYi updated https://github.com/llvm/llvm-project/pull/74415 >From 6243b1b8529779f0c09da35c844bd0038d6c4121 Mon Sep 17 00:00:00 2001 From: esmeyi Date: Tue, 12 Dec 2023 01:17:55 -0500 Subject: [PATCH 1/3] Draft. --- llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 86 ++

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
@@ -216,6 +216,9 @@ ENUM_CODEGENOPT(StructReturnConvention, StructReturnConventionKind, 2, SRCK_Defa CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions. CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is enabled. CODEGENOPT(S

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/75177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
@@ -184,13 +199,24 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() || Ty->

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: In general, this patch needs to be clearer about what rules it's actually enforcing. You're adding new command-line options, but users have to guess what they mean! If you're going to be working on TBAA, would you mind adding a section to Clang's manual

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
@@ -105,13 +105,28 @@ static bool isValidBaseType(QualType QTy) { if (RD->hasFlexibleArrayMember()) return false; // RD can be struct, union, class, interface or enum. -// For now, we only handle struct and class. -if (RD->isStruct() || RD->isClass()) +

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
@@ -184,13 +199,24 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() || Ty->

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
@@ -4080,7 +4080,11 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, E->getType(), !getLangOpts().isSignedOverflowDefined(), SignedIndices, E->getExprLoc(), &arrayType, E->getBase()); EltBaseInfo = ArrayLV.getBaseInfo(); -E

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
@@ -4598,8 +4602,7 @@ LValue CodeGenFunction::EmitLValueForField(LValue base, if (base.getTBAAInfo().isMayAlias() || rec->hasAttr() || FieldType->isVectorType()) { FieldTBAAInfo = TBAAAccessInfo::getMayAliasInfo(); - } else if (rec->isUnion()) { -// TODO: S

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2023-12-20 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel commented: There's probably some useful discussion to be had about how aggressive `-ffinite-math-only` at the clang level should be wrt lowering to `nnan`/`ninf` in the IR. It may be worth deferring the ReturnInst changes (but landing everything else) until t

[clang-tools-extra] [compiler-rt] [clang] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -481,3 +509,49 @@ Error BinaryInstrProfCorrelator::correlateProfileNameImpl() { this->Names.append(this->Ctx->NameStart, this->Ctx->NameSize); return Error::success(); } + +llvm::Expected> InstrProfCorrelators::get( +ArrayRef> +CorrelateInputs, +uint32_

[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)

2023-12-20 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: > [N2844](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2844.pdf), as > linked by OP, references the removed language that you are looking for. Doing some more spelunking, no released version of the TS ever had default argument promotion. The change to the TS was done

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/75650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-20 Thread Tyler Rockwood via cfe-commits
https://github.com/rockwotj updated https://github.com/llvm/llvm-project/pull/76101 >From 34feb9d9fefc4007a657366824ad38221228e86f Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Wed, 20 Dec 2023 15:05:48 -0600 Subject: [PATCH] clang-tidy/misc: introduce a must use check Introduce a new (o

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-20 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 8bbeed05c4da832a2abf532fee8665c0d6576cbc f7f94494372c4e9b42d027b6fc100e90f2bfe1e0 --

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Tyler Rockwood (rockwotj) Changes Introduce a new (off by default) clang tidy check to ensure that variables of a specific type are always used even if -Wunused-variables wouldn't generate a warning. This check has already caught a

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-20 Thread Tyler Rockwood via cfe-commits
https://github.com/rockwotj edited https://github.com/llvm/llvm-project/pull/76101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] clang-tidy/misc: introduce a must use check (PR #76101)

2023-12-20 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

[clang-tools-extra] clang-tidy/misc: introduce a must use check (PR #76101)

2023-12-20 Thread Tyler Rockwood via cfe-commits
https://github.com/rockwotj created https://github.com/llvm/llvm-project/pull/76101 Introduce a new (off by default) clang tidy check to ensure that variables of a specific type are always used even if -Wunused-variables wouldn't generate a warning. This check has already caught a couple of d

[clang-tools-extra] [libunwind] [llvm] [clang] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/74791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [libunwind] [clang-tools-extra] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Fangrui Song via cfe-commits
@@ -2974,6 +2966,37 @@ bool UnwindCursor::getFunctionName(char *buf, size_t bufLen, buf, bufLen, offset); } +#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) +template +bool UnwindCursor::isReadableAddr(const pint_t addr) const { + // T

[clang] [llvm] [libunwind] [clang-tools-extra] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Fangrui Song via cfe-commits
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf, size_t bufLen, buf, bufLen, offset); } +#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) +template +bool UnwindCursor::isReadableAddr(const pint_t addr) const { + // T

[clang] [llvm] [libunwind] [clang-tools-extra] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Fangrui Song via cfe-commits
@@ -2974,6 +2966,37 @@ bool UnwindCursor::getFunctionName(char *buf, size_t bufLen, buf, bufLen, offset); } +#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) +template +bool UnwindCursor::isReadableAddr(const pint_t addr) const { + // T

[clang] [flang] [flang][driver] Remove Fortain_main static library from linking stages (PR #75816)

2023-12-20 Thread Andrzej Warzyński via cfe-commits
@@ -163,6 +163,40 @@ forward compiler options to the frontend driver, `flang-new -fc1`. You can read more on the design of `clangDriver` in Clang's [Driver Design & Internals](https://clang.llvm.org/docs/DriverInternals.html). +## Linker Driver +When used as a linker, Flang's

[llvm] [flang] [clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2023-12-20 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. I think this is a good direction to go, lgtm https://github.com/llvm/llvm-project/pull/68882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[llvm] [compiler-rt] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -481,3 +509,49 @@ Error BinaryInstrProfCorrelator::correlateProfileNameImpl() { this->Names.append(this->Ctx->NameStart, this->Ctx->NameSize); return Error::success(); } + +llvm::Expected> InstrProfCorrelators::get( +ArrayRef> +CorrelateInputs, +uint32_

[clang] [llvm] [compiler-rt] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[compiler-rt] [llvm] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -25,6 +25,25 @@ // RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata) +// Test debug info correlate with build id. ZequanWu wrote: The added test in `Linux/instr

[compiler-rt] [clang] [clang-tools-extra] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ZequanWu wrote: The added test in `Linux/instrprof-debug-info-correlate.c` requires build id. Does darwin linker ld64 or ld64.lld have the option to emit build id into binary? I don't find such flag. https://github.

[compiler-rt] [llvm] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ZequanWu wrote: Added by mistake. Removed. https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[llvm] [compiler-rt] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/75957 >From d72f0e1ad7759bad81767418604d27f11d74d6de Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 19 Dec 2023 12:32:15 -0500 Subject: [PATCH 1/4] [Profile] Allow profile merging with multiple correlate files.

[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)

2023-12-20 Thread via cfe-commits
apple-fcloutier wrote: [N2844](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2844.pdf), as linked by OP, references the removed language that you are looking for. As Aaron said, it doesn't matter if clang never claimed conformance/never implemented default argument promotion for these type

[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)

2023-12-20 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: > Should this only apply in C23 mode? Standard behavior until C23 is that > `_Float16` promotes to `double`. What about C++? I can't find any reference in older versions of C or TS 18661-3 that suggests that `_Float16` is promoted to `double`. The wording of 6.5.2.2 used

[clang-tools-extra] [llvm] [clang] [XCOFF] Use RLDs to print branches even without -r (PR #74342)

2023-12-20 Thread via cfe-commits
https://github.com/stephenpeckham updated https://github.com/llvm/llvm-project/pull/74342 >From 4d255c7164b92e6dbfa34226d31055f9438855f0 Mon Sep 17 00:00:00 2001 From: Stephen Peckham Date: Mon, 4 Dec 2023 11:41:32 -0500 Subject: [PATCH 01/13] [XCOFF] Use RLDs to print branches even without -r

[flang] [clang] [flang][driver] Remove Fortain_main static library from linking stages (PR #75816)

2023-12-20 Thread Daniel Chen via cfe-commits
@@ -163,6 +163,40 @@ forward compiler options to the frontend driver, `flang-new -fc1`. You can read more on the design of `clangDriver` in Clang's [Driver Design & Internals](https://clang.llvm.org/docs/DriverInternals.html). +## Linker Driver +When used as a linker, Flang's

[clang] [clang-tools-extra] [llvm] [ISel] Add pattern matching for depositing subreg value (PR #75978)

2023-12-20 Thread David Li via cfe-commits
@@ -0,0 +1,93 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i386-unknown-unknown | FileCheck %s --check-prefixes=I386 +; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-pref

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ellishg wrote: Can we also add a test to `Darwin/instrprof-correlation-mixed.test`? https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@

[compiler-rt] [llvm] [clang-tools-extra] [clang] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -481,3 +509,49 @@ Error BinaryInstrProfCorrelator::correlateProfileNameImpl() { this->Names.append(this->Ctx->NameStart, this->Ctx->NameSize); return Error::success(); } + +llvm::Expected> InstrProfCorrelators::get( +ArrayRef> +CorrelateInputs, +uint32_

[clang] [compiler-rt] [llvm] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available +// Test llvm-profdata merging with multiple correlation files mixing different correlation modes. + +// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instr

[llvm] [clang-tools-extra] [clang] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available +// Test llvm-profdata merging with multiple correlation files mixing different correlation modes. + +// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instr

[compiler-rt] [clang] [clang-tools-extra] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ellishg wrote: Why is lld required? https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -25,6 +25,25 @@ // RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata) +// Test debug info correlate with build id. ellishg wrote: Can you add a test to `Darwin/i

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/76094 >From 132a5293a89d15d3e38c768727723157427f49db Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 20 Dec 2023 10:57:15 -0800 Subject: [PATCH] [Sema] Add -Wc++11-narrowing-const-reference https://github.com/l

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/76094 >From cea507db33bc1fe376b4a75c5ff96225a4e0e67e Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 20 Dec 2023 10:57:15 -0800 Subject: [PATCH] [Sema] Add -Wc++11-narrowing-const-reference https://github.com/l

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes https://github.com/llvm/llvm-project/pull/75332 diagnosed narrowing involving const reference. Our depot has hundreds if not thousands of breakages (https://github.com/llvm/llvm-project/pull/75332#issuecomment

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2023-12-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/76094 https://github.com/llvm/llvm-project/pull/75332 diagnosed narrowing involving const reference. Our depot has hundreds if not thousands of breakages (https://github.com/llvm/llvm-project/pull/75332#issuecomment-186

[llvm] [clang] [clang-tools-extra] [libcxx] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,104 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[libcxx] [llvm] [clang-tools-extra] [clang] [libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (PR #75259)

2023-12-20 Thread Konstantin Varlamov via cfe-commits
@@ -0,0 +1,104 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

  1   2   3   >