summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
...
* AttrListPtr has an overloaded operator== which does this for us, we should useNick Lewycky2011-01-261-8/+5
| | | | | | it. No functionality change! llvm-svn: 124286
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-2/+2
| | | | llvm-svn: 124209
* teach Value::isDereferenceablePointer that byval arguments are alwaysChris Lattner2011-01-231-0/+4
| | | | | | dereferencable, noticed by inspection. llvm-svn: 124085
* Add a constant folding of casts from zero to zero. Fixes PR9011!Nick Lewycky2011-01-211-0/+4
| | | | | | | | While here, I'd like to complain about how vector is not an aggregate type according to llvm::Type::isAggregateType(), but they're listed under aggregate types in the LangRef and zero vectors are stored as ConstantAggregateZero. llvm-svn: 123956
* Implement requiredTransitiveTobias Grosser2011-01-201-1/+32
| | | | | | | The PassManager did not implement the transitivity of requiredTransitive. This was unnoticed since 2006. llvm-svn: 123942
* Update a comment.Cameron Zwarich2011-01-201-1/+1
| | | | llvm-svn: 123879
* Remove an unnecessary #include.Cameron Zwarich2011-01-181-1/+0
| | | | llvm-svn: 123748
* Move DominanceFrontier from VMCore to Analysis.Cameron Zwarich2011-01-182-130/+1
| | | | llvm-svn: 123747
* There is no point in verifying an analysis that is never updated.Cameron Zwarich2011-01-181-11/+0
| | | | llvm-svn: 123743
* Remove some now-unused DominanceFrontier methods.Cameron Zwarich2011-01-181-124/+0
| | | | llvm-svn: 123726
* Remove useless Tag enumeration.Jay Foad2011-01-172-4/+5
| | | | llvm-svn: 123623
* Simplify the construction and destruction of Uses. SimplifyJay Foad2011-01-162-24/+15
| | | | | | User::dropHungOffUses(). llvm-svn: 123580
* Move the implementation of the User class into a new source file,Jay Foad2011-01-164-83/+89
| | | | | | User.cpp. llvm-svn: 123575
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-151-3/+0
| | | | llvm-svn: 123529
* Remove casts between Value** and Constant**, which won't work if aJay Foad2011-01-144-31/+67
| | | | | | | static_cast from Constant* to Value* has to adjust the "this" pointer. This is groundwork for PR889. llvm-svn: 123435
* Move some shift transforms out of instcombine and into InstructionSimplify.Duncan Sands2011-01-141-2/+2
| | | | | | | | | | | | While there, I noticed that the transform "undef >>a X -> undef" was wrong. For example if X is 2 then the top two bits must be equal, so the result can not be anything. I fixed this in the constant folder as well. Also, I made the transform for "X << undef" stronger: it now folds to undef always, even though X might be zero. This is in accordance with the LangRef, but I must admit that it is fairly aggressive. Also, I added "i32 X << 32 -> undef" following the LangRef and the constant folder, likewise fairly aggressive. llvm-svn: 123417
* Reject uses of unnamed_addr in declarations.Rafael Espindola2011-01-131-0/+3
| | | | llvm-svn: 123358
* FixedNumOperandTraits and VariadicOperandTraits assumed that, given aJay Foad2011-01-111-10/+20
| | | | | | | | | | | "this" pointer for any subclass of User, you could static_cast it to User* and then reinterpret_cast that to Use* to get the end of the operand list. This isn't a safe assumption in general, because the static_cast might adjust the "this" pointer. Fixed by having these OperandTraits classes take an extra template parameter, which is the subclass of User. This is groundwork for PR889. llvm-svn: 123235
* make domtree verification print something useful on failure.Chris Lattner2011-01-081-1/+8
| | | | llvm-svn: 123078
* First step in fixing PR8927:Rafael Espindola2011-01-082-0/+4
| | | | | | | | | | | | | | | | | | | 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
* Simplify the allocation and freeing of Users' operand lists, now thatJay Foad2011-01-072-60/+1
| | | | | | every BranchInst has a fixed number of operands. llvm-svn: 123027
* Silence a warning from non-standard warning avoidance code.Jakob Stoklund Olesen2011-01-051-1/+2
| | | | llvm-svn: 122911
* These methods should be "const"; make them so.Duncan Sands2011-01-041-4/+4
| | | | llvm-svn: 122809
* split dom frontier handling stuff out to its own DominanceFrontier header,Chris Lattner2011-01-021-1/+2
| | | | | | so that Dominators.h is *just* domtree. Also prune #includes a bit. llvm-svn: 122714
* fix PR8867: a crash handling fp128. Thanks to Nick for the testcase.Chris Lattner2010-12-291-1/+1
| | | | llvm-svn: 122613
* add methods to IRBuilder to create memcpy/memset/memmove.Chris Lattner2010-12-261-0/+81
| | | | llvm-svn: 122571
* Change all self assignments X=X to (void)X, so that we can turn on aJeffrey Yasskin2010-12-234-10/+10
| | | | | | | new gcc warning that complains on self-assignments and self-initializations. llvm-svn: 122458
* rename MVT::Flag to MVT::Glue. "Flag" is a terrible name forChris Lattner2010-12-211-1/+1
| | | | | | | something that just glues two nodes together, even if it is sometimes used for flags. llvm-svn: 122310
* Revert r122114 (CallbackVH observing use-list changes) because it caused ↵Owen Anderson2010-12-201-38/+0
| | | | | | severe slowdowns on the Linux self-host configuration. llvm-svn: 122279
* There is no need for isAssociative to take the type as an argument anymore.Duncan Sands2010-12-202-3/+2
| | | | llvm-svn: 122242
* Add missing standard headers. Patch by Joerg Sonnenberger!Nick Lewycky2010-12-191-0/+1
| | | | llvm-svn: 122193
* Add missing std:: prefixes to some calls. C++ doesn't require that <cfoo>Nick Lewycky2010-12-191-2/+2
| | | | | | | headers provide symbols outside namespace std and the LLVM coding standards state that we should prefix all of them. llvm-svn: 122192
* Add support to CallbackVH to receive notification when a Value's use-list ↵Owen Anderson2010-12-181-0/+38
| | | | | | changes. llvm-svn: 122114
* Remove trailing whitespace.Bob Wilson2010-12-171-7/+6
| | | | llvm-svn: 122099
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-161-4/+6
| | | | | | via an out parm. llvm-svn: 121958
* Move Value::getUnderlyingObject to be a standaloneDan Gohman2010-12-151-21/+0
| | | | | | | function so that it can live in Analysis instead of VMCore. llvm-svn: 121885
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-091-7/+8
| | | | | | error_code &ec. And fix clients. llvm-svn: 121379
* Remove the code from Function::dropAllReferences which replacedDan Gohman2010-12-071-13/+4
| | | | | | | | | uses of the function's blocks with undef. This code isn't needed, because BasicBlock's destructor handles such uses. Also, undef isn't correct, since blockaddresses may still be used for comparisons with null. llvm-svn: 121170
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-071-10/+7
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121120
* Fix PR 4170 by having ExtractValueInst::getIndexedType() reject ↵Frits van Bommel2010-12-051-7/+24
| | | | | | | | out-of-bounds indexing. Also add asserts that the indices are valid in InsertValueInst::init(). ExtractValueInst already asserts when constructed with invalid indices. llvm-svn: 120956
* Remove unneeded zero arrays.Benjamin Kramer2010-12-041-3/+1
| | | | llvm-svn: 120910
* Apparently APFloat::getZero doesn't like PPCDoubleDoubles.Benjamin Kramer2010-12-041-1/+1
| | | | llvm-svn: 120909
* Simplify code. No functionality change.Benjamin Kramer2010-12-041-6/+9
| | | | llvm-svn: 120907
* Merge System into Support.Michael J. Spencer2010-11-296-9/+9
| | | | llvm-svn: 120298
* add a function to the C api to get the context out of a module, patchChris Lattner2010-11-281-0/+6
| | | | | | by Eric Dobson! llvm-svn: 120259
* add a 'LLVMConstIntOfArbitraryPrecision' api to the C api,Chris Lattner2010-11-231-0/+8
| | | | | | patch by Greg Pfeil! llvm-svn: 119989
* Simplify code. No change in functionality.Benjamin Kramer2010-11-201-10/+6
| | | | llvm-svn: 119908
* Fix an order-of-deallocation issue where the AttrListImpl could be ↵Owen Anderson2010-11-181-2/+7
| | | | | | | | deallocated before the global LLVMContext, causing memory errors. Patch by Peter Collingbourne. llvm-svn: 119721
* Now that hasConstantValue has been made simpler, it may return theDuncan Sands2010-11-171-4/+5
| | | | | | | phi node itself if it occurs in an unreachable basic block. Protect against this. Hopefully this will fix some more buildbots. llvm-svn: 119493
* now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate theChris Lattner2010-11-172-6/+8
| | | | | | | | 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. llvm-svn: 119486
OpenPOWER on IntegriCloud