summaryrefslogtreecommitdiff
path: root/include/llvm/AbstractTypeUser.h
Commit message (Collapse)AuthorAge
* give PATypeHolder an explicit copy ctor which initializes the type pointer,Chris Lattner2010-06-29
| | | | | | | | | | | | | | and make PATypeHolder work with null pointers. The implicitly generated one didn't work on numerous levels, but was still accepted, allowing all sorts of bugs with default constructed pa type holders. Previously, they "sort of" worked if they were default constructed and then destructed. Now they really work, and you can even default construct one, then assign to it, amazing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107195 91177308-0d34-0410-b5e6-96231b3b80d8
* When a constant's type is refined, update the constant in placeDan Gohman2009-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | instead of cloning and RAUWing it. - Make AbstractTypeUser a friend of Value so that it can offer its subclasses a way to update a Value's type in place. This is better than a universally visible setType method on Value, and it's sufficient for the immediate need. - Eliminate the constant "convert" functions. This eliminates a lot of logic duplication, and fixes a complicated bug where a constant can't actually be cloned during the type refinement process because some of the types that its folder needs are half-destroyed, being in the middle of refinement themselves. - Move the getValType functions from being static overloaded functions in Constants.cpp to be members of class template specializations in ConstantsContext.h. This means that the code ends up getting instantiated twice, however it also makes it possible to eliminate all "convert" functions, so it's not a big net code size increase. And if desired, the duplicate instantiations could be eliminated with some reorganization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81861 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix apostrophos.Dan Gohman2009-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81856 91177308-0d34-0410-b5e6-96231b3b80d8
* Another attempt at fixing PR2975.Torok Edwin2009-04-07
| | | | | | | Types can have references to eachother, so we can't just call destroy on them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68523 91177308-0d34-0410-b5e6-96231b3b80d8
* implement simplify_type for PATypeHolder so that isa<FooType>(PATypeHolder)Chris Lattner2008-12-27
| | | | | | | works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61448 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-29
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-05
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid invalid C++ token in #errorChris Lattner2007-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36674 91177308-0d34-0410-b5e6-96231b3b80d8
* Have compiler enforce this.Jeff Cohen2007-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36353 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build problem with Gentoo 4.1.1-r3.Jeff Cohen2007-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36348 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR778:Reid Spencer2006-06-05
| | | | | | | | Move file-scoped documentation to class-scoped so it is more readily accessible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28689 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a dead methodChris Lattner2005-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24325 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tabs to spacesMisha Brukman2005-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21433 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert 'struct' to 'class' in various places to adhere to the coding standardsChris Lattner2004-10-27
| | | | | | | and work better with VC++. Patch contributed by Morten Ofstad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8
* New methodsChris Lattner2004-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15462 91177308-0d34-0410-b5e6-96231b3b80d8
* Make PATypeHolder and friends return non-const pointers to the types theyChris Lattner2004-07-14
| | | | | | | | hold. Because types are basically immutable anyway, they should not be referenced as "const Type*" everywhere. Just "Type*" should suffice! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14824 91177308-0d34-0410-b5e6-96231b3b80d8
* Apparently a particular vendor compiler uses the struct/class tag to MANGLEChris Lattner2004-06-08
| | | | | | | | | | | | symbols with. Therefore, if you do not use struct/class consistently, you can get LINK ERRORS. grr. This fixes the link errors for libsupport and vmcore. -Chris git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14070 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that at least one virtual method is defined in a .cpp file to avoidChris Lattner2004-02-26
| | | | | | | 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
* Hrm is a really nasty ommission. The lack of this destructor was causing ↵Chris Lattner2003-12-23
| | | | | | | | | | abstract types to never be deleted, manifesting itself as many OpaqueType objects being leaked. Whoops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10601 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM copyright header (for lack of a better term).John Criswell2003-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
* This checkin basically amounts to a complete rewrite of the type-resolutionChris Lattner2003-10-03
| | | | | | | | | | | | | | | | | | | 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
* Make the PATypeHolder use a simple union-find implementation to handleChris Lattner2003-10-02
| | | | | | | | 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
* There is no reason for the PATypeHolder class to derive from theChris Lattner2003-10-02
| | | | | | | PATypeHandle class git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8825 91177308-0d34-0410-b5e6-96231b3b80d8
* Update commentChris Lattner2003-09-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8783 91177308-0d34-0410-b5e6-96231b3b80d8
* Standardize header file commentsChris Lattner2003-09-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove inline declarations that GCC 3.3 doesn't like without a bodyChris Lattner2003-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7312 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the C++ <cassert> header, not the C <assert.h> headerChris Lattner2003-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7310 91177308-0d34-0410-b5e6-96231b3b80d8
* Merged in autoconf branch. This provides configuration via the autoconfJohn Criswell2003-06-30
| | | | | | | system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the PATypeHandle class, which was only really instantiated on ↵Chris Lattner2003-06-18
| | | | | | 'Type'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6774 91177308-0d34-0410-b5e6-96231b3b80d8
* Must #include assert.hChris Lattner2003-01-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5267 91177308-0d34-0410-b5e6-96231b3b80d8
* s/MethodType/FunctionTypeChris Lattner2002-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2115 91177308-0d34-0410-b5e6-96231b3b80d8
* * Add dump() virtual function to AbstractType user to help track down bugsChris Lattner2002-04-04
| | | | | | | | * PATypeHolder is now a nontemplated class, because it was (almost) only ever instantiated with 'Type' as the parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2095 91177308-0d34-0410-b5e6-96231b3b80d8
* Add castsChris Lattner2001-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1328 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix major bugs in type resolutionChris Lattner2001-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1092 91177308-0d34-0410-b5e6-96231b3b80d8
* New file for supporting abstract typesChris Lattner2001-09-07
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@502 91177308-0d34-0410-b5e6-96231b3b80d8