diff options
author | Devang Patel <dpatel@apple.com> | 2008-10-01 23:18:38 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-10-01 23:18:38 +0000 |
commit | 93698d997764a457fbe8c1a1df1d57f23a59ae14 (patch) | |
tree | 76f97c15558ecdeb6cb91a6282320c169d52dae9 /lib/CodeGen/LoopAligner.cpp | |
parent | e3769efeeb9676732f07f7b50952c3d529dbabb1 (diff) | |
download | external_llvm-93698d997764a457fbe8c1a1df1d57f23a59ae14.zip external_llvm-93698d997764a457fbe8c1a1df1d57f23a59ae14.tar.gz external_llvm-93698d997764a457fbe8c1a1df1d57f23a59ae14.tar.bz2 |
Remove OptimizeForSize global. Use function attribute optsize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LoopAligner.cpp')
-rw-r--r-- | lib/CodeGen/LoopAligner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/LoopAligner.cpp b/lib/CodeGen/LoopAligner.cpp index 6cca8e5..60e3f19 100644 --- a/lib/CodeGen/LoopAligner.cpp +++ b/lib/CodeGen/LoopAligner.cpp @@ -58,6 +58,10 @@ bool LoopAligner::runOnMachineFunction(MachineFunction &MF) { if (!Align) return false; // Don't care about loop alignment. + const Function *F = MF.getFunction(); + if (!F->isDeclaration() && F->hasFnAttr(Attribute::OptimizeForSize)) + return false; + for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) { MachineBasicBlock *MBB = I; if (MLI->isLoopHeader(MBB)) |