mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 12:21:04 +00:00
Add optimization bisect opt-in calls for PowerPC passes
Differential Revision: http://reviews.llvm.org/D19554 llvm-svn: 267769
This commit is contained in:
parent
221bf8bc4d
commit
98d037199a
@ -168,6 +168,9 @@ class PPCBoolRetToInt : public FunctionPass {
|
||||
}
|
||||
|
||||
bool runOnFunction(Function &F) {
|
||||
if (skipFunction(F))
|
||||
return false;
|
||||
|
||||
PHINodeSet PromotablePHINodes = getPromotablePHINodes(F);
|
||||
B2IMap Bool2IntMap;
|
||||
bool Changed = false;
|
||||
|
@ -166,6 +166,9 @@ FunctionPass *llvm::createPPCCTRLoopsVerify() {
|
||||
#endif // NDEBUG
|
||||
|
||||
bool PPCCTRLoops::runOnFunction(Function &F) {
|
||||
if (skipFunction(F))
|
||||
return false;
|
||||
|
||||
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
|
||||
SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
|
||||
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
|
||||
|
@ -173,6 +173,9 @@ protected:
|
||||
|
||||
public:
|
||||
bool runOnMachineFunction(MachineFunction &MF) override {
|
||||
if (skipFunction(*MF.getFunction()))
|
||||
return false;
|
||||
|
||||
TII = MF.getSubtarget().getInstrInfo();
|
||||
|
||||
bool Changed = false;
|
||||
|
@ -144,6 +144,9 @@ static Value *GetPointerOperand(Value *MemI) {
|
||||
}
|
||||
|
||||
bool PPCLoopPreIncPrep::runOnFunction(Function &F) {
|
||||
if (skipFunction(F))
|
||||
return false;
|
||||
|
||||
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
|
||||
SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
|
||||
auto *DTWP = getAnalysisIfAvailable<DominatorTreeWrapperPass>();
|
||||
|
@ -63,6 +63,8 @@ private:
|
||||
public:
|
||||
// Main entry point for this pass.
|
||||
bool runOnMachineFunction(MachineFunction &MF) override {
|
||||
if (skipFunction(*MF.getFunction()))
|
||||
return false;
|
||||
initialize(MF);
|
||||
return simplifyCode();
|
||||
}
|
||||
|
@ -60,6 +60,9 @@ FunctionPass *llvm::createPPCQPXLoadSplatPass() {
|
||||
}
|
||||
|
||||
bool PPCQPXLoadSplat::runOnMachineFunction(MachineFunction &MF) {
|
||||
if (skipFunction(*MF.getFunction()))
|
||||
return false;
|
||||
|
||||
bool MadeChange = false;
|
||||
const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
|
||||
|
||||
|
@ -382,9 +382,11 @@ void PPCPassConfig::addMachineSSAOptimization() {
|
||||
}
|
||||
|
||||
void PPCPassConfig::addPreRegAlloc() {
|
||||
initializePPCVSXFMAMutatePass(*PassRegistry::getPassRegistry());
|
||||
insertPass(VSXFMAMutateEarly ? &RegisterCoalescerID : &MachineSchedulerID,
|
||||
&PPCVSXFMAMutateID);
|
||||
if (getOptLevel() != CodeGenOpt::None) {
|
||||
initializePPCVSXFMAMutatePass(*PassRegistry::getPassRegistry());
|
||||
insertPass(VSXFMAMutateEarly ? &RegisterCoalescerID : &MachineSchedulerID,
|
||||
&PPCVSXFMAMutateID);
|
||||
}
|
||||
if (getPPCTargetMachine().getRelocationModel() == Reloc::PIC_)
|
||||
addPass(createPPCTLSDynamicCallPass());
|
||||
if (EnableExtraTOCRegDeps)
|
||||
|
@ -342,6 +342,9 @@ protected:
|
||||
|
||||
public:
|
||||
bool runOnMachineFunction(MachineFunction &MF) override {
|
||||
if (skipFunction(*MF.getFunction()))
|
||||
return false;
|
||||
|
||||
// If we don't have VSX then go ahead and return without doing
|
||||
// anything.
|
||||
const PPCSubtarget &STI = MF.getSubtarget<PPCSubtarget>();
|
||||
|
@ -191,6 +191,9 @@ private:
|
||||
public:
|
||||
// Main entry point for this pass.
|
||||
bool runOnMachineFunction(MachineFunction &MF) override {
|
||||
if (skipFunction(*MF.getFunction()))
|
||||
return false;
|
||||
|
||||
// If we don't have VSX on the subtarget, don't do anything.
|
||||
const PPCSubtarget &STI = MF.getSubtarget<PPCSubtarget>();
|
||||
if (!STI.hasVSX())
|
||||
|
Loading…
Reference in New Issue
Block a user