[llvm-commits] [llvm] r58425 - in /llvm/branches/release_24/lib: CodeGen/LLVMTargetMachine.cpp Target/X86/X86TargetMachine.cpp
Tanya Lattner
tonic at nondot.org
Wed Oct 29 23:06:32 PDT 2008
Author: tbrethou
Date: Thu Oct 30 01:06:32 2008
New Revision: 58425
URL: http://llvm.org/viewvc/llvm-project?rev=58425&view=rev
Log:
Merge from mainline.
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/branches/release_24/lib/CodeGen/LLVMTargetMachine.cpp
llvm/branches/release_24/lib/Target/X86/X86TargetMachine.cpp
Modified: llvm/branches/release_24/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/CodeGen/LLVMTargetMachine.cpp?rev=58425&r1=58424&r2=58425&view=diff
==============================================================================
--- llvm/branches/release_24/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/branches/release_24/lib/CodeGen/LLVMTargetMachine.cpp Thu Oct 30 01:06:32 2008
@@ -189,10 +189,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/branches/release_24/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/X86/X86TargetMachine.cpp?rev=58425&r1=58424&r2=58425&view=diff
==============================================================================
--- llvm/branches/release_24/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/branches/release_24/lib/Target/X86/X86TargetMachine.cpp Thu Oct 30 01:06:32 2008
@@ -174,6 +174,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