History log of /external/llvm/lib/VMCore/LLVMContextImpl.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
611afc0620aed7827b5fdf9072a1827952b684b6 11-Apr-2012 Benjamin Kramer <benny.kra@googlemail.com> Cache the hash value of the operands in the MDNode.

FoldingSet is implemented as a chained hash table. When there is a hash
collision during insertion, which is common as we fill the table until a
load factor of 2.0 is hit, we walk the chained elements, comparing every
operand with the new element's operands. This can be very expensive if the
MDNode has many operands.

We sacrifice a word of space in MDNode to cache the full hash value, reducing
compares on collision to a minimum. MDNode grows from 28 to 32 bytes + operands
on x86. On x86_64 the new bits fit nicely into existing padding, not growing
the struct at all.

The actual speedup depends a lot on the test case and is typically between
1% and 2% for C++ code with clang -c -O0 -g.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
3ecb447f52d169dea6663b95b5b5b43e9bb5826b 10-Apr-2012 Bill Wendling <isanbard@gmail.com> The MDString class stored a StringRef to the string which was already in a
StringMap. This was redundant and unnecessarily bloated the MDString class.

Because the MDString class is a "Value" and will never have a "name", and
because the Name field in the Value class is a pointer to a StringMap entry, we
repurpose the Name field for an MDString. It stores the StringMap entry in the
Name field, and uses the normal methods to get the string (name) back.

PR12474


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
ed7692a136a9bcf513b91b7b5eb33a1e2d83e7ee 04-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Replace the hashing functions on APInt and APFloat with overloads of the
new hash_value infrastructure, and replace their implementations using
hash_combine. This removes a complete copy of Jenkin's lookup3 hash
function (which is both significantly slower and lower quality than the
one implemented in hash_combine) along with a somewhat scary xor-only
hash function.

Now that APInt and APFloat can be passed directly to hash_combine,
simplify the rest of the LLVMContextImpl hashing to use the new
infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
0b66c6fca22e85f732cf58f459a06c06833d1882 01-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Rewrite LLVM's generalized support library for hashing to follow the API
of the proposed standard hashing interfaces (N3333), and to use
a modified and tuned version of the CityHash algorithm.

Some of the highlights of this change:
-- Significantly higher quality hashing algorithm with very well
distributed results, and extremely few collisions. Should be close to
a checksum for up to 64-bit keys. Very little clustering or clumping of
hash codes, to better distribute load on probed hash tables.
-- Built-in support for reserved values.
-- Simplified API that composes cleanly with other C++ idioms and APIs.
-- Better scaling performance as keys grow. This is the fastest
algorithm I've found and measured for moderately sized keys (such as
show up in some of the uniquing and folding use cases)
-- Support for enabling per-execution seeds to prevent table ordering
or other artifacts of hashing algorithms to impact the output of
LLVM. The seeding would make each run different and highlight these
problems during bootstrap.

This implementation was tested extensively using the SMHasher test
suite, and pased with flying colors, doing better than the original
CityHash algorithm even.

I've included a unittest, although it is somewhat minimal at the moment.
I've also added (or refactored into the proper location) type traits
necessary to implement this, and converted users of GeneralHash over.

My only immediate concerns with this implementation is the performance
of hashing small keys. I've already started working to improve this, and
will continue to do so. Currently, the only algorithms faster produce
lower quality results, but it is likely there is a better compromise
than the current one.

Many thanks to Jeffrey Yasskin who did most of the work on the N3333
paper, pair-programmed some of this code, and reviewed much of it. Many
thanks also go to Geoff Pike Pike and Jyrki Alakuijala, the original
authors of CityHash on which this is heavily based, and Austin Appleby
who created MurmurHash and the SMHasher test suite.

Also thanks to Nadav, Tobias, Howard, Jay, Nick, Ahmed, and Duncan for
all of the review comments! If there are further comments or concerns,
please let me know and I'll jump on 'em.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
bdf1748b12fa44b18b74ae71d68a9b964c4cb8c6 23-Feb-2012 Jay Foad <jay.foad@gmail.com> Reinstate r151049 now that GeneralHash is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
e6e258fe38c153bb910756882a025f4f98afa4bf 21-Feb-2012 Jay Foad <jay.foad@gmail.com> Revert r151049 cos it broke the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
6b842e35dcd7faf2b05b2ef9b1892c29050f3607 21-Feb-2012 Jay Foad <jay.foad@gmail.com> PR1210: make uniquing of struct and function types more efficient by
using a DenseMap and Talin's new GeneralHash, avoiding the need for a
temporary std::vector on every lookup.

