Duncan Sands
b854603cb5
Add some convenience methods for manipulating
...
call attributes.
llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Dan Gohman
b52f318a0c
Remove two convenience constructors because they're now private, and the
...
private implementation doesn't really need the convenience.
llvm-svn: 52629
2008-06-23 16:48:17 +00:00
Dan Gohman
696e841b14
Remove an unnecessary cast.
...
llvm-svn: 52626
2008-06-23 16:38:10 +00:00
Owen Anderson
5eeafbc3f7
Add an idx_iterator to the insertvalue and extractvalue instructions.
...
llvm-svn: 52493
2008-06-19 17:15:57 +00:00
Gabor Greif
7c2e365dbc
get rid of ExtractValueInst::init's Value argument, it is already passed to the UnaryInstruction ctor
...
llvm-svn: 52064
2008-06-06 21:06:32 +00:00
Gabor Greif
8ac103e71d
make ExtractValueInst derived from UnaryInstruction
...
llvm-svn: 52061
2008-06-06 20:28:12 +00:00
Bill Wendling
cb6cdd495d
Cast because I think I know what I'm doing. There are warnings about converting
...
from 64-bit to 32-bit.
llvm-svn: 51982
2008-06-05 07:35:27 +00:00
Matthijs Kooijman
e60059744e
Fix 80 column violations.
...
llvm-svn: 51981
2008-06-05 07:26:15 +00:00
Matthijs Kooijman
318e1df0e4
Add a Name parameter to two of the init methods of GetElementPointer to make the name setting more consistent.
...
llvm-svn: 51945
2008-06-04 16:14:12 +00:00
Matthijs Kooijman
2f6b694afc
Implement the two constructors in InsertValueInst and ExtractValueInst.
...
Add a Name argment to two init methods in these classes as well to make things
a bit more consistent.
llvm-svn: 51937
2008-06-04 14:40:55 +00:00
Dan Gohman
9ca8f65a00
Fix a copy+paste error in a comment.
...
llvm-svn: 51821
2008-05-31 19:09:47 +00:00
Dan Gohman
caa9c6e94d
Fix some bugs with the handling of indices in insertvalue/extractvalue.
...
llvm-svn: 51820
2008-05-31 19:09:08 +00:00
Dan Gohman
1ab21af8e0
Factor several methods, including getInversePredicate and
...
getSwappedPredicate, from ICmpInst and FCmpInst into common
methods in CmpInst. This allows CmpInsts to be manipulated
generically.
llvm-svn: 51810
2008-05-31 02:47:54 +00:00
Dan Gohman
ac5c3382fe
IR, bitcode reader, bitcode writer, and asmparser changes to
...
insertvalue and extractvalue to use constant indices instead of
Value* indices. And begin updating LangRef.html.
There's definately more to come here, but I'm checking this
basic support in now to make it available to people who are
interested.
llvm-svn: 51806
2008-05-31 00:58:22 +00:00
Gabor Greif
e052a42a62
eliminate calls to deprecated Use::init() interface
...
llvm-svn: 51570
2008-05-26 21:33:52 +00:00
Dan Gohman
9674662036
Add more IR support for the new extractvalue and insertvalue
...
instructions.
llvm-svn: 51461
2008-05-23 00:36:11 +00:00
Nick Lewycky
6f3744c685
Move isTrueWhenEqual to ICmpInst.
...
llvm-svn: 51215
2008-05-17 07:33:39 +00:00
Eric Christopher
11359e9b1c
Add functions to enable adding a single attribute to a function and
...
its associated call site.
llvm-svn: 51204
2008-05-16 20:39:43 +00:00
Dan Gohman
1760a08221
Update comments based on Duncan's feedback.
...
llvm-svn: 51170
2008-05-15 23:35:32 +00:00
Dan Gohman
821bf58428
IR support for extractvalue and insertvalue instructions. Also, begin
...
moving toward making structs and arrays first-class types.
llvm-svn: 51157
2008-05-15 19:50:34 +00:00
Nate Begeman
d805c4fac4
Don't generate unused variables in a no-assert build
...
Add some checks to the new vicmp,vfcmp instructions
llvm-svn: 51125
2008-05-14 20:28:31 +00:00
Gabor Greif
dd2f5c797d
Merge of r51073-51074 from use-diet branch.
...
Do not rely on std::swap<Use>, provide a (faster) member function instead.
This change is primarily necessitated by MSVC++'s incompatibility with
declaring std::swap<Use> to be a friend of Use.
Also contains some minor tweaks to Use inline functions,
to undo pointless changes that sneaked in with the last merge.
llvm-svn: 51078
2008-05-13 22:51:52 +00:00
Gabor Greif
22afb1f8f0
Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.
...
llvm-svn: 51023
2008-05-13 07:09:08 +00:00
Nate Begeman
b5b1e1353b
Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
...
for details. CodeGen support coming in a follow up patch
llvm-svn: 50985
2008-05-12 19:01:56 +00:00
Bill Wendling
cc084a6ba1
Remove warnings when using -Wshorten-64-to-32.
...
llvm-svn: 50952
2008-05-10 19:59:59 +00:00
Bill Wendling
cc8838799d
Prevent -W64-to-32-shortened warnings.
...
llvm-svn: 50947
2008-05-10 11:26:52 +00:00
Bill Wendling
adfb940f3a
Prevent warnings from the -Wshorten-64-to-32 flag.
...
llvm-svn: 50946
2008-05-10 10:58:07 +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
Evan Cheng
281654e4fb
Fix 80 column violations.
...
llvm-svn: 50655
2008-05-05 17:41:03 +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
Dan Gohman
a55da994b0
Remove an unnecessary #include.
...
llvm-svn: 48729
2008-03-24 16:58:44 +00:00
Dan Gohman
fec60bb357
Shrink the size of AllocationInst by using its SubclassData
...
field to store the alignment value instead of haing a
separate field.
llvm-svn: 48727
2008-03-24 16:55:58 +00:00
Chris Lattner
a14cdebdd9
move a bunch of trivial methods to be inline.
...
llvm-svn: 48326
2008-03-13 05:00:21 +00:00
Chris Lattner
d4a9aafc3f
Various improvements suggested by Duncan
...
llvm-svn: 48325
2008-03-13 04:33:03 +00:00
Chris Lattner
7925cc72c0
Reimplement the parameter attributes support, phase #1 . hilights:
...
1. There is now a "PAListPtr" class, which is a smart pointer around
the underlying uniqued parameter attribute list object, and manages
its refcount. It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
ParamAttrsWithIndex's, no need to make a SmallVector of a specific
size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
dereferencing the pointer is simplified to just access the
PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
bit simpler.
Phase #2 will rename some stuff (e.g. PAListPtr) and do other less
invasive changes.
llvm-svn: 48289
2008-03-12 17:45:29 +00:00
Devang Patel
5f5912ba27
Fix getOperand() for ReturnInst.
...
llvm-svn: 48229
2008-03-11 17:35:03 +00:00
Devang Patel
a96cf89c33
RetVal is not used when there are more then one return operands.
...
llvm-svn: 48022
2008-03-07 20:08:07 +00:00
Devang Patel
d0d7028a2b
s/isReturnStruct()/hasStructRetAttr()/g
...
llvm-svn: 47857
2008-03-03 21:46:28 +00:00
Chris Lattner
d1fc75add0
make operand accessors const-correct
...
llvm-svn: 47814
2008-03-02 05:32:05 +00:00
Chris Lattner
ffde7a642a
Add a new ShuffleVectorInst::getMaskValue method.
...
llvm-svn: 47813
2008-03-02 05:28:33 +00:00
Anton Korobeynikov
ecfe55a801
Assert on invalid PHINode::addIncoming() arguments. Patch by Erick Tryzelaar!
...
llvm-svn: 47697
2008-02-27 22:37:28 +00:00
Devang Patel
c68e26f9fe
Add comment.
...
llvm-svn: 47653
2008-02-27 01:20:54 +00:00
Devang Patel
5c00c6bafa
Remove unncessary ReturnInst constructors.
...
llvm-svn: 47633
2008-02-26 22:12:58 +00:00
Devang Patel
0be97b2118
Use SmallVector while constructing ReturnInst.
...
llvm-svn: 47619
2008-02-26 19:38:17 +00:00
Devang Patel
e5766a12da
Avoid const_casts
...
llvm-svn: 47616
2008-02-26 19:15:26 +00:00
Devang Patel
6d492c3caf
Remove unnecessary getOperand/setOperand overriders.
...
Simplify getReturnValue()
llvm-svn: 47614
2008-02-26 19:08:13 +00:00
Devang Patel
e0f9c6f281
Unify to ReturnInst::init() member functions.
...
llvm-svn: 47611
2008-02-26 18:49:29 +00:00
Devang Patel
b35d15edf9
Optimize most common case by using single RetVal in ReturnInst.
...
llvm-svn: 47607
2008-02-26 17:56:20 +00:00
Devang Patel
5b3d61f5ed
Pass const vectors by reference.
...
llvm-svn: 47577
2008-02-26 00:12:13 +00:00