summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* Fix C++0x narrowing errors when char is unsigned.Jeffrey Yasskin2011-08-301-1/+1
| | | | | | | In the case of EDInstInfo, this would actually cause a bug when -1 became 255 and was then compared >=0 in llvm-mc/Disassembler.cpp. llvm-svn: 138825
* The 'expected' argument to EXPECT_EQ is actually the first one;John McCall2011-08-271-23/+23
| | | | | | flip these tests around. llvm-svn: 138708
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-183-12/+12
| | | | llvm-svn: 135375
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-121-2/+2
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* De-constify Types in FunctionType::get().Jay Foad2011-07-111-2/+2
| | | | llvm-svn: 134888
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-88/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revamp the "ConstantStruct::get" methods. Previously, these were scatteredChris Lattner2011-06-201-1/+1
| | | | | | | | | | | | | | | 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
* Teach getCastOpcode about element-by-element vector casts. For example, "trunc"Duncan Sands2011-05-181-0/+8
| | | | | | | | | | | | | can be used to turn a <4 x i64> into a <4 x i32> but getCastOpcode would assert if you passed these types to it. Note that this strictly extends the previous functionality: if getCastOpcode previously accepted two vector types (i.e. didn't assert) then it still will and returns the same opcode (BitCast). That's because before it would only accept vectors with the same bitwidth, and the new code only touches vectors with the same length. However if two vectors have both the same bitwidth and the same length then their element types have the same bitwidth, so the new logic will return BitCast as before. llvm-svn: 131530
* PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-211-6/+6
| | | | llvm-svn: 129932
* Don't include Operator.h from InstrTypes.h.Jay Foad2011-04-112-0/+2
| | | | llvm-svn: 129271
* While testing dragonegg I noticed that isCastable and getCastOpcodeDuncan Sands2011-04-011-0/+13
| | | | | | | | had gotten out of sync: isCastable didn't think it was possible to cast the x86_mmx type to anything, while it did think it possible to cast an i64 to x86_mmx. llvm-svn: 128705
* Strip trailing whitespace.Duncan Sands2011-03-312-14/+14
| | | | llvm-svn: 128622
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-151-27/+0
| | | | llvm-svn: 123529
* Reject uses of unnamed_addr in declarations.Rafael Espindola2011-01-131-0/+26
| | | | llvm-svn: 123358
* First step in fixing PR8927:Rafael Espindola2011-01-081-0/+20
| | | | | | | | | | | | | | | | | | | Add a unnamed_addr bit to global variables and functions. This will be used to indicate that the address is not significant and therefore the constant or function can be merged with others. If an optimization pass can show that an address is not used, it can set this. Examples of things that can have this set by the FE are globals created to hold string literals and C++ constructors. Adding unnamed_addr to a non-const global should have no effect unless an optimization can transform that global into a constant. Aliases are not allowed to have unnamed_addr since I couldn't figure out any use for it. llvm-svn: 123063
* Remove the "ugly" method BranchInst::setUnconditionalDest().Jay Foad2011-01-071-17/+0
| | | | llvm-svn: 123026
* fix PR8867: a crash handling fp128. Thanks to Nick for the testcase.Chris Lattner2010-12-291-0/+9
| | | | llvm-svn: 122613
* Revert 119600 to unbreak the build. Francois, please investigate.Jim Grosbach2010-11-181-9/+9
| | | | llvm-svn: 119606
* Appease MSVC 2008: you can't use keyword this inside EXPECT_EQ().Francois Pichet2010-11-181-9/+9
| | | | | | This is because of bug 331418 on Microsoft Connect. llvm-svn: 119600
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-8/+29
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Move ValueMapTest from ADT to VMCore so that ADT doesn't needDan Gohman2010-09-271-0/+294
| | | | | | to link in "core". llvm-svn: 114831
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-6/+6
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-6/+6
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-6/+6
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Prefix `next' iterator operation with `llvm::'.Oscar Fuentes2010-08-021-2/+2
| | | | | | | | Fixes potential ambiguity problems on VS 2010. Patch by nobled! llvm-svn: 110029
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-3/+4
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* unit test to go along with r108610Chris Lattner2010-07-171-1/+56
| | | | llvm-svn: 108611
* Switch from EXPECT_EQ({true,false, ...) to the more canonicalChandler Carruth2010-07-131-9/+9
| | | | | | | EXPECT_{TRUE,FALSE}(...) macros. This also prevents suprious warnings about bool-to-pointer conversion that occurs withit EXPECT_EQ. llvm-svn: 108248
* introduce a new CallGraphSCC class, and pass it aroundChris Lattner2010-04-161-1/+1
| | | | | | | | to CallGraphSCCPass's instead of passing around a std::vector<CallGraphNode*>. No functionality change, but now we have a much tidier interface. llvm-svn: 101558
* another oneGabor Greif2010-03-181-1/+1
| | | | llvm-svn: 98850
* feedback from NickGabor Greif2010-03-171-1/+2
| | | | llvm-svn: 98761
* more BranchInst testsGabor Greif2010-03-161-0/+15
| | | | llvm-svn: 98634
* add BranchInst testsGabor Greif2010-03-161-0/+71
| | | | llvm-svn: 98632
* appease valgrind testersGabor Greif2010-03-161-0/+4
| | | | llvm-svn: 98628
* add single return testsGabor Greif2010-03-161-0/+11
| | | | llvm-svn: 98625
* fix PR6589Gabor Greif2010-03-161-3/+3
| | | | | | | | | | | | | adjusted unittest I have added some doxygen to OptionalOperandTraits, so hopefully there will be no confusion in the future. Incidentally OptionalOperandTraits is not used any more (IIUC), but the obvious client would be BranchInstr, and I plan to rearrange it that way. llvm-svn: 98624
* begin humbly with a repro of PR6589Gabor Greif2010-03-161-0/+26
| | | | llvm-svn: 98623
* Remove the last memory leak from the VMCore unit tests.Jeffrey Yasskin2010-03-131-2/+2
| | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests llvm-svn: 98414
* Remove a memory leak from MetadataTest.Jeffrey Yasskin2010-03-131-2/+2
| | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests llvm-svn: 98412
* Remove a memory leak from VerifierTest.Jeffrey Yasskin2010-03-131-3/+4
| | | | | Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests llvm-svn: 98411
* Stop leaking MDStrings.Jeffrey Yasskin2010-03-041-11/+18
| | | | llvm-svn: 97763
* Teach the verifier to check the condition on a branch and ensure that it hasNick Lewycky2010-02-151-0/+44
| | | | | | 'i1' type. llvm-svn: 96282
* Fix some of the memcheck errors found in the JIT unittests.Jeffrey Yasskin2010-02-111-4/+6
| | | | llvm-svn: 95856
* Roll r94484 (avoiding RTTI problems in tests) forward again in a way that isn'tJeffrey Yasskin2010-01-261-5/+0
| | | | | | broken by setting CXXFLAGS on the command line. llvm-svn: 94619
* Revert 94484. Re-disable unittests that need RTTI.Bob Wilson2010-01-261-0/+5
| | | | llvm-svn: 94569
* Re-enable unit tests disabled in r94164 by telling GTest about theJeffrey Yasskin2010-01-261-5/+0
| | | | | | lack of RTTI. llvm-svn: 94484
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+5
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* NamedMDNode is a collection MDNodes.Devang Patel2010-01-051-1/+1
| | | | llvm-svn: 92761
* don't unittest mdnode printing, we have disassembler tests for this.Chris Lattner2009-12-311-18/+1
| | | | llvm-svn: 92328
OpenPOWER on IntegriCloud