summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-09-14 17:23:48 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-09-14 17:23:48 +0000
commita2b036e88b8f31c4a2169c1d5634e21c9c8eb927 (patch)
tree42c193d75f862e2c4580fe41e0da38f3a3d5765c /llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
parentc531c9ebf555c2c96d62e2d0e956697fe7011cc3 (diff)
downloadbcm5719-llvm-a2b036e88b8f31c4a2169c1d5634e21c9c8eb927.tar.gz
bcm5719-llvm-a2b036e88b8f31c4a2169c1d5634e21c9c8eb927.zip
AArch64: Use TTI branch functions in branch relaxation
The main change is to return the code size from InsertBranch/RemoveBranch. Patch mostly by Tim Northover llvm-svn: 281505
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCInstrInfo.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
index ece7e086575..5a0ed18e0f9 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -605,7 +605,10 @@ bool PPCInstrInfo::analyzeBranch(MachineBasicBlock &MBB,
return true;
}
-unsigned PPCInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const {
+unsigned PPCInstrInfo::RemoveBranch(MachineBasicBlock &MBB,
+ int *BytesRemoved) const {
+ assert(!BytesRemoved && "code size not handled");
+
MachineBasicBlock::iterator I = MBB.getLastNonDebugInstr();
if (I == MBB.end())
return 0;
@@ -638,11 +641,13 @@ unsigned PPCInstrInfo::InsertBranch(MachineBasicBlock &MBB,
MachineBasicBlock *TBB,
MachineBasicBlock *FBB,
ArrayRef<MachineOperand> Cond,
- const DebugLoc &DL) const {
+ const DebugLoc &DL,
+ int *BytesAdded) const {
// Shouldn't be a fall through.
assert(TBB && "InsertBranch must not be told to insert a fallthrough");
assert((Cond.size() == 2 || Cond.size() == 0) &&
"PPC branch conditions have two components!");
+ assert(!BytesAdded && "code size not handled");
bool isPPC64 = Subtarget.isPPC64();
OpenPOWER on IntegriCloud