[llvm] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > How does this relate to the existing `shouldOptimizeForSize(Function&, ...)` > and `shouldOptimizeForSize(MachineFunction&, ...)` APIs which appear to > provide similar functionality at a first glance. If they are the same, then > we should have a plan in place to cleanup and

[llvm] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > FWIW we've tried this with sampling PGO in the past. While on paper this > seems like an obvious thing to do, in reality aggressively tuning down opt > level for cold functions can lead to regression since profile isn't always > accurate. > > That said, as long as this chang

[llvm] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,73 @@ +//===--===// +// +// 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: Apac

[clang] [llvm] [clang-tools-extra] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/69030 >From e52a811c3b643548837b4e630e8293a0b6857ad4 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 13 Oct 2023 14:40:28 -0700 Subject: [PATCH 1/6] [PGO] Add ability to mark cold functions as optsize/minsiz

[llvm] [clang] [clang-tools-extra] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/69030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I don't understand, if you're saying the profile is accurate, then those functions are actually cold, so we should be able to mark them as optsize? https://github.com/llvm/llvm-project/pull/69030 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-08 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > Good example. This pass should be run post-inline. @aeubanks, any reason we > want to run it early in the pipeline? We want the main function simplification pipeline to see these function attributes because some optimizations trigger or don't trigger depending on the presenc

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-09 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > > > Good example. This pass should be run post-inline. @aeubanks, any reason > > > we want to run it early in the pipeline? > > > > > > We want the main function simplification pipeline to see these function > > attributes because some optimizations trigger or don't trigger

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/69030 >From e52a811c3b643548837b4e630e8293a0b6857ad4 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 13 Oct 2023 14:40:28 -0700 Subject: [PATCH 1/3] [PGO] Add ability to mark cold functions as optsize/minsiz

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,28 @@ +//===- MarkColdFunctions.h - *- C++ -*-===// +// +// 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] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -1127,6 +1134,11 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, if (EnableSyntheticCounts && !PGOOpt) MPM.addPass(SyntheticCountsPropagation()); + if (EnableMarkColdFunctions && PGOOpt && + (PGOOpt->Action == PGOOptions::SampleUse ||

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/69030 >From e52a811c3b643548837b4e630e8293a0b6857ad4 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 13 Oct 2023 14:40:28 -0700 Subject: [PATCH 1/5] [PGO] Add ability to mark cold functions as optsize/minsiz

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,65 @@ +//===--===// +// +// 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: Apac

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -1127,6 +1134,11 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, if (EnableSyntheticCounts && !PGOOpt) MPM.addPass(SyntheticCountsPropagation()); + if (EnableMarkColdFunctions && PGOOpt && + (PGOOpt->Action == PGOOptions::SampleUse ||

[clang] [Driver] Test ignored target-specific options for AMDGPU/NVPTX (PR #79222)

2024-01-23 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,7 @@ +/// Some target-specific options are ignored for GPU, so %clang exits with code 0. +// DEFINE: %{gpu_opts} = --cuda-gpu-arch=sm_60 --cuda-path=%S/Inputs/CUDA/usr/local/cuda --no-cuda-version-check aeubanks wrote: these defines seem overkill and

[llvm] [lld] [clang-tools-extra] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)

2024-01-17 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/73045 >From 0145020ef2a803ec797e42f95bacde05dc32eac1 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 21 Nov 2023 14:01:04 -0800 Subject: [PATCH 1/2] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-01-17 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: sorry, I keep missing notifications, will find a repro https://github.com/llvm/llvm-project/pull/75841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [lld] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)

2024-01-17 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/73045 >From 0145020ef2a803ec797e42f95bacde05dc32eac1 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 21 Nov 2023 14:01:04 -0800 Subject: [PATCH 1/3] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a

[clang-tools-extra] [llvm] [lld] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)

2024-01-17 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/73045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA, NVPTX] accept/ignore any -mcmodel arguments. (PR #70740)

2024-01-18 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: should this have had a test? I'm trying to do the same thing for `-mlarge-data-threshold` and am trying to find an appropriate place to add a test https://github.com/llvm/llvm-project/pull/70740 ___ cfe-commits mailing list cfe-commit

[clang-tools-extra] [llvm] [clang] [CGProfile] Use callee's PGO name when caller->callee is an indirect call. (PR #78610)

2024-01-18 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I'm missing the full context behind this patch, but code seems reasonable https://github.com/llvm/llvm-project/pull/78610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang-tools-extra] [llvm] [clang] [CGProfile] Use callee's PGO name when caller->callee is an indirect call. (PR #78610)

2024-01-18 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/78610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-24 Thread Arthur Eubanks via cfe-commits
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, return ConstantExpr::getIntToPtr(C, ResTy); } - // Otherwise form a regular getelementptr. Recompute the indices so that - // we eliminate over-indexing of the notional static type array bo

[clang] [compiler-rt] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-28 Thread Arthur Eubanks via cfe-commits
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, return ConstantExpr::getIntToPtr(C, ResTy); } - // Otherwise form a regular getelementptr. Recompute the indices so that - // we eliminate over-indexing of the notional static type array bo

