[llvm-commits] [llvm] r57182 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Devang Patel
dpatel at apple.com
Mon Oct 6 11:03:39 PDT 2008
Author: dpatel
Date: Mon Oct 6 13:03:39 2008
New Revision: 57182
URL: http://llvm.org/viewvc/llvm-project?rev=57182&view=rev
Log:
It is possible that all functions in one module are not being
optimized for size. Set OptForSize for each function separately.
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=57182&r1=57181&r2=57182&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Oct 6 13:03:39 2008
@@ -642,11 +642,8 @@
/// 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)
More information about the llvm-commits
mailing list