summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-03-19 21:56:59 +0000
committerDevang Patel <dpatel@apple.com>2008-03-19 21:56:59 +0000
commit718da668ab066d742bd2d4670714c64e98ee39fb (patch)
tree5fe0b5f9f4a0c68b0968d9d3ca79bf12c794490c /llvm/docs
parentb9056838d2da8d3942e295e12e263436dc50b590 (diff)
downloadbcm5719-llvm-718da668ab066d742bd2d4670714c64e98ee39fb.tar.gz
bcm5719-llvm-718da668ab066d742bd2d4670714c64e98ee39fb.zip
PassInfo keep tracks whether a pass is an analysis pass or not.
llvm-svn: 48554
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/WritingAnLLVMPass.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/docs/WritingAnLLVMPass.html b/llvm/docs/WritingAnLLVMPass.html
index 4ae039d7539..07e736da691 100644
--- a/llvm/docs/WritingAnLLVMPass.html
+++ b/llvm/docs/WritingAnLLVMPass.html
@@ -292,13 +292,19 @@ function.</p>
initialization value is not important.</p>
<div class="doc_code"><pre>
- RegisterPass&lt;Hello&gt; X("<i>hello</i>", "<i>Hello World Pass</i>");
+ RegisterPass&lt;Hello&gt; X("<i>hello</i>", "<i>Hello World Pass</i>",
+ false /* Only looks at CFG */,
+ false /* Analysis Pass */);
} <i>// end of anonymous namespace</i>
</pre></div>
<p>Lastly, we <a href="#registration">register our class</a> <tt>Hello</tt>,
giving it a command line
-argument "<tt>hello</tt>", and a name "<tt>Hello World Pass</tt>".</p>
+argument "<tt>hello</tt>", and a name "<tt>Hello World Pass</tt>".
+Last two RegisterPass arguments are optional. Their default value is false.
+If a pass walks CFG without modifying it then third argument is set to true.
+If a pass is an analysis pass, for example dominator tree pass, then true
+is supplied as fourth argument. </p>
<p>As a whole, the <tt>.cpp</tt> file looks like:</p>
OpenPOWER on IntegriCloud