[clang] [compiler-rt] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-28 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: btw we're still looking into a performance regression caused by #68882 that still repros with LLVM head, even after the SROA enhancements. this patch looks good, but can we hold off a bit on submitting this? https://github.com/llvm/llvm-project/pull/89872 __

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-11 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/95126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: So actually even the `export_executable_symbols_for_plugins` doesn't fix our bots. I've narrowed it down to `-DLLVM_ENABLE_PIC=ON/OFF`. Perhaps we're not exporting symbols when `-DLLVM_ENABLE_PIC=OFF`. https://github.com/llvm/llvm-project/pull/89811

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I believe this has exposed a preexisting issue in isel with tan: ``` $ cat /tmp/b.ll target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv7-unknown-linux-android26" define <2 x float> @g() { entry: %0 = call <2 x float> @llvm.tan.v2f

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: This was with `-DLLVM_ENABLE_LLD=ON`, so probably not? I'm guessing there's some CMake logic that doesn't fit with clang-repl's expectation of symbol availability, but that may be wrong. https://github.com/llvm/llvm-project/pull/89811 ___

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: this seems to have broken code like [this](https://crsrc.org/c/base/allocator/partition_allocator/src/partition_alloc/random.cc;drc=36293863bf9bbc8131797eb8f4d2bafe8af3de79;l=33) with ``` ../../base/allocator/partition_allocator/src/partition_alloc/random.cc:33:69: error: inval

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: reduced: ``` struct Lock {}; struct A { Lock lock; union { bool b __attribute__((guarded_by(lock))); }; }; ``` seems like a regression, can we revert for now? https://github.com/llvm/llvm-project/pull/94216

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > @aeubanks I'll revert. Is this example C or C++? C++ https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: SLPVectorizer can introduce `llvm.tan.v2f32`. For example, running `opt -O3` on the following introduces `llvm.tan.v2f32` ``` target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv7-unknown-linux-android26" ; Function Attrs: null_pointe

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-13 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: @alexey-bataev https://github.com/llvm/llvm-project/pull/94559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-13 Thread Arthur Eubanks via cfe-commits
@@ -907,6 +945,76 @@ void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call, C.addTransition(State); } +static std::optional getPointeeType(const MemRegion *R) { + if (!R) +return std::nullopt; + if (const auto *ER = dyn_cast(R)) +return ER-

[clang] [llvm] [inline] Clone return range attribute on the callsite into inlined call (PR #92666)

2024-06-17 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: for future reference, https://github.com/llvm/llvm-project/commit/3cd67eeca28ab1084d02b7976de1af4c4c8d37d5 fixes a miscompile that this patch uncovered https://github.com/llvm/llvm-project/pull/92666 ___ cfe-commits mailing list cfe-c

[clang] [clang] Add flag to experiment with cold function attributes (PR #88793)

2024-04-15 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/88793 To be removed and promoted to a proper driver flag if experiments turn out fruitful. Original LLVM patch for this functionality: #69030 >From 52cd9974be908bf693832012e56e945e9e34f389 Mon Sep 17 00:00:00 2001 F

[clang] [clang] Add flag to experiment with cold function attributes (PR #89298)

2024-04-18 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/89298 To be removed and promoted to a proper driver flag if experiments turn out fruitful. For now, this can be experimented with `-mllvm -pgo-cold-func-opt=[optsize|minsize|optnone|default] -mllvm -enable-pgo-forc

[clang] [clang] Add flag to experiment with cold function attributes (PR #89298)

2024-04-19 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/89298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-13 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: adding assumes in general has issues: https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609 do you have proof that this change helps binaries and doesn't regress things? I have a feeling this will regress many things. `-fstrict-vtable-pointers` is still somewhat e

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-13 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > -fstrict-vtable-pointers IS experimental, but if you recall, this particular > optimization was added to -fstrict-vtable-pointers because of the effects it > had on compile-time, not because of correctness issues. can you clarify what you mean by "this particular optimization

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-14 Thread Arthur Eubanks via cfe-commits
@@ -1016,6 +1000,11 @@ void EmitAssemblyHelper::RunOptimizationPipeline( if (!IsThinLTOPostLink) { addSanitizers(TargetTriple, CodeGenOpts, LangOpts, PB); addKCFIPass(TargetTriple, LangOpts, PB); + PB.registerPipelineStartEPCallback( aeuban

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-14 Thread Arthur Eubanks via cfe-commits
@@ -670,9 +670,6 @@ void CodeGenPassBuilder::addIRPasses( !Opt.DisablePartialLibcallInlining) addPass(PartiallyInlineLibCallsPass()); - // Instrument function entry and exit, e.g. with calls to mcount(). - addPass(EntryExitInstrumenterPass(/*PostInlining=*/true));

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-14 Thread Arthur Eubanks via cfe-commits
@@ -135,6 +138,65 @@ static bool runOnFunction(Function &F, bool PostInlining) { return Changed; } +namespace { +struct EntryExitInstrumenter : public FunctionPass { + static char ID; + EntryExitInstrumenter() : FunctionPass(ID) { +initializeEntryExitInstrumenterPass(*

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-14 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: can you add links to https://reviews.llvm.org/D97608, https://github.com/rust-lang/rust/issues/92109, https://github.com/llvm/llvm-project/issues/52853 https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-c

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-15 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-15 Thread Arthur Eubanks via cfe-commits
@@ -101,6 +101,7 @@ void initializeEarlyMachineLICMPass(PassRegistry&); void initializeEarlyTailDuplicatePass(PassRegistry&); void initializeEdgeBundlesPass(PassRegistry&); void initializeEHContGuardCatchretPass(PassRegistry &); +void initializeEntryExitInstrumenterPass(PassReg

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-15 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: looks pretty good to me for testing the pre-inliner one, we should add some tests in `llvm/test/Transforms/EntryExitInstrumenter/` that invoke things like `opt -passes='default'`, `opt -passes='thinlto-pre-link'`, `opt -passes='thinlto'` to make sure tha

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-15 Thread Arthur Eubanks via cfe-commits
@@ -1028,6 +1029,14 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if (Phase != ThinOr

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-15 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,86 @@ +//===-- llvm/GEPNoWrapFlags.h - NoWrap flags for GEPs ---*- C++ -*-===// +// +// 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] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-15 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-15 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. thanks, I think abstracting out GEPNoWrapFlags is good https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-15 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,86 @@ +//===-- llvm/GEPNoWrapFlags.h - NoWrap flags for GEPs ---*- C++ -*-===// +// +// 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] [compiler-rt] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-05-16 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. we've resolved the performance regression from the previous patch internally, thanks for waiting! https://github.com/llvm/llvm-project/pull/89872 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [lld] [llvm] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-17 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: it seems like this should just be in the default codegen pipeline? you'd need to change the pass to bail out early if there are no relevant intrinsics (by checking if the module contains the intrinsic declaration) to not affect compile times https://github.com/llvm/llvm-projec

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-21 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,31 @@ +; RUN: opt -passes="default" -S < %s | FileCheck %s +; RUN: opt -passes="thinlto-pre-link" -S < %s | FileCheck %s +; RUN: opt -passes="thinlto-pre-link,thinlto" -S < %s | FileCheck %s aeubanks wrote: no need to run `thinlto` here, but we should

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-21 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,31 @@ +; RUN: opt -passes="default" -S < %s | FileCheck %s aeubanks wrote: should also test `O0` versions of these, plus `lto-pre-link` https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-21 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,31 @@ +; RUN: opt -passes="default" -S < %s | FileCheck %s +; RUN: opt -passes="thinlto-pre-link" -S < %s | FileCheck %s +; RUN: opt -passes="thinlto-pre-link,thinlto" -S < %s | FileCheck %s + +target triple = "x86_64-unknown-linux" + +define void @leaf_function() #0 {

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-21 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,29 @@ +; RUN: llc -mtriple=x86_64-- -O0 < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-- -O1 < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-- -O2 < %s | FileCheck %s + +; The codegen should insert post-inlining instrumentation calls and should not +; insert pre-inlini

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-21 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. awesome, thanks! https://github.com/llvm/llvm-project/pull/92953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,44 @@ +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="thinlto-pre-link,thinlto" -S < %s | FileCheck -check-prefix=PRELTO %s aeubank

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,44 @@ +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s aeubanks wrote: `PRELTO` isn't quite accurate since we also instrument in the default pipelines, I'd use `INSTRUMENT`/`NOINSTRUMENT` or even just `YES`/`NO` :) https://gi

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -1,41 +0,0 @@ -// REQUIRES: arm-registered-target,aarch64-registered-target - -// RUN: %clang -target armv7-unknown-none-eabi -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,UNSUPPORTED -// RUN: %clang -target armv7-unknown-none-eabi -pg -meabi gnu -S -emit-llvm

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,44 @@ +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="thinlto-pre-link,thinlto" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="thi

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,29 @@ +; RUN: llc -mtriple=x86_64-- -O0 < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-- -O1 < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-- -O2 < %s | FileCheck %s + +; The codegen should insert post-inlining instrumentation calls and should not +; insert pre-inlini

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
@@ -1,37 +1,27 @@ // REQUIRES: x86-registered-target -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -finstrument-functions -O0 -o - -emit-llvm %s | FileCheck %s -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -finstrument-functions -O2 -o - -emit-llvm %s | FileCheck %s -

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: forgot to hit "submit review"... https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
@@ -1,37 +1,27 @@ // REQUIRES: x86-registered-target -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -finstrument-functions -O0 -o - -emit-llvm %s | FileCheck %s -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -finstrument-functions -O2 -o - -emit-llvm %s | FileCheck %s -

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
@@ -1,37 +1,27 @@ // REQUIRES: x86-registered-target -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -finstrument-functions -O0 -o - -emit-llvm %s | FileCheck %s -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -finstrument-functions -O2 -o - -emit-llvm %s | FileCheck %s -

[clang] [llvm] Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
@@ -1,25 +1,13 @@ // RUN: %clang_cc1 -pg -triple powerpc-ibm-aix7.2.0.0 -emit-llvm %s -o - | FileCheck %s aeubanks wrote: also -disable-llvm-passes here https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits

[clang] [llvm] Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: looks pretty good, can you update the commit title to something like `[EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines` I've added test coverage for mcount-aix in 3ec57a7ed60a19c5e3e18655e19c997a469d10ec, can you merge that in?

[clang] [llvm] Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
@@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=standalone -emit-llvm -o - %s -finstrument-functions | FileCheck %s aeubanks wrote: this should also not be testing the pass and should have -disable-llvm-passes https://github.c

[clang] [llvm] Move instrumentation passes (PR #92171)

2024-05-24 Thread Arthur Eubanks via cfe-commits
@@ -1030,6 +1036,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if (!isLTOPostLink(

[clang] [lld] [llvm] Run ObjCContractPass in Default Codegen Pipeline (PR #92331)

2024-05-28 Thread Arthur Eubanks via cfe-commits
@@ -31,6 +31,10 @@ ; CHECK-NEXT: AArch64 Stack Tagging ; CHECK-NEXT: SME ABI Pass ; CHECK-NEXT: Exception handling preparation +; CHECK-NEXT: Dominator Tree Construction +; CHECK-NEXT: Basic Alias Analysis (stateless AA impl) +; CHECK-NEXT: F

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-28 Thread Arthur Eubanks via cfe-commits
@@ -1030,6 +1036,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if (!isLTOPostLink(

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-28 Thread Arthur Eubanks via cfe-commits
@@ -1030,6 +1036,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if (!isLTOPostLink(

[clang] [compiler-rt] [llvm] [mlir] [ConstantFold] Remove notional over-indexing fold (PR #93697)

2024-05-29 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/93697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-30 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-30 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: looks like `CodeGen/AMDGPU/llc-pipeline.ll` is failing https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ConstantFold] Remove non-trivial gep-of-gep fold (PR #93823)

2024-05-30 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. this PR looks good, and further dropping the fold is also good https://github.com/llvm/llvm-project/pull/93823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-09 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: Chromium is also seeing similar breakages. @sdkrystian is this breaking valid code? I can't tell from your latest comment. (if it is breaking valid code we should revert) https://github.com/llvm/llvm-project/pull/91498 ___ cfe-commits

[clang] Revert "[Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (#91498)" (PR #91620)

2024-05-09 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: should be fine to revert as much as you want in a single PR, just make sure to mention what you're reverting in the description https://github.com/llvm/llvm-project/pull/91620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-31 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-31 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: thanks for doing this! https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (PR #92171)

2024-05-31 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/92171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 465d908 - [test][clang] Opaquify pragma-init_seg.cpp

2022-08-15 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-08-15T10:45:24-07:00 New Revision: 465d9084ece1626335bc41eac96c56428faed7e9 URL: https://github.com/llvm/llvm-project/commit/465d9084ece1626335bc41eac96c56428faed7e9 DIFF: https://github.com/llvm/llvm-project/commit/465d9084ece1626335bc41eac96c56428faed7e9.diff

[clang] 9181ce6 - [Windows] Put init_seg(compiler/lib) in llvm.global_ctors

2022-08-16 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-08-16T08:16:18-07:00 New Revision: 9181ce623fd8189252659da7c48de1982597b79c URL: https://github.com/llvm/llvm-project/commit/9181ce623fd8189252659da7c48de1982597b79c DIFF: https://github.com/llvm/llvm-project/commit/9181ce623fd8189252659da7c48de1982597b79c.diff

[clang] 9599393 - Revert "[Pipelines] Introduce DAE after ArgumentPromotion"

2022-09-01 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-09-01T08:52:19-07:00 New Revision: 9599393eebf7b5ef46a144938f593e812dd01a18 URL: https://github.com/llvm/llvm-project/commit/9599393eebf7b5ef46a144938f593e812dd01a18 DIFF: https://github.com/llvm/llvm-project/commit/9599393eebf7b5ef46a144938f593e812dd01a18.diff

[clang] c911bef - [InstCombine] Treat passing undef to noundef params as UB

2022-09-01 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-09-01T15:16:45-07:00 New Revision: c911befaec494c52a63e3b957e28d449262656fb URL: https://github.com/llvm/llvm-project/commit/c911befaec494c52a63e3b957e28d449262656fb DIFF: https://github.com/llvm/llvm-project/commit/c911befaec494c52a63e3b957e28d449262656fb.diff

[clang] ef37504 - [Instrumentation] Remove legacy passes

2022-10-25 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-10-25T13:11:07-07:00 New Revision: ef37504879eecab1af98c70888bee0be403b9c60 URL: https://github.com/llvm/llvm-project/commit/ef37504879eecab1af98c70888bee0be403b9c60 DIFF: https://github.com/llvm/llvm-project/commit/ef37504879eecab1af98c70888bee0be403b9c60.diff

[clang] 69b2b72 - [clang] Remove no-op -fexperimental-new-pass-manager/-fno-legacy-pass-manager flags

2022-10-28 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-10-28T10:24:00-07:00 New Revision: 69b2b7282e92a1b576b7bd26f3b16716a5027e8e URL: https://github.com/llvm/llvm-project/commit/69b2b7282e92a1b576b7bd26f3b16716a5027e8e DIFF: https://github.com/llvm/llvm-project/commit/69b2b7282e92a1b576b7bd26f3b16716a5027e8e.diff

[clang] 29a500b - [CodeView][clang] Add flag to disable emitting command line into CodeView

2022-11-01 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-11-01T13:04:37-07:00 New Revision: 29a500b346bdd998cac237f8570c6957730e086a URL: https://github.com/llvm/llvm-project/commit/29a500b346bdd998cac237f8570c6957730e086a DIFF: https://github.com/llvm/llvm-project/commit/29a500b346bdd998cac237f8570c6957730e086a.diff

[clang] cd8c6ab - [NFC] clang-format part of TypePrinter.cpp

2022-11-07 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-11-07T13:20:36-08:00 New Revision: cd8c6ab084c05b50c41163cd9f415a4c70aea8e9 URL: https://github.com/llvm/llvm-project/commit/cd8c6ab084c05b50c41163cd9f415a4c70aea8e9 DIFF: https://github.com/llvm/llvm-project/commit/cd8c6ab084c05b50c41163cd9f415a4c70aea8e9.diff

[clang] e564f51 - [clang][test] Avoid UB in overload.cl

2022-11-13 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-11-13T14:02:24-08:00 New Revision: e564f5153f91ef40a406c7f907877ceafb6da39d URL: https://github.com/llvm/llvm-project/commit/e564f5153f91ef40a406c7f907877ceafb6da39d DIFF: https://github.com/llvm/llvm-project/commit/e564f5153f91ef40a406c7f907877ceafb6da39d.diff

[clang] cbcf123 - [LegacyPM] Remove cl::opts controlling optimization pass manager passes

2022-11-14 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-11-14T09:38:17-08:00 New Revision: cbcf123af293ee56876cce16dac83c3008478dae URL: https://github.com/llvm/llvm-project/commit/cbcf123af293ee56876cce16dac83c3008478dae DIFF: https://github.com/llvm/llvm-project/commit/cbcf123af293ee56876cce16dac83c3008478dae.diff

[clang] 70dc3b8 - [AggressiveInstCombine] Remove legacy PM pass

2022-11-15 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-11-15T14:35:15-08:00 New Revision: 70dc3b811e4926fa2c88bd3b53b29c46fcba1a90 URL: https://github.com/llvm/llvm-project/commit/70dc3b811e4926fa2c88bd3b53b29c46fcba1a90 DIFF: https://github.com/llvm/llvm-project/commit/70dc3b811e4926fa2c88bd3b53b29c46fcba1a90.diff

[clang] 44ad670 - [clang][msan] Turn on -fsanitize-memory-param-retval by default

2022-09-28 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-09-28T09:36:39-07:00 New Revision: 44ad67031cc1a10483337f8b1f728e2be237685e URL: https://github.com/llvm/llvm-project/commit/44ad67031cc1a10483337f8b1f728e2be237685e DIFF: https://github.com/llvm/llvm-project/commit/44ad67031cc1a10483337f8b1f728e2be237685e.diff

[clang] 2f3d7c2 - [clang] Add debug info in MicrosoftCXXABI::EmitVirtualMemPtrThunk()

2022-09-28 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-09-28T22:06:04-07:00 New Revision: 2f3d7c2cc770c902b3a2fabc2ea92b98bf8f3e0a URL: https://github.com/llvm/llvm-project/commit/2f3d7c2cc770c902b3a2fabc2ea92b98bf8f3e0a DIFF: https://github.com/llvm/llvm-project/commit/2f3d7c2cc770c902b3a2fabc2ea92b98bf8f3e0a.diff

<    1   2   3   4   5   >