llvm.org GIT mirror llvm / e76225a
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 Devang Patel 12 years ago
1 changed file(s) with 2 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
641641 /// when it has created a SelectionDAG for us to codegen.
642642 void X86DAGToDAGISel::InstructionSelect() {
643643 CurBB = BB; // BB can change as result of isel.
644 if (!OptForSize) {
645 const Function *F = CurDAG->getMachineFunction().getFunction();
646 OptForSize = !F->isDeclaration() &&
647 F->hasFnAttr(Attribute::OptimizeForSize);
648 }
644 const Function *F = CurDAG->getMachineFunction().getFunction();
645 OptForSize = F->hasFnAttr(Attribute::OptimizeForSize);
649646
650647 DEBUG(BB->dump());
651648 if (!Fast)