diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-03-03 01:44:33 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-03-03 01:44:33 +0000 |
commit | 506049f29f4f202a8e45feb916cc0264440a7f6d (patch) | |
tree | e64fb0945798d2e0f46b23f121554317bf0a1f84 /lib/CodeGen/MachineLICM.cpp | |
parent | d89347cb49178da65a1c72cde5d54e79007d57ae (diff) | |
download | external_llvm-506049f29f4f202a8e45feb916cc0264440a7f6d.zip external_llvm-506049f29f4f202a8e45feb916cc0264440a7f6d.tar.gz external_llvm-506049f29f4f202a8e45feb916cc0264440a7f6d.tar.bz2 |
- Change MachineInstr::isIdenticalTo to take a new option that determines whether it should skip checking defs or at least virtual register defs. This subsumes part of the TargetInstrInfo::isIdentical functionality.
- Eliminate TargetInstrInfo::isIdentical and replace it with produceSameValue. In the default case, produceSameValue just checks whether two machine instructions are identical (except for virtual register defs). But targets may override it to check for unusual cases (e.g. ARM pic loads from constant pools).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineLICM.cpp')
-rw-r--r-- | lib/CodeGen/MachineLICM.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index bb80cd6..0361694 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -445,7 +445,7 @@ MachineLICM::LookForDuplicate(const MachineInstr *MI, std::vector<const MachineInstr*> &PrevMIs) { for (unsigned i = 0, e = PrevMIs.size(); i != e; ++i) { const MachineInstr *PrevMI = PrevMIs[i]; - if (TII->isIdentical(MI, PrevMI, RegInfo)) + if (TII->produceSameValue(MI, PrevMI)) return PrevMI; } return 0; |