summaryrefslogtreecommitdiff
path: root/include/llvm/User.h
Commit message (Collapse)AuthorAge
* Remove unnecessary classof()'sSean Silva2012-10-11
| | | | | | | isa<> et al. automatically infer when the cast is an upcast (including a self-cast), so these are no longer necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165767 91177308-0d34-0410-b5e6-96231b3b80d8
* More descriptive, doxygen-ed commentsMichael Ilseman2012-10-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165512 91177308-0d34-0410-b5e6-96231b3b80d8
* New value_op_iterator for User. This allows other code to iterate over the ↵Michael Ilseman2012-10-09
| | | | | | User's operands directly as values, which can be convenient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165508 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment ↵Craig Topper2012-09-16
| | | | | | operators that aren't implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164006 91177308-0d34-0410-b5e6-96231b3b80d8
* Grammar.Eric Christopher2012-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156955 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some missing anchors.David Blaikie2011-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145578 91177308-0d34-0410-b5e6-96231b3b80d8
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos in assert messages.Jay Foad2011-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128002 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify User::operator delete().Jay Foad2011-01-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124330 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the construction and destruction of Uses. SimplifyJay Foad2011-01-16
| | | | | | User::dropHungOffUses(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123580 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary specialization OperandTraits<User>.Jay Foad2011-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123577 91177308-0d34-0410-b5e6-96231b3b80d8
* OperandTraits<>::Layout isn't used for anything. Remove it.Jay Foad2011-01-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123452 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the allocation and freeing of Users' operand lists, now thatJay Foad2011-01-07
| | | | | | every BranchInst has a fixed number of operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123027 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some dead functions, patch by Ryan Flynn!Chris Lattner2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75664 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the Win32 VS2008 build:Sebastian Redl2009-03-19
| | | | | | | | | | - Make type declarations match the struct/class keyword of the definition. - Move AddSignalHandler into the namespace where it belongs. - Correctly call functions from template base. - Some other small changes. With this patch, LLVM and Clang should build properly and with far less noise under VS2008. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67347 91177308-0d34-0410-b5e6-96231b3b80d8
* Rearrange operands of the BranchInst, to be able toGabor Greif2009-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | access each with a fixed negative index from op_end(). This has two important implications: - getUser() will work faster, because there are less iterations for the waymarking algorithm to perform. This is important when running various analyses that want to determine callers of basic blocks. - getSuccessor() now runs faster, because the indirection via OperandList is not necessary: Uses corresponding to the successors are at fixed offset to "this". The price we pay is the slightly more complicated logic in the operator User::delete, as it has to pick up the information whether it has to free the memory of an original unconditional BranchInst or a BranchInst that was originally conditional, but has been shortened to unconditional. I was not able to come up with a nicer solution to this problem. (And rest assured, I tried *a lot*). Similar reorderings will follow for InvokeInst and CallInst. After that some optimizations to pred_iterator and CallSite will fall out naturally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66815 91177308-0d34-0410-b5e6-96231b3b80d8
* Give Op<N>() AppleScript-like semantics, i.e. for negative N it indexes ↵Gabor Greif2009-03-10
| | | | | | | | relative to op_end. This is a preliminary to changes to come. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66593 91177308-0d34-0410-b5e6-96231b3b80d8
* make the Op<N> methods protected, how it was intended to beGabor Greif2009-03-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66430 91177308-0d34-0410-b5e6-96231b3b80d8
* fix and clean up a commentGabor Greif2009-02-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65212 91177308-0d34-0410-b5e6-96231b3b80d8
* add accessorsChris Lattner2009-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63478 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not allow a user to set the operand for a constant.Tanya Lattner2008-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58335 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some documentation from the header file into ProgrammersManual. About ↵Gabor Greif2008-06-16
| | | | | | to improve. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52360 91177308-0d34-0410-b5e6-96231b3b80d8
* op_iterator-ify dropAllReferencesGabor Greif2008-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52215 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress warnings about missing placement delete. This should now be ↵Gabor Greif2008-05-22
| | | | | | std-conformant even if compiled with exceptions on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51429 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove warnings about unused parameters and shadowed variables.Bill Wendling2008-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51266 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the operator new and operator delete out of line. This fixes an issue withNate Begeman2008-05-15
| | | | | | | | operator new() referring to the static initTags function, which has to be in the same linkage unit as any file including User.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51136 91177308-0d34-0410-b5e6-96231b3b80d8
* merge of use-diet branch to trunkGabor Greif2008-05-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50943 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-06
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* To support multiple return values, now ret instruction supports multiple ↵Devang Patel2008-02-23
| | | | | | operands instead of one aggregate operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47508 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
* Reverting dtor devirtualization patch.Gordon Henriksen2007-12-10
| | | | | | | _sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed _sabre_: the vtable lives to fight another day git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44760 91177308-0d34-0410-b5e6-96231b3b80d8
* Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!Gordon Henriksen2007-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44747 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-12
| | | | | | | | | | std::map<std::string, Value*> as its main datastructure. There are many improvements yet to be made, but this speeds up opt --std-compile-opts on 447.dealII by 7.3%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
* 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