}
// Find final node: predecesor of the loop header that's also an exit
- BasicBlock *terminator;
+ BasicBlock *terminator = 0;
BasicBlock *header = L->getHeader();
for (pred_iterator PI = pred_begin(header), PE = pred_end(header);
PI != PE; ++PI) {
void
InstructionSelection::InsertPhiElimInstructions(BasicBlock *BB,
- const vector<MachineInstr*>& CpVec)
+ const vector<MachineInstr*>& CpVec)
{
Instruction *TermInst = (Instruction*)BB->getTerminator();
MachineCodeForInstruction &MC4Term = MachineCodeForInstruction::get(TermInst);
assert (FirstMIOfTerm && "No Machine Instrs for terminator");
MachineFunction &MF = MachineFunction::get(BB->getParent());
- MachineBasicBlock *MBB;
// FIXME: if PHI instructions existed in the machine code, this would be
// unnecesary.
+ MachineBasicBlock *MBB = 0;
for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I)
if (I->getBasicBlock() == BB) {
MBB = I;
void
InstructionSelection::InsertPhiElimInstructions(BasicBlock *BB,
- const vector<MachineInstr*>& CpVec)
+ const vector<MachineInstr*>& CpVec)
{
Instruction *TermInst = (Instruction*)BB->getTerminator();
MachineCodeForInstruction &MC4Term = MachineCodeForInstruction::get(TermInst);
assert (FirstMIOfTerm && "No Machine Instrs for terminator");
MachineFunction &MF = MachineFunction::get(BB->getParent());
- MachineBasicBlock *MBB;
// FIXME: if PHI instructions existed in the machine code, this would be
// unnecesary.
+ MachineBasicBlock *MBB = 0;
for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I)
if (I->getBasicBlock() == BB) {
MBB = I;
std::vector<Edge> edges;
Node *tmp;
- Node *exitNode, *startNode;
+ Node *exitNode = 0, *startNode = 0;
// The nodes must be uniquesly identified:
// That is, no two nodes must hav same BB*
if (AI.isArrayAllocation()) // Check C != 1
if (const ConstantUInt *C = dyn_cast<ConstantUInt>(AI.getArraySize())) {
const Type *NewTy = ArrayType::get(AI.getAllocatedType(), C->getValue());
- AllocationInst *New;
+ AllocationInst *New = 0;
// Create and insert the replacement instruction...
if (isa<MallocInst>(AI))
New = new MallocInst(NewTy, 0, AI.getName(), &AI);
- else if (isa<AllocaInst>(AI))
+ else {
+ assert(isa<AllocaInst>(AI) && "Unknown type of allocation inst!");
New = new AllocaInst(NewTy, 0, AI.getName(), &AI);
+ }
// Scan to the end of the allocation instructions, to skip over a block of
// allocas if possible...