Gabor Greif
624a31f2eb
Finally land the InvokeInst operand reordering.
...
I have audited all getOperandNo calls now, fixing
hidden assumptions. CallSite related uglyness will
be eliminated successively.
Note this patch has a long and griveous history,
for all the back-and-forths have a look at
CallSite.h's log.
llvm-svn: 99399
2010-03-24 13:21:49 +00:00
Gabor Greif
ef64581628
backing out r99170 because it still fails on clang-x86_64-darwin10-fnt
...
llvm-svn: 99171
2010-03-22 09:11:00 +00:00
Gabor Greif
04f7f381ae
Now that hopefully all direct accesses to InvokeInst operands are fixed
...
we can reapply the InvokeInst operand reordering patch. (see r98957).
llvm-svn: 99170
2010-03-22 08:28:00 +00:00
Gabor Greif
0bfed2dc4e
back out r98957, it broke http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite
...
llvm-svn: 98958
2010-03-19 13:50:02 +00:00
Gabor Greif
953702b8e6
Recommit r80858 again (which has been backed out in r80871).
...
This time I did a self-hosted bootstrap on Linux x86-64,
with no problems. Let's see how darwin 64-bit self-hosting
goes. At the first sign of failure I'll back this out.
Maybe the valgrind bots give me a hint of what may be wrong
(it at all).
llvm-svn: 98957
2010-03-19 11:55:53 +00:00
Chris Lattner
cf7f134913
reapply r98656 unmodified, which exposed the asmprinter not
...
handling constant unions.
llvm-svn: 98680
2010-03-16 21:25:55 +00:00
Daniel Dunbar
faade5305c
Revert r98656, its breaking all over the place.
...
llvm-svn: 98662
2010-03-16 19:35:34 +00:00
Chris Lattner
7a96045d0a
improve support for uniontype and ConstantUnion, patch by Tim Northover!
...
llvm-svn: 98656
2010-03-16 19:15:03 +00:00
Erick Tryzelaar
a71d3b252d
Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
...
llvm-svn: 97858
2010-03-06 00:30:06 +00:00
Erick Tryzelaar
6e35683720
Whoops, the old LLVMWriteBitcodeToFileHandle closed the stream.
...
Luckily this never was released.
llvm-svn: 97857
2010-03-06 00:30:01 +00:00
Erick Tryzelaar
7c33f3d1f3
LLVMWriteBitcodeToFileHandle should work on all architectures now.
...
llvm-svn: 97856
2010-03-06 00:29:58 +00:00
Erick Tryzelaar
66bf49241f
Add Module functions in place of module providers.
...
llvm-svn: 97608
2010-03-02 23:58:54 +00:00
Nick Lewycky
3fb5927aea
Make the side-numbering of instructions used by metadata (which is needed to
...
keep track of instructions that return void) per-function. This fixes PR5278.
This breaks backwards compatibility with the metadata format. That's okay
because we haven't released the metadata bitcode yet.
llvm-svn: 97132
2010-02-25 08:30:17 +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
Daniel Dunbar
d01423cec1
Simplify.
...
llvm-svn: 96269
2010-02-15 21:08:22 +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
Evan Cheng
3e15f48df5
Also recognize armv6t2-* and armv5te-* triplets.
...
llvm-svn: 96008
2010-02-12 20:39:35 +00:00
Evan Cheng
c75a237988
Add ARM bitcode file magic.
...
llvm-svn: 96006
2010-02-12 20:13:44 +00:00
Victor Hernandez
e65222a748
Function-local metadata whose operands had been optimized to no longer refer to function-local IR were not getting written by BitcodeWriter; solution is for these metadata to be enumerated just like global metadata.
...
llvm-svn: 95467
2010-02-06 01:21:09 +00:00
Victor Hernandez
28f795182c
Fix (and test) function-local metadata that occurs before the instruction that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated
...
llvm-svn: 95269
2010-02-04 01:13:08 +00:00
Victor Hernandez
8102f790ac
We were not writing bitcode for function-local metadata whose operands have been erased (making it not have any more function-local operands)
...
llvm-svn: 94842
2010-01-29 21:19:19 +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
Dan Gohman
18bbc20ac8
Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case
...
of a forward-reference, which doesn't use an "abbrev" encoding.
llvm-svn: 94454
2010-01-25 21:55:39 +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
Benjamin Kramer
252f9b6a26
Respect operator precedence (and silence a gcc 4.3 warning).
...
llvm-svn: 94304
2010-01-23 09:54:23 +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
Nick Lewycky
938b8b195c
Fix a crasher trying to fold each element in a comparison between two vectors
...
if one of the vectors didn't have elements (such as undef). Fixes PR 6096.
Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would
have <2 x i1> type if constant folding was successful and i1 type if it wasn't.
This exposed a related issue in the bitcode reader.
llvm-svn: 94069
2010-01-21 07:03:21 +00:00
Victor Hernandez
23d77b1e51
Simplify code that chooses when to enumerate function-local metadata operands
...
llvm-svn: 93446
2010-01-14 19:54:11 +00:00
Victor Hernandez
292297e8e2
Avoid modifying ValueEnumerator's MD ValueList by choosing which function-local MD to write based on the function currently being written
...
llvm-svn: 93441
2010-01-14 19:38:44 +00:00
Victor Hernandez
6878a7e7b6
In WriteFunction(), write function-local metadata before we write the instructions, so instruction's references to metadata are fully resolved by the time they get written.
...
llvm-svn: 93403
2010-01-14 01:50:08 +00:00
Victor Hernandez
367ef8bf4a
Clean up unnecessary return and brackets
...
llvm-svn: 93401
2010-01-14 01:46:02 +00:00
Victor Hernandez
55e8dacfed
Fix comment typo
...
llvm-svn: 93355
2010-01-13 21:25:04 +00:00
Victor Hernandez
d250df09f5
Write function-local metadata as a metadata subblock of a funciton block
...
llvm-svn: 93339
2010-01-13 19:37:33 +00:00
Victor Hernandez
9938929f1f
Enumerate function-local metadata (and its types and operands) only during function-incorporation, global metadata continues to be enumerated during creation of ValueEnumerator
...
llvm-svn: 93338
2010-01-13 19:36:16 +00:00
Victor Hernandez
4e63ccc1c3
Parse function-local metadata inside function blocks
...
llvm-svn: 93337
2010-01-13 19:34:08 +00:00
Victor Hernandez
6de2f65f80
Revert 93270 pending investigation of how stray non-constant values end up in ValueEnumerator's ValueList during WriteConstants()
...
llvm-svn: 93289
2010-01-13 03:18:30 +00:00
Victor Hernandez
9b62aee9ad
Make WriteConstants() more robust against stray values in ValueEnumerator's ValueList
...
llvm-svn: 93270
2010-01-12 23:37:59 +00:00
Devang Patel
9874d72976
s/NextValueNo/NextMDValueNo while processing metadata.
...
llvm-svn: 93165
2010-01-11 18:52:33 +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
953394de82
"In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
...
Patch by James Y Knight!
llvm-svn: 93079
2010-01-09 22:27:07 +00:00
Chris Lattner
8a92d699f8
clean up this code, add a fixme.
...
llvm-svn: 93042
2010-01-09 02:02:37 +00:00
Devang Patel
de49dd9087
NamedMDNode is never used so there is no need to enumerate it here.
...
llvm-svn: 93039
2010-01-09 01:24:03 +00:00
Devang Patel
fbb47c2300
NamedMDNode element is either null or MDNode. Otherwise this is a malformed NamedMDNode record.
...
llvm-svn: 93037
2010-01-09 01:02:22 +00:00
Devang Patel
ea208bf99c
Derive NamedMDNode from Value.
...
llvm-svn: 93032
2010-01-09 00:30:14 +00:00
Devang Patel
10ee76f7f4
Use separate namespace for named metadata.
...
llvm-svn: 92931
2010-01-07 19:39:36 +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
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