summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-10 01:29:39 +0000
committerDan Gohman <gohman@apple.com>2010-03-10 01:29:39 +0000
commit16c678c8de86d7fb0f0ad22bf3bc6ab53ee5012f (patch)
tree19c11048777634e4ffb7b5bbdb68786be704b6e0 /llvm
parentb973ea88b53c52d136adfc6cb5b5c2c6dc7c7aa6 (diff)
downloadbcm5719-llvm-16c678c8de86d7fb0f0ad22bf3bc6ab53ee5012f.tar.gz
bcm5719-llvm-16c678c8de86d7fb0f0ad22bf3bc6ab53ee5012f.zip
Clarify the documentation for MachineFunctionPasses.
llvm-svn: 98119
Diffstat (limited to 'llvm')
-rw-r--r--llvm/docs/WritingAnLLVMPass.html14
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/docs/WritingAnLLVMPass.html b/llvm/docs/WritingAnLLVMPass.html
index f2be1fd3bbd..7dbaa9e6bda 100644
--- a/llvm/docs/WritingAnLLVMPass.html
+++ b/llvm/docs/WritingAnLLVMPass.html
@@ -909,16 +909,22 @@ finalization.</p>
<p>A <tt>MachineFunctionPass</tt> is a part of the LLVM code generator that
executes on the machine-dependent representation of each LLVM function in the
-program. A <tt>MachineFunctionPass</tt> is also a <tt>FunctionPass</tt>, so all
+program.</p>
+
+<p>Code generator passes are registered and initialized specially by
+<tt>TargetMachine::addPassesToEmitFile</tt> and similar routines, so they
+cannot generally be run from the <tt>opt</tt> or <tt>bugpoint</tt>
+commands.</p>
+
+<p>A <tt>MachineFunctionPass</tt> is also a <tt>FunctionPass</tt>, so all
the restrictions that apply to a <tt>FunctionPass</tt> also apply to it.
<tt>MachineFunctionPass</tt>es also have additional restrictions. In particular,
<tt>MachineFunctionPass</tt>es are not allowed to do any of the following:</p>
<ol>
-<li>Modify any LLVM Instructions, BasicBlocks or Functions.</li>
+<li>Modify or create any LLVM IR Instructions, BasicBlocks, Arguments,
+ Functions, GlobalVariables, GlobalAliases, or Modules.</li>
<li>Modify a MachineFunction other than the one currently being processed.</li>
-<li>Add or remove MachineFunctions from the current Module.</li>
-<li>Add or remove global variables from the current Module.</li>
<li>Maintain state across invocations of <a
href="#runOnMachineFunction"><tt>runOnMachineFunction</tt></a> (including global
data)</li>
OpenPOWER on IntegriCloud