Commit Graph

2835 Commits

Author SHA1 Message Date
Owen Anderson
333c400965 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:48:35 +00:00
Owen Anderson
d1474d09cb Thread LLVMContext through MVT and related parts of SDISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 17:57:24 +00:00
Owen Anderson
c341f1c62d LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75072 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 23:50:31 +00:00
Jeffrey Yasskin
7309762365 Fix the AssertingVH unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 22:09:00 +00:00
Devang Patel
2214c94bb7 Drop "constant" from
!0 = constant metadata !{...}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75057 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 21:57:07 +00:00
Devang Patel
320671d265 Update SLotTracker to handle MDNode slots.
Simplify MDNode printing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 21:44:25 +00:00
Torok Edwin
dac237e182 Implement changes from Chris's feedback.
Finish converting lib/Target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:53:28 +00:00
Owen Anderson
d1fbd14294 Push LLVMContext _back_ through IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:50:47 +00:00
Owen Anderson
e9b11b4313 Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 19:03:57 +00:00
Torok Edwin
ab7c09b6b6 Start converting to new error handling API.
cerr+abort -> llvm_report_error
assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 18:01:40 +00:00
Nick Lewycky
7f6aa2b162 Remove the vicmp and vfcmp instructions. Because we never had a release with
these instructions, no autoupgrade or backwards compatibility support is
provided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 03:04:38 +00:00
Owen Anderson
3d29df3e8a Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:26:06 +00:00
Owen Anderson
f81b57694b LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:43:39 +00:00
Owen Anderson
62e744b555 LLVMContext-ifiy the implementation of the C API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:33:58 +00:00
Owen Anderson
a9d1f2c559 Have scoped mutexes take referenes instead of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:33:04 +00:00
Owen Anderson
07cf79ef53 "LLVMContext* " --> "LLVMContext *"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74878 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 23:00:19 +00:00
Chris Lattner
e4840bc611 Add two new accessors to the C bindings, patch by Wladimir van der Laan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 17:29:59 +00:00
Owen Anderson
0a205a4598 More LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-05 22:41:43 +00:00
Owen Anderson
fa5cbd6d0f Even more passes being LLVMContext'd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74781 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 19:42:02 +00:00
Owen Anderson
0d86e2fa58 Fill in a few more missing accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 23:58:19 +00:00
Owen Anderson
62fabf5fab Add an accessor to Function so that Passes can easily get access to the context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 18:03:58 +00:00
Owen Anderson
093811593e Add accessors for metadata constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 17:19:47 +00:00
Owen Anderson
77cf22c451 Add accessor for MDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 17:12:48 +00:00
Owen Anderson
480752e9f6 Add accessor for getting UndefValue's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 16:51:51 +00:00
Owen Anderson
c8897d9c2f Restore other bits of the C API that I tore up. All pre-existing APIs default to using the
default global context, while new *InContext() APIs have been added that take a LLVMContextRef parameter.

Apologies to anyone affected by this breakage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74694 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 07:17:57 +00:00
Owen Anderson
c70e62110b Add a C wrapper for accessing the global default context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 00:16:38 +00:00
Owen Anderson
7f41781c3b Add a few methods that got left out earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 23:56:45 +00:00
Owen Anderson
4434ed44c4 Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 23:13:44 +00:00
Dan Gohman
82c32c4272 Use find instead of operator[] to test whether an element is in a std::map.
This fixes a bug that caused -debug-pass=Details to abort.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 23:12:33 +00:00
Bill Wendling
aa3943bf63 --- Reverse-merging (from foreign repository) r74648 into '.':
U    include/llvm/LLVMContext.h
U    lib/VMCore/LLVMContext.cpp
U    lib/AsmParser/LLParser.cpp
U    lib/AsmParser/LLParser.h

Temporarily reverting r74648. It was causing massive failures in release mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 22:33:26 +00:00
Owen Anderson
3f64342e11 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:58:14 +00:00
Owen Anderson
c137ea6cf5 Convert LLParser to use LLVMContext for creating constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74648 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:57:44 +00:00
Owen Anderson
31895e7359 Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:22:36 +00:00
Devang Patel
fcd65ae28f Fix metadata unittests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 20:59:15 +00:00
Devang Patel
05a0e6a01c Do not print stranded metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 19:39:39 +00:00
Devang Patel
923078c65d Support stand alone metadata syntax.
!0 = constant metadata !{i32 21, i32 22}
@llvm.blah = constant metadata !{i32 1000, i16 200, metadata !0}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74630 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 19:21:12 +00:00
Owen Anderson
334143d304 I give up on trying to use reader/writer locks for recursive type refinement. Use a recursive mutex instead, which will (in theory) generate more contention, but is really
a much more natural fit for what's going on during recursive type refinement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 17:22:27 +00:00
Owen Anderson
8b477ed579 Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.

Patches for Clang and LLVM-GCC to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:58:40 +00:00
Owen Anderson
db47ed0925 Add a global context, for easing backwards compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 23:39:59 +00:00
Owen Anderson
72bf4473a6 Add wrappers for type construction to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 17:50:28 +00:00
Owen Anderson
5217007006 Fix up header comments to make Chris happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 17:06:46 +00:00
Owen Anderson
2bc29dc0bc Add LLVMContext, which will eventually be used as a container for privatizing a lot of (currently) global state, including the
constant and type uniquing tables.  For now, just make it a wrapper around the existing APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74488 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:48:55 +00:00
Torok Edwin
6c839926ba Set wasRun to false here on Dan's suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74455 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 21:05:10 +00:00
Torok Edwin
1970a89a49 Call doInitialization(), releaseMemory(), and doFinalization() for on-the-fly passes as well.
Also don't call finalizers for LoopPass if initialization was not called.
Add a unittest that tests that these methods are called, in the proper
order, and the correct number of times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74438 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 18:49:09 +00:00
David Greene
9b9838dbd4 Add more vector ValueTypes for AVX and other extended vector instruction
sets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74427 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 16:47:10 +00:00
Owen Anderson
a6184406b7 Make this const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74317 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 20:21:18 +00:00
Devang Patel
70535451e0 Add constructor to create MDString using std::string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 22:42:39 +00:00
Owen Anderson
6b96f6cfeb Guard the listeners list. Unfortunately, this requires a real static rather
than a managed static because other managed statics can (and do) access this
list in their destructors.  Yes, I know it's horrible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:25:42 +00:00
Owen Anderson
6f2c64d70a Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
we care about are capable of supporting it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:17:22 +00:00
Owen Anderson
f43f9d0ef8 Atomic ops that do arithmetic use signed arithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:30:27 +00:00