summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-154-101/+43
| | | | llvm-svn: 135265
* remove the old and dangerous uncheckedReplaceAllUsesWith method,Chris Lattner2011-07-152-28/+14
| | | | | | | which was just replaceAllUsesWith without some assertions. It was needed back when type refinement was alive. llvm-svn: 135253
* devirtualize Constant::isNullValue:Chris Lattner2011-07-151-5/+14
| | | | | | 4 files changed, 15 insertions(+), 60 deletions(-) llvm-svn: 135252
* add CFP::isNegative() and ConstnatInt::isNegative() methods.Chris Lattner2011-07-151-0/+9
| | | | | | Devirtualize the isNegativeZeroValue method. llvm-svn: 135249
* bump pointer allocate LLVM IR types, since they are never deallocated.Chris Lattner2011-07-153-38/+23
| | | | llvm-svn: 135248
* Add dump()Devang Patel2011-07-141-0/+16
| | | | llvm-svn: 135200
* Fix GlobalValue::isDeclaration() to always consider aliases to be definitions.Chris Lattner2011-07-141-3/+2
| | | | llvm-svn: 135182
* Add LLVMConstNamedStruct to the C api to let its users create constantsRafael Espindola2011-07-141-0/+10
| | | | | | of named struct types. llvm-svn: 135178
* DebugLoc's don't hide any interesting types for TypeFinder to find.Chris Lattner2011-07-141-1/+1
| | | | llvm-svn: 135174
* manually copy debugloc over to a new instruction in clone() insteadChris Lattner2011-07-141-1/+3
| | | | | | | of calling getAllMetadata(). This is semantically identical, but doing it this way avoids unpacking the DebugLoc. llvm-svn: 135173
* add comments.Chris Lattner2011-07-141-1/+3
| | | | llvm-svn: 135164
* consolidate GlobalValue::isDeclaration into one Chris Lattner2011-07-141-8/+13
| | | | | | non-virtual function. llvm-svn: 135163
* code cleanupChris Lattner2011-07-141-20/+15
| | | | llvm-svn: 135157
* Change Intrinsic::getDeclaration and friends to take an ArrayRef.Benjamin Kramer2011-07-142-13/+10
| | | | llvm-svn: 135154
* add a couple more missing C api, patch by Vitaly Lugovskiy!Chris Lattner2011-07-141-0/+8
| | | | llvm-svn: 135151
* Simplify some functions in the C API by using an ArrayRef to directly ↵Frits van Bommel2011-07-141-13/+3
| | | | | | reference the array passed to them instead of copying it to a std::vector. llvm-svn: 135145
* add C api for hte new type system rewrite API. Patch by Vitaly Lugovskiy!Chris Lattner2011-07-141-0/+13
| | | | llvm-svn: 135132
* Simplify and delay extracting DebugLoc elements, scope and InlinedAt, as ↵Devang Patel2011-07-141-0/+16
| | | | | | much as possible. llvm-svn: 135124
* Revert r135042. As Chris pointed out, it had no effect, and was based onJay Foad2011-07-131-5/+0
| | | | | | a complete misunderstanding of the code. llvm-svn: 135070
* Really cache function types and anonymous struct types.Jay Foad2011-07-131-0/+5
| | | | llvm-svn: 135042
* Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.Jay Foad2011-07-137-127/+62
| | | | llvm-svn: 135040
* stop leaking all named struct types with an empty name. ThanksChris Lattner2011-07-133-8/+18
| | | | | | to Benjamin Kramer for steering me in the right direction here. llvm-svn: 135031
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-126-32/+18
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* simplify assertions to not be completely redundant.Chris Lattner2011-07-121-15/+2
| | | | llvm-svn: 134968
* make the IRBuilder type methods return non-const types.Chris Lattner2011-07-121-1/+1
| | | | llvm-svn: 134959
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-126-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\ ne 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134893 into '.': U include/llvm/Target/TargetData.h U include/llvm/DerivedTypes.h U tools/bugpoint/ExtractFunction.cpp U unittests/Support/TypeBuilderTest.cpp U lib/Target/ARM/ARMGlobalMerge.cpp U lib/Target/TargetData.cpp U lib/VMCore/Constants.cpp U lib/VMCore/Type.cpp U lib/VMCore/Core.cpp U lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Instrumentation/ProfilingUtils.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/CodeGen/SjLjEHPrepare.cpp --- Reverse-merging r134888 into '.': G include/llvm/DerivedTypes.h U include/llvm/Support/TypeBuilder.h U include/llvm/Intrinsics.h U unittests/Analysis/ScalarEvolutionTest.cpp U unittests/ExecutionEngine/JIT/JITTest.cpp U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp U unittests/VMCore/PassManagerTest.cpp G unittests/Support/TypeBuilderTest.cpp U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp U lib/VMCore/IRBuilder.cpp G lib/VMCore/Type.cpp U lib/VMCore/Function.cpp G lib/VMCore/Core.cpp U lib/VMCore/Module.cpp U lib/AsmParser/LLParser.cpp U lib/Transforms/Utils/CloneFunction.cpp G lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Utils/InlineFunction.cpp U lib/Transforms/Instrumentation/GCOVProfiling.cpp U lib/Transforms/Scalar/ObjCARC.cpp U lib/Transforms/Scalar/SimplifyLibCalls.cpp U lib/Transforms/Scalar/MemCpyOptimizer.cpp G lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/Transforms/IPO/ArgumentPromotion.cpp U lib/Transforms/InstCombine/InstCombineCompares.cpp U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp U lib/Transforms/InstCombine/InstCombineCalls.cpp U lib/CodeGen/DwarfEHPrepare.cpp U lib/CodeGen/IntrinsicLowering.cpp U lib/Bitcode/Reader/BitcodeReader.cpp llvm-svn: 134949
* 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
OpenPOWER on IntegriCloud