[all-commits] [llvm/llvm-project] 8e7027: [NFC][DebugInfo] Use iterator moveBefore at many c...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Fri Jan 24 02:53:33 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e702735090388a3231a863e343f880d0f96fecb
      https://github.com/llvm/llvm-project/commit/8e702735090388a3231a863e343f880d0f96fecb
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2025-01-24 (Fri, 24 Jan 2025)

  Changed paths:
    M clang/lib/CodeGen/CGCoroutine.cpp
    M clang/lib/CodeGen/CGException.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M llvm/include/llvm/IR/BasicBlock.h
    M llvm/include/llvm/IR/DebugProgramInstruction.h
    M llvm/include/llvm/IR/Instruction.h
    M llvm/lib/Analysis/LoopInfo.cpp
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/CodeGen/SelectOptimize.cpp
    M llvm/lib/CodeGen/SjLjEHPrepare.cpp
    M llvm/lib/CodeGen/StackColoring.cpp
    M llvm/lib/CodeGen/TypePromotion.cpp
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/lib/FuzzMutate/IRMutator.cpp
    M llvm/lib/IR/DIBuilder.cpp
    M llvm/lib/IR/DebugProgramInstruction.cpp
    M llvm/lib/IR/Instruction.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
    M llvm/lib/Target/ARM/ARMParallelDSP.cpp
    M llvm/lib/Target/BPF/BPFASpaceCastSimplifyPass.cpp
    M llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
    M llvm/lib/Target/BPF/BPFAdjustOpt.cpp
    M llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp
    M llvm/lib/Target/BPF/BPFPreserveStaticOffset.cpp
    M llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
    M llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp
    M llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
    M llvm/lib/Target/X86/X86LowerAMXType.cpp
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    M llvm/lib/Transforms/Coroutines/SpillUtils.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    M llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp
    M llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/lib/Transforms/Scalar/DivRemPairs.cpp
    M llvm/lib/Transforms/Scalar/GVN.cpp
    M llvm/lib/Transforms/Scalar/GVNHoist.cpp
    M llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
    M llvm/lib/Transforms/Scalar/LICM.cpp
    M llvm/lib/Transforms/Scalar/LoopFuse.cpp
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    M llvm/lib/Transforms/Scalar/LoopSink.cpp
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
    M llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
    M llvm/lib/Transforms/Scalar/NewGVN.cpp
    M llvm/lib/Transforms/Scalar/Reassociate.cpp
    M llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
    M llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
    M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
    M llvm/lib/Transforms/Scalar/Sink.cpp
    M llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
    M llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
    M llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
    M llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
    M llvm/lib/Transforms/Utils/CallPromotionUtils.cpp
    M llvm/lib/Transforms/Utils/CloneFunction.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
    M llvm/lib/Transforms/Utils/GuardUtils.cpp
    M llvm/lib/Transforms/Utils/Instrumentation.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
    M llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
    M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.cpp
    M llvm/tools/llvm-stress/llvm-stress.cpp
    M llvm/unittests/Analysis/AssumeBundleQueriesTest.cpp
    M llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
    M llvm/unittests/Analysis/MemorySSATest.cpp
    M llvm/unittests/IR/BasicBlockDbgInfoTest.cpp
    M llvm/unittests/IR/BasicBlockTest.cpp
    M llvm/unittests/IR/LegacyPassManagerTest.cpp
    M llvm/unittests/IR/VerifierTest.cpp
    M polly/lib/CodeGen/BlockGenerators.cpp
    M polly/lib/Support/ScopHelper.cpp

  Log Message:
  -----------
  [NFC][DebugInfo] Use iterator moveBefore at many call-sites (#123583)

As part of the "RemoveDIs" project, BasicBlock::iterator now carries a
debug-info bit that's needed when getFirstNonPHI and similar feed into
instruction insertion positions. Call-sites where that's necessary were
updated a year ago; but to ensure some type safety however, we'd like to
have all calls to moveBefore use iterators.

This patch adds a (guaranteed dereferenceable) iterator-taking
moveBefore, and changes a bunch of call-sites where it's obviously safe
to change to use it by just calling getIterator() on an instruction
pointer. A follow-up patch will contain less-obviously-safe changes.

We'll eventually deprecate and remove the instruction-pointer
insertBefore, but not before adding concise documentation of what
considerations are needed (very few).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list