diff options
author | Dan Gohman <gohman@apple.com> | 2010-03-10 01:29:39 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-03-10 01:29:39 +0000 |
commit | 9f116aa3b1ece85b863099ffa7ea1cab88ef46a8 (patch) | |
tree | 66040a82a72addb2bff5fdc8ba4e248ec4e8dbd3 /docs/WritingAnLLVMPass.html | |
parent | 00685bb5cf791fcda9fa0ceb42a6a62a07478461 (diff) | |
download | llvm-9f116aa3b1ece85b863099ffa7ea1cab88ef46a8.tar.gz llvm-9f116aa3b1ece85b863099ffa7ea1cab88ef46a8.tar.bz2 llvm-9f116aa3b1ece85b863099ffa7ea1cab88ef46a8.tar.xz |
Clarify the documentation for MachineFunctionPasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/WritingAnLLVMPass.html')
-rw-r--r-- | docs/WritingAnLLVMPass.html | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/docs/WritingAnLLVMPass.html b/docs/WritingAnLLVMPass.html index f2be1fd3bb..7dbaa9e6bd 100644 --- a/docs/WritingAnLLVMPass.html +++ b/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> |