Chris Lattner
117d05ca0e
Give llvm::SourceMgr the ability to have a client-specified
...
diagnostic handler.
llvm-svn: 100503
2010-04-06 00:26:48 +00:00
Chris Lattner
269737461d
stringref-ize the MemoryBuffer::get apis. This requires
...
a co-committed clang patch.
llvm-svn: 100485
2010-04-05 22:42:30 +00:00
Chris Lattner
b77a53bb60
include header.
...
llvm-svn: 100087
2010-04-01 05:20:21 +00:00
Chris Lattner
b0cddaebe0
rewrite handling of forward ref'd instruction metadata
...
to used deferred resolution instead of creating a temporary
node + rauw. There is no reason to create the temporary
mdnode, then do rauw, then destroy it.
llvm-svn: 100086
2010-04-01 05:14:45 +00:00
Chris Lattner
7de674345c
no really, we don't need to copy strings around in the accessor.
...
llvm-svn: 100083
2010-04-01 04:53:22 +00:00
Chris Lattner
98c3d20ae4
eliminate a temporary smallvector
...
llvm-svn: 100082
2010-04-01 04:51:13 +00:00
Duncan Sands
e9a13a3c60
Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
...
methods to try to have the type predicates be more logically positioned.
llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands
1b33dd3c83
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Duncan Sands
2acaf3609c
Uniformize the names of type predicates: rather than having isFloatTy and
...
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
2010-02-15 16:12:20 +00:00
Chris Lattner
2265d6280b
Add support for a union type in LLVM IR. Patch by Talin!
...
llvm-svn: 96011
2010-02-12 20:49:41 +00:00
Charles Davis
d69c12ecc6
Add a new function attribute, 'alignstack'. It will indicate (when the backends
...
implement support for it) that the stack should be forcibly realigned in the
prologue (and the process reversed in the epilogue).
llvm-svn: 95945
2010-02-12 00:31:15 +00:00
Jakob Stoklund Olesen
83ebc265b3
Reintroduce the InlineHint function attribute.
...
This time it's for real! I am going to hook this up in the frontends as well.
The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.
We need some experiments to determine if that is the right thing to do.
llvm-svn: 95466
2010-02-06 01:16:28 +00:00
Jeffrey Yasskin
fb10587e50
Kill ModuleProvider and ghost linkage by inverting the relationship between
...
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.
Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods. The bindings to
other languages still use the ModuleProvider concept. It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.
Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735 .
llvm-svn: 94686
2010-01-27 20:34:15 +00:00
Chris Lattner
5a57121631
make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
...
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Devang Patel
81f0fa06d7
Remove MetadataBase class because it is not adding significant value.
...
llvm-svn: 94243
2010-01-22 22:52:10 +00:00
Chris Lattner
276811b58a
Stop building RTTI information for *most* llvm libraries. Notable
...
missing ones are libsupport, libsystem and libvmcore. libvmcore is
currently blocked on bugpoint, which uses EH. Once it stops using
EH, we can switch it off.
This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.
llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Dan Gohman
f14fd7ec69
Make the parser include the lower level error message in its own error
...
message, to be more informative.
llvm-svn: 94072
2010-01-21 10:15:06 +00:00
Eric Christopher
3c5d9dc0e3
Remove the InlineHint attribute. There are no current or planned
...
users.
llvm-svn: 93558
2010-01-15 21:36:30 +00:00
Victor Hernandez
1ca202f9ea
Consolidate ConvertGlobalValIDToValue, ConvertGlobalOrMetadataValIDToValue, and ConvertValIDToValue into a more powerful ConvertValIDToValue() that does all three's work
...
llvm-svn: 93197
2010-01-11 22:31:58 +00:00
Victor Hernandez
f4272b50d6
Compute isFunctionLocal in MDNode ctor or via argument in new function getWhenValsUnresolved().
...
Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue().
llvm-svn: 93108
2010-01-10 07:14:18 +00:00
Chris Lattner
8e44e4eddc
fix PR5983, reject function bodies with no blocks per the grammar.
...
llvm-svn: 93067
2010-01-09 19:20:07 +00:00
Victor Hernandez
6551d8e0be
When parsing function-local metadata, create a function-local MDNode
...
llvm-svn: 92838
2010-01-06 17:00:21 +00:00
Victor Hernandez
0e7561092b
Re-add parsing of function-local metadata; this time with testcase.
...
llvm-svn: 92793
2010-01-05 22:22:14 +00:00
Devang Patel
311b5584e5
Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1 , null}
...
llvm-svn: 92783
2010-01-05 21:47:32 +00:00
Benjamin Kramer
0ba7479f2c
Move remaining stuff to the isInteger predicate.
...
llvm-svn: 92771
2010-01-05 21:05:54 +00:00
Devang Patel
ab66612f1b
NamedMDNode is a collection MDNodes.
...
llvm-svn: 92761
2010-01-05 20:41:31 +00:00
Benjamin Kramer
e90a3c66c4
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
...
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
Chris Lattner
740252f319
remove some fixme's
...
llvm-svn: 92304
2009-12-30 06:00:36 +00:00
Chris Lattner
c3422a8190
now that instruction metadata is only parsed in one place, eliminate the
...
parser-global MDsOnInst vector and make ParseInstructionMetadata return
its result by-ref through an argument like the entire rest of the parser.
llvm-svn: 92302
2009-12-30 05:48:36 +00:00
Chris Lattner
fb3b372e6d
reimplement ParseOptionalInfo as ParseOptionalCommaAlign, correctly
...
handle the comma case for metadata.
llvm-svn: 92301
2009-12-30 05:44:30 +00:00
Chris Lattner
f7b95d1fbc
rename ParseOptionalCustomMetadata -> ParseInstructionMetadata,
...
and make it non-optional. This fixes the bug where we'd accept
and ignore a spurious comma after some instructions.
llvm-svn: 92300
2009-12-30 05:31:19 +00:00
Chris Lattner
89aae53e72
convert 4 more instructions over.
...
llvm-svn: 92299
2009-12-30 05:27:33 +00:00
Chris Lattner
2aaf4a0490
add facilities to start factoring instruction metadata parsing
...
out of each opcode's handler. Change ret over so far.
llvm-svn: 92298
2009-12-30 05:23:43 +00:00
Chris Lattner
03a91d987f
reimplement insertvalue/extractvalue metadata handling to not blindly
...
accept invalid input. Actually add a testcase.
llvm-svn: 92297
2009-12-30 05:14:00 +00:00
Chris Lattner
2ed8fad119
remove two bogus calls that accepted metadata in the middle of insert/extract value
...
*constant exprs*.
llvm-svn: 92296
2009-12-30 05:04:46 +00:00
Chris Lattner
63289c0f1e
rename NamedOrCustomMD -> MetadataVar to follow conventions of all the rest of the code.
...
llvm-svn: 92295
2009-12-30 05:02:06 +00:00
Chris Lattner
2e5b6d96ac
rename lltok::Metadata -> lltok::exclaim. We name tokens
...
after their syntactic form, not their semantic form.
llvm-svn: 92294
2009-12-30 04:56:59 +00:00
Chris Lattner
6664b8bd4d
rename MetadataCache -> NumberedMetadata to follow the convention
...
used by other things. Convert it to a vector since it is a dense
numbering.
llvm-svn: 92293
2009-12-30 04:51:58 +00:00
Chris Lattner
bc506fa595
rewrite ParseMDNodeVector to follow the normal patter used in the .ll parser.
...
llvm-svn: 92292
2009-12-30 04:42:57 +00:00
Chris Lattner
9583b65fb9
rename ParseMDNode -> ParseMDNodeID, since it parses !42 , not !{... } as you'd expect.
...
llvm-svn: 92291
2009-12-30 04:15:23 +00:00
Chris Lattner
c42b8ff24e
fix parsing of mdstring values.
...
llvm-svn: 92290
2009-12-30 04:13:37 +00:00
Chris Lattner
41a3666fc1
remove the code added in r90497. It has several major issues and no tests.
...
llvm-svn: 92288
2009-12-30 02:20:07 +00:00
Chris Lattner
4f406c8c74
split t_Metadata into t_MDNode and t_MDString, eliminating some unsafe casting.
...
llvm-svn: 92287
2009-12-30 02:11:14 +00:00
Chris Lattner
c549263f8a
factor code even more.
...
llvm-svn: 92280
2009-12-29 22:40:21 +00:00
Chris Lattner
4dd14b6835
simplify some code and unbreak the build by not consuming an
...
extra token.
llvm-svn: 92279
2009-12-29 22:35:39 +00:00
Benjamin Kramer
aa342be382
remove a really wrong parenthesis.
...
llvm-svn: 92277
2009-12-29 22:17:06 +00:00
Chris Lattner
66fa49bda4
clean up some really strange code.
...
llvm-svn: 92275
2009-12-29 22:01:50 +00:00
Chris Lattner
4803e84704
change ParseMDString and ParseMDNode to take arguments of the right type.
...
This exposed a raft of other problems, which I'll deal with in subsequent
patches.
llvm-svn: 92273
2009-12-29 21:53:55 +00:00
Chris Lattner
bfd6a6f096
switch to TrackingVH instead of WeakVH, since these can never
...
be RAUW'd and go to null. This also gets us some sorely lacking
type safety.
llvm-svn: 92272
2009-12-29 21:43:58 +00:00
Chris Lattner
c6b925c592
Each instruction is allowed to have *multiple* different
...
metadata objects on them. Though the entire compiler supports this,
the asmparser didn't.
llvm-svn: 92270
2009-12-29 21:25:40 +00:00