llvm-project/llvm/test/Transforms/IROutliner
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
..
different-intrinsics.ll [IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions 2022-01-28 13:52:21 -06:00
different-order-phi-merges.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
duplicate-merging-phis.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
exit-block-phi-node-value-attribution.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
exit-phi-nodes-incoming-value-constant-argument.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
extraction.ll
gvn-output-set-overload.ll
illegal-allocas.ll
illegal-assumes.ll
illegal-branches.ll
illegal-callbr.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
illegal-catchpad.ll
illegal-cleanup.ll
illegal-frozen.ll
illegal-indirect-calls.ll [IRSim][IROutliner] Adding support for recognizing and outlining indirect function calls, and function calls with different names, but the same type 2022-01-25 15:19:28 -06:00
illegal-invoke.ll
illegal-landingpad.ll
illegal-memcpy.ll [IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions 2022-01-28 13:52:21 -06:00
illegal-memmove.ll [IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions 2022-01-28 13:52:21 -06:00
illegal-memset.ll [AutoUpgrade] Don't lose attributes when upgrading mem intrinsics 2022-04-13 09:30:10 +00:00
illegal-phi-nodes.ll
illegal-returns-twice.ll [IROutliner] Disallow outlining calls that return twice. 2022-01-25 13:09:30 -06:00
illegal-vaarg.ll [IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions 2022-01-28 13:52:21 -06:00
included-phi-nodes-begin.ll [IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region. 2022-01-25 18:25:50 -06:00
included-phi-nodes-end.ll [IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region. 2022-01-25 18:25:50 -06:00
legal-debug.ll
legal-indirect-calls.ll [IRSim][IROutliner] Adding support for recognizing and outlining indirect function calls, and function calls with different names, but the same type 2022-01-25 15:19:28 -06:00
mismatched-phi-exits-not-in-first-outlined.ll
mismatched-phi-exits.ll
mismatched-phi-outputs-ordering.ll
must-capture-all-phi-nodes-begin.ll [IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region. 2022-01-25 18:25:50 -06:00
must-capture-all-phi-nodes-end.ll [IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region. 2022-01-25 18:25:50 -06:00
no-external-block-entries.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
no-outlining-optnone.ll [IROutliner] Do not outlined from functions with optnone 2022-03-20 23:39:23 -05:00
one-external-incoming-block-phi-node.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
opt-remarks.ll
outline-memcpy.ll [IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions 2022-01-28 13:52:21 -06:00
outline-memmove.ll [IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions 2022-01-28 13:52:21 -06:00
outline-memset.ll [AutoUpgrade] Don't lose attributes when upgrading mem intrinsics 2022-04-13 09:30:10 +00:00
outline-vaarg-intrinsic.ll [IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions 2022-01-28 13:52:21 -06:00
outlining-across-branch.ll
outlining-address-taken.ll
outlining-basic-branches.ll [IRSim] Make sure the first instruction of a block doesn't get missed if it is the first valid instruction in Module. 2022-03-13 23:13:09 -05:00
outlining-bitcasts.ll
outlining-branches-phi-nodes.ll [IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region. 2022-01-25 18:25:50 -06:00
outlining-call-and-indirect.ll [IRSim][IROutliner] Adding support for recognizing and outlining indirect function calls, and function calls with different names, but the same type 2022-01-25 15:19:28 -06:00
outlining-calls-names-must-match.ll [IRSim][IROutliner] Adding support for recognizing and outlining indirect function calls, and function calls with different names, but the same type 2022-01-25 15:19:28 -06:00
outlining-calls.ll [IRSim][IROutliner] Adding support for recognizing and outlining indirect function calls, and function calls with different names, but the same type 2022-01-25 15:19:28 -06:00
outlining-commutative-fp.ll
outlining-commutative-operands-opposite-order.ll
outlining-commutative.ll
outlining-compatible-and-attribute-transfer.ll
outlining-compatible-or-attribute-transfer.ll
outlining-constants-vs-registers.ll
outlining-cost-model.ll
outlining-debug-statements.ll
outlining-different-constants.ll
outlining-different-globals.ll
outlining-different-output-blocks.ll
outlining-different-structure.ll
outlining-exits-to-phi-node.ll [IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region. 2022-01-25 18:25:50 -06:00
outlining-first-instruction.ll [IRSim] Make sure the first instruction of a block doesn't get missed if it is the first valid instruction in Module. 2022-03-13 23:13:09 -05:00
outlining-gep.ll
outlining-isomorphic-predicates.ll
outlining-multiple-exits-diff-outputs.ll
outlining-multiple-exits-one-output-set.ll
outlining-multiple-exits.ll
outlining-musttail.ll [IRSim][IROutliner] Ignoring Musttail Function 2022-03-13 19:27:25 -05:00
outlining-no-return-functions.ll [IRSim] Make sure the first instruction of a block doesn't get missed if it is the first valid instruction in Module. 2022-03-13 23:13:09 -05:00
outlining-odr.ll
outlining-remapped-outputs.ll
outlining-same-constants.ll
outlining-same-globals.ll
outlining-same-output-blocks.ll
outlining-strip-loop-info.ll [IROutliner] Make sure that loop debug info is stripped. 2022-03-17 14:41:53 -06:00
outlining-swift-error.ll
outlining-swifttailcc.ll [IRSim][IROutliner] Ignoring Musttail Function 2022-03-13 19:27:25 -05:00
outlining-tailcc.ll [IRSim][IROutliner] Ignoring Musttail Function 2022-03-13 19:27:25 -05:00
phi-node-exit-path-order.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
phi-nodes-non-constant.ll [IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region. 2022-01-25 18:25:50 -06:00
phi-nodes-output-overload.ll
phi-nodes-parent-block-referential.ll [IROutliner] Fix phi nodes when self referential within block but doesn't contain branch 2022-03-21 11:05:15 -05:00
phi-nodes-simple.ll [IRSim] Make sure the first instruction of a block doesn't get missed if it is the first valid instruction in Module. 2022-03-13 23:13:09 -05:00
region-end-of-module.ll
region-inputs-in-phi-nodes.ll [IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region. 2022-01-25 18:25:50 -06:00