[llvm-commits] [llvm] r65501 - /llvm/trunk/lib/CodeGen/StackSlotColoring.cpp

Evan Cheng echeng at apple.com
Wed Feb 25 22:35:07 PST 2009


Sorry to nag. Although stack coloring create more opportunities for  
DCE, I really don't think this belongs in stack coloring. Can you move  
this to DeadMachineInstructionElim instead? Right now, only x86 runs  
it when it's doing fast-isel. We can add this pass to all targets just  
before post-ra and have it check for loads / stores only.

Evan

On Feb 25, 2009, at 8:47 PM, Owen Anderson wrote:

> Author: resistor
> Date: Wed Feb 25 22:47:57 2009
> New Revision: 65501
>
> URL: http://llvm.org/viewvc/llvm-project?rev=65501&view=rev
> Log:
> Enable stack slot coloring DCE.  Evan's spiller fixes were needed  
> before this could happen.
>
> Modified:
>    llvm/trunk/lib/CodeGen/StackSlotColoring.cpp
>
> Modified: llvm/trunk/lib/CodeGen/StackSlotColoring.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackSlotColoring.cpp?rev=65501&r1=65500&r2=65501&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/StackSlotColoring.cpp (original)
> +++ llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Wed Feb 25 22:47:57  
> 2009
> @@ -30,12 +30,7 @@
> static cl::opt<bool>
> DisableSharing("no-stack-slot-sharing",
>              cl::init(false), cl::Hidden,
> -             cl::desc("Surpress slot sharing during stack  
> coloring"));
> -
> -static cl::opt<bool>
> -EnableDCE("enable-ssc-dce",
> -               cl::init(false), cl::Hidden,
> -               cl::desc("Enable slot coloring DCE"));
> +             cl::desc("Suppress slot sharing during stack  
> coloring"));
>
> static cl::opt<int> DCELimit("ssc-dce-limit", cl::init(-1),  
> cl::Hidden);
>
> @@ -342,7 +337,7 @@
>     Assignments[i].clear();
>   Assignments.clear();
>
> -  if (EnableDCE) {
> +  if (Changed) {
>     for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I ! 
> = E; ++I)
>       Changed |= removeDeadStores(I);
>   }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list