summaryrefslogtreecommitdiff
path: root/include/llvm/User.h
Commit message (Collapse)AuthorAge
* Move the definition of value_use_iterator::getOperandNo to User.h where theChris Lattner2006-05-08
| | | | | | | | definition of the User class is available, this fixes the build with some compiler versions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28163 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
* Fix spelling, patch contributed by Gabor GreifChris Lattner2005-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20342 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of storing operands as std::vector<Use>, just maintain a pointerChris Lattner2005-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and num operands in the User class. this allows us to embed the operands directly in the subclasses if possible. For example, for binary operators we store the two operands in the derived class. The has several effects: 1. it improves locality because the operands and instruction are together 2. it makes accesses to operands faster (one less load) if you access them through the derived class pointer. For example this: Value *GetBinaryOperatorOp(BinaryOperator *I, int i) { return I->getOperand(i); } Was compiled to: _Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi: movl 4(%esp), %edx movl 8(%esp), %eax sall $4, %eax movl 24(%edx), %ecx addl %ecx, %eax movl (%eax), %eax ret and is now compiled to: _Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi: movl 8(%esp), %eax movl 4(%esp), %edx sall $4, %eax addl %edx, %eax movl 44(%eax), %eax ret Accesses through "Instruction*" are unmodified. 3. This reduces memory consumption (by about 3%) by eliminating 1 word of vector overhead and a malloc header on a seperate object. 4. This speeds up gccas about 10% (both debug and release builds) on large things (such as 176.gcc). For example, it takes a debug build from 172.9 -> 155.6s and a release gccas from 67.7 -> 61.8s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19883 91177308-0d34-0410-b5e6-96231b3b80d8
* Warning fixes for VC++, contributed by Morten Ofstad!Chris Lattner2004-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17831 91177308-0d34-0410-b5e6-96231b3b80d8
* bug 122:Reid Spencer2004-07-17
| | | | | | | Remove redundancy in User::classof(Value*); GlobalValue isa Constant now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14924 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ctor inline, change ValueTy ->unsignedChris Lattner2004-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14430 91177308-0d34-0410-b5e6-96231b3b80d8
* Consider anything with a ValueType that is >= Instruction to be an instructionChris Lattner2004-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14429 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for PR114: Thanks to Reid Spencer!Chris Lattner2003-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 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
* lalalaChris Lattner2003-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9146 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new op_erase methodChris Lattner2003-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9068 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method to reserve space for operandsChris Lattner2003-10-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8992 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded dtorsChris Lattner2003-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8896 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 a ton of extraneous #includesChris Lattner2003-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new op_erase methodChris Lattner2003-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6757 91177308-0d34-0410-b5e6-96231b3b80d8
* Included assert.h so that the code compiles under newer versions of GCC.John Criswell2003-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't require the user to do something like isa<foo>(II->get()). The ->getChris Lattner2003-05-29
| | | | | | | should be implicit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6395 91177308-0d34-0410-b5e6-96231b3b80d8
* - Remove the User::eraseOperand method which is never used, reallyChris Lattner2002-10-01
| | | | | | | dangerous, and not something we want to expose. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4007 91177308-0d34-0410-b5e6-96231b3b80d8
* Add routines to update or erase operands (and to do so without externalVikram S. Adve2002-09-16
| | | | | | | assumptions about which operand number stores what operand). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3750 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert comments to Doxygen styleChris Lattner2002-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3507 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneccesary methodChris Lattner2002-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3452 91177308-0d34-0410-b5e6-96231b3b80d8
* Add method copyOperands().Vikram S. Adve2002-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3445 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a misguided API extensionChris Lattner2002-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1926 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to build successfully with GCC 3.02Chris Lattner2002-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
* Renamed inst_const_iterator -> const_inst_iteratorChris Lattner2001-12-04
| | | | | | | | Renamed op_const_iterator -> const_op_iterator Renamed PointerType::getValueType() -> PointerType::getElementType() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1408 91177308-0d34-0410-b5e6-96231b3b80d8
* Add classof implementations for UserChris Lattner2001-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@739 91177308-0d34-0410-b5e6-96231b3b80d8
* Chris seems fond of #include <vector>. Fix these. Also convert use list inChris Lattner2001-09-14
| | | | | | | | | Value to a vector instead of a list. Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@572 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra whitespace at EOLChris Lattner2001-09-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@427 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix stupid typoChris Lattner2001-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new "addOperand" method to User.Chris Lattner2001-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158 91177308-0d34-0410-b5e6-96231b3b80d8
* Devirtualize User::dropAllReferencesChris Lattner2001-07-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed the fundemental architecture of Operands for Instructions. NowChris Lattner2001-07-07
| | | | | | | | | | | | Operands are maintained as a vector<Use> in the User class, and operator iterators are provided as before. Getting an operand no longer requires a virtual function call. WARNING: getOperand(x) where x >= getNumOperands() will now assert instead of returning null! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial revisionChris Lattner2001-06-06
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8