[llvm-commits] CVS: llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp SparcV9CodeEmitter.cpp SparcV9CodeEmitter.h
Chris Lattner
lattner at cs.uiuc.edu
Sat Jul 26 18:05:01 PDT 2003
Changes in directory llvm/lib/Target/Sparc:
PrologEpilogCodeInserter.cpp updated: 1.27 -> 1.28
SparcV9CodeEmitter.cpp updated: 1.21 -> 1.22
SparcV9CodeEmitter.h updated: 1.11 -> 1.12
---
Log message:
This code doesn't modify the LLVM structure, keep stuff const
---
Diffs of the changes:
Index: llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp
diff -u llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.27 llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.28
--- llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.27 Fri Jun 6 04:52:23 2003
+++ llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp Sat Jul 26 18:04:00 2003
@@ -133,8 +133,8 @@
for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) {
MachineBasicBlock &MBB = *I;
- BasicBlock &BB = *I->getBasicBlock();
- Instruction *TermInst = (Instruction*)BB.getTerminator();
+ const BasicBlock &BB = *I->getBasicBlock();
+ const Instruction *TermInst = (Instruction*)BB.getTerminator();
if (TermInst->getOpcode() == Instruction::Ret)
{
int ZR = TM.getRegInfo().getZeroRegNum();
Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp
diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.21 llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.22
--- llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.21 Wed Jul 16 15:30:40 2003
+++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp Sat Jul 26 18:04:00 2003
@@ -571,7 +571,7 @@
// Duplicate code of the above case for VirtualRegister, BasicBlock...
// It should really hit this case, but Sparc backend uses VRegs instead
DEBUG(std::cerr << "Saving reference to MBB\n");
- BasicBlock *BB = MO.getMachineBasicBlock()->getBasicBlock();
+ const BasicBlock *BB = MO.getMachineBasicBlock()->getBasicBlock();
unsigned* CurrPC = (unsigned*)(intptr_t)MCE.getCurrentPCValue();
BBRefs.push_back(std::make_pair(BB, std::make_pair(CurrPC, &MI)));
} else if (MO.isExternalSymbol()) {
Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.h
diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.11 llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.12
--- llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.11 Wed Jul 16 15:30:40 2003
+++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.h Sat Jul 26 18:04:00 2003
@@ -18,13 +18,13 @@
class SparcV9CodeEmitter : public MachineFunctionPass {
TargetMachine &TM;
MachineCodeEmitter &MCE;
- BasicBlock *currBB;
+ const BasicBlock *currBB;
// Tracks which instruction references which BasicBlock
- std::vector<std::pair<BasicBlock*,
+ std::vector<std::pair<const BasicBlock*,
std::pair<unsigned*,MachineInstr*> > > BBRefs;
// Tracks where each BasicBlock starts
- std::map<BasicBlock*, long> BBLocations;
+ std::map<const BasicBlock*, long> BBLocations;
// Tracks locations of Constants which are laid out in memory (e.g. FP)
// But we also need to map Constants to ConstantPool indices
More information about the llvm-commits
mailing list