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 | 1b76f2c40b5492476a1b2863811eb1f6913526f1 (patch) | |
tree | 2dc43979db6250dd2dabbff63fac269bb4cdfaa8 /llvm/lib/CodeGen/LoopAligner.cpp | |
parent | e13447ec81b1f05b56d4e2c38623404ecdcea312 (diff) | |
download | bcm5719-llvm-1b76f2c40b5492476a1b2863811eb1f6913526f1.tar.gz bcm5719-llvm-1b76f2c40b5492476a1b2863811eb1f6913526f1.zip |
Remove OptimizeForSize global. Use function attribute optsize.
llvm-svn: 56937
Diffstat (limited to 'llvm/lib/CodeGen/LoopAligner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LoopAligner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LoopAligner.cpp b/llvm/lib/CodeGen/LoopAligner.cpp index 6cca8e5badc..60e3f194305 100644 --- a/llvm/lib/CodeGen/LoopAligner.cpp +++ b/llvm/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)) |