Nuno Lopes
5b1a422162
regenerate
...
llvm-svn: 57575
2008-10-15 11:20:21 +00:00
Nuno Lopes
067c8791fe
fix memleak in getTypeVal()
...
llvm-svn: 57574
2008-10-15 11:19:34 +00:00
Nuno Lopes
970117385a
regenerate
...
llvm-svn: 57573
2008-10-15 11:11:12 +00:00
Nuno Lopes
0e2359f53d
fix memleak in ResolveTypeTo()
...
llvm-svn: 57572
2008-10-15 11:10:21 +00:00
Chris Lattner
33e7093540
regenerate
...
llvm-svn: 57561
2008-10-15 06:16:57 +00:00
Chris Lattner
9449f199b3
Fix the .ll grammar rules to allow any type before an 'i32', not just an
...
integer type. Invalid things like 'float 42' are now rejected by the
semantic analysis in the productions not the parser. This fixes PR2733.
llvm-svn: 57560
2008-10-15 06:16:45 +00:00
Chris Lattner
33079f9c37
regenerate
...
llvm-svn: 57559
2008-10-15 06:03:48 +00:00
Chris Lattner
dc80d9772a
Eliminate the "IntType ::= INTTYPE" production, just use
...
INTTYPE everywhere.
llvm-svn: 57558
2008-10-15 06:03:37 +00:00
Dale Johannesen
cc34c2da3a
Generated files for previous checkin.
...
llvm-svn: 57331
2008-10-09 23:01:34 +00:00
Dale Johannesen
075a62519f
Add a "loses information" return value to APFloat::convert
...
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
llvm-svn: 57329
2008-10-09 23:00:39 +00:00
Chris Lattner
293590ca07
regenerate
...
llvm-svn: 57290
2008-10-08 06:44:45 +00:00
Chris Lattner
4afce47e9b
Add missing semicolumns in parser rules, those missing semicolumns
...
are required to compile with the latest Bison.
Patch by Samuel Tardieu!
llvm-svn: 57289
2008-10-08 06:44:36 +00:00
Nuno Lopes
4cf7f0e3cd
regenerate
...
llvm-svn: 57114
2008-10-05 16:49:34 +00:00
Nuno Lopes
9e274c3532
clean ArgTypeListI production: free the PATypeHolder
...
llvm-svn: 57113
2008-10-05 16:49:03 +00:00
Nuno Lopes
3fbdc238d6
regenerate
...
llvm-svn: 57009
2008-10-03 15:52:39 +00:00
Nuno Lopes
5cb07eb550
fix more memleaks in ResolveTypeTo() and ParseGlobalVariable()
...
llvm-svn: 57008
2008-10-03 15:51:46 +00:00
Nuno Lopes
263d218cd1
regenerate with bison 2.3
...
llvm-svn: 57007
2008-10-03 15:45:58 +00:00
Nuno Lopes
949c7ea3e7
fix memleak in FunctionHeaderH
...
llvm-svn: 57005
2008-10-03 15:44:21 +00:00
Devang Patel
7536edca09
Support inreg, zext and sext as return value attributes.
...
llvm-svn: 56801
2008-09-29 20:49:50 +00:00
Devang Patel
47a504c87c
Implement function notes as function attributes.
...
llvm-svn: 56716
2008-09-26 23:51:19 +00:00
Dale Johannesen
54cc5b6eee
Generated files for warning fix.
...
llvm-svn: 56715
2008-09-26 23:46:20 +00:00
Dale Johannesen
96018ccd87
Fix a compiler warning.
...
llvm-svn: 56714
2008-09-26 23:45:53 +00:00
Devang Patel
e4e6ea0728
Now Attributes are divided in three groups
...
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn
Return attributes use 0 as the index.
Function attributes use ~0U as the index.
This patch requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56704
2008-09-26 22:53:05 +00:00
Dale Johannesen
9ce0f3e4b3
Generated files for previous patch.
...
llvm-svn: 56679
2008-09-26 19:32:34 +00:00
Dale Johannesen
3f62c40108
Add "inreg" field to CallSDNode (doesn't increase
...
its size). Adjust various lowering functions to
pass this info through from CallInst. Use it to
implement sseregparm returns on X86. Remove
X86_ssecall calling convention.
llvm-svn: 56677
2008-09-26 19:31:26 +00:00
Devang Patel
64dd7a2e89
Large mechanical patch.
...
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
2008-09-25 21:00:45 +00:00
Eric Christopher
c53ff83d48
Fix fallout from revision r56535.
...
llvm-svn: 56545
2008-09-24 04:55:49 +00:00
Devang Patel
25ecdc49d9
Put FN_NOTE_AlwaysInline and others in FnAttr namespace.
...
llvm-svn: 56527
2008-09-24 00:06:15 +00:00
Devang Patel
b39defd763
Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.
...
Do not check isDeclaration() in hasNote(). It is clients' responsibility.
llvm-svn: 56524
2008-09-23 23:52:03 +00:00
Devang Patel
3ce6525647
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56520
2008-09-23 23:25:44 +00:00
Devang Patel
a3e9bf1bca
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56513
2008-09-23 23:03:40 +00:00
Devang Patel
ad8ca34acd
Use parameter attribute store (soon to be renamed) for
...
Function Notes also. Function notes are stored at index ~0.
llvm-svn: 56511
2008-09-23 22:35:17 +00:00
Chris Lattner
b5ced46ab8
regenerate
...
llvm-svn: 56502
2008-09-23 21:18:31 +00:00
Chris Lattner
7d905c615f
allow inreg on the result of a function
...
llvm-svn: 56501
2008-09-23 21:18:08 +00:00
Oscar Fuentes
0f25988689
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Dan Gohman
90358a2f67
Update generated files.
...
llvm-svn: 55972
2008-09-09 01:13:24 +00:00
Dan Gohman
3e79d697f3
Extend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
...
and, if so, to return a vector of boolean as a result;
Extend the select LLVM IR instruction to allow you to specify a result
type which is a vector of boolean, in which case the result will be an
element-wise selection instead of choosing one vector or the other; and
Update LangRef.html to describe these changes.
This patch was contributed by Preston Gurd!
llvm-svn: 55969
2008-09-09 01:02:47 +00:00
Devang Patel
f8c7bd2a05
Parse and print opt_size note.
...
llvm-svn: 55740
2008-09-03 22:10:21 +00:00
Devang Patel
5659d2508e
s/FP_AlwaysInline/FN_NOTE_AlwaysInline/g
...
llvm-svn: 55676
2008-09-02 22:43:57 +00:00
Devang Patel
f06ad159e9
Parse function notes.
...
llvm-svn: 55646
2008-09-02 20:52:40 +00:00
Chris Lattner
a90998343b
regenerate
...
llvm-svn: 55542
2008-08-29 17:20:18 +00:00
Chris Lattner
b23f7dae39
Add support for parsing .ll files that have numbers in front of
...
nameless values, such as:
%3 = add i32 4, 2
This fixes the first half of PR2480
llvm-svn: 55539
2008-08-29 17:12:13 +00:00
Gordon Henriksen
8409ec74bc
Regenerate.
...
llvm-svn: 54900
2008-08-17 18:48:50 +00:00
Gordon Henriksen
2cc861a6c1
Rename some GC classes so that their roll will hopefully be clearer.
...
In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:
Collector -> GCStrategy
CollectorMetadata -> GCFunctionInfo
CollectorModuleMetadata -> GCModuleInfo
CollectorRegistry -> GCRegistry
Function::getCollector -> getGC (setGC, hasGC, clearGC)
Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.
llvm-svn: 54899
2008-08-17 18:44:35 +00:00
Chris Lattner
c0610874cc
Rework the routines that convert AP[S]Int into a string. Now, instead of
...
returning an std::string by value, it fills in a SmallString/SmallVector
passed in. This significantly reduces string thrashing in some cases.
More specifically, this:
- Adds an operator<< and a print method for APInt that allows you to
directly send them to an ostream.
- Reimplements APInt::toString to be much simpler and more efficient
algorithmically in addition to not thrashing strings quite as much.
This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the
asmprinter. This also fixes a bug I introduced into the asmwriter in a
previous patch w.r.t. alias printing.
llvm-svn: 54873
2008-08-17 07:19:36 +00:00
Dale Johannesen
b23672a4e3
Generated files for 54744.
...
llvm-svn: 54745
2008-08-13 18:41:46 +00:00
Dale Johannesen
c3d88ff804
Add read/write support for X86's sseregparm.
...
llvm-svn: 54744
2008-08-13 18:40:23 +00:00
Nate Begeman
9a71580e21
Add vector shifts to the IR, patch by Eli Friedman.
...
CodeGen & Clang work coming next.
llvm-svn: 54161
2008-07-29 15:49:41 +00:00
Dan Gohman
7f0f329344
Update the generated .cvs files.
...
llvm-svn: 53943
2008-07-23 00:54:54 +00:00
Dan Gohman
6564581be0
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
94f659d6cb
Align comments, colons and cases. Remove trailing
...
whitespace.
llvm-svn: 53453
2008-07-11 07:37:30 +00:00
Chris Lattner
20b1bde882
regenerate
...
llvm-svn: 53440
2008-07-11 00:30:39 +00:00
Chris Lattner
9dff6fbe58
Implement PR2538
...
llvm-svn: 53438
2008-07-11 00:30:06 +00:00
Mon P Wang
7d89d61387
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
29c5903a80
Fix some signed vs. unsigned issues in array and vector handling.
...
llvm-svn: 52664
2008-06-24 01:17:52 +00:00
Dan Gohman
5a929b928e
Update the .cvs files.
...
llvm-svn: 52637
2008-06-23 18:43:26 +00:00
Dan Gohman
7492d685c7
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
7c97681798
AsmParser support for immediate constant aggregate values.
...
llvm-svn: 52149
2008-06-09 14:45:02 +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
Dan Gohman
abbe3d47ab
Don't silently truncate array extents to 32 bits.
...
llvm-svn: 51505
2008-05-23 21:40:55 +00:00
Dan Gohman
d3610b38ac
Issue errors in several situations instead of aborting.
...
llvm-svn: 51493
2008-05-23 18:23:11 +00:00
Dan Gohman
c7007dd0dc
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
bed6c00ef0
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
27c184c385
Reverting accidental commit of generated files.
...
llvm-svn: 51239
2008-05-19 05:57:12 +00:00
Gordon Henriksen
a1f7004038
Remove a duplicative binding. Patch by Mahadevan R.
...
llvm-svn: 51238
2008-05-19 05:47:10 +00:00
Gabor Greif
d61f20217a
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
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
Gabor Greif
48ffb6c7dc
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
8edeae6888
CommonLinkage (missed a file)
...
llvm-svn: 51120
2008-05-14 20:14:09 +00:00
Dale Johannesen
dcdf2760f2
Generated files for CommonLinkage.
...
llvm-svn: 51119
2008-05-14 20:13:36 +00:00
Dale Johannesen
768b6f281e
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
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
Chris Lattner
57a81e6804
regenerate
...
llvm-svn: 50621
2008-05-04 17:18:47 +00:00
Nick Lewycky
1f831c0f57
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
6de65a742d
Allow llvm-as to parse a getresult with an undef operand.
...
llvm-svn: 50175
2008-04-23 20:11:27 +00:00
Chris Lattner
b11a2cca2d
regenerate
...
llvm-svn: 50139
2008-04-23 05:37:08 +00:00
Chris Lattner
b343e5cf8b
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
33e206ef89
regenerate
...
llvm-svn: 49978
2008-04-20 00:41:19 +00:00
Chris Lattner
f390d62b7f
Switch to using Simplified ConstantFP::get API.
...
llvm-svn: 49977
2008-04-20 00:41:09 +00:00
Dan Gohman
ac2fac937c
Teach llvm-as to accept function types with multiple return types.
...
llvm-svn: 49945
2008-04-19 00:24:39 +00:00
Gabor Greif
5a1f254f0a
regenerate
...
llvm-svn: 49293
2008-04-06 23:07:54 +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
Chris Lattner
d141d16ed7
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
2b96ce84aa
Add explicit keywords.
...
llvm-svn: 48801
2008-03-25 22:06:05 +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
Nick Lewycky
fac0f67198
Update the .cvs files to match today's asm syntax change.
...
llvm-svn: 48128
2008-03-10 05:01:34 +00:00
Nick Lewycky
5dd879d5b5
Turn unwind_to into "unwinds to".
...
llvm-svn: 48123
2008-03-10 02:20:00 +00:00
Devang Patel
e7bf998c9a
regenerate.
...
llvm-svn: 47849
2008-03-03 18:58:47 +00:00
Nick Lewycky
b02fe64d8b
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
4813397027
regenerate.
...
llvm-svn: 47642
2008-02-26 23:19:08 +00:00
Devang Patel
e696fb4f5a
Add assert.
...
llvm-svn: 47641
2008-02-26 23:17:50 +00:00
Devang Patel
6229b52816
regenerate
...
llvm-svn: 47634
2008-02-26 22:17:48 +00:00
Devang Patel
5c00c6bafa
Remove unncessary ReturnInst constructors.
...
llvm-svn: 47633
2008-02-26 22:12:58 +00:00
Devang Patel
ac2ec94778
Regenerate.
...
llvm-svn: 47519
2008-02-23 01:17:37 +00:00
Devang Patel
56d28d9fe3
Use isa check instead of getTypeID() check.
...
llvm-svn: 47518
2008-02-23 01:17:17 +00:00
Devang Patel
7cfd9e7634
Regenerate
...
llvm-svn: 47509
2008-02-23 00:38:56 +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
ae08bdb4cf
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
f8efadbac0
Regenerate
...
llvm-svn: 47495
2008-02-22 19:31:30 +00:00
Devang Patel
92fdd3b97c
Use SymbolicValueRef to parse getresult operand
...
llvm-svn: 47494
2008-02-22 19:31:15 +00:00
Dale Johannesen
1d3737e5ed
Generated files for 47484.
...
llvm-svn: 47485
2008-02-22 17:50:51 +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
302f762255
regenerate.
...
llvm-svn: 47408
2008-02-20 22:40:23 +00:00
Devang Patel
77c614dc4a
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
7c2d87a9fc
Regenerated files.
...
llvm-svn: 47402
2008-02-20 21:15:43 +00:00
Dale Johannesen
9b42dda1fd
Support alignment within ParamAttrs in the I/O handling.
...
llvm-svn: 47401
2008-02-20 21:15:19 +00:00
Devang Patel
9f3c2e3d61
Regenerate.
...
llvm-svn: 47391
2008-02-20 19:13:10 +00:00
Devang Patel
6266d7147e
Specify GetResultInst index as an unsigned.
...
llvm-svn: 47390
2008-02-20 19:10:47 +00:00
Anton Korobeynikov
53103ebdf6
Regenerate
...
llvm-svn: 47376
2008-02-20 12:10:37 +00:00
Anton Korobeynikov
c41f5b6af4
Fix newly-introduced 4.3 warnings
...
llvm-svn: 47375
2008-02-20 12:07:57 +00:00
Anton Korobeynikov
0c5e186924
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
f5e3f35874
regenerate
...
llvm-svn: 47350
2008-02-19 22:27:01 +00:00
Devang Patel
7a4c97d14a
Parse
...
%b = getresult {i32, i32} %a, i32 1
llvm-svn: 47349
2008-02-19 22:26:37 +00:00
Dale Johannesen
b022130b62
Generated files for checkin 47342.
...
llvm-svn: 47344
2008-02-19 21:40:51 +00:00
Dale Johannesen
b713b1dde4
Forgot a file, goes with 47342.
...
llvm-svn: 47343
2008-02-19 21:40:10 +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
Chris Lattner
851ebb75de
regenerate
...
llvm-svn: 47312
2008-02-19 04:36:25 +00:00
Chris Lattner
5400cc3907
Fix PR2060 by rejecting invalid types for integer constants.
...
llvm-svn: 47311
2008-02-19 04:36:07 +00:00
Scott Michel
4a4f50da13
Back out mods to llvmAsmParser, incorrectly committed
...
llvm-svn: 46545
2008-01-30 03:10:00 +00:00
Scott Michel
ab3702fba9
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
d99973b822
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
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
8193d4af33
remove attribution from lib Makefiles.
...
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Christopher Lamb
2087584f25
regenerate.
...
llvm-svn: 45085
2007-12-17 01:17:35 +00:00
Christopher Lamb
a608afb52e
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
cc0088ff41
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
8187d5cde7
Regenerate.
...
llvm-svn: 44934
2007-12-12 08:45:45 +00:00
Christopher Lamb
6d12d7c0fe
Implement part of review feedback for address spaces.
...
llvm-svn: 44933
2007-12-12 08:44:39 +00:00
Christopher Lamb
71a996a387
Regenerate.
...
llvm-svn: 44859
2007-12-11 09:02:08 +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
Gordon Henriksen
5d201e0bcc
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
df7a006f45
add #include
...
llvm-svn: 44710
2007-12-08 19:03:30 +00:00
Anton Korobeynikov
75a3208bb0
Regenerate
...
llvm-svn: 44546
2007-12-03 21:01:29 +00:00
Anton Korobeynikov
dcec56301a
Fix fallout from my last patch: don't reject varargs functions :)
...
llvm-svn: 44545
2007-12-03 21:00:45 +00:00
Anton Korobeynikov
3f14aef8e9
Regenerate
...
llvm-svn: 44541
2007-12-03 19:17:47 +00:00
Anton Korobeynikov
a19d61c50e
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
94d751995e
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
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
Duncan Sands
d05a55f03f
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
7f2b9b27b3
autoupgrade files that use callfoo as call foo.
...
llvm-svn: 44218
2007-11-18 18:43:24 +00:00
Chris Lattner
88f47f2798
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
54284cf34a
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
a42e2c2272
Basic non-power-of-2 vector support
...
llvm-svn: 44181
2007-11-15 21:15:26 +00:00
Anton Korobeynikov
b1e6079350
Regenerate
...
llvm-svn: 44110
2007-11-14 09:53:48 +00:00
Anton Korobeynikov
00f3ace7e9
Add pure/const attributes. Documentation will follow.
...
llvm-svn: 44109
2007-11-14 09:52:30 +00:00
Dan Gohman
6255ce9f5d
Add support for vector remainder operations.
...
llvm-svn: 43744
2007-11-05 23:35:22 +00:00
Dale Johannesen
1f70f86c7a
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
Dale Johannesen
0ee2a2fb59
Next PPC long double bits. First cut at constants.
...
No compile-time support for constant operations yet,
just format transformations. Make readers and
writers work. Split constants into 2 doubles in
Legalize.
llvm-svn: 42865
2007-10-11 18:07:22 +00:00
Dale Johannesen
967ee09f04
Generated files for previous patch.
...
llvm-svn: 41876
2007-09-12 03:31:28 +00:00
Dale Johannesen
4784ee3431
Revise previous patch per review comments.
...
Next round of x87 long double stuff.
Getting close now, basically works.
llvm-svn: 41875
2007-09-12 03:30:33 +00:00
Dale Johannesen
4ee2a51844
Generated files for previous patch.
...
llvm-svn: 41859
2007-09-11 18:33:39 +00:00
Dale Johannesen
7bc3969cea
Add APInt interfaces to APFloat (allows directly
...
access to bits). Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling
(untested, probably does not work).
llvm-svn: 41858
2007-09-11 18:32:33 +00:00
Chris Lattner
9f93ab3579
regenerate
...
llvm-svn: 41816
2007-09-10 23:24:14 +00:00
Chris Lattner
c94e3e9361
Fix PR1645 by resolving forward alias references.
...
llvm-svn: 41815
2007-09-10 23:23:53 +00:00
Dale Johannesen
783215c630
Apply feedback from previous patch.
...
llvm-svn: 41774
2007-09-07 21:07:57 +00:00
Dale Johannesen
86f367a6b7
Next round of APFloat changes.
...
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double. Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)
llvm-svn: 41747
2007-09-06 18:13:44 +00:00
David Greene
34e8027ee3
Update generated files.
...
llvm-svn: 41706
2007-09-04 18:46:50 +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
c3b406a619
update these
...
llvm-svn: 41565
2007-08-29 16:15:23 +00:00
David Greene
5b85021be8
Update InvokeInst to work like CallInst
...
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Chris Lattner
789dad3483
regenerate
...
llvm-svn: 40875
2007-08-06 21:00:46 +00:00
Chris Lattner
da9f76e17a
Fix PR1577, a crash on invalid bug.
...
llvm-svn: 40874
2007-08-06 21:00:37 +00:00
Chandler Carruth
d76683caee
Regenerating.
...
llvm-svn: 40808
2007-08-04 01:56:21 +00:00
Chandler Carruth
00e56b0e81
This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
...
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.
llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Dale Johannesen
dda00eb44d
Long double, part 1 of N. Support in IR.
...
llvm-svn: 40774
2007-08-03 01:03:46 +00:00
David Greene
29112580c6
Update generated files.
...
llvm-svn: 40663
2007-08-01 03:59:32 +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
Reid Spencer
037c4a8a1d
Regenerate.
...
llvm-svn: 40634
2007-07-31 14:41:17 +00:00
Reid Spencer
c103e8add9
After a discussion with Anton, it turns out that the InReg attribute is not
...
permitted on function results. So, revert the last patch to make it illegal.
llvm-svn: 40632
2007-07-31 14:39:10 +00:00
Reid Spencer
70d8b73b1d
Regenerate.
...
llvm-svn: 40621
2007-07-31 06:37:43 +00:00
Reid Spencer
3c756948a5
Allow the INREG parameter attribute to be added to functions. This permits the
...
function result to be passed in a register. This implements the GCC regparm
function attribute for llvm by translation to the InReg parameter attribute
and fixes test/CFrontend/2002-07-30-SubregSetAssertion.c
llvm-svn: 40619
2007-07-31 06:37:27 +00:00
Reid Spencer
2ee436e652
Regenerate (again).
...
llvm-svn: 40613
2007-07-31 03:55:56 +00:00
Reid Spencer
15d4188166
Don't include newlines in the whitespace before newline (WSNL) rule.
...
Fix the comment for WSNL to describe its actual function.
llvm-svn: 40612
2007-07-31 03:55:43 +00:00
Reid Spencer
1d951c9803
Regenerate.
...
llvm-svn: 40611
2007-07-31 03:50:36 +00:00
Reid Spencer
ac494bd7cf
For PR1553:
...
Make the AsmParser auto-upgrade the old zext and sext
keywords for parameter attributes and handle the
end-of-line ambiguity.
llvm-svn: 40610
2007-07-31 02:57:37 +00:00
Duncan Sands
e8bb2c6d32
Support for trampolines, except for X86 codegen which is
...
still under discussion.
llvm-svn: 40549
2007-07-27 12:58:54 +00:00
Reid Spencer
44d34e9b61
For PR1553:
...
Change the keywords for the zext and sext parameter attributes to be
zeroext and signext so they don't conflict with the keywords for the
instructions of the same name. This gets around the ambiguity.
llvm-svn: 40069
2007-07-19 23:13:04 +00:00
Rafael Espindola
7b3de98989
Add the byval attribute
...
llvm-svn: 37940
2007-07-06 10:57:03 +00:00
Chris Lattner
1d5bf72d84
update the .cvs files
...
llvm-svn: 37918
2007-07-05 17:26:49 +00:00
John Criswell
57e5ed4b5a
Convert .cvsignore files
...
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Zhou Sheng
09b12fef98
Commit first round work of PR1373. "noalias" is now fully supported in
...
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.
llvm-svn: 37432
2007-06-05 05:28:26 +00:00
Reid Spencer
b989fcc157
Regenerate.
...
llvm-svn: 37294
2007-05-22 19:08:16 +00:00
Reid Spencer
e7aa6d1247
Don't allow the UnEscape code to read or write beyond the end of yytext.
...
Make sure we convert \\ into \.
llvm-svn: 37293
2007-05-22 19:07:45 +00:00
Reid Spencer
c0e0e864b3
Regenerate.
...
llvm-svn: 37292
2007-05-22 18:52:55 +00:00
Reid Spencer
4c7237fdca
Implement full unescaping of escaped hex characters in all quoted identifiers
...
and strings.
llvm-svn: 37291
2007-05-22 18:52:21 +00:00
Chris Lattner
d645a38841
update comment
...
llvm-svn: 37282
2007-05-22 06:56:32 +00:00
Chris Lattner
87cf325aad
regenerate
...
llvm-svn: 37281
2007-05-22 06:47:55 +00:00
Chris Lattner
27741f22d9
simplify code
...
llvm-svn: 37280
2007-05-22 06:47:11 +00:00
Reid Spencer
b95962309d
Regenerate
...
llvm-svn: 37258
2007-05-19 07:22:10 +00:00
Reid Spencer
b3bb24667a
Make the %"..." syntax legal for local name. This just makes it symmetric
...
with global names which can already be @"..."
llvm-svn: 37257
2007-05-19 07:21:26 +00:00
Chris Lattner
9f7278dff9
regenerate
...
llvm-svn: 36740
2007-05-04 04:01:37 +00:00
Chris Lattner
5c433c384d
fix a bug where llvm-as couldn't assemble the .ll file for 252.eon.
...
llvm-svn: 36739
2007-05-04 04:01:07 +00:00
Anton Korobeynikov
527cff103e
Regenerate
...
llvm-svn: 36566
2007-04-29 18:38:24 +00:00
Anton Korobeynikov
3d95e52ea2
Implement protected visibility. This partly implements PR1363. Linker
...
should be taught to deal with protected symbols.
llvm-svn: 36565
2007-04-29 18:35:00 +00:00
Jeff Cohen
7cfc4b404f
Fix MemoryBuffer breakage correctly.
...
llvm-svn: 36561
2007-04-29 14:43:31 +00:00
Reid Spencer
2e8cb6e797
Regenerate.
...
llvm-svn: 36543
2007-04-28 16:07:31 +00:00
Reid Spencer
2ba9c4d36d
Revert the premature portion of the last commit.
...
llvm-svn: 36542
2007-04-28 16:06:50 +00:00
Reid Spencer
349097160e
Fix a compilation error (jump to case label).
...
llvm-svn: 36539
2007-04-28 14:13:42 +00:00
Anton Korobeynikov
f59f5a254c
Regenerate
...
llvm-svn: 36538
2007-04-28 13:48:45 +00:00
Anton Korobeynikov
45162c6dad
Implement review feedback. Aliasees can be either GlobalValue's or
...
bitcasts of them.
llvm-svn: 36537
2007-04-28 13:45:00 +00:00
Chris Lattner
6d3ca4205e
regen
...
llvm-svn: 36470
2007-04-26 05:31:05 +00:00
Chris Lattner
a25d560c24
wrap long lines
...
Fix PR1358 and test/Assembler/2007-04-25-AssemblerFoldExternWeak.ll, by
creating forward decl globals with linkage extern_weak to defeat implicit
constant folding.
llvm-svn: 36469
2007-04-26 05:30:35 +00:00
Bill Wendling
6968d3cb0d
Quiet a compiler warning about assignment in an if-then conditional.
...
llvm-svn: 36454
2007-04-25 23:52:02 +00:00
Anton Korobeynikov
60f5a47a64
Add missed semicolon. Resotre compatibility with older bisons
...
llvm-svn: 36443
2007-04-25 18:07:40 +00:00
Anton Korobeynikov
21684d3242
Regenerate
...
llvm-svn: 36437
2007-04-25 14:29:12 +00:00
Anton Korobeynikov
25dc9a61cb
Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
...
will follow.
llvm-svn: 36435
2007-04-25 14:27:10 +00:00
Christopher Lamb
52b9e77abb
Regenerated
...
llvm-svn: 36350
2007-04-22 20:09:11 +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
4721577334
For PR1146:
...
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.
llvm-svn: 36327
2007-04-22 05:46:44 +00:00
Reid Spencer
81070d52da
Revert Christopher Lamb's load/store alignment changes.
...
llvm-svn: 36309
2007-04-21 18:36:27 +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
Reid Spencer
226017813d
Regenerate
...
llvm-svn: 36179
2007-04-16 22:02:23 +00:00
Reid Spencer
52d73dba41
Okay, yes there *is* a getKeyLength method on ValueName. And, it should be
...
used because we *do* want to allow nulls in names.
llvm-svn: 36178
2007-04-16 22:01:57 +00:00
Reid Spencer
162b270bd1
Regenerate.
...
llvm-svn: 36156
2007-04-16 20:35:38 +00:00
Reid Spencer
d36a46527a
Check length of string before we walk off the end of it.
...
Thanks, Chris.
llvm-svn: 36155
2007-04-16 20:31:06 +00:00
Reid Spencer
33f8e6461a
Regenerate.
...
llvm-svn: 36144
2007-04-16 17:47:06 +00:00
Reid Spencer
09e600f773
Use a more optimal way to get the name of a function. Thanks, Chris.
...
llvm-svn: 36143
2007-04-16 17:45:50 +00:00
Reid Spencer
67f5aa847c
Regenerate.
...
llvm-svn: 36122
2007-04-16 06:56:07 +00:00
Reid Spencer
408e427abf
For PR1328:
...
Use the new parameter on Function::getIntrinsicID to identify cases where
a function is being called with an "llvm." name but it isn't actually an
intrinsic. In such cases generate an error.
llvm-svn: 36121
2007-04-16 06:55:42 +00:00
Lauro Ramos Venancio
a76c2806de
Implement the "thread_local" keyword.
...
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Reid Spencer
2792e203c5
For PR1146:
...
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.
llvm-svn: 35877
2007-04-11 02:44:20 +00:00
Reid Spencer
2660b8dccb
For PR1146:
...
Adapt handling of parameter attributes to use the new ParamAttrsList class.
llvm-svn: 35814
2007-04-09 06:17:21 +00:00
Reid Spencer
3ffd70d6e4
Regenerate
...
llvm-svn: 35813
2007-04-09 06:16:21 +00:00
Reid Spencer
4ede44609e
Regenerate
...
llvm-svn: 35795
2007-04-09 01:56:05 +00:00
Reid Spencer
93d41cc941
Drop the implementation keyword.
...
llvm-svn: 35794
2007-04-09 01:55:42 +00:00
Reid Spencer
bc87d8dbef
For PR1289: Regenerate
...
llvm-svn: 35500
2007-03-30 01:37:39 +00:00
Reid Spencer
8a51bc0379
For PR1289:
...
Check at the end of the parse that there are no unresolved types and no
undefined values. Issue errors if there are. This gets rid of the need
for implementation or checkpoint by ensuring you can't finish a parse with
undefined things.
llvm-svn: 35499
2007-03-30 01:37:13 +00:00
Reid Spencer
6125321928
Regenerate.
...
llvm-svn: 35473
2007-03-29 18:50:01 +00:00
Reid Spencer
b4730512d7
Give users a grace period on the implementation keyword. This *will* get
...
removed in a few days.
llvm-svn: 35472
2007-03-29 18:49:28 +00:00
Reid Spencer
c50c59b4f6
Regenerate.
...
llvm-svn: 35411
2007-03-28 02:37:40 +00:00
Reid Spencer
f88fd1096c
Replace the "implementation" keyword with "checkpoint". This more accurately
...
describes its function as check against unresolved types and definitions.
This is handy for forcing error messages in assembly test cases or otherwise
ensuring that everything is resolved at that point in the assembly.
llvm-svn: 35410
2007-03-28 02:36:42 +00:00
Reid Spencer
620297a20c
Regenerate.
...
llvm-svn: 35259
2007-03-22 02:14:08 +00:00
Reid Spencer
6890147648
Add support for the noreturn and nounwind function attributes.
...
llvm-svn: 35258
2007-03-22 02:13:23 +00:00
Reid Spencer
d37f0f007d
Regenerate.
...
llvm-svn: 35215
2007-03-20 17:19:31 +00:00
Reid Spencer
3cc307f4d7
Don't delete things before their last use (avoids bad reads).
...
llvm-svn: 35214
2007-03-20 17:18:33 +00:00
Reid Spencer
81602be7e3
Regenerate.
...
llvm-svn: 35199
2007-03-20 01:13:36 +00:00
Reid Spencer
4a8b426ab2
Plug some PATypeHolder memory leaks.
...
llvm-svn: 35198
2007-03-20 01:13:00 +00:00
Reid Spencer
ea5bcde3c8
Regenerate.
...
llvm-svn: 35183
2007-03-19 20:40:51 +00:00
Reid Spencer
7f92fc05cd
Fix test/Assembler/2007-03-19-NegValue.ll by using the new "isSigned"
...
parameter on ConstantInt::get to indicate the signedness of the intended
value.
llvm-svn: 35182
2007-03-19 20:40:22 +00:00
Reid Spencer
65e272dedd
Regenerate.
...
llvm-svn: 35174
2007-03-19 18:40:50 +00:00
Reid Spencer
a304595278
For PR1248:
...
Eliminate support for type planes in numbered values. This simplifies the
data structures involved in managing forward definitions, etc. Instead of
requiring maps from type to value, we can now just use a vector of values.
These changes also required rewrites of some support functions such as
InsertValue, getBBVal, and ResolveDefinitions. Some other cosmetic changes
were made as well.
llvm-svn: 35173
2007-03-19 18:39:36 +00:00
Reid Spencer
34f69893be
Add and Operator== method to ValID so equality can be done properly for
...
named or numbered ValIDs.
llvm-svn: 35172
2007-03-19 18:34:28 +00:00
Reid Spencer
75ffe11ca9
Regenerate.
...
llvm-svn: 35050
2007-03-09 21:19:09 +00:00
Reid Spencer
f860fd3370
For PR1245:
...
Account for the sign bit when computing the number of bits required for
a negative integer literal constant.
llvm-svn: 35046
2007-03-09 19:26:52 +00:00
Reid Spencer
29c98b589c
Regenerate.
...
llvm-svn: 34797
2007-03-01 19:41:47 +00:00
Reid Spencer
125af87a25
Use a simpler constructor when constructing ConstantInt. Also, replace
...
verbose code to sext/trunc or zext/trunc and APInt with new methods on
that class.
llvm-svn: 34794
2007-03-01 19:32:01 +00:00
Reid Spencer
2f6d8e2243
Regenerate.
...
llvm-svn: 34716
2007-02-28 02:24:54 +00:00
Reid Spencer
36f506df46
Implement arbitrary integer constants through the use of APInt values.
...
Positive, negative, and hexadecimal integer constants will now return an
APInt for values having > 64 bits of precision.
llvm-svn: 34715
2007-02-28 02:24:27 +00:00
Reid Spencer
14d26ed070
Implement support for aribrary precision integers by creating two new
...
tokens: ESAPINTVAL and EUAPINTVAL and adding an APInt* as a semantic value.
This allows us to extend the definition of an integer constant to allow
arbitrary precision integer constant values.
llvm-svn: 34714
2007-02-28 02:23:44 +00:00