Tanya Lattner
7bd0aec942
Do not allow a user to set the operand for a constant.
...
llvm-svn: 58335
2008-10-28 17:22:40 +00:00
Gabor Greif
ae2be0f217
Move some documentation from the header file into ProgrammersManual. About to improve.
...
llvm-svn: 52360
2008-06-16 21:06:12 +00:00
Gabor Greif
8617cb5391
op_iterator-ify dropAllReferences
...
llvm-svn: 52215
2008-06-11 11:45:26 +00:00
Gabor Greif
7ccadaaaf9
Suppress warnings about missing placement delete. This should now be std-conformant even if compiled with exceptions on.
...
llvm-svn: 51429
2008-05-22 13:16:42 +00:00
Bill Wendling
1866fa680f
Remove warnings about unused parameters and shadowed variables.
...
llvm-svn: 51266
2008-05-19 20:15:12 +00:00
Nate Begeman
253fc69ff3
Move the operator new and operator delete out of line. This fixes an issue with
...
operator new() referring to the static initTags function, which has to be in the
same linkage unit as any file including User.h.
llvm-svn: 51136
2008-05-15 01:23:11 +00:00
Gabor Greif
49bf1a4cf6
merge of use-diet branch to trunk
...
llvm-svn: 50943
2008-05-10 08:32:32 +00:00
Evan Cheng
d9353009b7
Fix more -Wshorten-64-to-32 warnings.
...
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Gabor Greif
6c6b8a57f3
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Devang Patel
f674975a65
To support multiple return values, now ret instruction supports multiple operands instead of one aggregate operand.
...
llvm-svn: 47508
2008-02-23 00:35:18 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Gordon Henriksen
8430f1ff9a
Reverting dtor devirtualization patch.
...
_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
llvm-svn: 44760
2007-12-10 02:14:30 +00:00
Gordon Henriksen
a18a78e6e5
Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
...
llvm-svn: 44747
2007-12-09 22:46:10 +00:00
Chris Lattner
5a58a65c10
Switch ValueSymbolTable to use StringMap<Value*> instead of 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%.
llvm-svn: 34193
2007-02-12 05:18:08 +00:00
Chris Lattner
c1736fdce0
Move the definition of value_use_iterator::getOperandNo to User.h where the
...
definition of the User class is available, this fixes the build with some
compiler versions.
llvm-svn: 28163
2006-05-08 05:59:36 +00:00
Misha Brukman
3f0aa3dbf8
Remove trailing whitespace
...
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Chris Lattner
cf3862ce8d
Fix spelling, patch contributed by Gabor Greif
...
llvm-svn: 20342
2005-02-27 06:15:51 +00:00
Chris Lattner
c6c1106909
Instead of storing operands as std::vector<Use>, just maintain a pointer
...
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
llvm-svn: 19883
2005-01-29 00:29:39 +00:00
Chris Lattner
60e159a806
Warning fixes for VC++, contributed by Morten Ofstad!
...
llvm-svn: 17831
2004-11-15 19:02:35 +00:00
Reid Spencer
b0ee45b970
bug 122:
...
Remove redundancy in User::classof(Value*); GlobalValue isa Constant now.
llvm-svn: 14924
2004-07-17 23:32:11 +00:00
Chris Lattner
2926c33e27
Make ctor inline, change ValueTy ->unsigned
...
llvm-svn: 14430
2004-06-27 18:01:15 +00:00
Chris Lattner
b6833e4a48
Consider anything with a ValueType that is >= Instruction to be an instruction
...
llvm-svn: 14429
2004-06-26 20:51:50 +00:00
Chris Lattner
9995768f47
Fixes for PR114: Thanks to Reid Spencer!
...
llvm-svn: 10029
2003-11-16 20:21:15 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
16c6cda9d5
Added LLVM copyright header (for lack of a better term).
...
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Chris Lattner
a390208127
lalala
...
llvm-svn: 9146
2003-10-15 22:09:57 +00:00
Chris Lattner
b743545965
Add new op_erase method
...
llvm-svn: 9068
2003-10-13 03:29:26 +00:00
Chris Lattner
b6367d9414
Add a method to reserve space for operands
...
llvm-svn: 8992
2003-10-09 22:45:59 +00:00
Chris Lattner
394f190dab
Remove unneeded dtors
...
llvm-svn: 8896
2003-10-06 17:36:49 +00:00
Chris Lattner
4e4c763dfc
Standardize header file comments
...
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
6c12776232
Remove a ton of extraneous #includes
...
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
Chris Lattner
8903500053
Add new op_erase method
...
llvm-svn: 6757
2003-06-17 22:15:55 +00:00
John Criswell
4781723de6
Included assert.h so that the code compiles under newer versions of GCC.
...
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Chris Lattner
d3eae6379d
Don't require the user to do something like isa<foo>(II->get()). The ->get
...
should be implicit.
llvm-svn: 6395
2003-05-29 15:08:33 +00:00
Chris Lattner
5ee67379d9
- Remove the User::eraseOperand method which is never used, really
...
dangerous, and not something we want to expose.
llvm-svn: 4007
2002-10-01 23:41:17 +00:00
Vikram S. Adve
9226baa6bc
Add routines to update or erase operands (and to do so without external
...
assumptions about which operand number stores what operand).
llvm-svn: 3750
2002-09-16 16:06:12 +00:00
Chris Lattner
69f833618d
Convert comments to Doxygen style
...
llvm-svn: 3507
2002-08-25 22:54:55 +00:00
Chris Lattner
2522ebee1b
Remove unneccesary method
...
llvm-svn: 3452
2002-08-22 15:57:37 +00:00
Vikram S. Adve
dba9c85e36
Add method copyOperands().
...
llvm-svn: 3445
2002-08-22 03:01:44 +00:00
Chris Lattner
7b3dc0948b
Remove a misguided API extension
...
llvm-svn: 1926
2002-03-21 05:46:43 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
c4a5815033
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
027f8b242b
Add classof implementations for User
...
llvm-svn: 739
2001-10-13 06:18:05 +00:00
Chris Lattner
d6a98c11bc
Chris seems fond of #include <vector>. Fix these. Also convert use list in
...
Value to a vector instead of a list.
Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling
llvm-svn: 572
2001-09-14 16:56:32 +00:00
Chris Lattner
1a4da8a9b3
Remove extra whitespace at EOL
...
llvm-svn: 427
2001-09-07 16:24:35 +00:00
Chris Lattner
9373328e93
Fix stupid typo
...
llvm-svn: 168
2001-07-09 16:54:29 +00:00
Chris Lattner
246d869f71
Add a new "addOperand" method to User.
...
llvm-svn: 158
2001-07-08 18:38:18 +00:00
Chris Lattner
cd5bbb0001
Devirtualize User::dropAllReferences
...
llvm-svn: 151
2001-07-07 19:00:36 +00:00
Chris Lattner
6f7587e4d3
Changed the fundemental architecture of Operands for Instructions. Now
...
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!
llvm-svn: 149
2001-07-07 08:36:50 +00:00
Chris Lattner
e6b9b382e2
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00