Don't run stack slot coloring if -fast.
authorEvan Cheng <evan.cheng@apple.com>
Mon, 30 Jun 2008 22:33:16 +0000 (22:33 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 30 Jun 2008 22:33:16 +0000 (22:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52933 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LLVMTargetMachine.cpp

index 1c8ce0a44c44b91e997b6c9abda92bd97ca14d15..97fe35c2f4b09c72ab3d2821a905b7e65b43c2ca 100644 (file)
@@ -99,7 +99,8 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
   PM.add(createRegisterAllocator());
   
   // Perform stack slot coloring.
-  PM.add(createStackSlotColoringPass());
+  if (!Fast)
+    PM.add(createStackSlotColoringPass());
 
   if (PrintMachineCode)  // Print the register-allocated code
     PM.add(createMachineFunctionPrinterPass(cerr));
@@ -235,7 +236,8 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM,
   PM.add(createRegisterAllocator());
 
   // Perform stack slot coloring.
-  PM.add(createStackSlotColoringPass());
+  if (!Fast)
+    PM.add(createStackSlotColoringPass());
 
   if (PrintMachineCode)
     PM.add(createMachineFunctionPrinterPass(cerr));