X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FCollector.cpp;h=1a1fb7c733857267edb890cbf381d9e38fd307e5;hb=ac6cecec189ba9689c42543c3106c02b96d788da;hp=6cf253d2ffd8ff221ea38ac3d1b534dccfe31c4e;hpb=4ee451de366474b9c228b4e5fa573795a715216d;p=oota-llvm.git diff --git a/lib/CodeGen/Collector.cpp b/lib/CodeGen/Collector.cpp index 6cf253d2ffd..1a1fb7c7338 100644 --- a/lib/CodeGen/Collector.cpp +++ b/lib/CodeGen/Collector.cpp @@ -21,6 +21,7 @@ #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" @@ -177,8 +178,8 @@ bool LowerIntrinsics::InsertRootInitializers(Function &F, AllocaInst **Roots, SmallPtrSet InitedRoots; for (; !CouldBecomeSafePoint(IP); ++IP) if (StoreInst *SI = dyn_cast(IP)) - if (AllocaInst *AI = dyn_cast( - IntrinsicInst::StripPointerCasts(SI->getOperand(1)))) + if (AllocaInst *AI = + dyn_cast(SI->getOperand(1)->stripPointerCasts())) InitedRoots.insert(AI); // Add root initializers. @@ -293,7 +294,7 @@ bool LowerIntrinsics::PerformDefaultLowering(Function &F, Collector &Coll) { // Initialize the GC root, but do not delete the intrinsic. The // backend needs the intrinsic to flag the stack slot. Roots.push_back(cast( - IntrinsicInst::StripPointerCasts(CI->getOperand(1)))); + CI->getOperand(1)->stripPointerCasts())); } break; default: @@ -336,7 +337,7 @@ void MachineCodeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { unsigned MachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const { unsigned Label = MMI->NextLabelID(); - BuildMI(MBB, MI, TII->get(TargetInstrInfo::LABEL)).addImm(Label); + BuildMI(MBB, MI, TII->get(TargetInstrInfo::GC_LABEL)).addImm(Label); return Label; } @@ -358,8 +359,8 @@ void MachineCodeAnalysis::FindSafePoints(MachineFunction &MF) { BBE = MF.end(); BBI != BBE; ++BBI) for (MachineBasicBlock::iterator MI = BBI->begin(), ME = BBI->end(); MI != ME; ++MI) - if (TII->isCall(MI->getOpcode())) - VisitCallPoint(*MI); + if (MI->getDesc().isCall()) + VisitCallPoint(MI); } void MachineCodeAnalysis::FindStackOffsets(MachineFunction &MF) {