[clang] [llvm] [Transforms][Utils][PromoteMem2Reg] Propagate nnan flag on par with the nsz flag (PR #114271)

2024-11-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/114271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Always pass fp128 arguments indirectly on Windows (PR #115052)

2024-11-05 Thread Nikita Popov via cfe-commits
nikic wrote: @tgross35 Libcalls are handled by the backend. I think you'd have to modify the CC_X86_Win64_C / RetCC_X86_Win64_C calling conventions in https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/X86/X86CallingConv.td for that. https://github.com/llvm/llvm-project/pull/11505

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-11-04 Thread Nikita Popov via cfe-commits
nikic wrote: Please land the remaining removals separately. https://github.com/llvm/llvm-project/pull/113331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-11-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/113331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] Deprecate Type::getPointerTo() (PR #113331)

2024-11-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/113331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PassBuilder] Add `LTOPreLink` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Nikita Popov via cfe-commits
@@ -478,7 +478,8 @@ class PassBuilder { /// This extension point allows adding optimization right after passes that do /// basic simplification of the input IR. void registerPipelineEarlySimplificationEPCallback( - const std::function &C) { + const std::functio

[clang] [llvm] [PassBuilder] Add `LTOPreLink` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Nikita Popov via cfe-commits
@@ -478,7 +478,8 @@ class PassBuilder { /// This extension point allows adding optimization right after passes that do /// basic simplification of the input IR. void registerPipelineEarlySimplificationEPCallback( - const std::function &C) { + const std::functio

[clang] [compiler-rt] [libc] [llvm] [mlir] [openmp] [NFC] Simple typo correction. (PR #114548)

2024-11-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/114548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE (PR #113532)

2024-11-01 Thread Nikita Popov via cfe-commits
nikic wrote: Looks like this causes a significant compile-time regression, but only for ReleaseLTO-g: https://llvm-compile-time-tracker.com/compare.php?from=1e19f0f9d92b5e9c43d53893e387341835d3d96b&to=c72a751dabff4260dcc309e48008941d51b31d21&stat=instructions:u I wouldn't really expect this ch

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: PassBuilder changes LGTM https://github.com/llvm/llvm-project/pull/114547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3a03513 - Revert "[clang] Introduce [[clang::lifetime_capture_by(X)]] (#111499)"

2024-11-11 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2024-11-11T20:57:26+01:00 New Revision: 3a03513fc6ef8f3272d33be19164243c9dbf0452 URL: https://github.com/llvm/llvm-project/commit/3a03513fc6ef8f3272d33be19164243c9dbf0452 DIFF: https://github.com/llvm/llvm-project/commit/3a03513fc6ef8f3272d33be19164243c9dbf0452.diff

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-11 Thread Nikita Popov via cfe-commits
nikic wrote: I've reverted this change, because it causes a large compile-time regression, see https://llvm-compile-time-tracker.com/compare.php?from=4a68e4cbd2423dcacada8162ab7c4bb8d7f7e2cf&to=8c4331c1abeb33eabf3cdbefa7f2b6e0540e7f4f&stat=instructions:u. https://github.com/llvm/llvm-project/p

[clang] [TableGen] Use heterogenous lookups with std::map (NFC) (PR #115682)

2024-11-11 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/115682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Use heterogenous lookups with std::map (NFC) (PR #115810)

2024-11-12 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/115810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-13 Thread Nikita Popov via cfe-commits
@@ -852,6 +852,7 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T, TLI.setUnavailable(LibFunc_memrchr); TLI.setUnavailable(LibFunc_ntohl); TLI.setUnavailable(LibFunc_ntohs); +TLI.setUnavailable(LibFunc_reallocarray); ---

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-13 Thread Nikita Popov via cfe-commits
@@ -8,6 +8,7 @@ int stpncpy; int strdup; int strndup; int index; +int reallocarray; nikic wrote: This change probably shouldn't be here anymore? https://github.com/llvm/llvm-project/pull/114818 ___ cfe-commits maili

[clang] [TableGen] Use heterogenous lookups with std::map (NFC) (PR #115994)

2024-11-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LG https://github.com/llvm/llvm-project/pull/115994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/114818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][IR] Use splat syntax when printing Constant[Data]Vector. (PR #112548)

2024-11-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/112548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Use heterogenous lookups with std::map (NFC) (PR #115633)

2024-11-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/115633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CVP] #114820 add 'samesign' for 'icmp' (PR #115642)

2024-11-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/115642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread Nikita Popov via cfe-commits
nikic wrote: > so > [12e3ed8](https://github.com/llvm/llvm-project/commit/12e3ed8de8c6063b15916b3faf67c8c9cd17df1f) > should resolve both lldb buildbot breakage and compile time regression in > clang. Thank you, I can confirm that this fixes the compile-time regression (or at least most of i

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread Nikita Popov via cfe-commits
nikic wrote: It looks like this increases time to build clang by 0.5% (see affected files here: https://llvm-compile-time-tracker.com/compare_clang.php?from=e385e0d3e71e17da0b2023f480259c95923707bd&to=41e3919ded78d8870f7c95e9181c7f7e29aa3cc4&stat=instructions%3Au&sortBy=interestingness) This u

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread Nikita Popov via cfe-commits
nikic wrote: Though looking at that file list in more details, this also affects files outside clang, so I think it might be adding some compile-time overhead that is only visible on specific workloads. E.g. `LLVMSupport.dir/UnicodeNameToCodepointGenerated.cpp` has a 4.5% increase. https://gi

[clang-tools-extra] [modularize] Avoid repeated hash lookups (NFC) (PR #109508)

2024-09-21 Thread Nikita Popov via cfe-commits
@@ -508,13 +508,11 @@ class EntityMap : public std::map> { // Sort contents. llvm::sort(H->second); - // Check whether we've seen this header before. - auto KnownH = AllHeaderContents.find(H->first); - if (KnownH == AllHeaderContents.end()) { -

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/109277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Rewrite] Avoid repeated hash lookups (NFC) (PR #109605)

2024-09-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, but it would probably make sense to make BlockByCopyDecls a SetVector, instead of having separate vector and set. https://github.com/llvm/llvm-project/pull/109605 ___ cfe-commits mailing list

[clang] [Rewrite] Avoid repeated hash lookups (NFC) (PR #109605)

2024-09-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/109605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #109603)

2024-09-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/109603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [modularize] Avoid repeated hash lookups (NFC) (PR #109508)

2024-09-21 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/109508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-22 Thread Nikita Popov via cfe-commits
@@ -5461,6 +5461,18 @@ std::string llvm::UpgradeDataLayoutString(StringRef DL, StringRef TT) { return Res; } + if (T.isSPARC()) { +// Add "-i128:128" +std::string I128 = "-i128:128"; +if (StringRef Ref = Res; !Ref.contains(I128)) { + SmallVector Groups

[clang] [clang-offload-bundler] Avoid repeated hash lookups (NFC) (PR #109507)

2024-09-21 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/109507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ecb98f9 - [IRBuilder] Remove uses of CreateGlobalStringPtr() (NFC)

2024-09-23 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2024-09-23T16:30:50+02:00 New Revision: ecb98f9fed65801d9ad2c138da7194496e18aeec URL: https://github.com/llvm/llvm-project/commit/ecb98f9fed65801d9ad2c138da7194496e18aeec DIFF: https://github.com/llvm/llvm-project/commit/ecb98f9fed65801d9ad2c138da7194496e18aeec.diff

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-23 Thread Nikita Popov via cfe-commits
nikic wrote: @dtcxzyw Thanks for pointing that out! I think truncation here is the semantically wrong thing to do. I added a check that we fit the bit width instead in https://github.com/llvm/llvm-project/commit/6f194a6dea4b4067336431e699ea3588417d4b96. https://github.com/llvm/llvm-project/pu

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-23 Thread Nikita Popov via cfe-commits
nikic wrote: Nice artifact size improvements: https://llvm-compile-time-tracker.com/compare.php?from=be0b1142df7733633354ef1f73d0379bcd2ccb54&to=53abbced3032b555d43f5b91fafa741c8a11a050&stat=size-file https://github.com/llvm/llvm-project/pull/108300 _

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-24 Thread Nikita Popov via cfe-commits
nikic wrote: We're seeing failures on s390x as well (which is big endian): ``` TEST 'Clang :: SemaCXX/constexpr-vectors.cpp' FAILED Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /builddir/build/BUILD/llvm-project-00629752e622814649e67d6e5e

[clang] [llvm] [ADT][NFC] Simplify SmallSet (PR #109412)

2024-09-26 Thread Nikita Popov via cfe-commits
nikic wrote: Okay, I tried a few things, and can reproduce the regression just by using std::find inside vfind: https://github.com/llvm/llvm-project/commit/21f98691f6e7d8664c094bd4218a508432ab2d23 My best guess at the cause would be the forced unroll in: https://github.com/gcc-mirror/gcc/blob

[clang] [clang][CGExpr] Avoid Type::getPointerTo() (NFC) (PR #110209)

2024-09-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/110209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGOpenMPRuntimeGPU] Avoid llvm::Type::getPointerTo() (NFC) (PR #110357)

2024-09-28 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/110357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/106951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-29 Thread Nikita Popov via cfe-commits
@@ -5461,6 +5461,18 @@ std::string llvm::UpgradeDataLayoutString(StringRef DL, StringRef TT) { return Res; } + if (T.isSPARC()) { +// Add "-i128:128" +std::string I64 = "-i64:64"; +std::string I128 = "-i128:128"; +if (StringRef Ref = Res; !Ref.contains(

[clang] [clang][CGObjCMac] Unionize identical llvm types (NFC) (PR #110422)

2024-09-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: I don't think we should do this. If we think there is (documentation) value in different member names we can just leave things as is -- if not, we should merge into a single PtrTy. https://github.com/llvm/llvm-project/pull/110422

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-18 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/100757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-18 Thread Nikita Popov via cfe-commits
@@ -9800,3 +9817,45 @@ SDValue SystemZTargetLowering::lowerVECREDUCE_ADD(SDValue Op, ISD::EXTRACT_VECTOR_ELT, DL, VT, DAG.getBitcast(OpVT, Op), DAG.getConstant(OpVT.getVectorNumElements() - 1, DL, MVT::i32)); } + +// Only consider a function fully internal as long

[clang] [clang-tools-extra] [clang-tidy] Fix performance-unnecessary-value-param (PR #109145)

2024-09-18 Thread Nikita Popov via cfe-commits
@@ -118,10 +118,19 @@ class FunctionParmMutationAnalyzer { static FunctionParmMutationAnalyzer * getFunctionParmMutationAnalyzer(const FunctionDecl &Func, ASTContext &Context, ExprMutationAnalyzer::Memoized &Memorized) { -auto [it, Ins

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-18 Thread Nikita Popov via cfe-commits
@@ -1185,6 +1189,9 @@ Currently, only the following parameter attributes are defined: value should be sign-extended to the extent required by the target's ABI (which is usually 32-bits) by the caller (for a parameter) or the callee (for a return value). +``noext``

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-18 Thread Nikita Popov via cfe-commits
@@ -9800,3 +9817,45 @@ SDValue SystemZTargetLowering::lowerVECREDUCE_ADD(SDValue Op, ISD::EXTRACT_VECTOR_ELT, DL, VT, DAG.getBitcast(OpVT, Op), DAG.getConstant(OpVT.getVectorNumElements() - 1, DL, MVT::i32)); } + +// Only consider a function fully internal as long

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-18 Thread Nikita Popov via cfe-commits
@@ -1185,6 +1189,9 @@ Currently, only the following parameter attributes are defined: value should be sign-extended to the extent required by the target's ABI (which is usually 32-bits) by the caller (for a parameter) or the callee (for a return value). +``noext``

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-18 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Looks good to me with some nits. In particular LangRef could be clearer on the purpose of the attribute. https://github.com/llvm/llvm-project/pull/100757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [clang-tools-extra] [clang-tidy] Fix performance-unnecessary-value-param (PR #109145)

2024-09-18 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. The code change looks good to me, but not familiar with clang-tidy testing. https://github.com/llvm/llvm-project/pull/109145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang-tools-extra] [clang-tidy] Fix performance-unnecessary-value-param (PR #109145)

2024-09-18 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/109145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: > Missing fold: https://alive2.llvm.org/ce/z/2rmc3h See > [dtcxzyw/llvm-opt-benchmark#1342 > (comment)](https://github.com/dtcxzyw/llvm-opt-benchmark/pull/1342#discussion_r1767033125) In principle, I think this could be supported by making decomposeBitTestICmp detect that `ugt 25

[clang] [lldb] [llvm] [mlir] [APInt] Assert correct values in APInt constructor (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309 >From 7467ecf67c706ffdfa79eaebdc9528002b74c5af Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Sep 2024 17:27:13 +0200 Subject: [PATCH] apint only --- clang/lib/AST/ByteCode/IntegralAP.h | 6 +

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fix bitwidth (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: I think this is ready for review now. I've landed many parts of this PR separately already, and am happy to land this in parts (or split as needed). https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/109277 >From edbdc039ee955cc9d5f0f7d4cb4be287c55e25bb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 17 Sep 2024 15:48:42 +0200 Subject: [PATCH 1/2] [Loads] Check context instruction for context-sensitive derefa

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: I added some wording to isSafeToSpeculativelyExecute(), but not sure if this is what you had in mind. https://github.com/llvm/llvm-project/pull/109277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #109375)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Hm, why does this wrapper exist at all? It looks like a trivial wrapper that doesn't add or change any DenseMap functionality. https://github.com/llvm/llvm-project/pull/109375 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: It looks like this change causes regressions in sinking/hoisting, because we currently can't handle identical calls with different call site attributes. Basic example: https://llvm.godbolt.org/z/5dTcTfs1x We need to extend the attribute intersection support to call attributes. It'

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/99620 >From 46ab5f809414b3f06ab9956e0fc6910284417b6d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 19 Jul 2024 11:02:56 +0200 Subject: [PATCH 1/3] [CVP] Infer range return attribute We already infer this in IPSC

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Nikita Popov via cfe-commits
@@ -1289,6 +1299,14 @@ static bool runImpl(Function &F, LazyValueInfo *LVI, DominatorTree *DT, FnChanged |= BBChanged; } + // Infer range attribute on return value. + if (RetRange && !RetRange->isFullSet()) { +Attribute RangeAttr = F.getRetAttribute(Attribute::Ran

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/99620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309 >From 511445e35376c904be454ed987786cb6faa70a81 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Sep 2024 17:27:13 +0200 Subject: [PATCH] apint only --- clang/lib/AST/ByteCode/IntegralAP.h | 6 +

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
@@ -1806,7 +1806,7 @@ bool AMDGPUDAGToDAGISel::SelectGlobalSAddr(SDNode *N, // instructions to perform VALU adds with immediates or inline literals. unsigned NumLiterals = !TII->isInlineConstant(APInt(32, COffsetVal & 0x)) + - !TII->isInli

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #109372)

2024-09-20 Thread Nikita Popov via cfe-commits
@@ -896,9 +896,8 @@ static void OCL2Qual(Sema &S, const OpenCLTypeStruct &Ty, if (ImageTypesMap.contains(T->getValueAsString("Name"))) continue; // Check we have not seen this Type -if (TypesSeen.contains(T->getValueAsString("Name"))) +if (!TypesSeen.try_e

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: >From the last run: ``` Top 5 regressions: verilator/V3WidthSel.cpp.ll 1476069359 1597049838 +8.20% verilator/V3LinkResolve.cpp.ll 1301807129 1388286283 +6.64% opencv/gscalar.cpp.ll 203273801 211586743 +4.09% verilator/V3Clock.cpp.ll 734000737 758828622 +3.38% verilator/V3W

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-19 Thread Nikita Popov via cfe-commits
@@ -5461,6 +5461,13 @@ std::string llvm::UpgradeDataLayoutString(StringRef DL, StringRef TT) { return Res; } + if (T.isSPARC()) { +// Add "-i128:128" +if (!DL.empty() && !DL.contains("-i128:128")) + Res.append("-i128:128"); +return Res; + } --

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-09-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/100757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-09-19 Thread Nikita Popov via cfe-commits
nikic wrote: Note that you need to also have softPromoteHalfType return true to get correct legalization for half operations. https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-19 Thread Nikita Popov via cfe-commits
nikic wrote: As update-verify-tests was reverted, can you rebase this to just the update_test_checks support? On the LLVM side, we definitely want to have this feature. https://github.com/llvm/llvm-project/pull/108425 ___ cfe-commits mailing list cfe

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309 >From 17ba7e8538a2a4cc7b17322d26e8ea83ce27d617 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Sep 2024 17:27:13 +0200 Subject: [PATCH] apint only --- clang/lib/AST/ByteCode/IntegralAP.h | 6 +

[clang] [TableGen] Use StringSet instead of StringMap (NFC) (PR #109469)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-move] Avoid repeated hash lookups (NFC) (PR #109374)

2024-09-20 Thread Nikita Popov via cfe-commits
@@ -76,9 +76,8 @@ HelperDeclRefGraph::getReachableNodes(const Decl *Root) const { llvm::DenseSet ConnectedNodes; std::function VisitNode = [&](const CallGraphNode *Node) { -if (ConnectedNodes.count(Node)) +if (!ConnectedNodes.insert(Node).second)

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #109373)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/109373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-move] Avoid repeated hash lookups (NFC) (PR #109374)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/109374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fix bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic ready_for_review https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Declare GlobalMethodPool with using (NFC) (PR #109437)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-move] Use a range-based for loop (NFC) (PR #109438)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Use StringSet instead of StringMap (NFC) (PR #109441)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-10-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM. I gave this a try and it seems to work well! https://github.com/llvm/llvm-project/pull/108425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [lldb] [llvm] [mlir] [APInt] Assert correct values in APInt constructor (PR #80309)

2024-09-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309 >From f47b38cd26107108f082df437196832fbe9ad78d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Sep 2024 17:27:13 +0200 Subject: [PATCH] apint only --- clang/lib/AST/ByteCode/IntegralAP.h | 6

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/99620 >From 46ab5f809414b3f06ab9956e0fc6910284417b6d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 19 Jul 2024 11:02:56 +0200 Subject: [PATCH 1/2] [CVP] Infer range return attribute We already infer this in IPSC

[clang] [clang] fix the unexpected controlflow in `ParseTentative.cpp` (PR #95917)

2024-09-19 Thread Nikita Popov via cfe-commits
nikic wrote: FWIW, I think it would be fine to just merge this PR as-is without a test case. It seems pretty clear that this was the original intention of the code. https://github.com/llvm/llvm-project/pull/95917 ___ cfe-commits mailing list cfe-commi

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-19 Thread Nikita Popov via cfe-commits
nikic wrote: @cor3ntin See the discussion on https://github.com/llvm/llvm-project/pull/95917. This is very likely effectively dead code, but nobody is certain enough of that to delete it outright... https://github.com/llvm/llvm-project/pull/109298 _

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, don't think exactly how the builder call looks like here is important... https://github.com/llvm/llvm-project/pull/108606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/109277 >From edbdc039ee955cc9d5f0f7d4cb4be287c55e25bb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 17 Sep 2024 15:48:42 +0200 Subject: [PATCH] [Loads] Check context instruction for context-sensitive derefabili

[clang] [llvm] [ADT][NFC] Simplify SmallSet (PR #109412)

2024-09-25 Thread Nikita Popov via cfe-commits
nikic wrote: Looks like this change has a small negative compile-time impact: https://llvm-compile-time-tracker.com/compare.php?from=0c31ea5a09d854d5891eac40629f6a17a66fdcf7&to=ce6c236c965dc1bb5fa2257e17ea253a015705cc&stat=instructions:u Not obvious to me why that should be. https://github.com

[clang] [Serialization] Avoid repeated hash lookups (NFC) (PR #110950)

2024-10-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/110950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analysis] Avoid repeated hash lookups (NFC) (PR #110949)

2024-10-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/110949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #110947)

2024-10-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/110947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #110951)

2024-10-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/110951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-11-06 Thread Nikita Popov via cfe-commits
nikic wrote: @yingopq As you regularly do MIPS work, I'd recommend to request commit access, as described at https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access. https://github.com/llvm/llvm-project/pull/112084 ___ cfe-commits mailing

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Nikita Popov via cfe-commits
@@ -153,12 +155,37 @@ std::string AttributeCommonInfo::getNormalizedFullName() const { normalizeName(getAttrName(), getScopeName(), getSyntax())); } +// Sorted list of attribute scope names +static constexpr std::pair ScopeList[] = +{{"", AttributeCommonInfo::Scope:

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-11-06 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/112084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Call DenseMap::find without constructing std::string (NFC) (PR #115260)

2024-11-07 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LG https://github.com/llvm/llvm-project/pull/115260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Use heterogenous lookups with std::set (NFC) (PR #115259)

2024-11-07 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LG https://github.com/llvm/llvm-project/pull/115259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    5   6   7   8   9   10   11   12   13   14   >