aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
diff options
context:
space:
mode:
authorKarl Schimpf <kschimpf@google.com>2013-08-26 09:29:51 -0700
committerKarl Schimpf <kschimpf@google.com>2013-08-26 09:29:51 -0700
commit685d11b718cf8a017665f241f45fc144e8d622f2 (patch)
tree0312b7fa4ea846b899029c500f45052568d8ecab /lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
parentbbdf86f69eebaad59f7338f645916ed984a88861 (diff)
Elide pointer to int casts on phi nodes.
Handles the eliding of pointer to integer casts operands of the phi node. Also caches unelided casts generated in the reader (removing duplicates within the same block). This reduces the size of thawed pnacl-llc.pexe by about 2%. BUG= https://code.google.com/p/nativeclient/issues/detailid=3544 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/22909016
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp')
-rw-r--r--lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
index bee36e2631..060a6d63f4 100644
--- a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
+++ b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp
@@ -479,6 +479,7 @@ static bool ExpectsScalarValue(const Value *V, const Instruction *Arg) {
switch (I->getOpcode()) {
default:
return false;
+ case Instruction::PHI:
case Instruction::Trunc:
case Instruction::ZExt:
case Instruction::SExt:
@@ -497,7 +498,6 @@ static bool ExpectsScalarValue(const Value *V, const Instruction *Arg) {
// instructions:
// case Instruction::IntToPtr:
// case Instruction::BitCast:
- // case Instruction::PHI:
// case Instruction::Call:
}
}