aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-10 23:15:24 +0000
committerChris Lattner <sabre@nondot.org>2009-10-10 23:15:24 +0000
commitf5a1fb6b247611b92d9dec9476202b477661dbe8 (patch)
treef5ea2f5452c36cb04c0c881e94decc37be13bfd0 /include/llvm
parentaa6aeb91b4863ab7c17df154d10ba61d265ca3da (diff)
downloadexternal_llvm-f5a1fb6b247611b92d9dec9476202b477661dbe8.zip
external_llvm-f5a1fb6b247611b92d9dec9476202b477661dbe8.tar.gz
external_llvm-f5a1fb6b247611b92d9dec9476202b477661dbe8.tar.bz2
add ability for clients of SSAUpdater to find out about the
PHI nodes inserted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83744 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Transforms/Utils/SSAUpdater.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Transforms/Utils/SSAUpdater.h b/include/llvm/Transforms/Utils/SSAUpdater.h
index 8af50e3..c697d04 100644
--- a/include/llvm/Transforms/Utils/SSAUpdater.h
+++ b/include/llvm/Transforms/Utils/SSAUpdater.h
@@ -18,6 +18,9 @@ namespace llvm {
class Value;
class BasicBlock;
class Use;
+ class PHINode;
+ template<typename T>
+ class SmallVectorImpl;
/// SSAUpdater - This class updates SSA form for a set of values defined in
/// multiple blocks. This is used when code duplication or another unstructured
@@ -40,8 +43,14 @@ class SSAUpdater {
/// should be empty.
//std::vector<std::pair<BasicBlock*, TrackingVH<Value> > > IncomingPredInfo;
void *IPI;
+
+ /// InsertedPHIs - If this is non-null, the SSAUpdater adds all PHI nodes that
+ /// it creates to the vector.
+ SmallVectorImpl<PHINode*> *InsertedPHIs;
public:
- SSAUpdater();
+ /// SSAUpdater constructor. If InsertedPHIs is specified, it will be filled
+ /// in with all PHI Nodes created by rewriting.
+ SSAUpdater(SmallVectorImpl<PHINode*> *InsertedPHIs = 0);
~SSAUpdater();
/// Initialize - Reset this object to get ready for a new set of SSA