[llvm-commits] [llvm] r56937 - in /llvm/trunk: include/llvm/Target/TargetOptions.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/LoopAligner.cpp lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp lib/Target/TargetMachine.cpp lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp lib/Target/X86/X86ISelDAGToDAG.cpp test/CodeGen/X86/vec_shuffle-23.ll test/CodeGen/X86/vec_shuffle-24.ll
Chris Lattner
clattner at apple.com
Sat Oct 4 13:21:34 PDT 2008
On Oct 1, 2008, at 4:18 PM, Devang Patel wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=56937&view=rev
> Log:
> Remove OptimizeForSize global. Use function attribute optsize.
Cool.
> +++ llvm/trunk/lib/CodeGen/LoopAligner.cpp Wed Oct 1 18:18:38 2008
> @@ -58,6 +58,10 @@
> if (!Align)
> return false; // Don't care about loop alignment.
>
> + const Function *F = MF.getFunction();
> + if (!F->isDeclaration() && F-
> >hasFnAttr(Attribute::OptimizeForSize))
> + return false;
Please remove the check for isDeclaration, F can never be a declaration.
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
> (original)
> +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Wed
> Oct 1 18:18:38 2008
> @@ -153,7 +153,7 @@
>
> SwitchToSection(TAI->SectionForGlobal(F));
>
> - unsigned FnAlign = OptimizeForSize ? 1 : 4;
> + unsigned FnAlign = 4;
> if (!F->isDeclaration() && F->hasFnAttr(Attribute::OptimizeForSize))
> FnAlign = 1;
Likewise.
> +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp Wed
> Oct 1 18:18:38 2008
> @@ -140,7 +140,7 @@
>
> SwitchToTextSection("_text", F);
>
> - unsigned FnAlign = OptimizeForSize ? 1 : 4;
> + unsigned FnAlign = 4;
> if (!F->isDeclaration() && F->hasFnAttr(Attribute::OptimizeForSize))
> FnAlign = 1;
Likewise.
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Oct 1
> 18:18:38 2008
> @@ -137,7 +137,7 @@
> ContainsFPCode(false), TM(tm),
> X86Lowering(*TM.getTargetLowering()),
> Subtarget(&TM.getSubtarget<X86Subtarget>()),
> - OptForSize(OptimizeForSize) {}
> + OptForSize(false) {}
Is OptForSize dead now? Please remove it.
Thanks,
-Chris
More information about the llvm-commits
mailing list