Commit Graph

39 Commits

Author SHA1 Message Date
Chris Lattner 1c12a881fb 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
Chris Lattner 47a6e63696 remove dead var
llvm-svn: 28287
2006-05-14 18:34:36 +00:00
Chris Lattner bb7ff6690f Add an assertion for a common error
llvm-svn: 28210
2006-05-10 04:32:43 +00:00
Chris Lattner 667a056e11 Add assertions that verify that the actual arguments to a call or invoke match
the prototype of the called function.

llvm-svn: 28070
2006-05-03 00:48:22 +00:00
Chris Lattner 0875d94567 Move these ctors out of line
llvm-svn: 27713
2006-04-14 22:20:32 +00:00
Chris Lattner 54865b39ab Add methods to check insertelement/extractelement instructions for validity,
check validity when instructions are created.

llvm-svn: 27523
2006-04-08 04:05:48 +00:00
Chris Lattner bbe0a4248b Add shufflevector support, todo, implement better constant folding.
llvm-svn: 27510
2006-04-08 01:18:18 +00:00
Chris Lattner e8e7ac465d Teach BinaryOperator::createNot to work with packed integer types
llvm-svn: 27124
2006-03-25 21:54:21 +00:00
Robert Bocchino ca27f0320b VMCore support for the insertelement operation.
llvm-svn: 25408
2006-01-17 20:07:22 +00:00
Robert Bocchino 230044839d Added support for the extractelement operation.
llvm-svn: 25181
2006-01-10 19:05:34 +00:00
Chris Lattner dca56cbd9a Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand.

llvm-svn: 24906
2005-12-21 18:22:19 +00:00
Chris Lattner 79b8c79242 verify that alignments are always a power of 2
llvm-svn: 24200
2005-11-05 21:57:54 +00:00
Nate Begeman 848622f87f 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 6e709c1318 PHINode::hasConstantValue should never return the PHI itself, even if the
PHI is its only operand.

llvm-svn: 22676
2005-08-05 15:37:31 +00:00
Chris Lattner 37774affb1 Invoke instructions do not dominate all successors
llvm-svn: 22671
2005-08-05 01:03:27 +00:00
Chris Lattner bcd8d2c6e5 Use the bool argument to hasConstantValue to decide whether the client is
prepared to deal with return values that do not dominate the PHI.  If we
cannot prove that the result dominates the PHI node, do not return it if
the client can't cope.

llvm-svn: 22669
2005-08-05 01:00:58 +00:00
Chris Lattner 1d8b24878f Mark hasConstantValue as a const method
llvm-svn: 22666
2005-08-05 00:49:06 +00:00
Nate Begeman 0a94dec78a Add an extra parameter that Chris requested
llvm-svn: 22665
2005-08-04 23:50:43 +00:00
Nate Begeman b392321cae 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 9144ec4764 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner f7b6d3191b add support for explicit calling conventions
llvm-svn: 21746
2005-05-06 20:26:43 +00:00
Chris Lattner 0603845a49 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 c22333348e fix a bug in the 1 index GEP handling code
llvm-svn: 21670
2005-05-03 16:44:45 +00:00
Chris Lattner 8298120f17 add direct support for making GEP instrs with one index
llvm-svn: 21665
2005-05-03 05:43:30 +00:00
Chris Lattner 2c7d177d25 Allow these methods to take a generic Value* to simplify clients. Use
const_cast instead of c casts.

llvm-svn: 21493
2005-04-24 07:28:37 +00:00
Misha Brukman b1c9317bb4 Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Misha Brukman 96eb878f2a Convert tabs to spaces
llvm-svn: 20638
2005-03-16 05:42:00 +00:00
Chris Lattner 47ac187c08 switch instructions only allow constantints for their values, be more specific.
llvm-svn: 20298
2005-02-24 05:32:09 +00:00
Chris Lattner df57a02be4 Instead of initializing the volatile field, use accessors to set it.
llvm-svn: 20045
2005-02-05 01:38:38 +00:00
Chris Lattner f711f8db41 Make sure that we always grow a multiple of 2 operands.
llvm-svn: 19902
2005-01-29 01:05:12 +00:00
Chris Lattner afdb3de4d7 Merge InstrTypes.cpp into this file
Adjust to changes in the User class, operand handling is very different.
PHI node and switch statements must handle explicit resizing of operand
lists.

llvm-svn: 19891
2005-01-29 00:35:16 +00:00
Misha Brukman 3852f652bf Fix grammar
llvm-svn: 19854
2005-01-27 06:46:38 +00:00
Chris Lattner de5626cd40 These methods are inlined
llvm-svn: 17958
2004-11-18 17:47:13 +00:00
Alkis Evlogimenos 531e901deb 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 5e0b9f2eec Add support for undef and unreachable
llvm-svn: 17041
2004-10-16 18:08:06 +00:00
Chris Lattner f22be93428 Move the implementation of the instructions clone methods to this file so
that the vtables for these classes are only instantiated in this translation
unit, not in every xlation unit they are used.

llvm-svn: 17026
2004-10-15 23:52:53 +00:00
Brian Gaeke 0220904e7a Packed types, brought to you by Brad Jones
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Alkis Evlogimenos 079fbde482 Split assertion to two in order to give better assertion messages.
llvm-svn: 15543
2004-08-06 14:33:37 +00:00
Alkis Evlogimenos 93a7c060db Merge i*.cpp definitions into Instructions.cpp as part of bug403.
llvm-svn: 15326
2004-07-29 12:33:25 +00:00