OSDN Git Service

If a variable can only hold two values, and is not already a bool, shrink it
authorChris Lattner <sabre@nondot.org>
Sun, 12 Dec 2004 05:53:50 +0000 (05:53 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 12 Dec 2004 05:53:50 +0000 (05:53 +0000)
commit96a86b2993c03be1de934b2c4e10ed08dbacfe0a
tree47e62fa96344175212b18d7e20ccae8cbbfcffc6
parentef07cc5e489def0561d45d850d4eeccee723d5db
If a variable can only hold two values, and is not already a bool, shrink it
down to actually BE a bool.  This allows simple value range propagation
stuff work harder, deleting comparisons in bzip2 in some hot loops.

This implements GlobalOpt/integer-bool.ll, which is the essence of the
loop condition distilled into a testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18817 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp