summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
...
* TypeMap had a destructor that destroyed the types it held. DenseMap did not, soNick Lewycky2011-07-121-14/+18
| | | | | | destroy those types in ~LLVMContext. llvm-svn: 134945
* De-constify Types in StructType::get() and TargetData::getIntPtrType().Jay Foad2011-07-113-12/+5
| | | | llvm-svn: 134893
* De-constify Types in FunctionType::get().Jay Foad2011-07-115-20/+13
| | | | llvm-svn: 134888
* Remove mentions of type planes.Jay Foad2011-07-111-4/+4
| | | | llvm-svn: 134887
* Silence -Wunused-variable in release builds.Chandler Carruth2011-07-101-0/+2
| | | | llvm-svn: 134868
* the various ConstantExpr::get*Ty methods existed to work with issues aroundChris Lattner2011-07-091-145/+90
| | | | | | type refinement. Zap them now that type refinement is toast. llvm-svn: 134837
* don't load element before checking to see if it is valid.Chris Lattner2011-07-091-2/+2
| | | | llvm-svn: 134836
* Eliminate the WriteTypeSymbolic function. Now that types knowChris Lattner2011-07-091-5/+0
| | | | | | their names, we don't need a module around to print them. llvm-svn: 134835
* remove the DerivedType which isn't adding value anymore.Chris Lattner2011-07-091-1/+1
| | | | llvm-svn: 134832
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-0919-2251/+703
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Introduce "expect" intrinsic instructions.Jakub Staszak2011-07-061-0/+4
| | | | llvm-svn: 134516
* Improve constant folding of undef for cmp and select operators.Dan Gohman2011-07-011-2/+7
| | | | llvm-svn: 134223
* Improve constant folding of undef for binary operators.Dan Gohman2011-07-011-4/+24
| | | | llvm-svn: 134221
* Add r134057 back, but splice the predecessor after the successors phiRafael Espindola2011-06-301-0/+20
| | | | | | | | | nodes. Original message: Let simplify cfg simplify bb with only debug and lifetime intrinsics. llvm-svn: 134182
* Temporarily revert r134057: "Let simplify cfg simplify bb with only debug and Chad Rosier2011-06-291-20/+0
| | | | | | lifetime intrinsics" due to buildbot failures. llvm-svn: 134071
* Let simplify cfg simplify bb with only debug and lifetime intrinsics.Rafael Espindola2011-06-291-0/+20
| | | | llvm-svn: 134057
* PR10210: New method ConstantArray::getAsCString(). Use it in LTO toJay Foad2011-06-281-8/+23
| | | | | | avoid getting embedded trailing null bytes in std::strings. llvm-svn: 133999
* Revert unintentional check-in.Devang Patel2011-06-242-81/+10
| | | | llvm-svn: 133822
* Handle debug info for i128 constants.Devang Patel2011-06-242-10/+81
| | | | llvm-svn: 133821
* Reinstate r133513 (reverted in r133700) with an additional fix for aJay Foad2011-06-235-30/+54
| | | | | | -Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708
* Revert r133513:Eric Christopher2011-06-235-54/+30
| | | | | | | | | "Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512)." Due to some additional warnings. llvm-svn: 133700
* Replace the existing forms of ConstantArray::get() with a single formJay Foad2011-06-222-12/+3
| | | | | | that takes an ArrayRef. llvm-svn: 133615
* Make ConstantVector::get() always take an ArrayRef, never a std::vector.Jay Foad2011-06-222-10/+4
| | | | llvm-svn: 133614
* Eliminate a temporary std::vector in ConstantStruct::get().Jay Foad2011-06-221-4/+2
| | | | llvm-svn: 133612
* Extend ConstantUniqueMap with a new template parameter ValRefType,Jay Foad2011-06-222-14/+18
| | | | | | | | 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. llvm-svn: 133611
* Fix some trailing issues from my introduction of MVT::untyped and its use ↵Owen Anderson2011-06-211-0/+1
| | | | | | for REGISTER_SEQUENCE. llvm-svn: 133567
* Remove r130409, as requested by Chris.Devang Patel2011-06-211-55/+0
| | | | llvm-svn: 133536
* Reinstate r133435 and r133449 (reverted in r133499) now that the clangJay Foad2011-06-215-30/+54
| | | | | | self-hosted build failure has been fixed (r133512). llvm-svn: 133513
* Revert r133435 and r133449 to appease buildbots.Chad Rosier2011-06-215-54/+30
| | | | llvm-svn: 133499
* Fix a check for PHINodes with two incoming values.Jay Foad2011-06-201-1/+1
| | | | llvm-svn: 133449
* Change how PHINodes store their operands.Jay Foad2011-06-205-29/+53
| | | | | | | | | | | | | | | | | | | Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
* Make better use of the PHINode API.Jay Foad2011-06-203-10/+13
| | | | | | | | Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
* Remove the AugmentedUse struct.Jay Foad2011-06-202-11/+5
| | | | | | | | I don't think the AugmentedUse struct buys us much, either in correctness or in ease of use. Ditch it, and simplify Use::getUser() and User::allocHungoffUses(). llvm-svn: 133433
* Revamp the "ConstantStruct::get" methods. Previously, these were scatteredChris Lattner2011-06-203-37/+42
| | | | | | | | | | | | | | | all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. llvm-svn: 133412
* fix the varargs version of StructType::get to not require an LLVMContext, ↵Chris Lattner2011-06-182-5/+7
| | | | | | | | making usage much cleaner. llvm-svn: 133364
* eliminate some pointless virtual methods.Chris Lattner2011-06-181-26/+32
| | | | llvm-svn: 133363
* now that Type::getDescription() is dead, the TypePrinting class can move ↵Chris Lattner2011-06-181-28/+42
| | | | | | | | from Assembly/Writer.h to being a private class in AsmWriter.cpp. llvm-svn: 133361
* eliminate the Type::getDescription() method, using "<<" instead. This Chris Lattner2011-06-184-37/+8
| | | | | | removes some gunk from LLVMContext. llvm-svn: 133360
* rework the remaining autoupgrade logic to use a StringRef instead of creating aChris Lattner2011-06-181-49/+34
| | | | | | temporary std::string for every function being checked. llvm-svn: 133355
* rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which isChris Lattner2011-06-181-1197/+23
| | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337
* Fix typo in comment.Jay Foad2011-06-171-1/+1
| | | | llvm-svn: 133254
* change Type.h to forward declare ArrayRef instead of #including it.Chris Lattner2011-06-161-1/+9
| | | | llvm-svn: 133197
* prune #includes.Chris Lattner2011-06-161-19/+5
| | | | llvm-svn: 133194
* move the address space into the subclass data field, saving a word on ↵Chris Lattner2011-06-161-1/+1
| | | | | | | | PointerType. This limits the # address spaces to 2^23, which should be good enough. llvm-svn: 133192
* tidy up some comments, store the 'isvararg' bit for FunctionType inChris Lattner2011-06-161-2/+2
| | | | | | the SubclassData field, saving a word. llvm-svn: 133191
* remove Type::getVAArgsPromotedType, which is dead, and tidy up a bit.Chris Lattner2011-06-161-9/+0
| | | | llvm-svn: 133190
* Add a new function attribute, nonlazybind, which inhibits lazy-loadingJohn McCall2011-06-151-0/+2
| | | | | | | | | | | | | | | | optimizations when emitting calls to the function; instead those calls may use faster relocations which require the function to be immediately resolved upon loading the dynamic object featuring the call. This is useful when it is known that the function will be called frequently and pervasively and therefore there is no merit in delaying binding of the function. Currently only implemented for x86-64, where it turns into a call through the global offset table. Patch by Dan Gohman, who assures me that he's going to add LangRef documentation for this once it's committed. llvm-svn: 133080
* Teach the .ll parser to handle named metadata with non-simple names.Nick Lewycky2011-06-151-1/+19
| | | | | | | | Unfortunately we can't follow what the rest of the language does (wrapping it in double-quotes) because that would cause an ambiguity with metadata strings, so instead we escape any unusual characters with \xx escaping. llvm-svn: 133050
* Add one more argument to the prefetch intrinsic to indicate whether it's a dataBruno Cardoso Lopes2011-06-141-0/+47
| | | | | | | or instruction cache access. Update the targets to match it and also teach autoupgrade. llvm-svn: 132976
* Another possible bug. Stopgap until we can autogenerate tables andEric Christopher2011-06-031-6/+3
| | | | | | | | constraint lengths. Part of rdar://9037836 and rdar://9119939 llvm-svn: 132598
OpenPOWER on IntegriCloud