forked from OSchip/llvm-project
[MachineOutliner][AArch64][NFC] Add early exit to candidate discarding logic
If we dropped too many candidates to be beneficial when dropping candidates that modify the stack, there's no reason to check for other cost model qualities. llvm-svn: 348219
This commit is contained in:
parent
23c48c2823
commit
2f5833ecd9
|
@ -5214,6 +5214,12 @@ AArch64InstrInfo::getOutliningCandidateInfo(
|
|||
} else {
|
||||
SetCandidateCallInfo(MachineOutlinerDefault, 12);
|
||||
}
|
||||
|
||||
// If we dropped all of the candidates, bail out here.
|
||||
if (RepeatedSequenceLocs.size() < 2) {
|
||||
RepeatedSequenceLocs.clear();
|
||||
return outliner::OutlinedFunction();
|
||||
}
|
||||
}
|
||||
|
||||
// Does every candidate's MBB contain a call? If so, then we might have a call
|
||||
|
|
Loading…
Reference in New Issue