Dan Gohman
16f5415f5b
Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrap
...
and hasNoSignedWrap, for consistency with the nuw and nsw properties.
llvm-svn: 79539
2009-08-20 17:11:38 +00:00
Daniel Dunbar
8b0b11582d
Switch to SmallString::str from SmallString::c_str, and remove
...
SmallString::c_str.
llvm-svn: 79456
2009-08-19 20:07:03 +00:00
Owen Anderson
a42ac6953b
Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
...
llvm-svn: 78955
2009-08-13 23:27:32 +00:00
Owen Anderson
55f1c09e31
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Benjamin Kramer
78c3bcb582
Make LLVMContext and LLVMContextImpl classes instead of structs.
...
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Erick Tryzelaar
70ede4843c
Change llvm-c's ordering of contexts to make it consistent.
...
llvm-svn: 78656
2009-08-11 07:46:16 +00:00
Owen Anderson
03cb69fbd1
Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
...
llvm-svn: 78258
2009-08-05 23:16:16 +00:00
Chris Lattner
694285ca6d
revert r78048, it isn't worth using assertingvh here.
...
llvm-svn: 78119
2009-08-04 23:07:12 +00:00
Owen Anderson
afd0c4cd56
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
Devang Patel
05eb617da5
Use separate ValueList for metadata.
...
This fixes PR4666.
llvm-svn: 78056
2009-08-04 06:00:18 +00:00
Devang Patel
8cca7b4abe
Revert recent bitcode writer patches.
...
llvm-svn: 78053
2009-08-04 05:01:35 +00:00
Chris Lattner
59c08e76ca
switch ValueMap to using AssertingVH. This is an old patch I had laying
...
around in a tree I forgot about.
llvm-svn: 78048
2009-08-04 04:31:02 +00:00
Devang Patel
4314b1dc01
Remove dead code.
...
llvm-svn: 78035
2009-08-04 02:54:15 +00:00
Devang Patel
b299790411
Fix MDString Abbrev setup.
...
llvm-svn: 78034
2009-08-04 02:36:39 +00:00
Devang Patel
8abe6bc291
Constants and Metadata share ValueList. This means they must be emitted interleaved (using appropriate BLOCK_IDs) otherwise ValuePtrs index gets out of sync.
...
llvm-svn: 78033
2009-08-04 02:26:56 +00:00
Owen Anderson
0087fe6e5c
Move the metadata constructors back to 2.5 syntax.
...
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Owen Anderson
5a1acd9912
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
Benjamin Kramer
7e7617edf8
Work around a dangling pointer dereference when enumerating NamedMDNodes.
...
llvm-svn: 77675
2009-07-31 14:22:13 +00:00
Devang Patel
16e5124a82
Do not use abbrev while writing NamedMDNode name.
...
llvm-svn: 77637
2009-07-30 23:06:35 +00:00
Devang Patel
d14bacfb7a
Enumerate NamedMDNode elements first.
...
llvm-svn: 77636
2009-07-30 23:03:43 +00:00
Owen Anderson
b292b8ce70
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Devang Patel
27c87fff7f
Read and write NamedMDNode.
...
llvm-svn: 77517
2009-07-29 22:34:41 +00:00
Owen Anderson
4056ca9568
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Owen Anderson
487375e9a2
Move ConstantExpr to 2.5 API.
...
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Devang Patel
727a582c59
Refactor. Fix indentation.
...
llvm-svn: 77482
2009-07-29 18:15:02 +00:00
Devang Patel
a4f43fb5dd
Rename MDNode.h header. It defines MDnode and other metadata classes.
...
New name is Metadata.h.
llvm-svn: 77370
2009-07-28 21:49:47 +00:00
Owen Anderson
4aa3295a65
Return ConstantVector to 2.5 API.
...
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Owen Anderson
c2c7932c64
Change ConstantArray to 2.5 API.
...
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Owen Anderson
45308b578b
Move ConstantStruct back to 2.5 API.
...
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Dan Gohman
1639c3905e
Add a new keyword 'inbounds' for use with getelementptr. See the
...
LangRef.html changes for details.
llvm-svn: 77259
2009-07-27 21:53:46 +00:00
Owen Anderson
69c464dec4
Move ConstantFP construction back to the 2.5-ish API.
...
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Daniel Dunbar
d786b51ea4
Remove Value::setName(const char*, unsigned).
...
llvm-svn: 77100
2009-07-26 00:34:27 +00:00
Daniel Dunbar
d43b86d4a4
Finish migrating VMCore to StringRef/Twine based APIs.
...
llvm-svn: 77051
2009-07-25 06:02:13 +00:00
Eric Christopher
c974225976
Move ExtractElementInst to ::Create instead of new. Update all uses.
...
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Owen Anderson
edb4a70325
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
Devang Patel
6292003492
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
Devang Patel
e059ba6ed2
Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
...
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Devang Patel
096ecf1bed
Fix indentation.
...
llvm-svn: 76787
2009-07-22 21:10:50 +00:00
Devang Patel
75094f8e83
Use isa<> instead of dyn_cast<>.
...
llvm-svn: 76767
2009-07-22 18:35:25 +00:00
Sanjiv Gupta
8f3169cf4a
Fixed build warning. No functionality change.
...
llvm-svn: 76761
2009-07-22 17:58:47 +00:00
Devang Patel
7428d8acec
Introduce MetadataBase, a base class for MDString and MDNode.
...
Derive MDString directly from MetadataBase.
Introduce new bitcode block to hold metadata.
llvm-svn: 76759
2009-07-22 17:43:22 +00:00
Dan Gohman
0ebd69614c
Assembly and Bitcode support for unsigned/signed overflow flags and
...
exact sdiv flags.
llvm-svn: 76475
2009-07-20 21:19:07 +00:00
Bill Wendling
a3c6f6bffa
Add plumbing for the `linker_private' linkage type. This type is meant for
...
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.
This is plumbing, so we don't have a use of it yet. More to come, etc.
llvm-svn: 76385
2009-07-20 01:03:30 +00:00
Owen Anderson
4fdeba9706
Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.
...
llvm-svn: 75863
2009-07-15 23:53:25 +00:00
Owen Anderson
b6b2530000
Move EVER MORE stuff over to LLVMContext.
...
llvm-svn: 75703
2009-07-14 23:09:55 +00:00
Torok Edwin
fbcc663cbf
llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
...
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").
llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Torok Edwin
56d0659726
assert(0) -> LLVM_UNREACHABLE.
...
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Owen Anderson
1e5f00e7a7
This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
...
llvm-svn: 75200
2009-07-09 23:48:35 +00:00
Owen Anderson
b17f32945f
Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
...
llvm-svn: 75025
2009-07-08 19:03:57 +00:00
Nick Lewycky
a21d3daadc
Remove the vicmp and vfcmp instructions. Because we never had a release with
...
these instructions, no autoupgrade or backwards compatibility support is
provided.
llvm-svn: 74991
2009-07-08 03:04:38 +00:00