mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-26 07:56:43 +00:00
[EarlyCSE] Change key type of AvailableCalls to Instruction*. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269445 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af223d6177
commit
5cf889e4f5
@ -301,7 +301,8 @@ public:
|
|||||||
/// values.
|
/// values.
|
||||||
///
|
///
|
||||||
/// It uses the same generation count as loads.
|
/// It uses the same generation count as loads.
|
||||||
typedef ScopedHashTable<CallValue, std::pair<Value *, unsigned>> CallHTType;
|
typedef ScopedHashTable<CallValue, std::pair<Instruction *, unsigned>>
|
||||||
|
CallHTType;
|
||||||
CallHTType AvailableCalls;
|
CallHTType AvailableCalls;
|
||||||
|
|
||||||
/// \brief This is the current generation of the memory value.
|
/// \brief This is the current generation of the memory value.
|
||||||
@ -654,7 +655,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
|
|||||||
if (CallValue::canHandle(Inst)) {
|
if (CallValue::canHandle(Inst)) {
|
||||||
// If we have an available version of this call, and if it is the right
|
// If we have an available version of this call, and if it is the right
|
||||||
// generation, replace this instruction.
|
// generation, replace this instruction.
|
||||||
std::pair<Value *, unsigned> InVal = AvailableCalls.lookup(Inst);
|
std::pair<Instruction *, unsigned> InVal = AvailableCalls.lookup(Inst);
|
||||||
if (InVal.first != nullptr && InVal.second == CurrentGeneration) {
|
if (InVal.first != nullptr && InVal.second == CurrentGeneration) {
|
||||||
DEBUG(dbgs() << "EarlyCSE CSE CALL: " << *Inst
|
DEBUG(dbgs() << "EarlyCSE CSE CALL: " << *Inst
|
||||||
<< " to: " << *InVal.first << '\n');
|
<< " to: " << *InVal.first << '\n');
|
||||||
@ -668,7 +669,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
|
|||||||
|
|
||||||
// Otherwise, remember that we have this instruction.
|
// Otherwise, remember that we have this instruction.
|
||||||
AvailableCalls.insert(
|
AvailableCalls.insert(
|
||||||
Inst, std::pair<Value *, unsigned>(Inst, CurrentGeneration));
|
Inst, std::pair<Instruction *, unsigned>(Inst, CurrentGeneration));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user