From 685d11b718cf8a017665f241f45fc144e8d622f2 Mon Sep 17 00:00:00 2001 From: Karl Schimpf Date: Mon, 26 Aug 2013 09:29:51 -0700 Subject: 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 --- lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp') 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: } } -- cgit v1.2.3-18-g5258