1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[MachineIRBuilder] Rename the setter for MBB for consistency with the getter.

llvm-svn: 263261
This commit is contained in:
Quentin Colombet 2016-03-11 17:27:47 +00:00
parent 4c20724407
commit 87dd1b9264
3 changed files with 7 additions and 5 deletions

View File

@ -74,7 +74,7 @@ public:
/// Set the insertion point to the beginning (\p Beginning = true) or end
/// (\p Beginning = false) of \p MBB.
/// \pre \p MBB must be contained by getMF().
void setBasicBlock(MachineBasicBlock &MBB, bool Beginning = false);
void setMBB(MachineBasicBlock &MBB, bool Beginning = false);
/// Set the insertion point to before (\p Before = true) or after
/// (\p Before = false) \p MI.

View File

@ -112,7 +112,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) {
MRI = &MF.getRegInfo();
// Setup the arguments.
MachineBasicBlock &MBB = getOrCreateBB(F.front());
MIRBuilder.setBasicBlock(MBB);
MIRBuilder.setMBB(MBB);
SmallVector<unsigned, 8> VRegArgs;
for (const Argument &Arg: F.args())
VRegArgs.push_back(getOrCreateVReg(&Arg));
@ -123,7 +123,9 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) {
for (const BasicBlock &BB: F) {
MachineBasicBlock &MBB = getOrCreateBB(BB);
MIRBuilder.setBasicBlock(MBB);
// Set the insertion point of all the following translations to
// the end of this basic block.
MIRBuilder.setMBB(MBB);
for (const Instruction &Inst: BB) {
bool Succeeded = translate(Inst);
if (!Succeeded) {

View File

@ -28,7 +28,7 @@ void MachineIRBuilder::setFunction(MachineFunction &MF) {
this->MI = nullptr;
}
void MachineIRBuilder::setBasicBlock(MachineBasicBlock &MBB, bool Beginning) {
void MachineIRBuilder::setMBB(MachineBasicBlock &MBB, bool Beginning) {
this->MBB = &MBB;
Before = Beginning;
assert(&getMF() == MBB.getParent() &&
@ -37,7 +37,7 @@ void MachineIRBuilder::setBasicBlock(MachineBasicBlock &MBB, bool Beginning) {
void MachineIRBuilder::setInstr(MachineInstr &MI, bool Before) {
assert(MI.getParent() && "Instruction is not part of a basic block");
setBasicBlock(*MI.getParent());
setMBB(*MI.getParent());
this->MI = &MI;
this->Before = Before;
}