[llvm-commits] CVS: llvm/docs/ReleaseNotes.html

Chris Lattner sabre at nondot.org
Thu May 17 14:41:49 PDT 2007



Changes in directory llvm/docs:

ReleaseNotes.html updated: 1.378 -> 1.379
---
Log message:

add a section about API changes.


---
Diffs of the changes:  (+60 -11)

 ReleaseNotes.html |   71 +++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 60 insertions(+), 11 deletions(-)


Index: llvm/docs/ReleaseNotes.html
diff -u llvm/docs/ReleaseNotes.html:1.378 llvm/docs/ReleaseNotes.html:1.379
--- llvm/docs/ReleaseNotes.html:1.378	Thu May 17 14:58:57 2007
+++ llvm/docs/ReleaseNotes.html	Thu May 17 16:41:31 2007
@@ -295,13 +295,6 @@
 
 </ul>
 
-<p>Further, several significant target-specific enhancements are included in
-LLVM 2.0:</p>
-
-<ul>
-<li></li>
-</ul>
-
 </div>
 
 <!--_________________________________________________________________________-->
@@ -389,9 +382,6 @@
 <p>More specific changes include:</p>
 
 <ul>
-<li>ConstantBool, ConstantIntegral and ConstantInt classes have been merged 
-    together, we now just have ConstantInt</li>
-
 <li>LLVM no longer relies on static destructors to shut itself down.  Instead,
     it lazily initializes itself and shuts down when llvm_shutdown() is 
     explicitly called.</li>
@@ -417,6 +407,65 @@
 </ul>
 </div>
 
+<!--_________________________________________________________________________-->
+<div class="doc_subsubsection"><a name="apichanges">API Changes</a></div>
+<div class="doc_text">
+
+<p>LLVM 2.0 contains a revamp of the type system and several other significant
+internal changes.  If you are programming to the C++ API, be aware of the
+following major changes:</p>
+
+<ul>
+<li>Pass registration is slightly different in LLVM 2.0 (you now needs an
+   intptr_t in your constructor), as explained in the <a 
+   href="WritingAnLLVMPass.html#basiccode">Writing an LLVM Pass</a>
+   document.</li>
+   
+<li><tt>ConstantBool</tt>, <tt>ConstantIntegral</tt> and <tt>ConstantInt</tt>
+    classes have been merged together, we now just have
+    <tt>ConstantInt</tt>.</li>
+
+<li><tt>Type::IntTy</tt>, <tt>Type::UIntTy</tt>, <tt>Type::SByteTy</tt>, ... are
+    replaced by <tt>Type::Int8Ty</tt>, <tt>Type::Int16Ty</tt>, etc.  LLVM types
+    have always corresponded to fixed size types
+    (e.g. long was always 64-bits), but the type system no longer includes
+    information about the sign of the type.</li>
+
+<li>Several classes (<tt>CallInst</tt>, <tt>GetElementPtrInst</tt>,
+    <tt>ConstantArray</tt>, etc), that once took <tt>std::vector</tt> as
+     arguments now take ranges instead.   For example, you can create a
+    <tt>GetElementPtrInst</tt> with code like:
+    
+    <pre>
+      Value *Ops[] = { Op1, Op2, Op3 };
+      GEP = new GetElementPtrInst(BasePtr, Ops, 3);
+    </pre>
+    
+    This avoids creation of a temporary vector (and a call to malloc/free).  If
+    you have an std::vector, use code like this:
+    <pre>
+      std::vector<Value*> Ops = ...;
+      GEP = new GetElementPtrInst(BasePtr, &Ops[0], Ops.size());
+    </pre>
+
+    </li>
+    
+<li>CastInst is now abstract and its functionality is split into several parts,
+    one for each of the <a href="LangRef.html#convertops">new cast
+    instructions</a>.</li>
+
+<li><tt>Instruction::getNext()/getPrev()</tt> are now private (along with
+    <tt>BasicBlock::getNext</tt>, etc), for efficiency reasons (they are now no
+    longer just simple pointers).  Please use BasicBlock::iterator, etc instead.
+</li>
+
+<li><tt>Module::getNamedFunction()</tt> is now called
+    <tt>Module::getFunction()</tt>.</li>
+
+<li><tt>SymbolTable.h</tt> has been split into <tt>ValueSymbolTable.h</tt> and 
+<tt>TypeSymbolTable.h</tt>.</li>
+</ul>
+</div>
 
 
 <!-- *********************************************************************** -->
@@ -840,7 +889,7 @@
   src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
 
   <a href="http://llvm.org/">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2007/05/17 19:58:57 $
+  Last modified: $Date: 2007/05/17 21:41:31 $
 </address>
 
 </body>






More information about the llvm-commits mailing list