projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Codegen pass definition cleanup. No functionality.
[oota-llvm.git]
/
lib
/
CodeGen
/
MachineCopyPropagation.cpp
diff --git
a/lib/CodeGen/MachineCopyPropagation.cpp
b/lib/CodeGen/MachineCopyPropagation.cpp
index c82f81b6b5840e99b4378d5bda8cf0268a0f6c8e..ed3f3498f5fa7295bcc22a793037b2de3c7e2c56 100644
(file)
--- a/
lib/CodeGen/MachineCopyPropagation.cpp
+++ b/
lib/CodeGen/MachineCopyPropagation.cpp
@@
-33,7
+33,7
@@
namespace {
class MachineCopyPropagation : public MachineFunctionPass {
const TargetRegisterInfo *TRI;
BitVector ReservedRegs;
class MachineCopyPropagation : public MachineFunctionPass {
const TargetRegisterInfo *TRI;
BitVector ReservedRegs;
-
+
public:
static char ID; // Pass identification, replacement for typeid
MachineCopyPropagation() : MachineFunctionPass(ID) {
public:
static char ID; // Pass identification, replacement for typeid
MachineCopyPropagation() : MachineFunctionPass(ID) {
@@
-50,14
+50,11
@@
namespace {
};
}
char MachineCopyPropagation::ID = 0;
};
}
char MachineCopyPropagation::ID = 0;
+char &llvm::MachineCopyPropagationID = MachineCopyPropagation::ID;
INITIALIZE_PASS(MachineCopyPropagation, "machine-cp",
"Machine Copy Propagation Pass", false, false)
INITIALIZE_PASS(MachineCopyPropagation, "machine-cp",
"Machine Copy Propagation Pass", false, false)
-FunctionPass *llvm::createMachineCopyPropagationPass() {
- return new MachineCopyPropagation();
-}
-
void
MachineCopyPropagation::SourceNoLongerAvailable(unsigned Reg,
DenseMap<unsigned, unsigned> &SrcMap,
void
MachineCopyPropagation::SourceNoLongerAvailable(unsigned Reg,
DenseMap<unsigned, unsigned> &SrcMap,
@@
-142,7
+139,12
@@
bool MachineCopyPropagation::CopyPropagateBlock(MachineBasicBlock &MBB) {
// %RSP<def> = COPY %RAX
// CALL
// %RAX<def> = COPY %RSP
// %RSP<def> = COPY %RAX
// CALL
// %RAX<def> = COPY %RSP
- CopyMI->getOperand(1).setIsKill(false);
+
+ // Clear any kills of Def between CopyMI and MI. This extends the
+ // live range.
+ for (MachineBasicBlock::iterator I = CopyMI, E = MI; I != E; ++I)
+ I->clearRegisterKills(Def, TRI);
+
MI->eraseFromParent();
Changed = true;
++NumDeletes;
MI->eraseFromParent();
Changed = true;
++NumDeletes;