diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-12-15 07:26:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-12-15 07:26:43 +0000 |
| commit | 45d040bd85e0775156c65d99b329b7da5e764ef7 (patch) | |
| tree | 4d52506fa579b13ad859c3fb2322b536cbafc4f2 /llvm/lib/Transforms | |
| parent | 66a664870b0faf134399f3182abde0c821d7f040 (diff) | |
| download | bcm5719-llvm-45d040bd85e0775156c65d99b329b7da5e764ef7.tar.gz bcm5719-llvm-45d040bd85e0775156c65d99b329b7da5e764ef7.zip | |
Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.
llvm-svn: 91421
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SCCVN.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 1 |
4 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index dcc9dd4f49c..222792bc75c 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -190,8 +190,11 @@ template <> struct DenseMapInfo<Expression> { static bool isEqual(const Expression &LHS, const Expression &RHS) { return LHS == RHS; } - static bool isPod() { return true; } }; + +template <> +struct isPodLike<Expression> { static const bool value = true; }; + } //===----------------------------------------------------------------------===// diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 2b4b66b5001..b9c536fe1e5 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -11200,8 +11200,9 @@ namespace llvm { return LHS.PN == RHS.PN && LHS.Shift == RHS.Shift && LHS.Width == RHS.Width; } - static bool isPod() { return true; } }; + template <> + struct isPodLike<LoweredPHIRecord> { static const bool value = true; }; } diff --git a/llvm/lib/Transforms/Scalar/SCCVN.cpp b/llvm/lib/Transforms/Scalar/SCCVN.cpp index db87874107a..dbc82e13017 100644 --- a/llvm/lib/Transforms/Scalar/SCCVN.cpp +++ b/llvm/lib/Transforms/Scalar/SCCVN.cpp @@ -154,8 +154,10 @@ template <> struct DenseMapInfo<Expression> { static bool isEqual(const Expression &LHS, const Expression &RHS) { return LHS == RHS; } - static bool isPod() { return true; } }; +template <> +struct isPodLike<Expression> { static const bool value = true; }; + } //===----------------------------------------------------------------------===// diff --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index 438ac43bcba..846e432a7df 100644 --- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -55,7 +55,6 @@ struct DenseMapInfo<std::pair<BasicBlock*, unsigned> > { static bool isEqual(const EltTy &LHS, const EltTy &RHS) { return LHS == RHS; } - static bool isPod() { return true; } }; } |

