summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-10-06 18:03:39 +0000
committerDevang Patel <dpatel@apple.com>2008-10-06 18:03:39 +0000
commite76225a4c1f185e7a00f790f956bd3ff0e017c90 (patch)
treefcb07be9e13dccd502a4d816117b0a0846dddbad
parent4daa9071ed1afde7fb03c7e0198101f4806b7d11 (diff)
downloadllvm-e76225a4c1f185e7a00f790f956bd3ff0e017c90.tar.gz
It is possible that all functions in one module are not being
optimized for size. Set OptForSize for each function separately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57182 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86ISelDAGToDAG.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp
index daa7f135f819..50c8f5b8708f 100644
--- a/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -642,11 +642,8 @@ void X86DAGToDAGISel::PreprocessForFPConvert() {
/// when it has created a SelectionDAG for us to codegen.
void X86DAGToDAGISel::InstructionSelect() {
CurBB = BB; // BB can change as result of isel.
- if (!OptForSize) {
- const Function *F = CurDAG->getMachineFunction().getFunction();
- OptForSize = !F->isDeclaration() &&
- F->hasFnAttr(Attribute::OptimizeForSize);
- }
+ const Function *F = CurDAG->getMachineFunction().getFunction();
+ OptForSize = F->hasFnAttr(Attribute::OptimizeForSize);
DEBUG(BB->dump());
if (!Fast)