mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Add an option to enable StrongPHIElimination, for ease of testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3341262de2
commit
95dad830bb
@ -103,6 +103,10 @@ namespace llvm {
|
|||||||
/// compile time.
|
/// compile time.
|
||||||
extern bool EnableFastISel;
|
extern bool EnableFastISel;
|
||||||
|
|
||||||
|
/// StrongPHIElim - This flag enables more aggressive PHI elimination
|
||||||
|
/// wth earlier copy coalescing.
|
||||||
|
extern bool StrongPHIElim;
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
@ -67,8 +68,12 @@ void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||||||
AU.addRequired<LiveVariables>();
|
AU.addRequired<LiveVariables>();
|
||||||
AU.addPreservedID(MachineLoopInfoID);
|
AU.addPreservedID(MachineLoopInfoID);
|
||||||
AU.addPreservedID(MachineDominatorsID);
|
AU.addPreservedID(MachineDominatorsID);
|
||||||
|
|
||||||
|
if (!StrongPHIElim) {
|
||||||
AU.addPreservedID(PHIEliminationID);
|
AU.addPreservedID(PHIEliminationID);
|
||||||
AU.addRequiredID(PHIEliminationID);
|
AU.addRequiredID(PHIEliminationID);
|
||||||
|
}
|
||||||
|
|
||||||
AU.addRequiredID(TwoAddressInstructionPassID);
|
AU.addRequiredID(TwoAddressInstructionPassID);
|
||||||
MachineFunctionPass::getAnalysisUsage(AU);
|
MachineFunctionPass::getAnalysisUsage(AU);
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "llvm/CodeGen/RegisterCoalescer.h"
|
#include "llvm/CodeGen/RegisterCoalescer.h"
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "llvm/ADT/EquivalenceClasses.h"
|
#include "llvm/ADT/EquivalenceClasses.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
@ -107,6 +108,8 @@ namespace {
|
|||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
AU.addRequired<LiveIntervals>();
|
AU.addRequired<LiveIntervals>();
|
||||||
|
if (StrongPHIElim)
|
||||||
|
AU.addRequiredID(StrongPHIEliminationID);
|
||||||
// Make sure PassManager knows which analyses to make available
|
// Make sure PassManager knows which analyses to make available
|
||||||
// to coalescing and which analyses coalescing invalidates.
|
// to coalescing and which analyses coalescing invalidates.
|
||||||
AU.addRequiredTransitive<RegisterCoalescer>();
|
AU.addRequiredTransitive<RegisterCoalescer>();
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "llvm/CodeGen/RegisterCoalescer.h"
|
#include "llvm/CodeGen/RegisterCoalescer.h"
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/ADT/SmallSet.h"
|
#include "llvm/ADT/SmallSet.h"
|
||||||
@ -72,6 +73,9 @@ void SimpleRegisterCoalescing::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||||||
AU.addRequired<MachineLoopInfo>();
|
AU.addRequired<MachineLoopInfo>();
|
||||||
AU.addPreserved<MachineLoopInfo>();
|
AU.addPreserved<MachineLoopInfo>();
|
||||||
AU.addPreservedID(MachineDominatorsID);
|
AU.addPreservedID(MachineDominatorsID);
|
||||||
|
if (StrongPHIElim)
|
||||||
|
AU.addPreservedID(StrongPHIEliminationID);
|
||||||
|
else
|
||||||
AU.addPreservedID(PHIEliminationID);
|
AU.addPreservedID(PHIEliminationID);
|
||||||
AU.addPreservedID(TwoAddressInstructionPassID);
|
AU.addPreservedID(TwoAddressInstructionPassID);
|
||||||
MachineFunctionPass::getAnalysisUsage(AU);
|
MachineFunctionPass::getAnalysisUsage(AU);
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/ADT/BitVector.h"
|
#include "llvm/ADT/BitVector.h"
|
||||||
@ -76,6 +77,9 @@ namespace {
|
|||||||
AU.addPreserved<LiveVariables>();
|
AU.addPreserved<LiveVariables>();
|
||||||
AU.addPreservedID(MachineLoopInfoID);
|
AU.addPreservedID(MachineLoopInfoID);
|
||||||
AU.addPreservedID(MachineDominatorsID);
|
AU.addPreservedID(MachineDominatorsID);
|
||||||
|
if (StrongPHIElim)
|
||||||
|
AU.addPreservedID(StrongPHIEliminationID);
|
||||||
|
else
|
||||||
AU.addPreservedID(PHIEliminationID);
|
AU.addPreservedID(PHIEliminationID);
|
||||||
MachineFunctionPass::getAnalysisUsage(AU);
|
MachineFunctionPass::getAnalysisUsage(AU);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ namespace llvm {
|
|||||||
bool RealignStack;
|
bool RealignStack;
|
||||||
bool VerboseAsm;
|
bool VerboseAsm;
|
||||||
bool DisableJumpTables;
|
bool DisableJumpTables;
|
||||||
|
bool StrongPHIElim;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cl::opt<bool, true> PrintCode("print-machineinstrs",
|
static cl::opt<bool, true> PrintCode("print-machineinstrs",
|
||||||
@ -157,6 +158,12 @@ DisableSwitchTables(cl::Hidden, "disable-jump-tables",
|
|||||||
cl::location(DisableJumpTables),
|
cl::location(DisableJumpTables),
|
||||||
cl::init(false));
|
cl::init(false));
|
||||||
|
|
||||||
|
static cl::opt<bool, true>
|
||||||
|
EnableStrongPHIElim(cl::Hidden, "strong-phi-elim",
|
||||||
|
cl::desc("Use strong PHI elimination."),
|
||||||
|
cl::location(StrongPHIElim),
|
||||||
|
cl::init(false));
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// TargetMachine Class
|
// TargetMachine Class
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user