1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

75 Commits

Author SHA1 Message Date
Craig Topper
24f46609c1 Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
llvm-svn: 164017
2012-09-17 07:16:40 +00:00
Dan Gohman
3c5cc7f336 Define an official slot for the new !tbaa.struct metadata tag.
llvm-svn: 163815
2012-09-13 17:56:17 +00:00
Nuno Lopes
de7b3a54f2 revert r158660, since Chris has some issues with this patch (namely using code to reprent information only used by the compiler)
Original commit msg:
add the 'alloc' metadata node to represent the size of offset of buffers pointed to by pointers.
This metadata can be attached to any instruction returning a pointer

llvm-svn: 158688
2012-06-18 23:34:26 +00:00
Nuno Lopes
aa5ffcb407 add the 'alloc' metadata node to represent the size of offset of buffers pointed to by pointers.
This metadata can be attached to any instruction returning a pointer

llvm-svn: 158660
2012-06-18 16:04:04 +00:00
Duncan Sands
40d080e3b7 Rename "fpaccuracy" metadata to the more generic "fpmath". That's because I'm
thinking of generalizing it to be able to specify other freedoms beyond accuracy
(such as that NaN's don't have to be respected).  I'd like the 3.1 release (the
first one with this metadata) to have the more generic name already rather than
having to auto-upgrade it in 3.2.

llvm-svn: 154744
2012-04-14 12:36:06 +00:00
Rafael Espindola
277fa2bfe2 First part of PR12251. Add documentation and verifier support for the range
metadata.

llvm-svn: 153359
2012-03-24 00:14:51 +00:00
Chris Lattner
4f5ba31205 generalize LLVMContext::emitError to take a twine instead of a StringRef.
llvm-svn: 147501
2012-01-03 23:47:05 +00:00
Peter Collingbourne
24c42c8534 Add a pinned metadata name for fpaccuracy, and document it
llvm-svn: 143135
2011-10-27 19:19:14 +00:00
Jakub Staszak
28bcc8673e Introduce "expect" intrinsic instructions.
llvm-svn: 134516
2011-07-06 18:22:43 +00:00
Chris Lattner
99b8654169 now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate the
cookie argument to the SourceMgr diagnostic stuff.  This cleanly separates
LLVMContext's inlineasm handler from the sourcemgr error handling 
definition, increasing type safety and cleaning things up.

llvm-svn: 119486
2010-11-17 08:13:01 +00:00
Dan Gohman
ebbc4df924 Remove the experimental AliasAnalysis::getDependency interface, which
isn't a good level of abstraction for memdep. Instead, generalize
AliasAnalysis::alias and related interfaces with a new Location
class for describing a memory location. For now, this is the same
Pointer and Size as before, plus an additional field for a TBAA tag.

Also, introduce a fixed MD_tbaa metadata tag kind.

llvm-svn: 113858
2010-09-14 21:25:10 +00:00
Owen Anderson
700d71937c Move private member functions to the end of the class declaration.
llvm-svn: 113385
2010-09-08 18:41:07 +00:00
Owen Anderson
785d0760ab Make module ownership methods on LLVMContext private, and make Module a friend
so that it can access them.  These are not intended to be externally accessible APIs.

llvm-svn: 113380
2010-09-08 18:22:11 +00:00
Owen Anderson
c7dd9d3840 Clarify the ownership model of LLVMContext and Module. Namely, contexts own
modules are instantiated in them.  If the context is deleted, all of its owned
modules are also deleted.

llvm-svn: 113374
2010-09-08 18:03:32 +00:00
Dan Gohman
5bb3ce490d Remove an obsolete comment.
llvm-svn: 108940
2010-07-20 21:45:17 +00:00
Dan Gohman
b9a28557ea Add support for remapping metadata kind IDs when reading in a
bitcode file, so that two bitcode files where the same metadata kind
name happens to have been assigned a different ID can still be
linked together.

Eliminate the restriction that metadata kind IDs can't be 0.

Change MD_dbg from 1 to 0, because we can now, and because it's
less mysterious that way.

llvm-svn: 108939
2010-07-20 21:42:28 +00:00
Chris Lattner
393ea6fc22 introduce a new recoverable error handling API to LLVMContext
and use it in one place in inline asm handling stuff.  Before
we'd generate this for an invalid modifier letter:

$ clang asm.c -c -o t.o
fatal error: error in backend: Invalid operand found in inline asm: 'abc incl    ${0:Z}'
INLINEASM <es:abc incl    ${0:Z}>, 10, %EAX<def>, 2147483657, %EAX, 14, %EFLAGS<earlyclobber,def,dead>, <!-1>


Now we generate this:

$ clang asm.c -c -o t.o
error: invalid operand in inline asm: 'incl    ${0:Z}'
asm.c:3:12: note: generated from here
  __asm__ ("incl    %Z0" : "+r" (X));
           ^
