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

43 Commits

Author SHA1 Message Date
Chris Lattner
6d71b145da convert CAZ, UndefValue, and CPN to use DenseMap's again, this time without
using OwningPtr.  OwningPtr would barf when the densemap had to reallocate,
which doesn't appear to happen on the regression test suite, but obviously
happens in real life :)

llvm-svn: 148700
2012-01-23 15:20:12 +00:00
Chris Lattner
4dbbd66de9 revert r148691 and 148693
llvm-svn: 148698
2012-01-23 15:09:44 +00:00
Chris Lattner
7cf6171afa switch UndefValue and ConstantPointerNull over to DenseMap's for uniquing.
llvm-svn: 148693
2012-01-23 08:52:32 +00:00
Chris Lattner
395d1616b3 Replace a use of ConstantUniqueMap for CAZ constants with a simple DenseMap.
Now that the type system rewrite has landed, there is no need for its
complexity and std::map'ness.

llvm-svn: 148691
2012-01-23 08:42:38 +00:00
David Blaikie
576aba04f1 Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146960
2011-12-20 02:50:00 +00:00
Dan Gohman
9c8c9a8f62 The powers that be have decided that LLVM IR should now support 16-bit
"half precision" floating-point with a first-class type.

This patch adds basic IR support (but not codegen support).

llvm-svn: 146786
2011-12-17 00:04:22 +00:00
Chris Lattner
20c6e388ef bump pointer allocate LLVM IR types, since they are never deallocated.
llvm-svn: 135248
2011-07-15 05:49:15 +00:00
Chris Lattner
e299b86ead stop leaking all named struct types with an empty name. Thanks
to Benjamin Kramer for steering me in the right direction here.

llvm-svn: 135031
2011-07-13 04:22:39 +00:00
Nick Lewycky
1b63bb5f14 TypeMap had a destructor that destroyed the types it held. DenseMap did not, so
destroy those types in ~LLVMContext.

llvm-svn: 134945
2011-07-12 00:26:08 +00:00
Chris Lattner
a106725fc5 Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM.  One way to look at it
is through diffstat:
 109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing.  Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
   union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
   uniques them.  This means that the compiler doesn't merge them structurally
   which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
   struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
   in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead 
   "const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.  
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.

llvm-svn: 134829
2011-07-09 17:41:24 +00:00
Dan Gohman
3b55a1294e More SmallVectorImpls.
llvm-svn: 116279
2010-10-12 00:15:27 +00:00
Dale Johannesen
b3df2ff13d Add X86 MMX type to bitcode and Type.
(The Ada bindings probably need it too, but all the
obvious places to change say "do not edit this file".)

llvm-svn: 113618
2010-09-10 20:55:01 +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
Chris Lattner
ecf276b787 remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.

llvm-svn: 112356
2010-08-28 04:09:24 +00:00
Dan Gohman
d48633d340 Fix a bunch of namespace polution.
llvm-svn: 101376
2010-04-15 17:08:50 +00:00
Chris Lattner
b7a7cb37b6 give LLVMContext an inline asm diagnostic hook member.
llvm-svn: 100506
2010-04-06 00:44:45 +00:00
Jeffrey Yasskin
94ecd53a3a Free all Constants in ~LLVMConstantImpl. We avoid assertion failures
by dropping all references from all constants that can use other
constants before trying to destroy any of them.

I also had to free bugpoint's Module in ~BugDriver().

llvm-svn: 99160
2010-03-22 05:23:37 +00:00
Jeffrey Yasskin
f4aab98729 Re-add the Metadata.h include to LLVMContextImpl.h so that MDNode is complete
where FoldingSet<MDNode> is instantiated.  Clang and MSVC complain; gcc
doesn't.

llvm-svn: 99147
2010-03-21 22:08:41 +00:00
Jeffrey Yasskin
98a4091e4a Move the LLVMContextImpl implementation into a .cpp file.
llvm-svn: 99146
2010-03-21 21:17:34 +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
Edward O'Callaghan
db24e89295 One two many newlines at end of file LLVMContextImpl.cpp
llvm-svn: 77911
2009-08-02 20:06:26 +00:00
Edward O'Callaghan
51bfa293c8 Fix no newline at end of LLVMContextImpl.cpp
llvm-svn: 77907
2009-08-02 19:38:12 +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
93ccaf5c60 Move more code back to 2.5 APIs.
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Devang Patel
cb23671431 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
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
038a7f0d35 Remove Value::{isName, getNameRef}.
Also, change MDString to use a StringRef.

llvm-svn: 77098
2009-07-25 23:55:21 +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
Daniel Dunbar
b5adc13728 Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.

llvm-svn: 76888
2009-07-23 18:17:34 +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
Devang Patel
6b2162686a 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
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
1c2b8cc518 Privatize the MDNode uniquing table.
llvm-svn: 76126
2009-07-16 23:44:30 +00:00
Owen Anderson
476adb2e49 Privatize the MDString uniquing table.
llvm-svn: 76113
2009-07-16 22:11:26 +00:00
Owen Anderson
c63b0e7a30 Privatize the ConstantFP table. I'm on a roll!
llvm-svn: 76097
2009-07-16 19:05:41 +00:00
Owen Anderson
21d2d69727 Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here

llvm-svn: 76089
2009-07-16 18:04:31 +00:00