llvm-project/llvm/unittests/Analysis
Arthur Eubanks a8f1da128d [LazyCallGraph] Handle spurious ref edges when deleting a dead function
Spurious ref edges are ref edges that still exist in the call graph even
though the corresponding IR reference no longer exists. This can cause
issues when deleting a dead function which has a spurious ref edge
pointed at it because currently we expect the dead function's RefSCC to
be trivial.

In the case that the dead function's RefSCC is not trivial, remove all
ref edges from other nodes in the RefSCC to it.

Removing a ref edge can result in splitting RefSCCs. There's actually no
reason to revisit those RefSCCs because currently we only run passes on
SCCs, and we've already added all SCCs in the RefSCC to the worklist.
(as opposed to removing the ref edge in
updateCGAndAnalysisManagerForPass() which can modify the call graph of
SCCs we have not visited yet). We also don't expect that RefSCC
refinement will allow us to glean any more information for optimization
use. Also, doing so would drastically increase the complexity of
LazyCallGraph::removeDeadFunction(), requiring us to return a list of
invalidated RefSCCs and new RefSCCs to add to the worklist.

Fixes #56503

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D133907
2022-09-22 15:01:15 -07:00
..
Inputs/ir2native_x86_64_model [mlgo] Use TFLite for 'development' mode. 2022-08-24 16:07:24 -07:00
AliasAnalysisTest.cpp Revert "Don't treat readnone call in presplit coroutine as not access memory" 2022-07-20 17:00:58 +08:00
AliasSetTrackerTest.cpp [AST] Fix unit test to use BatchAA (NFC) 2022-09-09 16:07:04 +02:00
AssumeBundleQueriesTest.cpp [llvm] Remove uses of `std::vector<bool>` 2022-01-18 18:20:45 +01:00
BasicAliasAnalysisTest.cpp [llvm] Don't use Optional::{hasValue,getValue} (NFC) 2022-06-25 11:24:23 -07:00
BlockFrequencyInfoTest.cpp [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
BranchProbabilityInfoTest.cpp
CFGTest.cpp [test] Fix old memory leak in a test 2022-07-15 16:56:20 -07:00
CGSCCPassManagerTest.cpp [NFC] Add #include for constants 2022-02-23 01:26:53 -08:00
CMakeLists.txt [nfc][mlgo] Separate logger and training-mode model evaluator 2022-08-03 16:20:28 -07:00
CallGraphTest.cpp
CaptureTrackingTest.cpp
ConstraintSystemTest.cpp
DDGTest.cpp
DivergenceAnalysisTest.cpp
DomTreeUpdaterTest.cpp
FunctionPropertiesAnalysisTest.cpp [FunctionPropertiesAnalysis] Generalize support for unreachable 2022-06-21 08:18:01 -07:00
GlobalsModRefTest.cpp [AA] Tracking per-location ModRef info in FunctionModRefBehavior (NFCI) 2022-09-14 16:34:41 +02:00
IRSimilarityIdentifierTest.cpp [llvm] Use has_value instead of hasValue (NFC) 2022-07-12 22:25:42 -07:00
IVDescriptorsTest.cpp Fix incorrect TypeSize->uint64_t cast in InductionDescriptor::isInductionPHI 2022-02-10 09:39:12 +00:00
InlineCostTest.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
LazyCallGraphTest.cpp [LazyCallGraph] Handle spurious ref edges when deleting a dead function 2022-09-22 15:01:15 -07:00
LoadsTest.cpp [NFC] Add #include for constants 2022-02-23 01:26:53 -08:00
LoopInfoTest.cpp [NFC] Introduce API to detect tokens penetrating LCSSA form 2022-07-19 13:52:30 +07:00
LoopNestTest.cpp [LoopNest] Add new utilites 2022-01-13 17:19:19 -05:00
MLModelRunnerTest.cpp Fix implicit double -> float truncation warnings. NFCI. 2022-05-13 19:07:00 +01:00
MemoryBuiltinsTest.cpp [MemoryBuiltins] Demote isMallocLikeFn to implementation routine since last use has been removed 2022-01-18 15:24:52 -08:00
MemoryProfileInfoTest.cpp [MemProf] Add memprof metadata related analysis utilities 2022-07-21 13:46:01 -07:00
MemorySSATest.cpp [NFC] Add tests for MemorySSA shouldn't contain debug instructions 2022-08-19 15:03:29 +08:00
PhiValuesTest.cpp [NFC] Add #include for constants 2022-02-23 01:26:53 -08:00
ProfileSummaryInfoTest.cpp
ScalarEvolutionTest.cpp [SCEV] Make SCEVUnionPredicate externally immutable [NFC] 2022-02-09 13:47:28 -08:00
SparsePropagation.cpp
TBAATest.cpp
TFUtilsTest.cpp [llvm] Use has_value instead of hasValue (NFC) 2022-09-18 19:45:34 -07:00
TargetLibraryInfoTest.cpp [InstCombine] Tighten up known library function signature tests (PR #56463) 2022-08-10 14:15:46 -06:00
TensorSpecTest.cpp [llvm] Don't use Optional::{hasValue,getValue} (NFC) 2022-06-25 11:24:23 -07:00
TrainingLoggerTest.cpp [nfc][mlgo] Separate logger and training-mode model evaluator 2022-08-03 16:20:28 -07:00
UnrollAnalyzerTest.cpp
ValueLatticeTest.cpp [llvm] Don't use Optional::{hasValue,getValue} (NFC) 2022-06-25 11:24:23 -07:00
ValueTrackingTest.cpp [ValueTracking][InstCombine] restrict FP min/max matching to avoid miscompile 2022-08-25 16:52:40 -04:00
VectorFunctionABITest.cpp [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
VectorUtilsTest.cpp