1 error generated.

This is much better but still admittedly not great ("why" is the operand 
invalid??), codegen should try harder with its diagnostics :)

llvm-svn: 100723
2010-04-07 23:40:44 +00:00
Chris Lattner
b7a7cb37b6 give LLVMContext an inline asm diagnostic hook member.
llvm-svn: 100506
2010-04-06 00:44:45 +00:00
Chris Lattner
9ab48420db Fix a major source of compile-time slowness at -O0 -g by optimizing
the storage of !dbg metadata kinds in the instruction themselves.
The on-the-side hash table works great for metadata that not-all
instructions get, or for metadata that only exists when optimizing.
But when compile-time is everything, it isn't great.

I'm not super thrilled with the fact that this plops a TrackingVH in
Instruction, because it grows it by 3 words.  I'm investigating 
alternatives, but this should be a step in the right direction in any
case.

llvm-svn: 99957
2010-03-30 23:03:27 +00:00
Chris Lattner
84e9de4a58 Final step in the metadata API restructuring: move the
getMDKindID/getMDKindNames methods to LLVMContext (and add
convenience methods to Module), eliminating MetadataContext.
Move the state that it maintains out to LLVMContext.

llvm-svn: 92259
2009-12-29 09:01:33 +00:00
Devang Patel
f9d56f4830 Derive metadata hierarchy from Value instead of User.
llvm-svn: 84801
2009-10-21 23:57:35 +00:00
Dan Gohman
560feba5c2 Make LLVMContext's pImpl member const.
llvm-svn: 83393
2009-10-06 17:43:57 +00:00
Devang Patel
1070b7a713 s/class Metadata/class MetadataContext/g
llvm-svn: 83019
2009-09-28 21:41:20 +00:00
Devang Patel
253aa4d192 Add llvm::Metadata to manage metadata used in a context.
This interface will be used to attach metadata with an instruction.

llvm-svn: 82060
2009-09-16 18:09:00 +00:00
Owen Anderson
9df206d02d Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Benjamin Kramer
9a590500ea Make LLVMContext and LLVMContextImpl classes instead of structs.
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Dan Gohman
24939b2c4f Tidy #includes.
llvm-svn: 78677
2009-08-11 16:02:12 +00:00
Devang Patel
4609ecd4bd Remove dead metadata.
llvm-svn: 78651
2009-08-11 06:31:57 +00:00
Benjamin Kramer
cde4b103b0 Remove unused forward decls.
llvm-svn: 78187
2009-08-05 11:33:27 +00:00
Owen Anderson
cf2c39dc30 Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous.  Also, fix some MSVC compile errors.

llvm-svn: 78115
2009-08-04 22:41:48 +00:00
Owen Anderson
762987e14b Privatize the last bit of Constant-creation state.
llvm-svn: 78097
2009-08-04 20:25:11 +00:00
Owen Anderson
5370346117 Privatize all but one of the remaining constant tables.
llvm-svn: 77748
2009-07-31 22:45:43 +00:00
Owen Anderson
034ab4f8b1 Move the metadata constructors back to 2.5 syntax.
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Owen Anderson
1dc40e205b Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Owen Anderson
d0e6352c97 Move getTrue() and getFalse() to 2.5-like APIs.
llvm-svn: 77685
2009-07-31 17:39:07 +00:00
Owen Anderson
93ccaf5c60 Move more code back to 2.5 APIs.
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Owen Anderson
881d928f9b Move types back to the 2.5 API.
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Owen Anderson
0ce2151b36 Move ConstantExpr to 2.5 API.
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Owen Anderson
390e9778d4 Return ConstantVector to 2.5 API.
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Owen Anderson
aa8c94b051 Change ConstantArray to 2.5 API.
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Owen Anderson
d729f993b8 Move ConstantStruct back to 2.5 API.
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Owen Anderson
256c2c250e Move ConstantFP construction back to the 2.5-ish API.
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Daniel Dunbar
9f50ab3c49 Finish migrating VMCore to StringRef/Twine based APIs.
llvm-svn: 77051
2009-07-25 06:02:13 +00:00
Owen Anderson
cc33e89571 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Owen Anderson
be00de7dfe Privatize the ConstantVector tables.
llvm-svn: 76922
2009-07-24 00:36:24 +00:00
Owen Anderson
d449007c92 Privatize the ConstantStruct table.
llvm-svn: 76912
2009-07-23 23:25:33 +00:00
Devang Patel
45ce5c2ac1 MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.

llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Owen Anderson
a8637e9824 Privatize the ConstantArray table.
llvm-svn: 76639
2009-07-21 20:55:28 +00:00
Owen Anderson
bdcb99324a Privatize the first of the value maps.
llvm-svn: 76634
2009-07-21 20:13:12 +00:00
Owen Anderson
7f61f8dc30 Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
llvm-svn: 76598
2009-07-21 18:03:38 +00:00