diff options
author | Matthias Braun <matze@braunis.de> | 2018-01-19 06:46:10 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2018-01-19 06:46:10 +0000 |
commit | 4a7c8e7aa2e9845652703141b240f9179f1f9980 (patch) | |
tree | b0b96fe5733880ae31bc9d179d8c2b82c8cd2b46 /llvm/lib/CodeGen/TargetPassConfig.cpp | |
parent | 3ab9fcb98e97efcf8f4e0a521018170dec8b6078 (diff) | |
download | bcm5719-llvm-4a7c8e7aa2e9845652703141b240f9179f1f9980.tar.gz bcm5719-llvm-4a7c8e7aa2e9845652703141b240f9179f1f9980.zip |
Split MachineLICM into EarlyMachineLICM and MachineLICM; NFC
This avoids playing games with pseudo pass IDs and avoids using an
unreliable MRI::isSSA() check to determine whether register allocation
has happened.
Note that this renames:
- MachineLICMID -> EarlyMachineLICM
- PostRAMachineLICMID -> MachineLICMID
to be consistent with the EarlyTailDuplicate/TailDuplicate naming.
llvm-svn: 322927
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index e59ada53663..558992bb790 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -241,13 +241,13 @@ static IdentifyingPassPtr overridePass(AnalysisID StandardID, if (StandardID == &EarlyIfConverterID) return applyDisable(TargetID, DisableEarlyIfConversion); - if (StandardID == &MachineLICMID) + if (StandardID == &EarlyMachineLICMID) return applyDisable(TargetID, DisableMachineLICM); if (StandardID == &MachineCSEID) return applyDisable(TargetID, DisableMachineCSE); - if (StandardID == &TargetPassConfig::PostRAMachineLICMID) + if (StandardID == &MachineLICMID) return applyDisable(TargetID, DisablePostRAMachineLICM); if (StandardID == &MachineSinkingID) @@ -267,9 +267,6 @@ INITIALIZE_PASS(TargetPassConfig, "targetpassconfig", "Target Pass Configuration", false, false) char TargetPassConfig::ID = 0; -// Pseudo Pass IDs. -char TargetPassConfig::PostRAMachineLICMID = 0; - namespace { struct InsertedPass { @@ -365,9 +362,6 @@ TargetPassConfig::TargetPassConfig(LLVMTargetMachine &TM, PassManagerBase &pm) initializeBasicAAWrapperPassPass(*PassRegistry::getPassRegistry()); initializeAAResultsWrapperPassPass(*PassRegistry::getPassRegistry()); - // Substitute Pseudo Pass IDs for real ones. - substitutePass(&PostRAMachineLICMID, &MachineLICMID); - if (StringRef(PrintMachineInstrs.getValue()).equals("")) TM.Options.PrintMachineCode = true; @@ -933,7 +927,7 @@ void TargetPassConfig::addMachineSSAOptimization() { // loop info, just like LICM and CSE below. addILPOpts(); - addPass(&MachineLICMID, false); + addPass(&EarlyMachineLICMID, false); addPass(&MachineCSEID, false); addPass(&MachineSinkingID); @@ -1085,7 +1079,7 @@ void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) { // Run post-ra machine LICM to hoist reloads / remats. // // FIXME: can this move into MachineLateOptimization? - addPass(&PostRAMachineLICMID); + addPass(&MachineLICMID); } } |