summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LoopAligner.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-10-01 23:18:38 +0000
committerDevang Patel <dpatel@apple.com>2008-10-01 23:18:38 +0000
commit1b76f2c40b5492476a1b2863811eb1f6913526f1 (patch)
tree2dc43979db6250dd2dabbff63fac269bb4cdfaa8 /llvm/lib/CodeGen/LoopAligner.cpp
parente13447ec81b1f05b56d4e2c38623404ecdcea312 (diff)
downloadbcm5719-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.cpp4
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))
OpenPOWER on IntegriCloud