Patch by Meador Inge!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
2cb395eae71dacda49ca3fe758618fc3e0701659 05-Feb-2012 Talin <viridia@gmail.com> Efficient Constant Uniquing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
27dd9cf5d1ec831a1cd0766580e6d1177a9800a3 23-Jan-2012 Chris Lattner <sabre@nondot.org> start the implementation of a new ConstantDataVector and ConstantDataArray
classes, per PR1324. Not all of their helper functions are implemented,
nothing creates them, and the rest of the compiler doesn't handle them yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
9df0fb4e8176325d713ba4eb67791e36cb833432 23-Jan-2012 Chris Lattner <sabre@nondot.org> 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
95889fa9c31779c9ef3e71d633b8d9146648bc97 23-Jan-2012 Chris Lattner <sabre@nondot.org> revert r148691 and 148693


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
3755615411713b2b27b1b2ffd3886584295843d1 23-Jan-2012 Chris Lattner <sabre@nondot.org> switch UndefValue and ConstantPointerNull over to DenseMap's for uniquing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
2a82d82936729b02fe1bbdcbfe764a61b8999be1 23-Jan-2012 Chris Lattner <sabre@nondot.org> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
ce16339930a2b03e53b4e6399ef59c092a7f2cfa 17-Dec-2011 Dan Gohman <gohman@apple.com> 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
ba3ddf391f5149b8fca073adc3cbca361353929c 15-Jul-2011 Chris Lattner <sabre@nondot.org> bump pointer allocate LLVM IR types, since they are never deallocated.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
c09ef37171b2a6c914ce34928a4ff4a839b21dbe 13-Jul-2011 Chris Lattner <sabre@nondot.org> stop leaking all named struct types with an empty name. Thanks
to Benjamin Kramer for steering me in the right direction here.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
1afcace3a3a138b1b18e5c6270caa8dae2261ae2 09-Jul-2011 Chris Lattner <sabre@nondot.org> 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.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
2a4a6fecf0b8c92223f8fdf19545b564b7d3fcde 22-Jun-2011 Jay Foad <jay.foad@gmail.com> Extend ConstantUniqueMap with a new template parameter ValRefType,
representing a constant reference to ValType. Normally this is just
"const ValType &", but when ValType is a std::vector we want to use
ArrayRef as the reference type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
0cd0d881604775f3f97048645f040b2ef4f61e4b 18-Jun-2011 Chris Lattner <sabre@nondot.org> eliminate the Type::getDescription() method, using "<<" instead. This
removes some gunk from LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
7a2bdde0a0eebcd2125055e0eacaca040f0b766c 15-Apr-2011 Chris Lattner <sabre@nondot.org> Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
4afa12890f679034e9741a687a6ce33f2846f129 17-Nov-2010 Chris Lattner <sabre@nondot.org> now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate the
cookie argument to the SourceMgr diagnostic stuff. This cleanly separates
LLVMContext's inlineasm handler from the sourcemgr error handling
definition, increasing type safety and cleaning things up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
bb811a244567aa8a1522203f15588f4d001b7353 10-Sep-2010 Dale Johannesen <dalej@apple.com> 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".)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
30268be89df6444f5ffb585439b3fbfec9055197 08-Sep-2010 Owen Anderson <resistor@mac.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
61c70e98ac3c7504d31dd9bc81c4e9cb998e9984 28-Aug-2010 Chris Lattner <sabre@nondot.org> remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
42a4ee0a35b4672311c1b988bd883167de9f88cd 06-Apr-2010 Chris Lattner <sabre@nondot.org> give LLVMContext an inline asm diagnostic hook member.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
b227925fa313428045f554187b0136d084d723f6 01-Apr-2010 Chris Lattner <sabre@nondot.org> Add a new "NewDebugLoc" class which will eventually replace DebugLoc,
and will replace the 'DbgInfo' member in Instruction.

The benefit of NewDebugLoc is that it is compact (8 bytes vs 12/24
bytes for the DbgInfo member in Instruction on a 32/64 bit system),
it means that we will end up not having to allocate MDNodes to
represent the "DILocations" in common cases of -O0 -g, and it is
much more efficient to get things out of than the MDNode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
b4cc66d7b71357d379257930f96929e26697805d 21-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
2f1efd639c8659582d0df2b8f927a018b057037f 21-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Move the LLVMContextImpl implementation into a .cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
bf48a9b6db111fc14a8faef1adefbce5d807aaef 21-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Memoize InlineAsms into the LLVMContext and delete them on shutdown.
Fixes PR803.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
6f555ca2cd0bba50542adcbb131f541ae70d34cd 13-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Delete MDNodes when LLVMContext is destroyed. Previous attempts: r97918, r97788.

