llvm-project/llvm/unittests/Transforms/Utils
Vedant Kumar 8359511c62 [CodeExtractor] Remove stale llvm.assume calls from extracted region
During extraction, stale llvm.assume handles may be retained in the
original function. The setup is:

1) CodeExtractor unregisters assumptions in the blocks that are to be
   extracted.

2) Extraction happens. There are now two functions: f1 and f1.extracted.

3) Leftover assumptions in f1 (/not/ removed as they were not in the set of
   blocks to be extracted) now have affected-value llvm.assume handles in
   f1.extracted.

When assumptions for a value used in f1 are looked up, ValueTracking can assert
as some of the handles are in the wrong function. To fix this, simply erase the
llvm.assume calls in the extracted function.

Alternatives include flushing the assumption cache in the original function, or
walking all values used in the original function to prune stale affected-value
handles. Both seem more expensive.

Testing: check-llvm, LNT run with -mllvm -hot-cold-split enabled

rdar://58460728
2020-01-28 17:18:01 -08:00
..
ASanStackFrameLayoutTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BasicBlockUtilsTest.cpp [Utils] Extract EliminateUnreachableBlocks (NFC) 2019-03-11 17:51:57 +00:00
CMakeLists.txt [LoopRotate] add ability to repeat loop rotation until non-deoptimizing exit is found 2020-01-23 15:56:24 +03:00
CloningTest.cpp reland "[DebugInfo] Support to emit debugInfo for extern variables" 2019-12-22 18:28:50 -08:00
CodeExtractorTest.cpp [CodeExtractor] Remove stale llvm.assume calls from extracted region 2020-01-28 17:18:01 -08:00
CodeMoverUtilsTest.cpp [CodeMoverUtils] Improve IsControlFlowEquivalent. 2020-01-28 14:18:00 +00:00
FunctionComparatorTest.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
IntegerDivisionTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LocalTest.cpp [SimplifyCFG] Handle AssumptionCache being null. 2019-12-07 16:54:49 +00:00
LoopRotationUtilsTest.cpp [LoopRotate] add ability to repeat loop rotation until non-deoptimizing exit is found 2020-01-23 15:56:24 +03:00
LoopUtilsTest.cpp [LoopUtils] Updated deleteDeadLoop() to handle loop nest. 2019-12-18 15:59:45 +00:00
SSAUpdaterBulkTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SizeOptsTest.cpp [PGO][PGSO] Distinguish queries from unit tests and explicitly enable for the existing IR passes only. NFC. 2019-12-04 09:35:50 -08:00
UnrollLoopTest.cpp [SCEV] Add option to forget everything in SCEV. 2019-04-12 19:16:07 +00:00
VFABIUtils.cpp [VFABI] Remove unused variables in testcase, fix buildbot 2019-11-12 08:28:12 +01:00
ValueMapperTest.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00