[llvm] [CodeGen] Perform early program return instead of using indirect branch (PR #102127)
Vikash Gupta via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 04:18:01 PDT 2024
vg0204 wrote:
TailDuplication in machineBlockPlacement occurs under very tight constraint (such as high branch probabilty & unconditional control flow to tailBB) . Also, it happens only if TailDuplicateThreshold (defined by TargetTransformInfo[TTI]) is satisfied (as inline duplication from taillBB to PredessorBB occurs). And above all, it does not account for range of branch instruction.
Thus, it boils down to the fact that this pass handles very few scenarios where returnBB is under TailDuplicateThreshold( defined by TTI), having high dest branch probability, along with having capability to be inline tail duplicated in all its predessor. As rather than creating flow to alternate TailBB, it merges tailBB.
So, is it good to assume that testCases should be made in accordance to above limitations to see the effective full pass pipeline effects, or all scenarios of early program return should be supposedly handled?
https://github.com/llvm/llvm-project/pull/102127
More information about the llvm-commits
mailing list