Tested: clang debug bootstrap, llvm-gcc bootstrap, `make check-lit`
after configuring with --with-llvmgccdir (and this did run the
FrontendC* tests this time)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
6fec233a1e4b26be2f69e02884d4f3c2a2c4a437 07-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Roll back r97918 again. Just configuring against llvm-gcc wasn't enough to run
the FrontendC* tests. :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
92ce42f9fc8758ff83da3ebf7cd0a60bdaec3c58 07-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Reapply r97788 to free MDNodes when the LLVMContext is destroyed. It
bootstraps llvm-gcc this time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
b71a2fcf5e5c0e4b598f07f5e3e7b0f2c718baf2 05-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Revert r97788 because it broke test/FrontendC/2010-02-16-DbgVarScope.c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
c8cfa30ca5e6ce80e3e6e1dbff5d24d266d43d27 05-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Free MDNodes when the LLVMContext is destroyed. Leak found by Valgrind.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
e5790a432a320c64440bf62adbcec378046eef6b 05-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Stop leaking MDStrings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
06fdaccc89d9abdc7e03797b25173791a2f5692f 18-Feb-2010 Devang Patel <dpatel@apple.com> Destroy MDNodes gracefully while deleting llvm context.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
fdfeb6976f07ad10d809b922ed7376ba2a3539be 12-Feb-2010 Chris Lattner <sabre@nondot.org> Add support for a union type in LLVM IR. Patch by Talin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
cb419d3c6f613360740594ff7bf9b8f556e79d4b 11-Feb-2010 Devang Patel <dpatel@apple.com> revert 95903.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
11dbf8ee694ba02843814c42bc4dc278f6935dd5 11-Feb-2010 Devang Patel <dpatel@apple.com> Destroy MDNodes while destructing llvm context.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
9233b15d01ca62445bfc638f782243988c672e01 11-Feb-2010 Jeffrey Yasskin <jyasskin@google.com> Fix some of the memcheck errors found in the JIT unittests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
081134741b40b342fb2f85722c9cea5d412489a8 29-Dec-2009 Chris Lattner <sabre@nondot.org> Final step in the metadata API restructuring: move the
getMDKindID/getMDKindNames methods to LLVMContext (and add
convenience methods to Module), eliminating MetadataContext.
Move the state that it maintains out to LLVMContext.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
ad715f86c90b06cc4ab9e1336d1bc3bf13ecb16d 17-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> This fixes a memory leak in OpaqueType found by Google's internal heapchecker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
4bbf4ee1491637c247e195e19e3e4a8ee5ad72fa 15-Dec-2009 Chris Lattner <sabre@nondot.org> Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
c4775e4b973aaf6695dc00a3403b8b64f5257568 01-Nov-2009 Chris Lattner <sabre@nondot.org> remove a bunch of locking from LLVMContextImpl. Since only one thread
can be banging on a context at a time, this isn't needed. Owen, please
review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
2ee11eccdde14c95c78773be76b02bb5fd09d7ee 28-Oct-2009 Chris Lattner <sabre@nondot.org> IR support for the new BlockAddress constant kind. This is
untested and there is no way to use it, next up: doing battle
with asmparser.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
03236140fa4ef316a605717e090276d6a0d42828 28-Oct-2009 Jeffrey Yasskin <jyasskin@google.com> Rename lib/VMCore/ConstantsContext.h:ValueMap<> to ConstantUniqueMap<> to avoid
colliding with llvm/ADT/ValueMap.h:ValueMap<>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
49708ad993529611cedfbe49ae44bb10beb73abe 22-Oct-2009 Devang Patel <dpatel@apple.com> Derive metadata hierarchy from Value instead of User.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
59d5aac0b435714f3ed2195dfa884aad2e993eb0 19-Oct-2009 Owen Anderson <resistor@mac.com> Banish ConstantsLock. It's serving no purpose other than slowing things down
at the moment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
e30e678865b8dc1b69ef1c26e7567ffd1300553c 28-Sep-2009 Devang Patel <dpatel@apple.com> s/class Metadata/class MetadataContext/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
937b1e92a9862862722732cb0f72d5ade77ac4c8 16-Sep-2009 Devang Patel <dpatel@apple.com> Add llvm::Metadata to manage metadata used in a context.
This interface will be used to attach metadata with an instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
fa82441868855dc192dce7cfc3b354504126195b 11-Sep-2009 Devang Patel <dpatel@apple.com> Fix whitespaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
9c0aa853377eaa36c0521b5cb29e52fbb7a0dda0 09-Sep-2009 Devang Patel <dpatel@apple.com> Gracefully destroy MDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
41fc6277f0cb5d6e0e2e929e627052abb189509a 08-Sep-2009 Devang Patel <dpatel@apple.com> Remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
5f4ac848d94b0a92e19ac7f2b3d0284d7d323173 03-Sep-2009 Devang Patel <dpatel@apple.com> Now Bitcode reader bug is fixed. Reapply 80839.

Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
8fc55764139f478087fc0a0d3c02da436e84bf43 02-Sep-2009 Devang Patel <dpatel@apple.com> Revert 80839 for now. It causes test failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
d9489cbb0cf933da9e2154a5336533d6254a5c30 02-Sep-2009 Devang Patel <dpatel@apple.com> Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
3a29d2d3279d53b757c31b4cc72f0b3f7082d4c2 02-Sep-2009 Devang Patel <dpatel@apple.com> For now disable MDNode uniquing. This fixes llvm-gcc bootstrap failure on certain Mac OS X 10.5. I am working on a proper fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
2cd5155c0e8f2448dbdbc9c9cd468e589f9745e9 31-Aug-2009 Torok Edwin <edwintorok@gmail.com> Free the constants that have no uses in ~LLVMContext.
This fixes leaks from LLVMContext in multithreaded apps.
Since constants are only deleted if they have no uses, it is safe to not delete
a Module on shutdown, as many single-threaded tools do.
Multithreaded apps should however delete the Module before destroying the
Context to ensure that there are no leaks (assuming they use a different context
for each thread).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
63a03cf58505aa839f721f212cd1518ebf133979 25-Aug-2009 Dan Gohman <gohman@apple.com> Allocate the basic types inside the LLVMContextImpl instance,
rather than separately with new. Move the members above the
TypeMap members to avoid destruction order issues. This fixes
a leak of these objects, and eliminates an extra level of
indirection in Type::getInt32Ty and friends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
b1352e953458711bcceb5600e25e9c5c94ad9013 23-Aug-2009 Owen Anderson <resistor@mac.com> Use standard LLVM-style headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
c34ebf65af0139eaf5cb0969fabcd32c0b6e1710 19-Aug-2009 Owen Anderson <resistor@mac.com> Reapply my less-lock-contention-in-leak-detector patch, now with new files
actually added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
021d664a3838b89620b3fb9d995083f1da77d451 19-Aug-2009 Owen Anderson <resistor@mac.com> Revert my last patch temporarily.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
ba43a385a817d7f59e528a744dc40e44317ec739 19-Aug-2009 Owen Anderson <resistor@mac.com> Privatize part of the leak detector mechanism, which turned out to be heavily contended
when trying to run opt in parallel. This lets parallel opt crunch 403.gcc in about a third
of the time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
4d919438898d542850449235da7f6dc55e6ca152 18-Aug-2009 Owen Anderson <resistor@mac.com> Privatize the ValueHandle global map. Because this is used so heavily throughout the code base, locking all accesses to
it is not practical performance-wise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
7b7b1020234a366dace1b449726c0751b879aefd 17-Aug-2009 Owen Anderson <resistor@mac.com> Privatize the last bits of static type state.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
36a3eb0aaa6e6981186ca0bc275bc86c2effd743 17-Aug-2009 Owen Anderson <resistor@mac.com> Move the TypeMap lock to a member on LLVMContextImpl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
0e275dc53880a7f14f8b8c83cc6e0290a215492d 14-Aug-2009 Owen Anderson <resistor@mac.com> Actually privatize a IntegerTypes, and fix a few bugs exposed by this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
12ddd409535b52a7fa5157ded9a4cedd161fedb6 11-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Make LLVMContext and LLVMContextImpl classes instead of structs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
9d3627ea27195534242ec8026a9b8c888b85bbba 11-Aug-2009 Devang Patel <dpatel@apple.com> Remove dead metadata.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
286d9e4b9d5a48e60c3f25a85578641e72b26ead 11-Aug-2009 Devang Patel <dpatel@apple.com> Remove MDNode from ValueMap when MDNode is destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
6418a3ca850d8863cbdc0ec4df20a57364e7ffe7 11-Aug-2009 Devang Patel <dpatel@apple.com> Rename MDNodeSet as MDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
0631fce85050f8f633e5fd032875d9151e0db4da 10-Aug-2009 Owen Anderson <resistor@mac.com> Change the MDNode uniquing to a ValueMap, at Devang's request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
d7f2a6cb3fbc012763adb42fd967f6fefbb22a37 06-Aug-2009 Owen Anderson <resistor@mac.com> Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
ab90b28adcd802c4d4eaa29d49549a371b93b355 05-Aug-2009 Owen Anderson <resistor@mac.com> Privatize the FunctionType table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
84e99f3c2543eb47262a0e79b04a3834bc50a468 05-Aug-2009 Owen Anderson <resistor@mac.com> Privatize the PointerType factory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
9eb5c93d34b7de9bd4387481c5048d3b13085712 05-Aug-2009 Owen Anderson <resistor@mac.com> Privatize the VectorType uniquing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
020e9ab052c42c308223eb85f9eff739874ee4a2 05-Aug-2009 Owen Anderson <resistor@mac.com> Begin the process of privatizing the type uniquing tables. No API changes yet, but there will be in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
48b2f3e4850cd27d54224cd42da8a160d6b95984 05-Aug-2009 Owen Anderson <resistor@mac.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
d03eecd063a18ce0c505a87afcb04db26c035bc9 04-Aug-2009 Owen Anderson <resistor@mac.com> Privatize the last bit of Constant-creation state.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
7e3142b0126abc86dc4da350e8b84b001c3eedde 01-Aug-2009 Owen Anderson <resistor@mac.com> Privatize all but one of the remaining constant tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
647e3016de18d2fc8b0f233a0b356809e3fdcc54 31-Jul-2009 Owen Anderson <resistor@mac.com> Move the metadata constructors back to 2.5 syntax.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
5defacc6e605f4651c6300237cef8e9bb2eb6d0e 31-Jul-2009 Owen Anderson <resistor@mac.com> Move getTrue() and getFalse() to 2.5-like APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
9e9a0d5fc26878e51a58a8b57900fcbf952c2691 31-Jul-2009 Owen Anderson <resistor@mac.com> Move more code back to 2.5 APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
baf3c404409d5e47b13984a7f95bfbd6d1f2e79e 29-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantExpr to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
af7ec975870f92245f1f1484ac80a1e2db6a0afa 28-Jul-2009 Owen Anderson <resistor@mac.com> Return ConstantVector to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
1fd7096407d5e598ed3366a1141548e71273f1c5 28-Jul-2009 Owen Anderson <resistor@mac.com> Change ConstantArray to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
8fa3338ed2400c1352b137613d2c2c70d1ead695 28-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantStruct back to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
6f83c9c6ef0e7f79825a0a8f22941815e4b684c7 27-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantFP construction back to the 2.5-ish API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
eed707b1e6097aac2bb6b3d47271f6300ace7f2e 25-Jul-2009 Owen Anderson <resistor@mac.com> Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
5bd68393ed87bcedc53f5998f1af9c906f5a1b4e 24-Jul-2009 Owen Anderson <resistor@mac.com> Privatize the ConstantVector tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
006c77df8cc7f6a9dac575600b797b8ba32b29eb 24-Jul-2009 Owen Anderson <resistor@mac.com> Privatize the ConstantStruct table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
2f9c3b002d3cb465fefc5f4b2535ca994c5e9283 23-Jul-2009 Devang Patel <dpatel@apple.com> MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
822ccd9974a17979d2cb9c6c118f94549055b7d4 21-Jul-2009 Owen Anderson <resistor@mac.com> Privatize the ConstantArray table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
16e298f98024bcff5c7219a96cac216114c30dad 21-Jul-2009 Owen Anderson <resistor@mac.com> Privatize the first of the value maps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
b3056faa5554ded7ac1ac5865d10ef5839fb77d3 21-Jul-2009 Owen Anderson <resistor@mac.com> Rename getConstantInt{True|False} to get{True|False} at Chris' behest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
f53c371983908f02678b0e12c5d18466dcc70ffd 21-Jul-2009 Owen Anderson <resistor@mac.com> Move a bit more state over to the LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
ce032b483ca96093b84f69178cdb2d047e124332 17-Jul-2009 Owen Anderson <resistor@mac.com> Privatize the MDNode uniquing table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
aad3fb7362aff151e97ad457005ea3f2872fe868 17-Jul-2009 Owen Anderson <resistor@mac.com> Privatize the MDString uniquing table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
914e50c841bbc248ab94144c11813b5785b1292d 16-Jul-2009 Owen Anderson <resistor@mac.com> Privatize the ConstantFP table. I'm on a roll!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
001dbfebcbbded8c8e74b19e838b50da2b6c6fb5 16-Jul-2009 Owen Anderson <resistor@mac.com> Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/LLVMContextImpl.h
5217007006e91fa4bbfe88fde5149f5db293b247 30-Jun-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/LLVMContextImpl.h
2bc29dc0bcb3c1441477a062e4a5cffff175c8ca 30-Jun-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/LLVMContextImpl.h