aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-13 00:59:38 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-13 00:59:38 +0000
commit4397294e78dbfda8e812a63adaf6f27fca7868a3 (patch)
tree2670d7bc39a62afe7476d7378dade6bd1de43edf
parent5d7802ceccdaaaec1b7612ef4adb90dbaa278ece (diff)
Avoid setIsInsideBundle in Target/R600.
This function is going to be removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170064 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/R600/R600ExpandSpecialInstrs.cpp3
-rw-r--r--lib/Target/R600/SILowerLiteralConstants.cpp18
2 files changed, 11 insertions, 10 deletions
diff --git a/lib/Target/R600/R600ExpandSpecialInstrs.cpp b/lib/Target/R600/R600ExpandSpecialInstrs.cpp
index 58221f9ec2..b6e62b7cef 100644
--- a/lib/Target/R600/R600ExpandSpecialInstrs.cpp
+++ b/lib/Target/R600/R600ExpandSpecialInstrs.cpp
@@ -318,7 +318,8 @@ bool R600ExpandSpecialInstrsPass::runOnMachineFunction(MachineFunction &MF) {
MachineInstr *NewMI =
TII->buildDefaultInstruction(MBB, I, Opcode, DstReg, Src0, Src1);
- NewMI->setIsInsideBundle(Chan != 0);
+ if (Chan != 0)
+ NewMI->bundleWithPred();
if (Mask) {
TII->addFlag(NewMI, 0, MO_FLAG_MASK);
}
diff --git a/lib/Target/R600/SILowerLiteralConstants.cpp b/lib/Target/R600/SILowerLiteralConstants.cpp
index 2d5ab0bea1..c0411e9b4d 100644
--- a/lib/Target/R600/SILowerLiteralConstants.cpp
+++ b/lib/Target/R600/SILowerLiteralConstants.cpp
@@ -89,15 +89,15 @@ bool SILowerLiteralConstantsPass::runOnMachineFunction(MachineFunction &MF) {
} else {
LoadLiteralOpcode = AMDGPU::SI_LOAD_LITERAL_F32;
}
- MachineInstr *First =
- BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(MovOpcode),
- MI.getOperand(0).getReg())
- .addReg(AMDGPU::SI_LITERAL_CONSTANT);
- MachineInstr *Last =
- BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(LoadLiteralOpcode))
- .addOperand(MI.getOperand(1));
- Last->setIsInsideBundle();
- llvm::finalizeBundle(MBB, First, Last);
+ MIBundleBuilder Bundle(MBB, I);
+ Bundle
+ .append(BuildMI(MF, MBB.findDebugLoc(I), TII->get(MovOpcode),
+ MI.getOperand(0).getReg())
+ .addReg(AMDGPU::SI_LITERAL_CONSTANT))
+ .append(BuildMI(MF, MBB.findDebugLoc(I),
+ TII->get(LoadLiteralOpcode))
+ .addOperand(MI.getOperand(1)));
+ llvm::finalizeBundle(MBB, Bundle.begin());
MI.eraseFromParent();
break;
}