summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
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
commitc0f3b52e651e0e2e95b2d11f63a3c6b2af970c08 (patch)
tree7c6c7ff4727313bfb5e85c8d2f90d44a092cef61 /llvm/lib/Target
parentdfe979bcb0d98c64782bdb3e3bbd4d4733c0026b (diff)
downloadbcm5719-llvm-c0f3b52e651e0e2e95b2d11f63a3c6b2af970c08.tar.gz
bcm5719-llvm-c0f3b52e651e0e2e95b2d11f63a3c6b2af970c08.zip
It is possible that all functions in one module are not being
optimized for size. Set OptForSize for each function separately. llvm-svn: 57182
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86ISelDAGToDAG.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index daa7f135f81..50c8f5b8708 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud