[llvm-commits] CVS: llvm/include/llvm/Type.h

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 23 18:08:50 PST 2005



Changes in directory llvm/include/llvm:

Type.h updated: 1.68 -> 1.69
---
Log message:

This giant patch speeds up Type::isSized().  Before, this would have to search
large nested types over and over again to determine if they are sized or not.
Now, isSized() is able to make snap decisions about all concrete types, which 
are a common occurance (and includes all primitives).

On 177.mesa, this speeds up DSE from 39.5s -> 21.3s and GCSE from
13.2s -> 11.3s, reducing gccas time from 80s -> 61s (this is a debug build).

DSE and GCSE are still too slow on this testcase, but this is a simple 
improvement.


---
Diffs of the changes:  (+1 -2)

 Type.h |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


Index: llvm/include/llvm/Type.h
diff -u llvm/include/llvm/Type.h:1.68 llvm/include/llvm/Type.h:1.69
--- llvm/include/llvm/Type.h:1.68	Mon Dec 13 10:28:53 2004
+++ llvm/include/llvm/Type.h	Sun Jan 23 20:08:34 2005
@@ -201,8 +201,7 @@
   /// TargetData subsystem to do this.
   ///
   bool isSized() const {
-    return (ID >= BoolTyID && ID <= DoubleTyID) || ID == PointerTyID || 
-           isSizedDerivedType();
+    return !isAbstract() || ID == PointerTyID || isSizedDerivedType();
   }
 
   /// getPrimitiveSize - Return the basic size of this type if it is a primitive






More information about the llvm-commits mailing list