llvm-project/llvm/lib/Transforms/Utils
Chandler Carruth 0ee8bb11c3 [PM] Move the collection of call sites to a more appropriate place
inside of `InlineFunction`. Prior to this, call instructions are
specifically being rewritten and replaced within the inlined region,
invalidating some of the call sites.

Several of these regions are using the same technique to walk the
inlined region so this seems clearly safe up to this point.

I've also added a short circuit to the scan for call sites based on what
other code is doing.

With this, the most common crash I've found in the new inliner code is
fixed. I've turned it on for another test case that covers this
scenario.

I'll make my way through most of the other inliner test cases
just to get some easy coverage next.

llvm-svn: 290562
2016-12-27 01:24:50 +00:00
..
ASanStackFrameLayout.cpp [asan] Replace std::to_string with llvm::to_string 2016-10-19 00:16:56 +00:00
AddDiscriminators.cpp Use the last 7 bits to represent the discriminator to fit it in 1 byte ULEB128 (NFC). 2016-11-08 16:32:32 +00:00
BasicBlockUtils.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
BreakCriticalEdges.cpp [PM] Port BreakCriticalEdges to the new PM. 2016-07-22 18:04:25 +00:00
BuildLibCalls.cpp Recommitting r275284: add support to inline __builtin_mempcpy 2016-07-29 18:23:18 +00:00
BypassSlowDivision.cpp [BypassSlowDivision] Handle division by constant numerators better. 2016-11-16 00:44:47 +00:00
CMakeLists.txt [LoopUnroll] Implement profile-based loop peeling 2016-11-30 21:13:57 +00:00
CloneFunction.cpp [CloneFunction] Don't remove unrelated nodes from the CGSSC 2016-08-19 16:37:40 +00:00
CloneModule.cpp Cloning: Also clone global variable attached metadata. 2016-10-26 02:57:33 +00:00
CmpInstAnalysis.cpp move decomposeBitTestICmp() to Transforms/Utils; NFC 2016-07-20 17:18:45 +00:00
CodeExtractor.cpp CodeExtractor : Add ability to preserve profile data. 2016-08-02 02:15:45 +00:00
CtorUtils.cpp [CtorUtils] Modernize. No functional changes intended. 2016-10-22 01:21:24 +00:00
DemoteRegToStack.cpp
EscapeEnumerator.cpp [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part 2016-11-14 21:41:13 +00:00
Evaluator.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
FlattenCFG.cpp [FlattenCFG] Simplify + remove unused variable. NFCI. 2016-08-05 20:53:35 +00:00
FunctionComparator.cpp IR: Move NumElements field from {Array,Vector}Type to SequentialType. 2016-12-02 03:20:58 +00:00
FunctionImportUtils.cpp [ThinLTO] Stop importing constant global vars as copies in the backend 2016-12-02 01:02:30 +00:00
GlobalStatus.cpp Merge two if conditions into one. NFCI. 2016-10-24 19:41:47 +00:00
ImportedFunctionsInliningStatistics.cpp Imported statistics types changes 2016-08-02 22:18:47 +00:00
InlineFunction.cpp [PM] Move the collection of call sites to a more appropriate place 2016-12-27 01:24:50 +00:00
InstructionNamer.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
IntegerDivision.cpp TransformUtils: Avoid getNodePtrUnchecked() in integer division, NFC 2016-02-21 20:14:29 +00:00
LCSSA.cpp [LCSSA] Perform LCSSA verification only for the current loop nest. 2016-10-28 12:57:20 +00:00
LLVMBuild.txt
LibCallsShrinkWrap.cpp Give some helper classes/functions internal linkage. NFC. 2016-11-19 20:44:26 +00:00
Local.cpp Refactor the DIExpression fragment query interface (NFC) 2016-12-22 05:27:12 +00:00
LoopSimplify.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
LoopUnroll.cpp [LoopUnroll] Modify a comment to clarify the usage of TripCount. NFC. 2016-12-20 20:23:48 +00:00
LoopUnrollPeel.cpp [LoopUnroll] Implement profile-based loop peeling 2016-11-30 21:13:57 +00:00
LoopUnrollRuntime.cpp Revert "[LoopUnroll] Properly update loop-info when cloning prologues and epilogues." 2016-09-08 03:51:30 +00:00
LoopUtils.cpp Remove stale comment. NFC. 2016-12-03 01:59:13 +00:00
LoopVersioning.cpp [LoopVersioning] Require loop-simplify form for loop versioning. 2016-12-19 17:13:37 +00:00
LowerInvoke.cpp [PM] Port LowerInvoke to the new pass manager 2016-08-12 17:28:27 +00:00
LowerSwitch.cpp Use the range variant of remove_if instead of unpacking begin/end 2016-08-12 04:32:37 +00:00
Mem2Reg.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
MemorySSA.cpp [MemorySSA] Define a restricted upward AccessList splice. 2016-12-25 23:34:07 +00:00
MetaRenamer.cpp
ModuleUtils.cpp [PM] Teach the always inliner in the new pass manager to support 2016-12-26 23:43:27 +00:00
NameAnonGlobals.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
PromoteMemoryToRegister.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
SSAUpdater.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
SanitizerStats.cpp Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; other minor fixes. 2016-01-26 18:48:36 +00:00
SimplifyCFG.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
SimplifyIndVar.cpp [IndVars] Remove -liv-reduce 2016-06-05 18:01:12 +00:00
SimplifyInstructions.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
SimplifyLibCalls.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
SplitModule.cpp Move instances of std::function. 2016-06-12 16:13:55 +00:00
StripGCRelocates.cpp [StripGCRelocates] New pass to remove gc.relocates added by RS4GC 2016-10-21 18:43:16 +00:00
StripNonLineTableDebugInfo.cpp Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
SymbolRewriter.cpp [PM] Port SymbolRewriter to the new PM 2016-07-25 20:52:00 +00:00
UnifyFunctionExitNodes.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
Utils.cpp Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
ValueMapper.cpp Do a sweep over move ctors and remove those that are identical to the default. 2016-10-20 12:20:28 +00:00