mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 02:43:51 +00:00
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. llvm-svn: 58144
This commit is contained in:
parent
e5b0182e94
commit
66e878f316
@ -185,10 +185,6 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, bool Fast) {
|
||||
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());
|
||||
|
||||
|
@ -183,6 +183,11 @@ X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS,
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user