aboutsummaryrefslogtreecommitdiffstats
path: root/docs/WritingAnLLVMPass.html
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
commit3aab76e3790476cc00f04706e7c6d71fcf2e92a1 (patch)
tree88b334fb5710b2d63089bdb840135dc1e8f7ebfa /docs/WritingAnLLVMPass.html
parent9f15357bf1a50b2bec0864bfbf4d6a8aa8c8148c (diff)
downloadexternal_llvm-3aab76e3790476cc00f04706e7c6d71fcf2e92a1.zip
external_llvm-3aab76e3790476cc00f04706e7c6d71fcf2e92a1.tar.gz
external_llvm-3aab76e3790476cc00f04706e7c6d71fcf2e92a1.tar.bz2
PassInfo keep tracks whether a pass is an analysis pass or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/WritingAnLLVMPass.html')
-rw-r--r--docs/WritingAnLLVMPass.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/WritingAnLLVMPass.html b/docs/WritingAnLLVMPass.html
index 4ae039d..07e736d 100644
--- a/docs/WritingAnLLVMPass.html
+++ b/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>