summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-07-22 20:53:20 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-07-22 20:53:20 +0000
commit6a33f36645643f5c724c781fbcc297dafb76e771 (patch)
tree1e536b7a5c437d21a0731fb54053681104eac20c /docs
parentf02dbf0f2253ed2f03e14d414a2422b6c817097d (diff)
downloadexternal_llvm-6a33f36645643f5c724c781fbcc297dafb76e771.zip
external_llvm-6a33f36645643f5c724c781fbcc297dafb76e771.tar.gz
external_llvm-6a33f36645643f5c724c781fbcc297dafb76e771.tar.bz2
Add documentation for runOnMachineFunction()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/WritingAnLLVMPass.html28
1 files changed, 27 insertions, 1 deletions
diff --git a/docs/WritingAnLLVMPass.html b/docs/WritingAnLLVMPass.html
index 414ed12..a39369f 100644
--- a/docs/WritingAnLLVMPass.html
+++ b/docs/WritingAnLLVMPass.html
@@ -42,6 +42,10 @@
</ul>
<li><a href="#MachineFunctionPass">The <tt>MachineFunctionPass</tt>
class</a>
+ <ul>
+ <li><a href="#runOnMachineFunction">The
+ <tt>runOnMachineFunction(MachineFunction &amp;)</tt> method</a>
+ </ul>
</ul>
<li><a href="#registration">Pass Registration</a>
<ul>
@@ -597,6 +601,28 @@ the following:
</ol><p>
+<!-- _______________________________________________________________________ -->
+</ul><h4><a name="runOnMachineFunction"><hr size=0>The
+<tt>runOnMachineFunction(MachineFunction &amp;MF)</tt> method</h4><ul>
+
+<pre>
+ <b>virtual bool</b> runOnMachineFunction(MachineFunction &amp;MF) = 0;
+</pre></p>
+
+<tt>runOnMachineFunction</tt> can be considered the main entry point
+of a <tt>MachineFunctionPass</tt>; that is, you should override this
+method to do the work of your <tt>MachineFunctionPass</tt>. <p>
+
+The <tt>runOnMachineFunction</tt> method is called on every
+<tt>MachineFunction</tt> in a <tt>Module</tt>, so that the
+<tt>MachineFunctionPass</tt> may perform optimizations on the
+machine-dependent representation of the function. If you want to get
+at the LLVM <tt>Function</tt> for the <tt>MachineFunction</tt> you're
+working on, use <tt>MachineFunction</tt>'s <tt>getFunction()</tt>
+accessor method -- but remember, you may not modify the LLVM
+<tt>Function</tt> or its contents from a
+<tt>MachineFunctionPass</tt>. <p>
+
<!-- *********************************************************************** -->
</ul><table width="100%" bgcolor="#330077" border=0 cellpadding=4 cellspacing=0>
<tr><td align=center><font color="#EEEEFF" size=+2 face="Georgia,Palatino"><b>
@@ -1250,6 +1276,6 @@ href="#Pass"><tt>Pass</tt></a>, only the other way around.<p>
<address><a href="mailto:sabre@nondot.org">Chris Lattner</a></address>
<!-- Created: Tue Aug 6 15:00:33 CDT 2002 -->
<!-- hhmts start -->
-Last modified: Mon Jul 14 12:12:53 CDT 2003
+Last modified: Tue Jul 22 15:52:30 CDT 2003
<!-- hhmts end -->
</font></body></html>