aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Type.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Speed up type resolution some more. On the testcase in PR224, for example,Chris Lattner2004-02-091-8/+27
| | | | | | | | this speeds up a release llvm-as from 21.95s to 11.21s, because before it would do an expensive traversal of the type-graph of every type resolved. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11242 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the hashing scheme in an attempt to speed up the "slow" case inChris Lattner2004-02-091-50/+68
| | | | | | | | | type resolution. Unfortunately it doesn't help. Also delete some dead debugging code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11237 91177308-0d34-0410-b5e6-96231b3b80d8
* Code cleanup in preparation for later changes. Now that ContainedTy's areChris Lattner2004-02-091-107/+75
| | | | | | | | consistent across the various type classes, we can factor out a LOT more almost-identical code. Also, add a couple of temporary statistics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11232 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that all of the derived types have disciplined interfaces, we can eliminateChris Lattner2004-02-091-66/+41
| | | | | | | | all of the ad-hoc storage of contained types. This allows getContainedType to not be virtual, and allows us to entirely delete the TypeIterator class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11230 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-091-13/+10
| | | | | | getElementTypes() is gone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using the new and improve interface to FunctionType argumentsChris Lattner2004-02-091-12/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11224 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR198Chris Lattner2003-12-311-8/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10659 91177308-0d34-0410-b5e6-96231b3b80d8
* Add commentsChris Lattner2003-12-311-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10658 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix const correctnessChris Lattner2003-11-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10229 91177308-0d34-0410-b5e6-96231b3b80d8
* Relax constrains on GEP type indexesChris Lattner2003-11-251-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10228 91177308-0d34-0410-b5e6-96231b3b80d8
* Really, there was a reason for me factoring that outChris Lattner2003-11-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10089 91177308-0d34-0410-b5e6-96231b3b80d8
* *** Significantly speed up type resultionChris Lattner2003-11-191-9/+47
| | | | | | | | | | | This change speeds up type resolution by checking to see if a type is recursive, and if it's not, using a more efficient algorithm. This dramatically reduces bytecode loading time of kc++, reducing time-to-jit kc++ --version to 17s from 33s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10088 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2003-11-191-6/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10080 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix InstCombine/2003-11-03-VarargsCallBug.llChris Lattner2003-11-031-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9681 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Speed up TypesEqual by specializing it for all of the derived types, avoidingChris Lattner2003-10-131-15/+33
| | | | | | | a lot of virtual method dispatch overhead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9078 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating lots of pointless opaque types, with short lifetimesChris Lattner2003-10-131-22/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9076 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling/grammar.Misha Brukman2003-10-101-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9023 91177308-0d34-0410-b5e6-96231b3b80d8
* Explicit copy ctors are no longer neededChris Lattner2003-10-031-21/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8844 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanupsChris Lattner2003-10-031-31/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8843 91177308-0d34-0410-b5e6-96231b3b80d8
* This checkin basically amounts to a complete rewrite of the type-resolutionChris Lattner2003-10-031-277/+116
| | | | | | | | | | | | | | | | | | | machinery. This dramatically simplifies how things works, removes irritating little corner cases, and overall improves speed and reliability. Highlights of this change are: 1. The exponential algorithm built into the code is now gone. For example the time to disassemble one bytecode file from the mesa benchmark went from taking 12.5s to taking 0.16s. 2. The linker bugs should be dramatically reduced. The one remaining bug has to do with constant handling, which I actually introduced in "union-find" checkins. 3. The code is much easier to follow, as a result of fewer special cases. It's probably also smaller. yaay. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8842 91177308-0d34-0410-b5e6-96231b3b80d8
* Dramatically simplify DerivedType::refineAbstractTypeToInternalChris Lattner2003-10-031-44/+25
| | | | | | | | | This makes use of the new PATypeHolder's to keep types from being deleted prematurely, instead of the wierd "self reference" garbage. This is easier to understand and more efficient as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8834 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the PATypeHolder use a simple union-find implementation to handleChris Lattner2003-10-021-22/+30
| | | | | | | | merging of types. This makes it MUCH more efficient than before, also making things simpler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8833 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spell-o'sChris Lattner2003-09-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8431 91177308-0d34-0410-b5e6-96231b3b80d8
* Add asserts, move code around. This gets the dropAllTypeUses partially ↵Chris Lattner2003-09-051-11/+24
| | | | | | implemented git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8361 91177308-0d34-0410-b5e6-96231b3b80d8
* Move functionality preserving changes.Chris Lattner2003-09-051-26/+14
| | | | | | | | Inline containsEquivalent Remove some //'s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8358 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor what has effectively become copy-and-pasted codeChris Lattner2003-09-051-32/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8357 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in a bunch of minor fixes, plus a whole lot of #if 0'd out code, which ↵Chris Lattner2003-09-051-25/+163
| | | | | | | | | will hopefully be enabled in the near future This does not make any functionality changes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8355 91177308-0d34-0410-b5e6-96231b3b80d8
* containsEquivalent never returns its argumentChris Lattner2003-09-041-9/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8353 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove needless usage of getDescription()Chris Lattner2003-09-041-25/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8351 91177308-0d34-0410-b5e6-96231b3b80d8
* Inline methodChris Lattner2003-09-041-23/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8350 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to be sneaky, breaking recursive types in the processChris Lattner2003-09-041-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8348 91177308-0d34-0410-b5e6-96231b3b80d8
* No need to rescan types when they are created.Chris Lattner2003-09-031-9/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8339 91177308-0d34-0410-b5e6-96231b3b80d8
* Another small speedup, this one to: 2.42sChris Lattner2003-09-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8335 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't return bogus references, and don't add an entry to the Concrete mapChris Lattner2003-09-021-6/+5
| | | | | | | unless it's not empty! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8334 91177308-0d34-0410-b5e6-96231b3b80d8
* Another optimization, speed up the testcase to 2.7sChris Lattner2003-09-021-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8333 91177308-0d34-0410-b5e6-96231b3b80d8
* Removal of explicit stack, which requires the method to be a member (so it canChris Lattner2003-09-021-33/+30
| | | | | | | | call setAbstract). Now that we just compute abstractness we can also return the computed value by value instead of as an argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8332 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the "recursive bit", not only is it unused by anyone, it was alsoChris Lattner2003-09-021-18/+12
| | | | | | | | not correctly calculated, and calculating it wrong for fun seems rather pointless. This also speeds up my favorite testcase by .25 seconds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8330 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't bother doing an exhaustive recursive walk if we are at the limit of whatChris Lattner2003-09-021-2/+4
| | | | | | | | we need to know anyway. This reduces the 2002-07-08-HugePerformanceProblem.llx down to 3.210u:0.010s, which is back in the acceptable range again git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8323 91177308-0d34-0410-b5e6-96231b3b80d8
* Ugh, fix bugs. Ok, so the last fix wasn't as great as I thought it was.Chris Lattner2003-09-021-1/+4
| | | | | | | | Now we're back to: 131.730u, 0.330s, which is still quite an improvement, but still quite unacceptable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8322 91177308-0d34-0410-b5e6-96231b3b80d8
* Further simplificationsChris Lattner2003-09-021-42/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8321 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the code to no longer compute the "type description" immediately whenChris Lattner2003-09-021-83/+188
| | | | | | | | | | | | | | | | | | | | | | | | the type is analyzed. Instead, only compute it when requested (with getDescription), and cached for reuse later. This dramatically speeds up LLVM in general because these descriptions almost _never_ need to be constructed. The only time they are used is when a type is <<'d. Printing of modules by themselves uses other code to print symbolic types when possible, so these descriptions are really only used for debugging. Also, this fixes the particularly bad case when lots of types get resolved to each other, such as during linking of large programs. In these cases, the type descriptions would be repeatedly recomputed and discarded even though: A. noone reads the description before it gets resolved, and B. many many resolutions happen at intermediate steps, causing a HUGE waste of time. Overall, this makes the getTypeDesc function much more light-weight, and fixes bug: Assembler/2002-07-08-HugePerformanceProblem.llx, which went from taking 1048.770u/19.150s (which is 17.5 MINUTES, on apoc), to taking 0.020u/0.000s, which is a nice little speedup. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8320 91177308-0d34-0410-b5e6-96231b3b80d8
* The word `dependent' has no `a'.Misha Brukman2003-08-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8030 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant const qualifiers from cast<> expressionsChris Lattner2003-07-231-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the PATypeHandle class, which was only really instantiated on ↵Chris Lattner2003-06-181-16/+16
| | | | | | 'Type'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6774 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix static constructor ordering problemChris Lattner2003-05-221-15/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6302 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove using declarationsChris Lattner2003-05-221-81/+77
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6300 91177308-0d34-0410-b5e6-96231b3b80d8
* s/convertable/convertible/gMisha Brukman2003-05-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6248 91177308-0d34-0410-b5e6-96231b3b80d8
* Make type resolution a bit more efficientChris Lattner2003-01-141-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5265 91177308-0d34-0410-b5e6-96231b3b80d8