Add PPC Freescale e500mc and e5500 subtargets.

Add subtargets for Freescale e500mc (32-bit) and e5500 (64-bit) to
the PowerPC backend.

Patch by Tobias von Koch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hal Finkel
2012-08-28 16:12:39 +00:00
parent 37dca6331d
commit 621b77ade2
10 changed files with 653 additions and 2 deletions

View File

@@ -449,6 +449,21 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
setSchedulingPreference(Sched::Hybrid);
computeRegisterProperties();
// The Freescale cores does better with aggressive inlining of memcpy and
// friends. Gcc uses same threshold of 128 bytes (= 32 word stores).
if (Subtarget->getDarwinDirective() == PPC::DIR_E500mc ||
Subtarget->getDarwinDirective() == PPC::DIR_E5500) {
maxStoresPerMemset = 32;
maxStoresPerMemsetOptSize = 16;
maxStoresPerMemcpy = 32;
maxStoresPerMemcpyOptSize = 8;
maxStoresPerMemmove = 32;
maxStoresPerMemmoveOptSize = 8;
setPrefFunctionAlignment(4);
benefitFromCodePlacementOpt = true;
}
}
/// getByValTypeAlignment - Return the desired alignment for ByVal aggregate