Add TargetInstrInfo::isProfitableToBranch and implement for AArch64. This
implements heuristics to determine if it is profitable to branch from a
dominating head block that is terminated by the conditional branch into the compare
block that contains the compare instruction and the conditional branch.
AArch64ConditionalCompares pass uses this heuristics to decide on merging the compare
block into the head block. The heuristics are only enabled for Kryo subtarget.
NFC for subtargets other than Kryo.
Details
Details
- Reviewers
t.p.northover jmolloy mcrosier apazos
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Hi,
Sorry for how long it's taken - I only just saw this on my phab list.
I think this generally looks fine, but I don't see the need for isProfitableToBranch to be in TargetInstrInfo. You can simply put it in AArch64InstrInfo and query that directly in AArch64ConditionalCompares (much like is done in AArch64LdStOptimizer).
Cheers,
James