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

366 Commits

Author SHA1 Message Date
Dan Gohman
39f93f6443 Add a new Constant::getIntegerValue helper function, and convert a
few places in InstCombine to use it, to fix problems handling pointer
types. This fixes the recent llvm-gcc bootstrap error.

llvm-svn: 78005
2009-08-03 22:07:33 +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
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
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
Daniel Dunbar
89c8a88449 Unbreak build.
llvm-svn: 77256
2009-07-27 21:47:07 +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
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
Chris Lattner
2cae10056c make Constant::getRelocationInfo return an enum, as suggested by Duncan.
llvm-svn: 76938
2009-07-24 03:27:21 +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
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
Devang Patel
5794cb80ad 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
Chris Lattner
48dffde0d7 reimplement Constant::ContainsRelocations as
Constant::getRelocationInfo(), which has a much simpler
to use API.  It still should not be part of libvmcore, but
is better than it was.  Also teach it to be smart about 
hidden visibility.

llvm-svn: 76700
2009-07-22 00:05:44 +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
b64eef73cf Move a bit more state over to the LLVMContext.
llvm-svn: 76533
2009-07-21 02:47:59 +00:00
Dan Gohman
00b05492f1 Revert the addition of hasNoPointerOverflow to GEPOperator.
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.

Remove a few optimizations that depended on this flag.

llvm-svn: 76437
2009-07-20 17:43:30 +00:00
Dan Gohman
8c7d396617 Make GetElementPtr ConstantExprs default to having no pointer overflow.
llvm-svn: 76280
2009-07-18 01:49:22 +00:00
Daniel Dunbar
cfd362eb0e Fix compile warning.
llvm-svn: 76210
2009-07-17 18:33:52 +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
Owen Anderson
13080d27c5 Move a few more convenience factory functions from Constant to LLVMContext.
llvm-svn: 75840
2009-07-15 21:51:10 +00:00
Owen Anderson
0171f6bc65 Move the ConstantStruct factory methods over to LLVMContext.
llvm-svn: 75830
2009-07-15 21:00:46 +00:00
Rafael Espindola
1e644a928d Revert 75798 to fix llvm build.
llvm-svn: 75805
2009-07-15 17:40:42 +00:00
Duncan Sands
e2f1199ab8 The static function TypeToFloatSemantics is now
unused - remove it.

llvm-svn: 75798
2009-07-15 17:19:24 +00:00
Owen Anderson
8c85061ee6 Move EVER MORE stuff over to LLVMContext.
llvm-svn: 75703
2009-07-14 23:09:55 +00:00
Torok Edwin
f955a6ef49 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
Owen Anderson
1404d6e7d1 Move more functionality over to LLVMContext.
llvm-svn: 75559
2009-07-13 23:50:59 +00:00
Owen Anderson
9ff3b6191e Move a bit more functionality to LLVMContext, which apparently wasn't being used anyways.
llvm-svn: 75546
2009-07-13 23:16:26 +00:00
Owen Anderson
7b2ee7dc21 As Chris pointed out, this doesn't actually need an LLVMContext to operate.
llvm-svn: 75508
2009-07-13 21:27:19 +00:00
Owen Anderson
1e5155161a Move more functionality over to LLVMContext.
llvm-svn: 75497
2009-07-13 20:58:05 +00:00
Owen Anderson
393d8b0a0c Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.

llvm-svn: 75445
2009-07-13 04:09:18 +00:00
Torok Edwin
62902fd6c8 Remove extra \n from LLVM_UNREACHABLE calls.
llvm-svn: 75416
2009-07-12 07:15:17 +00:00
Torok Edwin
ae8a3ff177 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
Torok Edwin
9b41a5faf2 Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
and abort()/exit() -> llvm_report_error().

llvm-svn: 75363
2009-07-11 13:10:19 +00:00
Nick Lewycky
d46a7b2d22 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
Owen Anderson
75f0f1cc6c Have scoped mutexes take referenes instead of pointers.
llvm-svn: 74931
2009-07-07 18:33:04 +00:00
Owen Anderson
633060240c Make this const.
llvm-svn: 74317
2009-06-26 20:21:18 +00:00
Devang Patel
715a8c1154 Add constructor to create MDString using std::string
llvm-svn: 74133
2009-06-24 22:42:39 +00:00
Owen Anderson
733fa621f6 Revert r73790, and replace it with a significantly less ugly solution. Rather than trying to make the global reader-writer lock work,
create separate recursive mutexes for each value map.  The recursive-ness fixes the double-acquiring issue, which having one per ValueMap
lets us continue to maintain some concurrency.

llvm-svn: 73801
2009-06-20 00:24:58 +00:00
Owen Anderson
295610c408 Fix a serious bug that would cause deadlock during abstract type refinement. The constant creation
gets involved, and we end up trying to recursively acquire a writer lock.  The fix for this is slightly horrible,
and involves passing a boolean "locked" parameter around in Constants.cpp, but it's better than having locked and
unlocked versions of most of the code.

llvm-svn: 73790
2009-06-19 23:16:19 +00:00