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

2023-12-19 Thread Nikita Popov via cfe-commits
@@ -17,6 +17,7 @@ #include "clang/Driver/Driver.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" +#include "llvm/Config/config.h" nikic wrote: This is a private LLVM header, see the comment at the top of the file. It cannot be included in

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

2023-12-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited 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/cfe-commits

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

2023-12-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic ready_for_review 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/cfe-commits

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

2023-12-20 Thread Nikita Popov via cfe-commits
@@ -560,14 +560,15 @@ define i32 @test28() nounwind { ; CHECK-NEXT: entry: ; CHECK-NEXT:[[ORIENTATIONS:%.*]] = alloca [1 x [1 x %struct.x]], align 8 ; CHECK-NEXT:[[T3:%.*]] = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str) #[[ATTR0]] +; CHECK-NEXT:[[

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

2023-12-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited 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/cfe-commits

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

2023-12-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited 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/cfe-commits

[llvm] [clang] [InstCombine] Set disjoint flag when turning Add into Or. (PR #72702)

2023-11-27 Thread Nikita Popov via cfe-commits
@@ -255,8 +255,11 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, return I->getOperand(1); // If the RHS is a constant, see if we can simplify it. -if (ShrinkDemandedConstant(I, 1, DemandedMask)) +if (ShrinkDemandedConstant(

[llvm] [clang] [InstCombine] Set disjoint flag when turning Add into Or. (PR #72702)

2023-11-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM assuming CI happy. https://github.com/llvm/llvm-project/pull/72702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [InstCombine] Infer disjoint flag on Or instructions. (PR #72912)

2023-11-27 Thread Nikita Popov via cfe-commits
nikic wrote: Needs a rebase. Also you'll want to do this inside SimplifyDemanded to reuse existing KnownBits information. https://github.com/llvm/llvm-project/pull/72912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] b31cd07 - [Clang] Regenerate test checks (NFC)

2023-11-28 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2023-11-28T09:58:30+01:00 New Revision: b31cd07de5b7dfb435b062c80d85083e14f28321 URL: https://github.com/llvm/llvm-project/commit/b31cd07de5b7dfb435b062c80d85083e14f28321 DIFF: https://github.com/llvm/llvm-project/commit/b31cd07de5b7dfb435b062c80d85083e14f28321.diff

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

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -560,14 +560,15 @@ define i32 @test28() nounwind { ; CHECK-NEXT: entry: ; CHECK-NEXT:[[ORIENTATIONS:%.*]] = alloca [1 x [1 x %struct.x]], align 8 ; CHECK-NEXT:[[T3:%.*]] = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str) #[[ATTR0]] +; CHECK-NEXT:[[

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

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -2282,6 +2282,15 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { if (MadeChange) return &GEP; + // Canonicalize constant GEPs to i8 type. nikic wrote: GEP operates in terms of bytes, not bits. The size of i8 is re

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

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -2282,6 +2282,15 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { if (MadeChange) return &GEP; + // Canonicalize constant GEPs to i8 type. nikic wrote: Note that i8 GEPs are already generated by some important comp

[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-11-28 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/73662 This adds support for using dominating conditions in computeKnownBits() when called from InstCombine. The implementation uses a DomConditionCache, which stores which branches may provide information that is relevan

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-11-28 Thread Nikita Popov via cfe-commits
nikic wrote: Just realized that this doesn't cover uses of isKnownNonNegative() in InstCombine yet, as it currently doesn't go through SimplifyQuery. I'll see about migrating those APIs tomorrow. https://github.com/llvm/llvm-project/pull/73662 ___ cf

[clang] [llvm] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -29,30 +29,31 @@ Overview Within LLVM, FatLTO is supported by choosing the ``FatLTODefaultPipeline``. This pipeline will: -#) Clone the IR module. -#) Run the pre-link (Thin)LTO pipeline using the cloned module. +#) Run the pre-link UnifiedLTO pipeline on the current module

[clang] [llvm] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
nikic wrote: I like the approach of saying that FatLTO implies UnifiedLTO. This nicely justifies why we are always using the ThinLTO pre-link pipeline. https://github.com/llvm/llvm-project/pull/72180 ___ cfe-commits mailing list cfe-commits@lists.llvm

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, -bool EmitSummary) { +PassBuilder::buildFatL

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, -bool EmitSummary) { +PassBuilder::buildFatL

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, -bool EmitSummary) { +PassBuilder::buildFatL

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-11-29 Thread Nikita Popov via cfe-commits
@@ -16,11 +16,15 @@ define i32 @test_asr(i32 %a, i32 %b) { ; CHECK-NEXT:[[C:%.*]] = icmp slt i32 [[A]], 0 ; CHECK-NEXT:br i1 [[C]], label [[BB2:%.*]], label [[BB3:%.*]] ; CHECK: bb2: +; CHECK-NEXT:[[NOT:%.*]] = xor i32 [[A]], -1 +; CHECK-NEXT:[[D:%.*]] = l

[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-11-29 Thread Nikita Popov via cfe-commits
nikic wrote: > Just realized that this doesn't cover uses of isKnownNonNegative() in > InstCombine yet, as it currently doesn't go through SimplifyQuery. I'll see > about migrating those APIs tomorrow. This is done now, but introduced an additional regression in idioms.ll. https://github.com/

[compiler-rt] [llvm] [mlir] [polly] [clang] [libc] [libcxx] [openmp] [lldb] [C API] Add support for setting/getting new nneg flag on zext instructions (PR #73592)

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

[clang] [llvm] [InstCombine] Infer disjoint flag on Or instructions. (PR #72912)

2023-11-30 Thread Nikita Popov via cfe-commits
nikic wrote: > Do we do that for other flags already? I based this off Add/Sub wrap flags. Add/Sub are not considered roots for demanded bits simplification, so we can't (reliably) perform this in there. `or` is a simplification root. > Are the KnownBits in SimplifyDemandedBit usable? We have

[clang] [llvm] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-30 Thread Nikita Popov via cfe-commits
@@ -29,34 +29,42 @@ Overview Within LLVM, FatLTO is supported by choosing the ``FatLTODefaultPipeline``. This pipeline will: -#) Clone the IR module. -#) Run the pre-link (Thin)LTO pipeline using the cloned module. +#) Run the pre-link UnifiedLTO pipeline on the current module

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -75,7 +75,8 @@ define void @idom_sign_bit_check_edge_dominates_select(i64 %a, i64 %b) { ; CHECK: land.lhs.true: ; CHECK-NEXT:br label [[LOR_END:%.*]] ; CHECK: lor.rhs: -; CHECK-NEXT:[[CMP3_NOT:%.*]] = icmp eq i64 [[A]], [[B:%.*]] +; CHECK-NEXT:[[SELE

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -16,11 +16,15 @@ define i32 @test_asr(i32 %a, i32 %b) { ; CHECK-NEXT:[[C:%.*]] = icmp slt i32 [[A]], 0 ; CHECK-NEXT:br i1 [[C]], label [[BB2:%.*]], label [[BB3:%.*]] ; CHECK: bb2: +; CHECK-NEXT:[[NOT:%.*]] = xor i32 [[A]], -1 +; CHECK-NEXT:[[D:%.*]] = l

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,74 @@ +//===- DomConditionCache.cpp --===// +// +// 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

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -16,11 +16,15 @@ define i32 @test_asr(i32 %a, i32 %b) { ; CHECK-NEXT:[[C:%.*]] = icmp slt i32 [[A]], 0 ; CHECK-NEXT:br i1 [[C]], label [[BB2:%.*]], label [[BB3:%.*]] ; CHECK: bb2: +; CHECK-NEXT:[[NOT:%.*]] = xor i32 [[A]], -1 +; CHECK-NEXT:[[D:%.*]] = l

[clang] [clang-tools-extra] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,14 @@ +; RUN: opt -S -passes=normalize < %s | FileCheck %s + +define double @foo(double %a0, double %a1) { +entry: +; CHECK: %b +; CHECK: %d +; CHECK: %a +; CHECK: %c + %a = fmul double %a0, %a1 + %b = fmul double %a0, 2.00e+00 + %c = fmul double %a, 6.00e+00

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-01 Thread Nikita Popov via cfe-commits
@@ -16,11 +16,15 @@ define i32 @test_asr(i32 %a, i32 %b) { ; CHECK-NEXT:[[C:%.*]] = icmp slt i32 [[A]], 0 ; CHECK-NEXT:br i1 [[C]], label [[BB2:%.*]], label [[BB3:%.*]] ; CHECK: bb2: +; CHECK-NEXT:[[NOT:%.*]] = xor i32 [[A]], -1 +; CHECK-NEXT:[[D:%.*]] = l

[clang] [clang-fuzzer] Remove GCC 4.x pre GCC 4.9 workaround to silence warning (PR #73974)

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

[clang] [llvm] [InstCombine] Infer disjoint flag on Or instructions. (PR #72912)

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

[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-04 Thread Nikita Popov via cfe-commits
nikic wrote: > Could you please rebase this patch on #74246 and add a test for #74242? Done. The new test is `@div_by_zero_or_one_from_dom_cond`. https://github.com/llvm/llvm-project/pull/73662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[llvm] [clang] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: LoopUnroll supports upper bound unrolling. Why is it not working in this case? https://github.com/llvm/llvm-project/pull/74268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread Nikita Popov via cfe-commits
nikic wrote: Can you please share the IR before the unroll pass? https://github.com/llvm/llvm-project/pull/74268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-04 Thread Nikita Popov via cfe-commits
nikic wrote: @dtcxzyw Could you please run another test with this branch? https://github.com/nikic/llvm-project/tree/perf/dom-cond-3 I believe the issue with DILATE is that we have some icmps that get canonicalized from signed to unsigned predicate, and IndVars is not able to perform some rea

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-04 Thread Nikita Popov via cfe-commits
nikic wrote: I went ahead and pushed a clean up version of that change to this PR, so you can just re-test this PR. I've found that dropping the icmp case also removes most of the second-order compile-time regressions, and also drops the (very minor) regression in the BPF test, so those are a

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

2023-12-21 Thread Nikita Popov via cfe-commits
nikic wrote: @dtcxzyw GitHub can't display the diff, and struggles to clone the repo. Can you share the diffs for just the mentioned files? https://github.com/llvm/llvm-project/pull/68882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

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

2023-12-21 Thread Nikita Popov via cfe-commits
nikic wrote: > > arrayidx > > We should teach `foldCmpLoadFromIndexedGlobal` to handle constant GEPs with > i8 source element type. There is a pending patch related to this: https://github.com/llvm/llvm-project/pull/67093 https://github.com/llvm/llvm-project/pull/68882 __

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-22 Thread Nikita Popov via cfe-commits
nikic wrote: > > Alternative would be to forbid GEP indexing into vectors entirely. > > I agree that it would be better if there just were no vector GEPs, but that > breaks importing older modules, and that cannot be easily auto-upgraded > (convert to byte-GEPs?). Yes, upgrade would be to byt

[clang] [llvm] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-22 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM I think this is a reasonable change in any case. https://github.com/llvm/llvm-project/pull/75448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[flang] [clang] [lldb] [clang-tools-extra] [compiler-rt] [libcxx] [llvm] [libc] [RegAllocFast] Refactor dominates algorithm for large basic block (PR #72250)

2023-12-22 Thread Nikita Popov via cfe-commits
@@ -62,6 +62,107 @@ static RegisterRegAlloc fastRegAlloc("fast", "fast register allocator", namespace { +/// Assign ascending index for instructions in machine basic block. The index +/// can be used to determine dominance between instructions in same MBB. +class InstrPosInd

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

2023-12-22 Thread Nikita Popov via cfe-commits
nikic wrote: (As usual, please make any LLVM changes separately from Clang changes, especially if they affect IR design.) https://github.com/llvm/llvm-project/pull/75177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[llvm] [clang] [FuncAttrs] Infer `norecurse` for funcs with calls to `nocallback` callees (PR #76372)

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

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
nikic wrote: There are lld test failures. https://github.com/llvm/llvm-project/pull/76553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
@@ -27,7 +27,7 @@ #endif // function return types -// CHECK-LABEL: define dso_local <8 x half> @test_ret_v8f16( +// CHECK-LABEL: define dso_local noundef <8 x half> @test_ret_v8f16( nikic wrote: Do you know why clang places the noundef on the argument but not

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

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

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
@@ -27,7 +27,7 @@ #endif // function return types -// CHECK-LABEL: define dso_local <8 x half> @test_ret_v8f16( +// CHECK-LABEL: define dso_local noundef <8 x half> @test_ret_v8f16( nikic wrote: Ah, it seems to indeed be a "weird C rule": https://github.com/l

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
@@ -1279,6 +1280,43 @@ static void addNonNullAttrs(const SCCNodeSet &SCCNodes, } } +/// Deduce noundef attributes for the SCC. +static void addNoUndefAttrs(const SCCNodeSet &SCCNodes, +SmallSet &Changed) { + // Check each function in turn, determ

[clang] [llvm] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
@@ -1279,6 +1280,43 @@ static void addNonNullAttrs(const SCCNodeSet &SCCNodes, } } +/// Deduce noundef attributes for the SCC. +static void addNoUndefAttrs(const SCCNodeSet &SCCNodes, +SmallSet &Changed) { + // Check each function in turn, determ

[llvm] [clang] [lld] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-31 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, assuming Linux CI passes now. https://github.com/llvm/llvm-project/pull/76553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [lld] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2024-01-01 Thread Nikita Popov via cfe-commits
nikic wrote: Yeah, we should skip this inference for functions with the sanitize_memory attribute. https://github.com/llvm/llvm-project/pull/76553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-03 Thread Nikita Popov via cfe-commits
nikic wrote: https://llvm-compile-time-tracker.com/compare.php?from=98624914367bf9091919de330cf322fb6d5e468f&to=7d398e29b0180aacc646fed5406ad7fbd4b30c02&stat=instructions%3Au Nice results for C++ code! https://github.com/llvm/llvm-project/pull/76825 _

[lldb] [libc] [llvm] [clang] [mlir] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-04 Thread Nikita Popov via cfe-commits
@@ -187,80 +187,124 @@ Value *lowerObjectSizeCall( const TargetLibraryInfo *TLI, AAResults *AA, bool MustSucceed, SmallVectorImpl *InsertedInstructions = nullptr); -using SizeOffsetType = std::pair; +/// SizeOffsetType - A base template class for the object size visito

[llvm] [clang] [RFC] Introducing `__builtin_consistent` to generate AArch64 BC.cond … (PR #72175)

2024-01-06 Thread Nikita Popov via cfe-commits
nikic wrote: @davidbolvansky The semantics of this builtin are slightly different, see the discussion at https://discourse.llvm.org/t/rfc-consistent-branches-support-in-llvm/74889. But yes, the consensus is that adding this builtin is not worthwhile. https://github.com/llvm/llvm-project/pull/

[clang] [OpenMP] Change `__tgt_device_image` to point to the image (PR #77003)

2024-01-07 Thread Nikita Popov via cfe-commits
@@ -19,8 +19,8 @@ // OPENMP-COFF: @__start_omp_offloading_entries = hidden constant [0 x %struct.__tgt_offload_entry] zeroinitializer, section "omp_offloading_entries$OA" // OPENMP-COFF-NEXT: @__stop_omp_offloading_entries = hidden constant [0 x %struct.__tgt_offload_ent

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

2024-01-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/77298 When initializing a union that constrain a struct with a flexible array member, and the initializer list is empty, we currently trigger an assertion failure. This happens because getFlexibleArrayInitChars() assumes

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

2024-01-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/77298 >From 68e21b7604964b7b391d9a077ca52175af21b65a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 8 Jan 2024 12:41:34 +0100 Subject: [PATCH 1/2] [clang] Fix assertion failure when initializing union with FAM W

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

2024-01-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/77298 >From 68e21b7604964b7b391d9a077ca52175af21b65a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 8 Jan 2024 12:41:34 +0100 Subject: [PATCH 1/3] [clang] Fix assertion failure when initializing union with FAM W

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

2024-01-08 Thread Nikita Popov via cfe-commits
@@ -696,6 +696,9 @@ Bug Fixes in This Version - Clang now accepts recursive non-dependent calls to functions with deduced return type. Fixes (`#71015 `_) +- Fix assertion failure when initializing union containing struct wi

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

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

[llvm] [clang] [Clang] Update Unicode version to 15.1 (PR #77147)

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

[clang] [llvm] [Clang] Update Unicode version to 15.1 (PR #77147)

2024-01-09 Thread Nikita Popov via cfe-commits
nikic wrote: Ooops, sorry about that. https://github.com/llvm/llvm-project/pull/77147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Set writable and dead_on_unwind attributes on sret arguments (PR #77116)

2024-01-10 Thread Nikita Popov via cfe-commits
nikic wrote: Some IR for reference: https://clang.godbolt.org/z/qEsP7vozW I believe that on unwind, the sret temporary is either entirely unused (if no cleanup landingpad is necessary) or we will call lifetime.end on it (which is legal for dead_on_unwind). This should be independent of whether

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK,CXX98 +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o - -f

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK,CXX98 +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o - -f

[clang] [Clang] Set writable and dead_on_unwind attributes on sret arguments (PR #77116)

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

[clang] 5548e80 - [IR] Remove support for extractvalue constant expression

2022-06-28 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-06-28T10:40:17+02:00 New Revision: 5548e807b5777fdda167b6795e0e05432a6163f1 URL: https://github.com/llvm/llvm-project/commit/5548e807b5777fdda167b6795e0e05432a6163f1 DIFF: https://github.com/llvm/llvm-project/commit/5548e807b5777fdda167b6795e0e05432a6163f1.diff

[clang] 9ac3864 - [ConstExpr] Don't create insertvalue expressions

2022-07-01 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-07-01T09:23:28+02:00 New Revision: 9ac386495d3c9578e04c9aeb07a3d255b8cc8413 URL: https://github.com/llvm/llvm-project/commit/9ac386495d3c9578e04c9aeb07a3d255b8cc8413 DIFF: https://github.com/llvm/llvm-project/commit/9ac386495d3c9578e04c9aeb07a3d255b8cc8413.diff

[clang] 935570b - [ConstExpr] Don't create div/rem expressions

2022-07-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-07-05T15:54:53+02:00 New Revision: 935570b2ad808035a1fd9bf6fa894657babc8694 URL: https://github.com/llvm/llvm-project/commit/935570b2ad808035a1fd9bf6fa894657babc8694 DIFF: https://github.com/llvm/llvm-project/commit/935570b2ad808035a1fd9bf6fa894657babc8694.diff

[clang] a4772cb - Revert "[SimplifyCFG] Thread branches on same condition in more cases (PR54980)"

2022-07-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-07-05T16:57:46+02:00 New Revision: a4772cbaf0dc717ab6b4639272ca2910897613f0 URL: https://github.com/llvm/llvm-project/commit/a4772cbaf0dc717ab6b4639272ca2910897613f0 DIFF: https://github.com/llvm/llvm-project/commit/a4772cbaf0dc717ab6b4639272ca2910897613f0.diff

[clang] 8a72391 - [IR] Require intrinsic struct return type to be anonymous

2022-03-30 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-30T09:51:24+02:00 New Revision: 8a72391f609f016b0aef17e728aca65027a80cc4 URL: https://github.com/llvm/llvm-project/commit/8a72391f609f016b0aef17e728aca65027a80cc4 DIFF: https://github.com/llvm/llvm-project/commit/8a72391f609f016b0aef17e728aca65027a80cc4.diff

[clang] d69e9f9 - [OpaquePtrs][Clang] Add -opaque-pointers/-no-opaque-pointers cc1 options

2022-04-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-04-05T10:15:41+02:00 New Revision: d69e9f9d8978399a9d1f1c1ed62aa661440afcd3 URL: https://github.com/llvm/llvm-project/commit/d69e9f9d8978399a9d1f1c1ed62aa661440afcd3 DIFF: https://github.com/llvm/llvm-project/commit/d69e9f9d8978399a9d1f1c1ed62aa661440afcd3.diff

[clang] ff18b15 - [CodeGen] Avoid unnecessary ConstantExpr cast

2022-04-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-04-05T11:28:40+02:00 New Revision: ff18b158edc4719c4b05cd04dceaedcf69a8d9c5 URL: https://github.com/llvm/llvm-project/commit/ff18b158edc4719c4b05cd04dceaedcf69a8d9c5 DIFF: https://github.com/llvm/llvm-project/commit/ff18b158edc4719c4b05cd04dceaedcf69a8d9c5.diff

[clang] 46cfbe5 - [LLVMContext] Replace enableOpaquePointers() with setOpaquePointers()

2022-04-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-04-05T12:02:48+02:00 New Revision: 46cfbe561bfd3b35984b3e1662bd2bca4eb9e96d URL: https://github.com/llvm/llvm-project/commit/46cfbe561bfd3b35984b3e1662bd2bca4eb9e96d DIFF: https://github.com/llvm/llvm-project/commit/46cfbe561bfd3b35984b3e1662bd2bca4eb9e96d.diff

[clang] 4d8a74c - [Test] Use cc1 instead of mllvm -opaque-pointers option (NFC)

2022-04-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-04-05T12:04:48+02:00 New Revision: 4d8a74c460eb9ec46f913375c92fa8c2359ddc22 URL: https://github.com/llvm/llvm-project/commit/4d8a74c460eb9ec46f913375c92fa8c2359ddc22 DIFF: https://github.com/llvm/llvm-project/commit/4d8a74c460eb9ec46f913375c92fa8c2359ddc22.diff

[clang] b1f610f - [Test] Use cc1 interface in more tests (NFC)

2022-04-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-04-05T13:16:24+02:00 New Revision: b1f610fec54a0083f0086788c404484359a1a48e URL: https://github.com/llvm/llvm-project/commit/b1f610fec54a0083f0086788c404484359a1a48e DIFF: https://github.com/llvm/llvm-project/commit/b1f610fec54a0083f0086788c404484359a1a48e.diff

[clang] f348ca5 - [Tests] Use %clang_cc1 instead of %clang -cc1 in codegen tests (NFC)

2022-04-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-04-05T13:21:44+02:00 New Revision: f348ca51c741580761e7ddefa1a8a0713494c20e URL: https://github.com/llvm/llvm-project/commit/f348ca51c741580761e7ddefa1a8a0713494c20e DIFF: https://github.com/llvm/llvm-project/commit/f348ca51c741580761e7ddefa1a8a0713494c20e.diff

[clang] 4737eeb - [OpaquePtr] Remove uses of CreateConstInBoundsGEP2_64() without type

2021-07-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2021-07-17T16:42:10+02:00 New Revision: 4737eebc0d05a42bd5a27e325d3846bd90a4d1b5 URL: https://github.com/llvm/llvm-project/commit/4737eebc0d05a42bd5a27e325d3846bd90a4d1b5 DIFF: https://github.com/llvm/llvm-project/commit/4737eebc0d05a42bd5a27e325d3846bd90a4d1b5.diff

[clang] 357756e - [OpaquePtr] Remove uses of CreateConstGEP1_64() without element type

2021-07-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2021-07-17T16:43:20+02:00 New Revision: 357756ecf67817c3db81b285b9fce0663d9ed875 URL: https://github.com/llvm/llvm-project/commit/357756ecf67817c3db81b285b9fce0663d9ed875 DIFF: https://github.com/llvm/llvm-project/commit/357756ecf67817c3db81b285b9fce0663d9ed875.diff

[clang] 5071360 - [OpaquePtr] Remove uses of CGF.Builder.CreateConstInBoundsGEP1_64() without type

2021-07-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2021-07-17T17:07:46+02:00 New Revision: 5071360eb1cf4a93ab72fd4ba47680a9eda98e39 URL: https://github.com/llvm/llvm-project/commit/5071360eb1cf4a93ab72fd4ba47680a9eda98e39 DIFF: https://github.com/llvm/llvm-project/commit/5071360eb1cf4a93ab72fd4ba47680a9eda98e39.diff

[clang] 6d3e7c7 - [OpaquePtr] Remove uses of CreateConstGEP1_32() without element type

2021-07-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2021-07-17T18:32:36+02:00 New Revision: 6d3e7c783b98e5663741152f046f14c934bcf612 URL: https://github.com/llvm/llvm-project/commit/6d3e7c783b98e5663741152f046f14c934bcf612 DIFF: https://github.com/llvm/llvm-project/commit/6d3e7c783b98e5663741152f046f14c934bcf612.diff

[clang] 4ace600 - [OpaquePtr] Remove uses of CreateStructGEP() without element type

2021-07-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2021-07-17T18:48:21+02:00 New Revision: 4ace6008f2fde781c1bedc7515e6380e449cb56a URL: https://github.com/llvm/llvm-project/commit/4ace6008f2fde781c1bedc7515e6380e449cb56a DIFF: https://github.com/llvm/llvm-project/commit/4ace6008f2fde781c1bedc7515e6380e449cb56a.diff

[clang] 6225d0c - [OpaquePtr] Remove uses of CreateInBoundsGEP() without element type

2021-07-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2021-07-17T21:27:16+02:00 New Revision: 6225d0cc6e6e3eef63261dda1efaf10689e33db7 URL: https://github.com/llvm/llvm-project/commit/6225d0cc6e6e3eef63261dda1efaf10689e33db7 DIFF: https://github.com/llvm/llvm-project/commit/6225d0cc6e6e3eef63261dda1efaf10689e33db7.diff

Re: [clang] 4ace600 - [OpaquePtr] Remove uses of CreateStructGEP() without element type

2021-07-21 Thread Nikita Popov via cfe-commits
as soon as you try to dereference a pointer. Nikita > On Sat, Jul 17, 2021 at 9:48 AM Nikita Popov via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> >> Author: Nikita Popov >> Date: 2021-07-17T18:48:21+02:00 >> New Revision: 4ace6008f2fde781c1bedc7

[clang] 799643f - [CGObjCGNU] Remove pointer element type uses

2022-03-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-17T14:53:34+01:00 New Revision: 799643f7f0bebbc4e45767cfea5e8e227af7ef9c URL: https://github.com/llvm/llvm-project/commit/799643f7f0bebbc4e45767cfea5e8e227af7ef9c DIFF: https://github.com/llvm/llvm-project/commit/799643f7f0bebbc4e45767cfea5e8e227af7ef9c.diff

[clang] bf1a998 - [CodeGen] Avoid some pointer element type accesses

2022-03-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-17T15:25:55+01:00 New Revision: bf1a99861c2e98cfd85792fdefe2ef9c7ec11f52 URL: https://github.com/llvm/llvm-project/commit/bf1a99861c2e98cfd85792fdefe2ef9c7ec11f52 DIFF: https://github.com/llvm/llvm-project/commit/bf1a99861c2e98cfd85792fdefe2ef9c7ec11f52.diff

[clang] 2edac9d - [CodeGen] Avoid some pointer element type accesses

2022-03-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-17T16:32:45+01:00 New Revision: 2edac9d962b9ee06d14a74886fb8aaa85d5256ee URL: https://github.com/llvm/llvm-project/commit/2edac9d962b9ee06d14a74886fb8aaa85d5256ee DIFF: https://github.com/llvm/llvm-project/commit/2edac9d962b9ee06d14a74886fb8aaa85d5256ee.diff

[clang] 6c0af92 - [CodeGen] Avoid some pointer element type accesses

2022-03-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-17T16:36:14+01:00 New Revision: 6c0af92612d0730a039226d67cfa08f4d6db5be9 URL: https://github.com/llvm/llvm-project/commit/6c0af92612d0730a039226d67cfa08f4d6db5be9 DIFF: https://github.com/llvm/llvm-project/commit/6c0af92612d0730a039226d67cfa08f4d6db5be9.diff

[clang] 6e1e99d - [CodeGen] Avoid pointer element type access for blocks

2022-03-17 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-17T16:56:31+01:00 New Revision: 6e1e99dc07f4f847a5dc8ad80d25ecce40690489 URL: https://github.com/llvm/llvm-project/commit/6e1e99dc07f4f847a5dc8ad80d25ecce40690489 DIFF: https://github.com/llvm/llvm-project/commit/6e1e99dc07f4f847a5dc8ad80d25ecce40690489.diff

[clang] 33d020d - [CodeGen] Remove some uses of deprecated Address constructor

2022-03-18 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-18T11:01:25+01:00 New Revision: 33d020d010478e59e2cdc57300d4aae3fbac0611 URL: https://github.com/llvm/llvm-project/commit/33d020d010478e59e2cdc57300d4aae3fbac0611 DIFF: https://github.com/llvm/llvm-project/commit/33d020d010478e59e2cdc57300d4aae3fbac0611.diff

[clang] 74992f4 - [CodeGen] Store element type in DominatingValue

2022-03-18 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-18T11:13:25+01:00 New Revision: 74992f4a5bb79e2084abdef406ef2e5aa2024368 URL: https://github.com/llvm/llvm-project/commit/74992f4a5bb79e2084abdef406ef2e5aa2024368 DIFF: https://github.com/llvm/llvm-project/commit/74992f4a5bb79e2084abdef406ef2e5aa2024368.diff

[clang] 52cc65d - [OpenMPRuntime] Specify correct pointer type

2022-03-18 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-18T14:25:51+01:00 New Revision: 52cc65d4740992a29ae8375498c3b470f003de26 URL: https://github.com/llvm/llvm-project/commit/52cc65d4740992a29ae8375498c3b470f003de26 DIFF: https://github.com/llvm/llvm-project/commit/52cc65d4740992a29ae8375498c3b470f003de26.diff

[clang] b6f85d8 - [CodeGen][OpenMP] Use correct type in EmitLoadOfPointer()

2022-03-21 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-21T12:08:05+01:00 New Revision: b6f85d8539455d82870bc275ef0de9a7973ccb17 URL: https://github.com/llvm/llvm-project/commit/b6f85d8539455d82870bc275ef0de9a7973ccb17 DIFF: https://github.com/llvm/llvm-project/commit/b6f85d8539455d82870bc275ef0de9a7973ccb17.diff

[clang] afb9cbb - [OpenMP] Regenerate test checks (NFC)

2022-03-21 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-21T14:25:02+01:00 New Revision: afb9cbb324df096fb55a2067be08d36c1eb7dab5 URL: https://github.com/llvm/llvm-project/commit/afb9cbb324df096fb55a2067be08d36c1eb7dab5 DIFF: https://github.com/llvm/llvm-project/commit/afb9cbb324df096fb55a2067be08d36c1eb7dab5.diff

[clang] 062b1ae - Reapply [Utils] Fix %S substitution

2022-03-21 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-21T15:15:34+01:00 New Revision: 062b1ae7e0ca61c81b0f8d097279268336a7efd7 URL: https://github.com/llvm/llvm-project/commit/062b1ae7e0ca61c81b0f8d097279268336a7efd7 DIFF: https://github.com/llvm/llvm-project/commit/062b1ae7e0ca61c81b0f8d097279268336a7efd7.diff

[clang] 7a2e12e - [CodeGen][OpenMP] Use correct type in EmitLoadOfPointer()

2022-03-21 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-21T15:22:37+01:00 New Revision: 7a2e12e0a7132739bb2c609477093d2b26ee4f3a URL: https://github.com/llvm/llvm-project/commit/7a2e12e0a7132739bb2c609477093d2b26ee4f3a DIFF: https://github.com/llvm/llvm-project/commit/7a2e12e0a7132739bb2c609477093d2b26ee4f3a.diff

[clang] a9656bd - [CodeGen][OpenMP] Make EmitLoadOfPointer() type consistent

2022-03-22 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-22T09:37:48+01:00 New Revision: a9656bd1bc3792b81ad5a7277bdf7d8159b3b924 URL: https://github.com/llvm/llvm-project/commit/a9656bd1bc3792b81ad5a7277bdf7d8159b3b924 DIFF: https://github.com/llvm/llvm-project/commit/a9656bd1bc3792b81ad5a7277bdf7d8159b3b924.diff

[clang] 767ec88 - [CodeGen] Avoid deprecated Address ctor in EmitLoadOfPointer()

2022-03-22 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2022-03-22T09:42:31+01:00 New Revision: 767ec883e37510a247ea5695921876ef67cf5b3f URL: https://github.com/llvm/llvm-project/commit/767ec883e37510a247ea5695921876ef67cf5b3f DIFF: https://github.com/llvm/llvm-project/commit/767ec883e37510a247ea5695921876ef67cf5b3f.diff

<    1   2   3   4   5   6   7   8   9   10   >