summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* These tags are now covered by dwarf::TagString().Devang Patel2011-02-181-9/+1
| | | | llvm-svn: 125987
* Expose getTypeName to the C API. Patch by Patrick Walton.Rafael Espindola2011-02-181-0/+4
| | | | llvm-svn: 125845
* hoist GlobalValue::removeDeadConstantUsers up to being a method on Constant.Chris Lattner2011-02-182-49/+53
| | | | llvm-svn: 125828
* Enhance constant folding of bitcast operations on vectors of floats.Nadav Rotem2011-02-172-3/+8
| | | | | | | Add getAllOnesValue of FP numbers to Constants and APFloat. Add more tests. llvm-svn: 125776
* convert ConstantVector::get to use ArrayRef.Chris Lattner2011-02-154-137/+79
| | | | llvm-svn: 125537
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-144-79/+137
| | | | | | builders unhappy. llvm-svn: 125504
* Switch ConstantVector::get to use ArrayRef instead of a pointer+sizeChris Lattner2011-02-144-137/+79
| | | | | | idiom. Change various clients to simplify their code. llvm-svn: 125487
* Fix a regression from r125393;Nadav Rotem2011-02-131-1/+2
| | | | | | | | | | | | | It caused a crash in MultiSource/Benchmarks/Bullet. Opt hit an assertion with "opt -std-compile-opts" because Constant::getAllOnesValue doesn't know how to handle floats. This patch added a test to reproduce the problem and a check that the destination vector is of integer type. Thank you Benjamin! llvm-svn: 125459
* Fix 9173.Nadav Rotem2011-02-111-0/+40
| | | | | | | Add more folding patterns to constant expressions of vector selects and vector bitcasts. llvm-svn: 125393
* make ConstantExpr::replaceUsesOfWithOnConstant preserve the inboundsChris Lattner2011-02-111-1/+2
| | | | | | flag. Noticed by Jin Gu Kang! llvm-svn: 125366
* make the constantexpr interfaces for inbounds GEPs follow the same styleChris Lattner2011-02-111-63/+10
| | | | | | as other constantexpr flags, reducing redundancy. llvm-svn: 125365
* switch the constantexpr, target folder, and IRBuilder interfacesChris Lattner2011-02-101-67/+24
| | | | | | | for NSW/NUW binops to follow the pattern of exact binops. This allows someone to use Builder.CreateAdd(x, y, "tmp", MaybeNUW); llvm-svn: 125270
* refactor ConstantExpr interfaces a bit around "exactness".Chris Lattner2011-02-091-29/+12
| | | | llvm-svn: 125190
* fix comment change.Chris Lattner2011-02-071-1/+1
| | | | llvm-svn: 125047
* implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.Chris Lattner2011-02-071-53/+74
| | | | | | Factor some code better. llvm-svn: 125006
* enhance vmcore to know that udiv's can be exact, and add a trivialChris Lattner2011-02-063-4/+10
| | | | | | | | instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 llvm-svn: 124992
* Make SwitchInst::removeCase() more efficient.Jay Foad2011-02-011-8/+4
| | | | llvm-svn: 124659
* Have m_One also match constant vectors for which every element is 1.Duncan Sands2011-02-011-1/+1
| | | | llvm-svn: 124655
* Fix 'fcmp one' constant folding. Noticed by inspection.Nick Lewycky2011-01-301-1/+1
| | | | llvm-svn: 124557
* Fix some formatting and upgrade comments from llvm 1.x to 2.x syntax.Nick Lewycky2011-01-301-6/+6
| | | | llvm-svn: 124556
* Add the select optimization recently added to instcombine to constant folding.Nick Lewycky2011-01-291-0/+12
| | | | | | | This is the one where one of the branches of the select is another select on the same condition. llvm-svn: 124547
* Fix indentation.Jay Foad2011-01-271-9/+9
| | | | llvm-svn: 124375
* Simplify User::operator delete().Jay Foad2011-01-261-10/+3
| | | | llvm-svn: 124330
* 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
OpenPOWER on IntegriCloud