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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215151 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gerolf Hoflehner
2014-08-07 21:40:58 +00:00
parent 31dec853c6
commit e4fa341dde
8 changed files with 564 additions and 21 deletions

View File

@ -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.