#include "llvm/Pass.h"
#include "Support/CommandLine.h"
#include "Support/LeakDetector.h"
-using std::cerr;
using std::vector;
+std::vector<MachineInstr*>
+FixConstantOperandsForInstr(Instruction* vmInstr, MachineInstr* minstr,
+ TargetMachine& target);
+
namespace {
//===--------------------------------------------------------------------===//
// SelectDebugLevel - Allow command line control over debugging.
if (SelectDebugLevel >= Select_DebugInstTrees)
{
- cerr << "\n\n*** Input to instruction selection for function "
- << F.getName() << "\n\n" << F
- << "\n\n*** Instruction trees for function "
- << F.getName() << "\n\n";
+ std::cerr << "\n\n*** Input to instruction selection for function "
+ << F.getName() << "\n\n" << F
+ << "\n\n*** Instruction trees for function "
+ << F.getName() << "\n\n";
instrForest.dump();
}
if (SelectDebugLevel >= Select_DebugBurgTrees)
{
printcover(basicNode, 1, 0);
- cerr << "\nCover cost == " << treecost(basicNode, 1, 0) << "\n\n";
+ std::cerr << "\nCover cost == " << treecost(basicNode, 1, 0) <<"\n\n";
printMatches(basicNode);
}
if (SelectDebugLevel >= Select_PrintMachineCode)
{
- cerr << "\n*** Machine instructions after INSTRUCTION SELECTION\n";
+ std::cerr << "\n*** Machine instructions after INSTRUCTION SELECTION\n";
MachineFunction::get(&F).dump();
}
MachineFunction &MF = MachineFunction::get(&F);
for (MachineFunction::iterator BB = MF.begin(); BB != MF.end(); ++BB) {
for (BasicBlock::iterator IIt = BB->getBasicBlock()->begin();
- PHINode *PN = dyn_cast<PHINode>(&*IIt); ++IIt) {
+ PHINode *PN = dyn_cast<PHINode>(IIt); ++IIt) {
// FIXME: This is probably wrong...
Value *PhiCpRes = new PHINode(PN->getType(), "PhiCp:");
int ruleForNode = burm_rule(treeRoot->state, goalnt);
if (ruleForNode == 0) {
- cerr << "Could not match instruction tree for instr selection\n";
+ std::cerr << "Could not match instruction tree for instr selection\n";
abort();
}
Pass *createInstructionSelectionPass(TargetMachine &T) {
return new InstructionSelection(T);
}
-