summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-03-11 17:27:47 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-03-11 17:27:47 +0000
commit91ebd71e26660d2120905ac506065fd6321f1ff5 (patch)
tree2e48b7feb4e1cd80cbadd1f96cf9958642454d38 /llvm/lib/CodeGen
parent53237a9e6457713e562f7964a953b24d0892e03e (diff)
downloadbcm5719-llvm-91ebd71e26660d2120905ac506065fd6321f1ff5.tar.gz
bcm5719-llvm-91ebd71e26660d2120905ac506065fd6321f1ff5.zip
[MachineIRBuilder] Rename the setter for MBB for consistency with the getter.
llvm-svn: 263261
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp6
-rw-r--r--llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 3e0c0eccbe2..f8a5e0485fd 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -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) {
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
index ded64077979..5e0cbb13e37 100644
--- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@ -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;
}
OpenPOWER on IntegriCloud