llvm-project/llvm/test/Transforms/CodeExtractor
Nikita Popov 2a721374ae [IR] Don't use blockaddresses as callbr arguments
Following some recent discussions, this changes the representation
of callbrs in IR. The current blockaddress arguments are replaced
with `!` label constraints that refer directly to callbr indirect
destinations:

    ; Before:
    %res = callbr i8* asm "", "=r,r,i"(i8* %x, i8* blockaddress(@test8, %foo))
    to label %asm.fallthrough [label %foo]
    ; After:
    %res = callbr i8* asm "", "=r,r,!i"(i8* %x)
    to label %asm.fallthrough [label %foo]

The benefit of this is that we can easily update the successors of
a callbr, without having to worry about also updating blockaddress
references. This should allow us to remove some limitations:

* Allow unrolling/peeling/rotation of callbr, or any other
  clone-based optimizations
  (https://github.com/llvm/llvm-project/issues/41834)
* Allow duplicate successors
  (https://github.com/llvm/llvm-project/issues/45248)

This is just the IR representation change though, I will follow up
with patches to remove limtations in various transformation passes
that are no longer needed.

Differential Revision: https://reviews.llvm.org/D129288
2022-07-15 10:18:17 +02:00
..
X86
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
BlockAddressReference.ll
BlockAddressSelfReference.ll
ExtractedFnEntryCount.ll
LoopExtractor.ll
LoopExtractor_alloca.ll
LoopExtractor_crash.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
LoopExtractor_infinite.ll
LoopExtractor_min_wrapper.ll
MultipleExitBranchProb.ll
PartialInlineAlloca.ll
PartialInlineAlloca2.ll
PartialInlineAlloca4.ll
PartialInlineAlloca5.ll
PartialInlineAnd.ll
PartialInlineAndOr.ll
PartialInlineAttributes.ll
PartialInlineCallRef.ll
PartialInlineDebug.ll
PartialInlineEntryPHICost.ll
PartialInlineEntryUpdate.ll
PartialInlineHighCost.ll
PartialInlineInvokeProducesOutVal.ll
PartialInlineLiveAcross.ll
PartialInlineNoInline.ll
PartialInlineNoLiveOut.ll
PartialInlineNotViable.ll
PartialInlineORECrash.ll
PartialInlineOptRemark.ll
PartialInlineOr.ll
PartialInlineOrAnd.ll
PartialInlinePGOMultiRegion.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
PartialInlinePGORegion.ll
PartialInlineVarArg.ll
PartialInlineVarArgsDebug.ll
SingleCondition.ll
cost.ll
cost_meta.ll
extract-assume.ll
inline_eh.ll
inline_eh_1.ll
live_shrink.ll
live_shrink_gep.ll
live_shrink_hoist.ll
live_shrink_multiple.ll
live_shrink_unsafe.ll
unreachable-block.ll