summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCombiner.cpp
diff options
context:
space:
mode:
authorGerolf Hoflehner <ghoflehner@apple.com>2014-08-07 21:40:58 +0000
committerGerolf Hoflehner <ghoflehner@apple.com>2014-08-07 21:40:58 +0000
commit97c383bc368b780c1f684438c6538eb836133725 (patch)
tree2c16f0509f6b6fcd521cbaa92a5c65859582d8a1 /llvm/lib/CodeGen/MachineCombiner.cpp
parentae2a9a236f5449f6bd41e740e7a7ee2b91da7b06 (diff)
downloadbcm5719-llvm-97c383bc368b780c1f684438c6538eb836133725.tar.gz
bcm5719-llvm-97c383bc368b780c1f684438c6538eb836133725.zip
MachineCombiner Pass for selecting faster instruction sequence on AArch64
Re-commit of r214832,r21469 with a work-around that avoids the previous problem with gcc build compilers The work-around is to use SmallVector instead of ArrayRef of basic blocks in preservesResourceLen()/MachineCombiner.cpp llvm-svn: 215151
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCombiner.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index 7cf3506c0a5..032b4ee5cbb 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -273,7 +273,9 @@ bool MachineCombiner::preservesResourceLen(
// Compute current resource length
- ArrayRef<const MachineBasicBlock *> MBBarr(MBB);
+ //ArrayRef<const MachineBasicBlock *> MBBarr(MBB);
+ SmallVector <const MachineBasicBlock *, 1> MBBarr;
+ MBBarr.push_back(MBB);
unsigned ResLenBeforeCombine = BlockTrace.getResourceLength(MBBarr);
// Deal with SC rather than Instructions.
OpenPOWER on IntegriCloud