llvm-project/llvm/test/Transforms/CodeExtractor
Davide Italiano fa15de34b7 [PartialInliner] Fix crash when inlining functions with unreachable blocks.
CodeExtractor looks up the dominator node corresponding to return blocks
when splitting them. If one of these blocks is unreachable, there's no
node in the Dom and CodeExtractor crashes because it doesn't check
for domtree node validity.
In theory, we could add just a check for skipping null DTNodes in
`splitReturnBlock` but the fix I propose here is slightly different. To the
best of my knowledge, unreachable blocks are irrelevant for the algorithm,
therefore we can just skip them when building the candidate set in the
constructor.

Differential Revision:  https://reviews.llvm.org/D32335

llvm-svn: 300946
2017-04-21 04:25:00 +00:00
..
X86 Move this test to x86-specific directory. 2016-08-01 03:22:05 +00:00
2004-03-13-LoopExtractorCrash.ll
2004-03-14-DominanceProblem.ll
2004-03-14-NoSwitchSupport.ll
2004-03-17-MissedLiveIns.ll
2004-03-17-UpdatePHIsOutsideRegion.ll
2004-03-18-InvokeHandling.ll
2004-08-12-BlockExtractPHI.ll
2004-11-12-InvokeExtract.ll
ExtractedFnEntryCount.ll CodeExtractor : Add ability to preserve profile data. 2016-08-02 02:15:45 +00:00
MultipleExitBranchProb.ll CodeExtractor : Add ability to preserve profile data. 2016-08-02 02:15:45 +00:00
unreachable-block.ll [PartialInliner] Fix crash when inlining functions with unreachable blocks. 2017-04-21 04:25:00 +00:00