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
commitc758209153ca0f6da6737f25ada269c573fba456 (patch)
tree88b334fb5710b2d63089bdb840135dc1e8f7ebfa /docs/WritingAnLLVMPass.html
parent7925ed05d0245aca0b0b2ea8d8a0b35b77c5ebd4 (diff)
downloadexternal_llvm-c758209153ca0f6da6737f25ada269c573fba456.zip
external_llvm-c758209153ca0f6da6737f25ada269c573fba456.tar.gz
external_llvm-c758209153ca0f6da6737f25ada269c573fba456.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>