diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-10 05:40:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-10 05:40:37 +0000 |
commit | 531823f125af948098ef5e1131bf54ce287fb553 (patch) | |
tree | 122f2467051723f96fa724e7f1a67936ee122651 /include | |
parent | 38fc13149ce3b1d6d398013c03da84e7b8df992a (diff) | |
download | external_llvm-531823f125af948098ef5e1131bf54ce287fb553.zip external_llvm-531823f125af948098ef5e1131bf54ce287fb553.tar.gz external_llvm-531823f125af948098ef5e1131bf54ce287fb553.tar.bz2 |
Add prototype for the PiNodeInserter pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Transforms/Scalar.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index ba8b90c..b649dee 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -98,6 +98,29 @@ Pass *createInstructionCombiningPass(); //===----------------------------------------------------------------------===// // +// PiNodeInsertion - This pass inserts single entry Phi nodes into basic blocks +// that are preceeded by a conditional branch, where the branch gives +// information about the operands of the condition. For example, this C code: +// if (x == 0) { ... = x + 4; +// becomes: +// if (x == 0) { +// x2 = phi(x); // Node that can hold data flow information about X +// ... = x2 + 4; +// +// Since the direction of the condition branch gives information about X itself +// (whether or not it is zero), some passes (like value numbering or ABCD) can +// use the inserted Phi/Pi nodes as a place to attach information, in this case +// saying that X has a value of 0 in this scope. The power of this analysis +// information is that "in the scope" translates to "for all uses of x2". +// +// This special form of Phi node is refered to as a Pi node, following the +// terminology defined in the "Array Bounds Checks on Demand" paper. +// +Pass *createPiNodeInsertionPass(); + + +//===----------------------------------------------------------------------===// +// // This pass is used to promote memory references to be register references. A // simple example of the transformation performed by this pass is: // |