Make InlineSpiller bundle-aware.

Simply treat bundles as instructions. Spill code is inserted between
bundles, never inside a bundle.  Rewrite all operands in a bundle at
once.

Don't attempt and memory operand folding inside bundles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151787 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2012-03-01 01:43:25 +00:00
parent 5c2b4ea73c
commit 66c994c2db
2 changed files with 57 additions and 45 deletions

View File

@@ -15,6 +15,7 @@
#define LLVM_CODEGEN_MACHINEREGISTERINFO_H
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/CodeGen/MachineInstrBundle.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/IndexedMap.h"
#include <vector>
@@ -483,6 +484,14 @@ public:
return MI;
}
MachineInstr *skipBundle() {
if (!Op) return 0;
MachineInstr *MI = getBundleStart(Op->getParent());
do ++*this;
while (Op && getBundleStart(Op->getParent()) == MI);
return MI;
}
MachineOperand &getOperand() const {
assert(Op && "Cannot dereference end iterator!");
return *Op;