diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-05-06 20:34:06 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-05-06 20:34:06 +0000 |
commit | 2518f8376d7dcaa28e17c96a34bdd9e0f389cd11 (patch) | |
tree | bba6f0dae76d2252bbf59915514a310724fa5c47 /llvm/lib/Target/PowerPC/PPCISelLowering.cpp | |
parent | 44932b6805c31075deb5173f89a70a5474459aaa (diff) | |
download | bcm5719-llvm-2518f8376d7dcaa28e17c96a34bdd9e0f389cd11.tar.gz bcm5719-llvm-2518f8376d7dcaa28e17c96a34bdd9e0f389cd11.zip |
Make the logic for determining function alignment more explicit. No functionality change.
llvm-svn: 131012
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 128522c8843..625c9634fb0 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -394,6 +394,10 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM) setLibcallName(RTLIB::EXP2_PPCF128, "exp2l$LDBL128"); } + setMinFunctionAlignment(2); + if (PPCSubTarget.isDarwin()) + setPrefFunctionAlignment(4); + computeRegisterProperties(); } @@ -460,14 +464,6 @@ MVT::SimpleValueType PPCTargetLowering::getSetCCResultType(EVT VT) const { return MVT::i32; } -/// getFunctionAlignment - Return the Log2 alignment of this function. -unsigned PPCTargetLowering::getFunctionAlignment(const Function *F) const { - if (getTargetMachine().getSubtarget<PPCSubtarget>().isDarwin()) - return F->hasFnAttr(Attribute::OptimizeForSize) ? 2 : 4; - else - return 2; -} - //===----------------------------------------------------------------------===// // Node matching predicates, for use by the tblgen matching code. //===----------------------------------------------------------------------===// |