aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Type.cpp
Commit message (Collapse)AuthorAgeFilesLines
* No Need to live in the past.Jim Laskey2006-07-261-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29282 91177308-0d34-0410-b5e6-96231b3b80d8
* Moving this function to a permanent home to prevent a dependency cycle createdJim Laskey2006-07-251-0/+19
| | | | | | | by the inline heuristic. Was preventing llvm-gcc4 from building. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29278 91177308-0d34-0410-b5e6-96231b3b80d8
* Use hidden visibility to reduce the sizes of some .o files. This chops 60K ↵Chris Lattner2006-06-281-1/+2
| | | | | | off a release llvm-dis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28969 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix grammar in a comment.Reid Spencer2006-05-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28534 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a hack required by V9.Chris Lattner2006-04-211-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27931 91177308-0d34-0410-b5e6-96231b3b80d8
* vector casts never reinterpret bitsChris Lattner2006-04-021-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27354 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix DerivedType::dropAllTypeUses to not change the number of types in aChris Lattner2005-11-161-22/+65
| | | | | | | | | | | | | | type when it gets refined. This allows us to hash on this crucial value. * Fix several issues in TypeMap::RefineAbstractType that prevent it from handling hash values that change correctly. * Define hashTypeStructure to not always return 0. :) This last part (which depends on the first two) speeds up gccld time on eon from 3.78s to 2.75s with a release build (a 28% speedup!). This resolves PR474. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24372 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some dummy method implsChris Lattner2005-11-131-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24345 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some methods around. Refactor the parts of TypeMap that do not dependChris Lattner2005-11-131-50/+52
| | | | | | | | on its template arguments into a base class so that the code isn't duplicated 5 times. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24343 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the type refinement case completely out of the type-becomes-concreteChris Lattner2005-11-131-35/+33
| | | | | | | case, simplifying the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24340 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate the type-became-concrete case from the type-is-resolved case, theChris Lattner2005-11-131-21/+31
| | | | | | | | former of which takes much less work than the later. This speeds up linking eon from 3.749 to 3.637s with a release build (about 3%). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24338 91177308-0d34-0410-b5e6-96231b3b80d8
* Unswitch a loop, add more assertions, eliminate use of removeUserFromConcrete.Chris Lattner2005-11-121-10/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24324 91177308-0d34-0410-b5e6-96231b3b80d8
* Tiny speedup, improve comments and code organization.Chris Lattner2005-11-121-23/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24323 91177308-0d34-0410-b5e6-96231b3b80d8
* Force packed vectors to be a power of two in length.Chris Lattner2005-11-101-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24264 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the sparc backend.Chris Lattner2005-04-271-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21598 91177308-0d34-0410-b5e6-96231b3b80d8
* don't let Reid build void*'s :)Chris Lattner2005-04-261-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21571 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in my previous checkinChris Lattner2005-04-231-22/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21485 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method, remove last use of Type.defChris Lattner2005-04-231-2/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21483 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-48/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
* correct the computation of the isAbstract bit for types.Chris Lattner2005-03-091-3/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20533 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a nasty order of evaluation bug that Gabor Greif ran into. Here's anChris Lattner2005-03-021-1/+2
| | | | | | | | | | | | | | | | | | explanation from IRC: |sabre| I think it's an order of evaluation thing |sabre| for me, the RHS of the assignment is evaluated first |sabre| getTypeDescription checks to see if ConcreteTypeDescription[Ty] contains anything |sabre| since it doesn't, it computes and returns the value |sabre| this gets put into the map. |sabre| For you, the LHS is evaluated first. |sabre| Map[Ty] (aka ConcreteTypeDescriptions[Ty]) inserts an empty string into the map, returning a reference |sabre| getTypeDesc then sees the empty string in the map |sabre| and returns it |sabre| bork :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20394 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow arrays to have more than 4G elements.Chris Lattner2005-01-081-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19395 91177308-0d34-0410-b5e6-96231b3b80d8
* Get GEP's working with packed types. Contributed by Morten Ofstad!Chris Lattner2004-12-011-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18404 91177308-0d34-0410-b5e6-96231b3b80d8
* Add hooks to free all memory allocated by the singleton factories in theseChris Lattner2004-11-191-0/+32
| | | | | | | files. Patch contributed by Morten Ofstad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17995 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup and speedup. This reduces link-time for 252.eon from 35.5sChris Lattner2004-11-161-22/+22
| | | | | | | to 34.7s with a profile build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17906 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this function work with non-abstract types.Chris Lattner2004-11-161-14/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17905 91177308-0d34-0410-b5e6-96231b3b80d8
* Unfortunately the fix for the previous bug introduced the previousChris Lattner2004-10-071-41/+67
| | | | | | | | | | | exponential behavior (bork!). This patch processes stuff with an explicit SCC finder, allowing the algorithm to be more clear, efficient, and also (as a bonus) correct! This gets us back to taking 0.6s to disassemble my horrible .bc file that previously took something > 30 mins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16811 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in my previous change. Unfortunately this reverts most of theChris Lattner2004-10-071-3/+4
| | | | | | | speedup, but has the advantage of not breaking a bunch of programs! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16806 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Type::isAbstract to have better comments, a more correct nameChris Lattner2004-10-061-12/+19
| | | | | | | | | | | | | (PromoteAbstractToConcrete), and to use a set to avoid recomputation. In particular, this set eliminates the potentially exponential cases from this little recursive algorithm. On a particularly nasty testcase, llvm-dis on the .bc file went from 34 minutes (which is when I killed it, it still hadn't finished) to 0.57s. Remember kids, exponential algorithms are bad. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16772 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-011-3/+3
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Packed types, brought to you by Brad JonesBrian Gaeke2004-08-201-0/+84
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15938 91177308-0d34-0410-b5e6-96231b3b80d8
* Catch aggregates passed by value sooner rather than later.Chris Lattner2004-07-131-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14800 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused methodChris Lattner2004-07-091-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14726 91177308-0d34-0410-b5e6-96231b3b80d8
* The uid mapping is no moreChris Lattner2004-07-081-12/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14708 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the SignedType and UnsignedType classes.Chris Lattner2004-07-081-49/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14695 91177308-0d34-0410-b5e6-96231b3b80d8
* The bytecode reader wants to be able to read types that are not quite resolvedChris Lattner2004-07-071-1/+2
| | | | | | | yet, then resolve them in it's own sweet time. We must support this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14666 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure people don't make functiontypes with an invalid return typeChris Lattner2004-07-061-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14654 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct syntax typo .. ; -> :Reid Spencer2004-07-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14619 91177308-0d34-0410-b5e6-96231b3b80d8
* - Changes for bug 122Reid Spencer2004-07-041-21/+46
| | | | | | | | | - Remove Tabs - Add inserters needed since Value doesn't implement them any more - Move some functions here to avoid cyclic header file dependencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14618 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Type::isSized() to realize that "{ opaque }" is not sizedChris Lattner2004-07-021-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14585 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()Chris Lattner2004-06-171-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
* Squish a warningChris Lattner2004-06-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14020 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use size() when you mean empty()Chris Lattner2004-05-281-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13876 91177308-0d34-0410-b5e6-96231b3b80d8
* Support getelementptr instructions which use uint's to index into structureChris Lattner2004-04-051-5/+4
| | | | | | | | types and can have arbitrary 32- and 64-bit integer types indexing into sequential types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12653 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an assertionChris Lattner2004-03-291-1/+1
| | | | | | | Contributed by Reid Spencer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12524 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two methods which have been needed for a long time: ↵Chris Lattner2004-03-261-0/+35
| | | | | | Type::get(Un)signedVersion git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12522 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that at least one virtual method is defined in a .cpp file to avoidChris Lattner2004-02-261-0/+1
| | | | | | | having the compiler emit RTTI and vtables to EVERY translation unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11871 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to recent changesChris Lattner2004-02-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11514 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the statisticsChris Lattner2004-02-091-11/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11243 91177308-0d34-0410-b5e6-96231b3b80d8