X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FOptimizePHIs.cpp;h=a1042e720c37585c1299abe47c14d751a25091cd;hb=a3e49ea99afc3c9f43953bdc3b3bd77970ed510d;hp=95a2934afb40d42afeefa235a217e549a4161517;hpb=8677f2ff9acf317461987b439ede693f01baa5ec;p=oota-llvm.git diff --git a/lib/CodeGen/OptimizePHIs.cpp b/lib/CodeGen/OptimizePHIs.cpp index 95a2934afb4..a1042e720c3 100644 --- a/lib/CodeGen/OptimizePHIs.cpp +++ b/lib/CodeGen/OptimizePHIs.cpp @@ -20,6 +20,7 @@ #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/IR/Function.h" #include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Target/TargetSubtargetInfo.h" using namespace llvm; #define DEBUG_TYPE "phi-opt" @@ -66,7 +67,7 @@ bool OptimizePHIs::runOnMachineFunction(MachineFunction &Fn) { return false; MRI = &Fn.getRegInfo(); - TII = Fn.getTarget().getInstrInfo(); + TII = Fn.getSubtarget().getInstrInfo(); // Find dead PHI cycles and PHI cycles that can be replaced by a single // value. InstCombine does these optimizations, but DAG legalization may @@ -91,7 +92,7 @@ bool OptimizePHIs::IsSingleValuePHICycle(MachineInstr *MI, unsigned DstReg = MI->getOperand(0).getReg(); // See if we already saw this register. - if (!PHIsInCycle.insert(MI)) + if (!PHIsInCycle.insert(MI).second) return true; // Don't scan crazily complex things. @@ -136,7 +137,7 @@ bool OptimizePHIs::IsDeadPHICycle(MachineInstr *MI, InstrSet &PHIsInCycle) { "PHI destination is not a virtual register"); // See if we already saw this register. - if (!PHIsInCycle.insert(MI)) + if (!PHIsInCycle.insert(MI).second) return true; // Don't scan crazily complex things.