aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/DCE.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-07-09 19:38:52 +0000
committerChris Lattner <sabre@nondot.org>2001-07-09 19:38:52 +0000
commitc262f7298f826347aee1519e20f5166b1d29e842 (patch)
tree41cab50f78413bd04fd477d0b44092779dfbe4aa /lib/Transforms/Scalar/DCE.cpp
parent8896eda9a9ea77c4b4e484ad76541ae5bf5ab773 (diff)
downloadexternal_llvm-c262f7298f826347aee1519e20f5166b1d29e842.zip
external_llvm-c262f7298f826347aee1519e20f5166b1d29e842.tar.gz
external_llvm-c262f7298f826347aee1519e20f5166b1d29e842.tar.bz2
Don't clean out the type plane of the constant pool... this is a hack. FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DCE.cpp')
-rw-r--r--lib/Transforms/Scalar/DCE.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp
index fa2c9c7..f1582d3 100644
--- a/lib/Transforms/Scalar/DCE.cpp
+++ b/lib/Transforms/Scalar/DCE.cpp
@@ -37,7 +37,12 @@ using namespace cfg;
struct ConstPoolDCE {
enum { EndOffs = 0 };
- static bool isDCEable(const Value *) { return true; }
+ static bool isDCEable(const ConstPoolVal *CPV) {
+ // TODO: The bytecode writer requires that all used types are in the
+ // constant pool for the current method. This is messy and is really
+ // irritating. FIXME
+ return CPV->getType() != Type::TypeTy; // Don't DCE Type plane constants!
+ }
};
struct BasicBlockDCE {