[llvm-commits] [llvm] r58144 - in /llvm/trunk/lib: CodeGen/LLVMTargetMachine.cpp Target/X86/X86TargetMachine.cpp
Dan Gohman
gohman at apple.com
Sat Oct 25 10:46:53 PDT 2008
Author: djg
Date: Sat Oct 25 12:46:52 2008
New Revision: 58144
URL: http://llvm.org/viewvc/llvm-project?rev=58144&view=rev
Log:
Move the code that adds the DeadMachineInstructionElimPass from
target-independent code to target-specific code. This prevents it
from running on targets that aren't using fast-isel.
In addition to saving compile time, this addresses the problem
that not all targets are prepared for it. In order to use this
pass, all instructions must declare all their fixed uses and
defs of physical registers.
Modified:
llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=58144&r1=58143&r2=58144&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Sat Oct 25 12:46:52 2008
@@ -185,10 +185,6 @@
if (PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(cerr));
- // If we're using Fast-ISel, clean up the mess.
- if (EnableFastISel)
- PM.add(createDeadMachineInstructionElimPass());
-
if (EnableLICM)
PM.add(createMachineLICMPass());
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=58144&r1=58143&r2=58144&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Sat Oct 25 12:46:52 2008
@@ -183,6 +183,11 @@
bool X86TargetMachine::addInstSelector(PassManagerBase &PM, bool Fast) {
// Install an instruction selector.
PM.add(createX86ISelDag(*this, Fast));
+
+ // If we're using Fast-ISel, clean up the mess.
+ if (EnableFastISel)
+ PM.add(createDeadMachineInstructionElimPass());
+
return false;
}
More information about the llvm-commits
mailing list