Dan Gohman
16a84c6e2d
Update the generated .cvs files.
...
llvm-svn: 53943
2008-07-23 00:54:54 +00:00
Dan Gohman
fa1211f69b
Enable first-class aggregates support.
...
Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.
The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.
llvm-svn: 53941
2008-07-23 00:34:11 +00:00
Duncan Sands
914ca2d368
Align comments, colons and cases. Remove trailing
...
whitespace.
llvm-svn: 53453
2008-07-11 07:37:30 +00:00
Chris Lattner
c9046b286b
regenerate
...
llvm-svn: 53440
2008-07-11 00:30:39 +00:00
Chris Lattner
61622615ae
Implement PR2538
...
llvm-svn: 53438
2008-07-11 00:30:06 +00:00
Mon P Wang
6a490371c9
Added MemOperands to Atomic operations since Atomics touches memory.
...
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub
llvm-svn: 52706
2008-06-25 08:15:39 +00:00
Dan Gohman
4aef821183
Fix some signed vs. unsigned issues in array and vector handling.
...
llvm-svn: 52664
2008-06-24 01:17:52 +00:00
Dan Gohman
b936ea7fc4
Update the .cvs files.
...
llvm-svn: 52637
2008-06-23 18:43:26 +00:00
Dan Gohman
a7c3e0e120
Fix the types for NumElements variables, and add a comment
...
explaining why empty array constants use ValID::createUndef().
llvm-svn: 52636
2008-06-23 18:40:28 +00:00
Dan Gohman
3ab46f1383
AsmParser support for immediate constant aggregate values.
...
llvm-svn: 52149
2008-06-09 14:45:02 +00:00
Dan Gohman
1ecaf45cf1
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
Dan Gohman
fa9dac2859
Don't silently truncate array extents to 32 bits.
...
llvm-svn: 51505
2008-05-23 21:40:55 +00:00
Dan Gohman
0fb92a65b3
Issue errors in several situations instead of aborting.
...
llvm-svn: 51493
2008-05-23 18:23:11 +00:00
Dan Gohman
30499844ea
Make structs and arrays first-class types, and add assembly
...
and bitcode support for the extractvalue and insertvalue
instructions and constant expressions.
Note that this does not yet include CodeGen support.
llvm-svn: 51468
2008-05-23 01:55:30 +00:00
Dan Gohman
298a1d6d5f
Recognize the "default" keyword, which is documented in LangRef.html
...
and supported in the grammar, in the lexer.
llvm-svn: 51448
2008-05-22 22:30:09 +00:00
Gordon Henriksen
8bd151d194
Reverting accidental commit of generated files.
...
llvm-svn: 51239
2008-05-19 05:57:12 +00:00
Gordon Henriksen
00889ccfca
Remove a duplicative binding. Patch by Mahadevan R.
...
llvm-svn: 51238
2008-05-19 05:47:10 +00:00
Gabor Greif
e1f6e4b21d
API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
...
llvm-svn: 51200
2008-05-16 19:29:10 +00:00
Dan Gohman
12fce7751b
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
Gabor Greif
697e94cc22
Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
...
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Dale Johannesen
21160df793
CommonLinkage (missed a file)
...
llvm-svn: 51120
2008-05-14 20:14:09 +00:00
Dale Johannesen
5c1b6db9ed
Generated files for CommonLinkage.
...
llvm-svn: 51119
2008-05-14 20:13:36 +00:00
Dale Johannesen
ce4396bc92
Add CommonLinkage; currently tentative definitions
...
are represented as "weak", but there are subtle differences
in some cases on Darwin, so we need both. The intent
is that "common" will behave identically to "weak" unless
somebody changes their target to do something else.
No functional change as yet.
llvm-svn: 51118
2008-05-14 20:12:51 +00:00
Nate Begeman
d21957002a
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
Chris Lattner
c17c8f3ec4
regenerate
...
llvm-svn: 50621
2008-05-04 17:18:47 +00:00
Nick Lewycky
4d43d3c72c
Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
...
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.
llvm-svn: 50265
2008-04-25 16:53:59 +00:00
Dan Gohman
6e9185093d
Allow llvm-as to parse a getresult with an undef operand.
...
llvm-svn: 50175
2008-04-23 20:11:27 +00:00
Chris Lattner
6e0284bba7
regenerate
...
llvm-svn: 50139
2008-04-23 05:37:08 +00:00
Chris Lattner
ff9089eb90
Validate that the result of a function type is valid using shared
...
logic with vmcore.
llvm-svn: 50138
2008-04-23 05:36:58 +00:00
Chris Lattner
167dbe5e39
regenerate
...
llvm-svn: 49978
2008-04-20 00:41:19 +00:00
Chris Lattner
3b18762f40
Switch to using Simplified ConstantFP::get API.
...
llvm-svn: 49977
2008-04-20 00:41:09 +00:00
Dan Gohman
41eb949aaf
Teach llvm-as to accept function types with multiple return types.
...
llvm-svn: 49945
2008-04-19 00:24:39 +00:00
Gabor Greif
92f493dc72
regenerate
...
llvm-svn: 49293
2008-04-06 23:07:54 +00:00
Gabor Greif
e9ecc68d8f
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
Chris Lattner
6f2ffdb73f
Change the MemoryBuffer::getFile* methods to take just a pointer to the
...
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.
llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Dan Gohman
c60c67fc37
Add explicit keywords.
...
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Chris Lattner
8a923e7c28
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
Nick Lewycky
5cb21155e4
Update the .cvs files to match today's asm syntax change.
...
llvm-svn: 48128
2008-03-10 05:01:34 +00:00
Nick Lewycky
fb2c1a999a
Turn unwind_to into "unwinds to".
...
llvm-svn: 48123
2008-03-10 02:20:00 +00:00
Devang Patel
83558f9f46
regenerate.
...
llvm-svn: 47849
2008-03-03 18:58:47 +00:00
Nick Lewycky
3cc9be0b59
Add an unwind_to field to basic blocks, making them Users instead of Values.
...
This is the first checkin for PR1269, the new EH infrastructure.
llvm-svn: 47802
2008-03-02 02:48:09 +00:00
Devang Patel
0362de154e
regenerate.
...
llvm-svn: 47642
2008-02-26 23:19:08 +00:00
Devang Patel
4db58fce82
Add assert.
...
llvm-svn: 47641
2008-02-26 23:17:50 +00:00
Devang Patel
8490c6935b
regenerate
...
llvm-svn: 47634
2008-02-26 22:17:48 +00:00
Devang Patel
a58b1c9b6b
Remove unncessary ReturnInst constructors.
...
llvm-svn: 47633
2008-02-26 22:12:58 +00:00
Devang Patel
14f9994562
Regenerate.
...
llvm-svn: 47519
2008-02-23 01:17:37 +00:00
Devang Patel
6c4bc99c44
Use isa check instead of getTypeID() check.
...
llvm-svn: 47518
2008-02-23 01:17:17 +00:00
Devang Patel
a22220d8f6
Regenerate
...
llvm-svn: 47509
2008-02-23 00:38:56 +00:00
Devang Patel
59643e575f
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
09f410b6d7
Split ParameterAttributes.h, putting the complicated
...
stuff into ParamAttrsList.h. Per feedback from
ParamAttrs changes.
llvm-svn: 47504
2008-02-22 22:17:59 +00:00
Devang Patel
faafcfd3ce
Regenerate
...
llvm-svn: 47495
2008-02-22 19:31:30 +00:00
Devang Patel
8f4062975e
Use SymbolicValueRef to parse getresult operand
...
llvm-svn: 47494
2008-02-22 19:31:15 +00:00
Dale Johannesen
45b0ef25b2
Generated files for 47484.
...
llvm-svn: 47485
2008-02-22 17:50:51 +00:00
Dale Johannesen
eabc5f39af
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
8a24fa68ad
regenerate.
...
llvm-svn: 47408
2008-02-20 22:40:23 +00:00
Devang Patel
bd254045d0
Parse
...
ret i32 1, i8 2
another step towards multiple return value support.
llvm-svn: 47407
2008-02-20 22:39:45 +00:00
Dale Johannesen
c3706fcfb8
Regenerated files.
...
llvm-svn: 47402
2008-02-20 21:15:43 +00:00
Dale Johannesen
965155affb
Support alignment within ParamAttrs in the I/O handling.
...
llvm-svn: 47401
2008-02-20 21:15:19 +00:00
Devang Patel
949173da7f
Regenerate.
...
llvm-svn: 47391
2008-02-20 19:13:10 +00:00
Devang Patel
666d45195a
Specify GetResultInst index as an unsigned.
...
llvm-svn: 47390
2008-02-20 19:10:47 +00:00
Anton Korobeynikov
5c96f98e5a
Regenerate
...
llvm-svn: 47376
2008-02-20 12:10:37 +00:00
Anton Korobeynikov
18991d78fa
Fix newly-introduced 4.3 warnings
...
llvm-svn: 47375
2008-02-20 12:07:57 +00:00
Anton Korobeynikov
579f07135a
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
...
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Devang Patel
8b51bc47a2
regenerate
...
llvm-svn: 47350
2008-02-19 22:27:01 +00:00
Devang Patel
0dcd198bff
Parse
...
%b = getresult {i32, i32} %a, i32 1
llvm-svn: 47349
2008-02-19 22:26:37 +00:00
Dale Johannesen
9bbd8ebf78
Generated files for checkin 47342.
...
llvm-svn: 47344
2008-02-19 21:40:51 +00:00
Dale Johannesen
151e50bf0c
Forgot a file, goes with 47342.
...
llvm-svn: 47343
2008-02-19 21:40:10 +00:00
Dale Johannesen
89268bc6e2
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
Chris Lattner
5f9f34d070
regenerate
...
llvm-svn: 47312
2008-02-19 04:36:25 +00:00
Chris Lattner
95816b9dee
Fix PR2060 by rejecting invalid types for integer constants.
...
llvm-svn: 47311
2008-02-19 04:36:07 +00:00
Scott Michel
cd2bb20b5f
Back out mods to llvmAsmParser, incorrectly committed
...
llvm-svn: 46545
2008-01-30 03:10:00 +00:00
Scott Michel
bb713ae0c7
More cleanups for CellSPU:
...
- Expand tabs... (poss 80-col violations, will get them later...)
- Consolidate logic for SelectDFormAddr and SelectDForm2Addr into a single
function, simplifying maintenance. Also reduced custom instruction
generation for SPUvecinsert/INSERT_MASK.
llvm-svn: 46544
2008-01-30 02:55:46 +00:00
Duncan Sands
7e46c50c6a
If there are attributes on the varargs part of a
...
call, don't discard them.
llvm-svn: 45884
2008-01-11 21:23:39 +00:00
Chris Lattner
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
a087a8d2ce
remove attribution from lib Makefiles.
...
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Christopher Lamb
083bb46370
regenerate.
...
llvm-svn: 45085
2007-12-17 01:17:35 +00:00
Christopher Lamb
edf0788758
Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
...
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Bill Wendling
fcf2085731
Remove spurious warnings from GCC:
...
warning: suggest a space before ';' or explicit braces around empty
body in 'for' statement
Patch by Mike Stump (modified slightly by yours truly).
llvm-svn: 45071
2007-12-16 09:16:12 +00:00
Christopher Lamb
17c405d29e
Regenerate.
...
llvm-svn: 44934
2007-12-12 08:45:45 +00:00
Christopher Lamb
25f5076612
Implement part of review feedback for address spaces.
...
llvm-svn: 44933
2007-12-12 08:44:39 +00:00
Christopher Lamb
e92cba4535
Regenerate.
...
llvm-svn: 44859
2007-12-11 09:02:08 +00:00
Christopher Lamb
54dd24c2a7
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
Gordon Henriksen
71183b6739
Adding a collector name attribute to Function in the IR. These
...
methods are new to Function:
bool hasCollector() const;
const std::string &getCollector() const;
void setCollector(const std::string &);
void clearCollector();
The assembly representation is as such:
define void @f() gc "shadow-stack" { ...
The implementation uses an on-the-side table to map Functions to
collector names, such that there is no overhead. A StringPool is
further used to unique collector names, which are extremely
likely to be unique per process.
llvm-svn: 44769
2007-12-10 03:18:06 +00:00
Chris Lattner
d58954b040
add #include
...
llvm-svn: 44710
2007-12-08 19:03:30 +00:00
Anton Korobeynikov
3ddfbf36e9
Regenerate
...
llvm-svn: 44546
2007-12-03 21:01:29 +00:00
Anton Korobeynikov
a638f11cd2
Fix fallout from my last patch: don't reject varargs functions :)
...
llvm-svn: 44545
2007-12-03 21:00:45 +00:00
Anton Korobeynikov
c09b265410
Regenerate
...
llvm-svn: 44541
2007-12-03 19:17:47 +00:00
Anton Korobeynikov
d62b10dc93
More sanity checks for function types.
...
Thanks goes to PyPy folks for generating broken stuff :)
llvm-svn: 44538
2007-12-03 19:16:54 +00:00
Duncan Sands
b41f872013
Add a convenience method for modifying parameter
...
attributes. While there, I noticed that not all
attribute methods returned a pointer-to-constant,
so I fixed that.
llvm-svn: 44457
2007-11-30 18:19:18 +00:00
Duncan Sands
5208d1ab4a
Add some convenience methods for querying attributes, and
...
use them.
llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
ad0ea2d430
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
Duncan Sands
a89a113a20
Rename the 'const' parameter attribute to 'readnone',
...
and the 'pure' parameter attribute to 'readonly'.
Names suggested by DannyB.
llvm-svn: 44273
2007-11-22 20:23:04 +00:00
Chris Lattner
b01e500f16
autoupgrade files that use callfoo as call foo.
...
llvm-svn: 44218
2007-11-18 18:43:24 +00:00
Chris Lattner
c3cc30cdb8
Bugfix, this fixes CodeGen/X86/ldzero.ll and CodeGen/X86/2007-10-16-fp80_select.ll
...
llvm-svn: 44215
2007-11-18 18:25:18 +00:00
Chris Lattner
660c6b9a92
Replace the original flex lexer with a hand writen one. This
...
drops a dependency on flex and lets us make future progress more
easily. Yay for 2 fewer .cvs files to make silly conflicts with.
llvm-svn: 44213
2007-11-18 08:46:26 +00:00
Nate Begeman
bd117f06ba
Basic non-power-of-2 vector support
...
llvm-svn: 44181
2007-11-15 21:15:26 +00:00
Anton Korobeynikov
6ca98cd532
Regenerate
...
llvm-svn: 44110
2007-11-14 09:53:48 +00:00
Anton Korobeynikov
ea09c697d7
Add pure/const attributes. Documentation will follow.
...
llvm-svn: 44109
2007-11-14 09:52:30 +00:00
Dan Gohman
08143e397d
Add support for vector remainder operations.
...
llvm-svn: 43744
2007-11-05 23:35:22 +00:00
Dale Johannesen
4646aa3e33
Make labels work in asm blocks; allow labels as
...
parameters. Rename ValueRefList to ParamList
in AsmParser, since its only use is for parameters.
llvm-svn: 43734
2007-11-05 21:20:28 +00:00