llvm-project/llvm/lib/Transforms/Utils
Anna Thomas 72750f0012 [TrivialDeadness] Introduce API separating two different usages
The earlier usage of wouldInstructionBeTriviallyDead is based on the
assumption that the use_count of that instruction being checked will be
zero. This patch separates the API into two different ones:

1. The strictly conservative one where the instruction is trivially dead iff the uses are dead.
2. The slightly relaxed form, where an instruction is dead along paths where it is not used.

The second form can be used in identifying instructions that are valid
to sink down to uses (D109917).

Reviewed-By: reames
Differential Revision: https://reviews.llvm.org/D114647
2021-12-03 10:09:52 -05:00
..
AMDGPUEmitPrintf.cpp [AMDGPU] Correction to 095c48fdf3. 2021-10-05 21:47:25 -04:00
ASanStackFrameLayout.cpp More size_t -> uint64_t fixes after 05392466 2021-10-06 15:13:47 -07:00
AddDiscriminators.cpp [SampleFDO] Place the discriminator flag variable into the used list. 2021-06-15 21:51:04 -07:00
AssumeBundleBuilder.cpp Make various assume bundle data structures use uint64_t 2021-10-13 10:38:41 -07:00
BasicBlockUtils.cpp Use a deterministic order when updating the DominatorTree 2021-11-29 13:14:50 +01:00
BreakCriticalEdges.cpp [SplitEdge] Update SplitCriticalEdge to return a nullptr only when the edge is not critical 2021-04-06 21:24:40 +00:00
BuildLibCalls.cpp [BuildLibCalls] Add support for memset_pattern{4,8}. 2021-12-02 11:04:25 +00:00
BypassSlowDivision.cpp
CMakeLists.txt profi - a flow-based profile inference algorithm: Part I (out of 3) 2021-12-01 15:30:38 -08:00
CallGraphUpdater.cpp
CallPromotionUtils.cpp [CallPromotion] Check for inalloca/byval mismatch 2021-08-13 16:52:04 -07:00
CanonicalizeAliases.cpp
CanonicalizeFreezeInLoops.cpp [CanonicalizeFreeze] Drop IVUsers.h include (NFC) 2021-10-09 17:01:26 +02:00
CloneFunction.cpp [CSSPGO] Unblock optimizations with pseudo probe instrumentation part 3. 2021-10-12 09:44:12 -07:00
CloneModule.cpp [Cloning] Clone metadata on function declarations 2021-12-01 15:40:05 -08:00
CodeExtractor.cpp [Transforms] Use make_early_inc_range (NFC) 2021-11-07 17:03:15 -08:00
CodeMoverUtils.cpp [Transforms] Use make_early_inc_range (NFC) 2021-11-02 18:13:23 -07:00
CtorUtils.cpp
Debugify.cpp NFC: [Debugify] Fix a typo when checking variables in the original mode 2021-09-29 04:35:10 -07:00
DemoteRegToStack.cpp
EntryExitInstrumenter.cpp [NPM] Added -print-pipeline-passes print params for a few passes. 2021-09-15 08:34:04 +02:00
EscapeEnumerator.cpp
Evaluator.cpp [llvm] Use range-based for loops (NFC) 2021-11-19 21:12:13 -08:00
FixIrreducible.cpp [Transforms] Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC) 2021-10-31 07:57:32 -07:00
FlattenCFG.cpp [Transforms] Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC) 2021-10-31 07:57:32 -07:00
FunctionComparator.cpp [NFC][AttributeList] Replace index_begin/end with an iterator 2021-10-01 10:17:41 -07:00
FunctionImportUtils.cpp [ThinLTO] Respect ClearDSOLocalOnDeclarations for unimported functions 2021-07-02 17:08:25 -07:00
GlobalStatus.cpp Reapply "[GlobalOpt][FIX] Do not embed initializers into AS!=0 globals"" 2021-09-10 15:22:56 -05:00
GuardUtils.cpp [llvm][NFC] Inclusive language: Reword replace uses of sanity in llvm/lib/Transform comments and asserts 2021-11-23 13:22:55 -05:00
HelloWorld.cpp
InjectTLIMappings.cpp [Transforms] Migrate from getNumArgOperands to arg_size (NFC) 2021-10-01 09:57:40 -07:00
InlineFunction.cpp [llvm][NFC] Inclusive language: Reword replace uses of sanity in llvm/lib/Transform comments and asserts 2021-11-23 13:22:55 -05:00
InstructionNamer.cpp
IntegerDivision.cpp
LCSSA.cpp Fix typo s/beloinging/belonging 2021-08-31 12:01:50 +05:30
LibCallsShrinkWrap.cpp [IR, Transforms] Use arg_empty (NFC) 2021-09-09 08:50:10 -07:00
Local.cpp [TrivialDeadness] Introduce API separating two different usages 2021-12-03 10:09:52 -05:00
LoopPeel.cpp [NFC] Get rid of hardcoded magical constant and use Optionals instead 2021-11-09 18:13:19 +07:00
LoopRotationUtils.cpp [Transforms] Use make_early_inc_range (NFC) 2021-11-07 17:03:15 -08:00
LoopSimplify.cpp [llvm] Use range-based for loops (NFC) 2021-11-19 21:12:13 -08:00
LoopUnroll.cpp [unroll] Keep unrolled iterations with initial iteration 2021-11-12 11:40:50 -08:00
LoopUnrollAndJam.cpp [LoopUnroll] Push runtime unrolling decision up into tryToUnrollLoop() 2021-06-19 09:25:57 +02:00
LoopUnrollRuntime.cpp [LoopUnrollRuntime] Remove unnecessary pointer BECount check (NFC) 2021-12-01 10:32:37 +01:00
LoopUtils.cpp [LoopVectorize] Add vector reduction support for fmuladd intrinsic 2021-11-24 08:50:04 +00:00
LoopVersioning.cpp [LoopUtils] Simplify addRuntimeCheck to return a single value. 2021-10-18 18:03:09 +01:00
LowerInvoke.cpp
LowerMemIntrinsics.cpp [LowerMemIntrinsics] Typo fix. 2021-08-08 22:38:58 -04:00
LowerSwitch.cpp [Transforms] Use make_early_inc_range (NFC) 2021-09-15 19:55:24 -07:00
MatrixUtils.cpp
Mem2Reg.cpp
MemoryOpRemark.cpp [NFC][OpaquePtr] Use GlobalValue::getValueType() more 2021-07-09 09:55:41 -07:00
MetaRenamer.cpp [llvm] Use range-based for loops (NFC) 2021-11-19 21:12:13 -08:00
ModuleUtils.cpp [IR, Transforms] Use arg_empty (NFC) 2021-09-09 08:50:10 -07:00
NameAnonGlobals.cpp
PredicateInfo.cpp [PredicateInfo] Use Intrinsic::getDeclaration now that it handles unnamed types. 2021-07-28 19:30:29 +02:00
PromoteMemoryToRegister.cpp [SROA] Support opaque pointers 2021-09-08 22:25:44 +02:00
RelLookupTableConverter.cpp [Utils] Use make_early_inc_range (NFC) 2021-09-13 08:57:23 -07:00
SCCPSolver.cpp [llvm] Use range-based for loops with CallBase::args (NFC) 2021-11-14 09:32:36 -08:00
SSAUpdater.cpp Reland "[LICM] Hoist LOAD without sinking the STORE" 2021-12-02 03:53:50 -08:00
SSAUpdaterBulk.cpp [Transforms] Remove HasValueForBlock (NFC) 2021-07-30 08:56:49 -07:00
SampleProfileInference.cpp profi - a flow-based profile inference algorithm: Part III (out of 3) 2021-12-02 12:01:30 -08:00
SampleProfileLoaderBaseUtil.cpp profi - a flow-based profile inference algorithm: Part I (out of 3) 2021-12-01 15:30:38 -08:00
SanitizerStats.cpp
ScalarEvolutionExpander.cpp [SCEVExpander] Drop poison generating flags when reusing instructions 2021-11-29 15:23:34 -08:00
SimplifyCFG.cpp Use a deterministic order when updating the DominatorTree 2021-11-29 13:14:50 +01:00
SimplifyIndVar.cpp Put implementation details into anonymous namespaces. NFCI. 2021-11-07 15:18:30 +01:00
SimplifyLibCalls.cpp [Target, Transforms] Use StringRef::contains (NFC) 2021-10-22 08:52:33 -07:00
SizeOpts.cpp Internalize some cl::opt global variables or move them under namespace llvm 2021-05-07 11:15:43 -07:00
SplitModule.cpp [IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol 2021-10-20 10:29:47 -07:00
StripGCRelocates.cpp
StripNonLineTableDebugInfo.cpp
SymbolRewriter.cpp [llvm] Replace report_fatal_error(std::string) uses with report_fatal_error(Twine) 2021-10-06 12:04:30 +01:00
UnifyFunctionExitNodes.cpp
UnifyLoopExits.cpp
Utils.cpp Revert "[Passes] Add relative lookup table converter pass" 2021-03-30 14:13:37 +02:00
VNCoercion.cpp [GVN][NFC] Remove redundant check 2021-11-19 20:24:36 -05:00
ValueMapper.cpp [IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol 2021-10-20 10:29:47 -07:00