};
}
-
TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi,
Value *s1, Value *s2, const std::string &name)
: Instruction(s1->getType(), Instruction::UserOp1, name)
}
}
- //
// Build the instruction trees to be given as inputs to BURG.
- //
InstrForest instrForest(&F);
-
if (SelectDebugLevel >= Select_DebugInstTrees) {
std::cerr << "\n\n*** Input to instruction selection for function "
<< F.getName() << "\n\n" << F
instrForest.dump();
}
- //
// Invoke BURG instruction selection for each tree
- //
for (InstrForest::const_root_iterator RI = instrForest.roots_begin();
RI != instrForest.roots_end(); ++RI) {
InstructionNode* basicNode = *RI;
// Invoke BURM to label each tree node with a state
burm_label(basicNode);
-
if (SelectDebugLevel >= Select_DebugBurgTrees) {
printcover(basicNode, 1, 0);
std::cerr << "\nCover cost == " << treecost(basicNode, 1, 0) <<"\n\n";
SelectInstructionsForTree(basicNode, /*goalnt*/1);
}
- //
// Create the MachineBasicBlock records and add all of the MachineInstrs
// defined in the MachineCodeForInstruction objects to also live in the
// MachineBasicBlock objects.
- //
MachineFunction &MF = MachineFunction::get(&F);
for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; ++BI) {
MachineBasicBlock *MCBB = new MachineBasicBlock(BI);
// The leak detector shouldn't track these nodes. They are not garbage,
// even though their parent field is never filled in.
- //
LeakDetector::removeGarbageObject(PhiCpRes);
// for each incoming value of the phi, insert phi elimination
- //
for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i) {
// insert the copy instruction to the predecessor BB
std::vector<MachineInstr*> mvec, CpVec;