mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Add a new target hook "predictableSelectIsExpensive".
This will be used to determine whether it's profitable to turn a select into a branch when the branch is likely to be predicted. Currently enabled for everything but Atom on X86 and Cortex-A9 devices on ARM. I'm not entirely happy with the name of this flag, suggestions welcome ;) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156233 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -824,6 +824,9 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
|
||||
|
||||
benefitFromCodePlacementOpt = true;
|
||||
|
||||
// Prefer likely predicted branches to selects on out-of-order cores.
|
||||
predictableSelectIsExpensive = Subtarget->isCortexA9();
|
||||
|
||||
setMinFunctionAlignment(Subtarget->isThumb() ? 1 : 2);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user