diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2004-04-06 04:17:51 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-04-06 04:17:51 +0000 |
commit | b3b28275daf8bc16a19880ef3ae458c4de690e47 (patch) | |
tree | a0ece8696140a9b9ace6d3f8ee4ed7caa7a37c5e /docs/ExtendingLLVM.html | |
parent | a3ce42921c5669b0e8b82e4ac827e2fb3f4a238b (diff) | |
download | external_llvm-b3b28275daf8bc16a19880ef3ae458c4de690e47.zip external_llvm-b3b28275daf8bc16a19880ef3ae458c4de690e47.tar.gz external_llvm-b3b28275daf8bc16a19880ef3ae458c4de690e47.tar.bz2 |
Incorporated Chris' comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ExtendingLLVM.html')
-rw-r--r-- | docs/ExtendingLLVM.html | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/ExtendingLLVM.html b/docs/ExtendingLLVM.html index 8c880e5..7dc8d15 100644 --- a/docs/ExtendingLLVM.html +++ b/docs/ExtendingLLVM.html @@ -50,6 +50,12 @@ different passes that you intend to use with your extension, and there are <em>many</em> LLVM analyses and transformations, so it may be quite a bit of work.</p> +<p>Adding an <a href="#intrinsic">intrinsic function</a> is easier than adding +an instruction, and is transparent to optimization passes which treat it as an +unanalyzable function. If your added functionality can be expressed as a +function call, an intrinsic function is the method of choice for LLVM +extension.</p> + <p>Before you invest a significant amount of effort into a non-trivial extension, <span class="doc_warning">ask on the list</span> if what you are looking to do can be done with already-existing infrastructure, or if maybe @@ -72,11 +78,12 @@ href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM-dev</a>.</p> <div class="doc_text"> <p><span class="doc_warning">WARNING: adding instructions changes the bytecode -format, and will break compatibility with currently-existing LLVM -installations.</span> Only add an instruction if it is absolutely +format, and it will take some effort to maintain compatibility with +the previous version.</span> Only add an instruction if it is absolutely necessary.</p> <ol> + <li><tt>llvm/include/llvm/Instruction.def</tt>: add a number for your instruction and an enum name</li> @@ -117,11 +124,6 @@ to understand this new instruction.</p> <div class="doc_text"> -<p>Adding an intrinsic function is easier than adding an instruction, and is -transparent to optimization passes which treat it as an unanalyzable function. -If your added functionality can be expressed as a function call, an intrinsic -function is the method of choice for LLVM extension.</p> - <ol> <li><tt>llvm/include/llvm/Intrinsics.h</tt>: |