mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
Switch mem2reg to use the new hashing infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
16003d0c0c
commit
e5121f2e22
@ -41,6 +41,7 @@
|
|||||||
#include "llvm/Analysis/ValueTracking.h"
|
#include "llvm/Analysis/ValueTracking.h"
|
||||||
#include "llvm/Transforms/Utils/Local.h"
|
#include "llvm/Transforms/Utils/Local.h"
|
||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
|
#include "llvm/ADT/Hashing.h"
|
||||||
#include "llvm/ADT/SmallPtrSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
@ -66,7 +67,8 @@ struct DenseMapInfo<std::pair<BasicBlock*, unsigned> > {
|
|||||||
return EltTy(reinterpret_cast<BasicBlock*>(-2), 0U);
|
return EltTy(reinterpret_cast<BasicBlock*>(-2), 0U);
|
||||||
}
|
}
|
||||||
static unsigned getHashValue(const std::pair<BasicBlock*, unsigned> &Val) {
|
static unsigned getHashValue(const std::pair<BasicBlock*, unsigned> &Val) {
|
||||||
return DenseMapInfo<void*>::getHashValue(Val.first) + Val.second*2;
|
using llvm::hash_value;
|
||||||
|
return static_cast<unsigned>(hash_value(Val));
|
||||||
}
|
}
|
||||||
static bool isEqual(const EltTy &LHS, const EltTy &RHS) {
|
static bool isEqual(const EltTy &LHS, const EltTy &RHS) {
|
||||||
return LHS == RHS;
|
return LHS == RHS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user