From 97c383bc368b780c1f684438c6538eb836133725 Mon Sep 17 00:00:00 2001 From: Gerolf Hoflehner Date: Thu, 7 Aug 2014 21:40:58 +0000 Subject: 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 --- llvm/lib/CodeGen/MachineCombiner.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') 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 MBBarr(MBB); + //ArrayRef MBBarr(MBB); + SmallVector MBBarr; + MBBarr.push_back(MBB); unsigned ResLenBeforeCombine = BlockTrace.getResourceLength(MBBarr); // Deal with SC rather than Instructions. -- cgit v1.2.3