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/ARM/ARMISelLowering.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/ARM/ARMISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index 7c2a7319235..d7db6880e93 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -724,6 +724,8 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM) setMinStackArgumentAlignment(4); benefitFromCodePlacementOpt = true; + + setMinFunctionAlignment(Subtarget->isThumb() ? 1 : 2); } // FIXME: It might make sense to define the representative register class as the @@ -925,11 +927,6 @@ ARMTargetLowering::createFastISel(FunctionLoweringInfo &funcInfo) const { return ARM::createFastISel(funcInfo); } -/// getFunctionAlignment - Return the Log2 alignment of this function. -unsigned ARMTargetLowering::getFunctionAlignment(const Function *F) const { - return getTargetMachine().getSubtarget<ARMSubtarget>().isThumb() ? 1 : 2; -} - /// getMaximalGlobalOffset - Returns the maximal possible offset which can /// be used for loads / stores from the global. unsigned ARMTargetLowering::getMaximalGlobalOffset() const { |