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
Devang Patel
a56b43b442
Remove unnecessary "inline" keywords.
...
llvm-svn: 47516
2008-02-23 01:11:02 +00:00
Devang Patel
63d29fccdf
Use dyn_cast instead of isa + cast.
...
llvm-svn: 47511
2008-02-23 00:47:00 +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
Dale Johannesen
a96eb3a1d8
Pass alignment on ByVal parameters, from FE, all
...
the way through. It is now used for codegen.
llvm-svn: 47484
2008-02-22 17:49:45 +00:00
Devang Patel
de35f122f2
getresult type is the type of indexed aggregate element
...
llvm-svn: 47392
2008-02-20 19:26:55 +00:00
Devang Patel
6266d7147e
Specify GetResultInst index as an unsigned.
...
llvm-svn: 47390
2008-02-20 19:10:47 +00:00
Devang Patel
aae784581e
Fix typo. Add const version of getAggregateValue() accessor member function.
...
llvm-svn: 47386
2008-02-20 18:36:16 +00:00
Devang Patel
a74d2cbb6f
Add GetResultInst. First step for multiple return value support.
...
llvm-svn: 47348
2008-02-19 22:15:16 +00:00
Dale Johannesen
ecb2b233b1
Expand ParameterAttributes to 32 bits (in preparation
...
for adding alignment info, not there yet). Clean up
interfaces to reference ParameterAttributes consistently.
llvm-svn: 47342
2008-02-19 21:38:47 +00:00
Nick Lewycky
6b070b1b93
Handle some more combinations of extend and icmp. Fixes PR1940.
...
llvm-svn: 46431
2008-01-28 03:48:02 +00:00
Evan Cheng
a5183224b0
Add hasByValArgument() to test if a call instruction has byval argument(s).
...
llvm-svn: 45913
2008-01-12 18:57:32 +00:00
Chris Lattner
9ec341b120
Split param attr implementation out from Function.cpp into its
...
own file. Don't #include ParameterAttributes.h into any major
public header files: just move methods out of line as appropriate.
llvm-svn: 45517
2008-01-02 23:42:30 +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
Duncan Sands
56f3add5b7
When inlining through an 'nounwind' call, mark inlined
...
calls 'nounwind'. It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.
llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Duncan Sands
242f80be86
Rename isNoReturn to doesNotReturn, and isNoUnwind to
...
doesNotThrow.
llvm-svn: 45160
2007-12-18 09:59:50 +00:00
Christopher Lamb
7368604860
Implement address space attribute for LLVM pointer types. Address spaces are
...
regions of memory that have a target specific relationship, as described in the
Embedded C Technical Report.
This also implements the 2007-12-11-AddressSpaces test,
which demonstrates how address space attributes can be used in LLVM IR.
In addition, this patch changes the bitcode signature for stores (in a backwards
compatible manner), such that the pointer type, rather than the pointee type, is
encoded. This permits type information in the pointer (e.g. address space) to be
preserved for stores.
LangRef updates are forthcoming.
llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Duncan Sands
b7ac459292
Make PruneEH update the nounwind/noreturn attributes
...
on functions as it calculates them.
llvm-svn: 44802
2007-12-10 19:09:40 +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
Duncan Sands
1e2e4972ff
Rather than having special rules like "intrinsics cannot
...
throw exceptions", just mark intrinsics with the nounwind
attribute. Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).
llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Duncan Sands
1b0feb42e2
Add some convenience methods for querying attributes, and
...
use them.
llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
3602011bec
Fix PR1146: parameter attributes are longer part of
...
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.
llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Chris Lattner
54f0c2bed9
add some static icmpinst predicates.
...
llvm-svn: 44283
2007-11-22 23:43:29 +00:00
Hartmut Kaiser
ed12f66488
Updated VC++ build system.
...
Silenced some VC warnings.
I'm getting linker errors, though: unresolved externals:
llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
and
llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
Where are these defined?
llvm-svn: 43073
2007-10-17 14:56:40 +00:00
Dan Gohman
c852b7450b
Remove an unnecessary static_cast.
...
llvm-svn: 42261
2007-09-24 15:46:02 +00:00
Chris Lattner
1b622ad721
Fix PR1666, SPASS with the CBE and 254.gap with the CBE.
...
GCC optimizes away things like ptr < NULL to false. To "fix" this,
have the CBE emit casts of pointers to intptr_t when doing relational
pointer comparisons.
llvm-svn: 41983
2007-09-15 06:51:03 +00:00
David Greene
8cda5af2e7
Update GEP constructors to use an iterator interface to fix
...
GLIBCXX_DEBUG issues.
llvm-svn: 41697
2007-09-04 15:46:09 +00:00
Chris Lattner
5e16fd8310
Silence implicit 64->32-bit conversion warnings.
...
llvm-svn: 41567
2007-08-29 16:32:50 +00:00
David Greene
5b85021be8
Update InvokeInst to work like CallInst
...
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Chris Lattner
af91aa2f5e
sink clone() down the class hierarchy from CmpInst into ICmpInst/FCmpInst.
...
This eliminates a conditional on that path, and ensures ICmpInst/FCmpInst
both have an out-of-line virtual method to home the class.
llvm-svn: 41371
2007-08-24 20:48:18 +00:00
Chris Lattner
cce6cf78e4
remove #if 0 code.
...
llvm-svn: 40879
2007-08-06 22:01:53 +00:00
David Greene
f06a395bb9
New CallInst interface to address GLIBCXX_DEBUG errors caused by
...
indexing an empty std::vector.
Updates to all clients.
llvm-svn: 40660
2007-08-01 03:43:44 +00:00
Dan Gohman
d1cc67ea8d
Simplify the logic for setVolatile.
...
llvm-svn: 40130
2007-07-20 23:14:50 +00:00
Dan Gohman
4d64f82ab5
Add constructor overloads for LoadInst and StoreInst that insert at the
...
end of a BasicBlock and have an alignment parameter.
llvm-svn: 40016
2007-07-18 20:51:11 +00:00
Owen Anderson
6644d23a16
Add some accessors to improve consistency.
...
llvm-svn: 37957
2007-07-06 23:13:31 +00:00
Dan Gohman
fad75ac3af
Simplify BranchInst::getSuccessor, avoiding a conditional operator.
...
llvm-svn: 36991
2007-05-11 20:59:29 +00:00
Chris Lattner
9bfe8f4517
add a GEP helper function
...
llvm-svn: 36515
2007-04-27 20:35:56 +00:00
Christopher Lamb
041ee2a78d
PR400 phase 1 implementation feedback.
...
llvm-svn: 36354
2007-04-22 22:22:02 +00:00
Christopher Lamb
5606cd66e2
PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM.
...
llvm-svn: 36349
2007-04-22 19:24:39 +00:00
Reid Spencer
4169952dab
For PR1136:
...
Add reference counting to ParamAttrsList and make use of it in Function,
CallInst and InvokeInst classes.
llvm-svn: 36346
2007-04-22 17:28:03 +00:00
Reid Spencer
81070d52da
Revert Christopher Lamb's load/store alignment changes.
...
llvm-svn: 36309
2007-04-21 18:36:27 +00:00
Jeff Cohen
193124f5f1
The expression "SubclassData = (SubclassData & ~1) | (V) ? 1 : 0;" does not do what
...
was intended! | has higher precedence than ?. Caught by Visual Studio.
llvm-svn: 36302
2007-04-21 14:32:59 +00:00
Christopher Lamb
b56b6a7ad7
add support for alignment attributes on load/store instructions
...
llvm-svn: 36301
2007-04-21 08:16:25 +00:00
Chris Lattner
5ed58fc4a9
add GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.
...
Writing it twice in the same day was too much for me.
llvm-svn: 35978
2007-04-14 00:12:57 +00:00
Reid Spencer
93a57ef458
For PR1146:
...
* Add ParamAttrs to InvokeInst class too.
* Make sure all initializes of ParamAttrs in CallInst and InvokeInst are 0
* Destruct the ParamAttrs in Call/Invoke destructors to avoid memory
leaks. This will change when ParamAttrsList is uniquified but needs to
be correct until then.
llvm-svn: 35824
2007-04-09 18:00:57 +00:00
Reid Spencer
d2380cfb76
For PR1146:
...
* Add ParamAttrList pointers to Function and CallInst.
* Move the implementation of ParamAttrList from Type.cpp to Function.cpp
llvm-svn: 35818
2007-04-09 15:01:12 +00:00
Reid Spencer
f632e1cd14
Provide an ICmpInst::makeConstantRange to generate a ConstantRange value
...
from a predicate and an APInt. This is removed from ConstantRange class
so that ConstantRange doesn't have to depend on lib/VMCore.
llvm-svn: 34760
2007-02-28 22:00:54 +00:00
Chris Lattner
0eb72353e4
Refactor the setName stuff, moving it down the inheritance hierarchy, to
...
solve a crash in -instcombine -debug that was hit while investigating PR1217
llvm-svn: 34544
2007-02-24 00:55:48 +00:00
Chris Lattner
134ae17654
make mayWriteToMemory a non-virtual function
...
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Reid Spencer
e7ff3305d6
For PR1195:
...
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.
llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer
55e4e98a2a
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner
4534d3fc6e
Switch UnaryOperators to default to passing names up by const char* when possible.
...
This speeds up bcreading by 1.5%.
llvm-svn: 34233
2007-02-13 07:54:42 +00:00
Chris Lattner
326271ee46
eliminate instruction ctors that take vectors.
...
llvm-svn: 34228
2007-02-13 06:22:32 +00:00
Chris Lattner
bc384d8d50
Add invokeinst and callinst ctors that don't take vectors.
...
llvm-svn: 34214
2007-02-13 01:04:01 +00:00
Chris Lattner
94ce3e4550
remove some dead methods.
...
llvm-svn: 34213
2007-02-13 00:58:44 +00:00
Chris Lattner
f94d4a17a7
add #include
...
llvm-svn: 34190
2007-02-12 05:00:35 +00:00
Reid Spencer
591bfa1e0b
Changes to support making the shift instructions be true BinaryOperators.
...
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.
llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Chris Lattner
55e5440018
implement the new GEP instruction ctors.
...
llvm-svn: 33708
2007-01-31 19:47:18 +00:00
Chris Lattner
677cab8ef3
Revise APIs for creating constantexpr GEPs to not require the use of
...
vectors. This allows us to eliminate many temporary vectors, and their
associated malloc/free pairs.
llvm-svn: 33691
2007-01-31 04:39:29 +00:00
Chris Lattner
018d873ce8
add accessors
...
llvm-svn: 33207
2007-01-14 19:41:24 +00:00
Reid Spencer
964e311d09
Doxygenify a comment.
...
llvm-svn: 32765
2006-12-29 04:10:59 +00:00
Reid Spencer
4428c3483b
For PR950:
...
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Reid Spencer
992d9788b3
For PR950:
...
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.
llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Reid Spencer
6e34ef887b
For PR950:
...
First in a series of patches to convert SetCondInst into ICmpInst and
FCmpInst using only two opcodes and having the instructions contain their
predicate value. Nothing uses these classes yet. More patches to follow.
llvm-svn: 31867
2006-11-20 01:22:35 +00:00
Reid Spencer
da1f5b882a
For PR950:
...
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.
llvm-svn: 31542
2006-11-08 06:47:33 +00:00
Chris Lattner
14ad447136
Add insertelement/extractelement helper ctors.
...
llvm-svn: 30750
2006-10-05 06:24:58 +00:00
Chris Lattner
4b7c9854bf
clean up use of 'explicit'. This is PR934.
...
Patch contributed by Kevin Sopp!
llvm-svn: 30701
2006-10-03 17:09:12 +00:00
Nick Lewycky
ad4eb4f0de
Fix findCaseDest to return null when BB is both the default dest and one
...
of the numeric cases.
llvm-svn: 30468
2006-09-18 20:44:37 +00:00
Nick Lewycky
87f79d5d69
Add a new helper method to SwitchInst. Useful when you've got a BB from
...
somewhere (like the dominator graph) and would like to know which case it
came from.
llvm-svn: 30466
2006-09-18 19:03:59 +00:00
Chris Lattner
be102d68c2
add a helper method
...
llvm-svn: 30452
2006-09-18 04:54:57 +00:00
Chris Lattner
547b62a967
Add ShiftInst::isLogical/ArithmeticShift methods.
...
llvm-svn: 30445
2006-09-17 19:29:56 +00:00
Chris Lattner
8aa718b0ed
Add new SetCondInst::isRelational/isEquality methods. Rename
...
Instruction::isRelational to Instruction::isComparison.
llvm-svn: 30444
2006-09-17 19:14:47 +00:00
Chris Lattner
a396e6d9ba
Add some out-of-line virtual dtors so that the class has a "home", preventing
...
vtables for (e.g.) Instruction from being emitted into every .o file.
llvm-svn: 28898
2006-06-21 16:53:47 +00:00
Reid Spencer
55df120f95
Fix some doxygen usage in these headers.
...
llvm-svn: 28394
2006-05-19 19:07:54 +00:00
Chris Lattner
39290ea978
Add alloca/malloc ctors that don't take array sizes.
...
llvm-svn: 28211
2006-05-10 04:38:35 +00:00
Chris Lattner
5324c4f9aa
These instructions always return a packed vector. Improve the class definitions to expose this fact.
...
llvm-svn: 27712
2006-04-14 22:20:07 +00:00
Chris Lattner
80450dd773
Add methods to check insert/extract element instructions for validity
...
llvm-svn: 27522
2006-04-08 04:04:54 +00:00
Chris Lattner
e2d0c1084a
Add a new shufflevector instruction
...
llvm-svn: 27507
2006-04-08 01:15:18 +00:00
Robert Bocchino
a5ec2815a1
Instruction and constant expression definitions for the insertelement
...
operation.
llvm-svn: 25402
2006-01-17 20:05:59 +00:00
Robert Bocchino
1088fb019d
Added an instruction and constant expression for the extractelement
...
operation.
llvm-svn: 25176
2006-01-10 19:04:13 +00:00
Chris Lattner
cfaf9f14c0
add an accessor
...
llvm-svn: 24201
2005-11-05 21:58:30 +00:00
Nate Begeman
f299b9fb03
Add support alignment of allocation instructions.
...
Add support for specifying alignment and size of setjmp jmpbufs.
No targets currently do anything with this information, nor is it presrved
in the bytecode representation. That's coming up next.
llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Chris Lattner
752c3e7b35
Mark hasConstantValue as a const method
...
llvm-svn: 22666
2005-08-05 00:49:06 +00:00
Nate Begeman
7547f4085b
Add an extra parameter that Chris requested
...
llvm-svn: 22665
2005-08-04 23:50:43 +00:00
Nate Begeman
ef41400067
Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
...
BasicBlock's removePredecessor routine. This requires shuffling around
the definition and implementation of hasContantValue from Utils.h,cpp into
Instructions.h,cpp
llvm-svn: 22664
2005-08-04 23:24:19 +00:00
Andrew Lenharth
ce40ab3077
fix DCE + va_arg problem
...
llvm-svn: 22264
2005-06-19 14:46:20 +00:00
Andrew Lenharth
108f509fb5
header file changes for varargs
...
llvm-svn: 22253
2005-06-18 18:31:30 +00:00
Reid Spencer
ba222e3e99
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
...
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Jeff Cohen
eafa15885e
Silence VC++ warnings about unsafe mixing of ints and bools with the | operator.
...
llvm-svn: 21758
2005-05-07 02:44:04 +00:00
Chris Lattner
d2dfcb3c0e
Add support for explicit calling conventions
...
llvm-svn: 21745
2005-05-06 20:26:26 +00:00
Chris Lattner
027639a16c
add a default arg
...
llvm-svn: 21733
2005-05-06 06:22:10 +00:00
Chris Lattner
72ffd7e7d5
Add a 'tail' marker for call instructions, patch contributed by
...
Alexander Friedman.
llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Chris Lattner
e53a188512
add direct support for making GEP instrs with one index
...
llvm-svn: 21665
2005-05-03 05:43:30 +00:00
Misha Brukman
3f0aa3dbf8
Remove trailing whitespace
...
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Misha Brukman
d5e8033d4a
Convert tabs to spaces
...
llvm-svn: 20634
2005-03-16 03:46:55 +00:00
Chris Lattner
902d9dc660
switch instructions only allow constantints for their values, be more specific.
...
llvm-svn: 20298
2005-02-24 05:32:09 +00:00
Chris Lattner
7eb45f89a5
Eliminate the explicit volatile fields in LoadInst and StoreInst. This shrinks
...
LoadInst from 60 -> 56 bytes and StoreInst from 76 -> 72 bytes.
Note however, that this doesn't actually save any memory on common systems
where 'malloc' returns 8-byte aligned memory, as the saved space is replaced
by useless alignment padding. :(
llvm-svn: 20046
2005-02-05 01:44:18 +00:00
Chris Lattner
6e2367383d
Many changes to cope with the User.h changes. Instructions now generally
...
directly embed their operands.
llvm-svn: 19885
2005-01-29 00:31:36 +00:00
Chris Lattner
d104c10aa5
Add missing accessor.
...
llvm-svn: 18775
2004-12-10 20:35:47 +00:00
Chris Lattner
6adc42af75
Remove dead field
...
llvm-svn: 18412
2004-12-02 02:35:38 +00:00
Chris Lattner
37651b157b
Update comments, now that CPR's are gone, inline the methods
...
llvm-svn: 17957
2004-11-18 17:46:57 +00:00
Alkis Evlogimenos
b9e38d3cc5
Make ReturnInst accept a value of type void as the return value. The
...
ReturnInst constructed is the same as if NULL was passed instead of
the void value.
llvm-svn: 17923
2004-11-17 21:02:25 +00:00
Chris Lattner
60e159a806
Warning fixes for VC++, contributed by Morten Ofstad!
...
llvm-svn: 17831
2004-11-15 19:02:35 +00:00
Chris Lattner
dd0094e4ed
Convert 'struct' to 'class' in various places to adhere to the coding standards
...
and work better with VC++. Patch contributed by Morten Ofstad!
llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Chris Lattner
423a692a5b
Add new UnreachableInst class
...
llvm-svn: 17037
2004-10-16 18:05:54 +00:00
Chris Lattner
b222ad66ef
Move the implementation of the clone method for these classes to
...
Instructions.cpp, so that a vtable is not emitted into every translation unit
that uses the classes.
llvm-svn: 17025
2004-10-15 23:52:05 +00:00
Alkis Evlogimenos
fb27f702ca
Merge i*.h headers into Instructions.h as part of bug403.
...
llvm-svn: 15325
2004-07-29 12:17: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
37a2301f9e
New helper header
...
llvm-svn: 5423
2003-01-27 22:08:52 +00:00