summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused STL header includes.Jay Foad2011-04-232-2/+0
| | | | llvm-svn: 130068
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-152-8/+8
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* remove the StructRetPromotion pass. It is unused, not maintained andChris Lattner2011-04-113-359/+0
| | | | | | | has some bugs. If this is interesting functionality, it should be reimplemented in the argpromotion pass. llvm-svn: 129314
* Just because a GlobalVariable's initializer is [N x { i32, void ()* }] doesn'tNick Lewycky2011-04-111-7/+10
| | | | | | | | | | | | mean that it has to be ConstantArray of ConstantStruct. We might have ConstantAggregateZero, at either level, so don't crash on that. Also, semi-deprecate the sentinal value. The linker isn't aware of sentinals so we end up with the two lists appended, each with their "sentinals" on them. Different parts of LLVM treated sentinals differently, so make them all just ignore the single entry and continue on with the rest of the list. llvm-svn: 129307
* Don't include Operator.h from InstrTypes.h.Jay Foad2011-04-112-0/+2
| | | | llvm-svn: 129271
* Add back a couple checks removed by r129128; the fact that an intitializerEli Friedman2011-04-091-4/+6
| | | | | | | is an array of structures doesn't imply it's a ConstantArray of ConstantStruct. llvm-svn: 129207
* llvm.global_[cd]tor is defined to be either external, or appending with an arrayNick Lewycky2011-04-081-20/+5
| | | | | | | of { i32, void ()* }. Teach the verifier to verify that, deleting copies of checks strewn about. llvm-svn: 129128
* Remove some support for ReturnInsts with multiple operands, and forJay Foad2011-04-041-1/+1
| | | | | | | returning a scalar value in a function whose return type is a single- element structure or array. llvm-svn: 128810
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-303-5/+3
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-303-1/+5
| | | | llvm-svn: 128535
* No functionality change, just adjust some whitespace for coding style ↵Nick Lewycky2011-03-251-2/+2
| | | | | | compliance. llvm-svn: 128257
* Handle another case that Frits suggested.Anders Carlsson2011-03-221-2/+4
| | | | llvm-svn: 128068
* More cleanups to the OptimizeEmptyGlobalCXXDtors GlobalOpt function.Anders Carlsson2011-03-211-15/+9
| | | | llvm-svn: 127997
* As suggested by Nick Lewycky, ignore debugging intrinsics when trying to ↵Anders Carlsson2011-03-211-0/+7
| | | | | | decide whether a destructor is empty or not. llvm-svn: 127985
* Fix commentsNick Lewycky2011-03-211-2/+2
| | | | llvm-svn: 127984
* Don't try to eliminate invokes to __cxa_atexit.Anders Carlsson2011-03-201-0/+6
| | | | llvm-svn: 127976
* Don't segfault on mutual recursion, as pointed out by Frits.Anders Carlsson2011-03-201-4/+6
| | | | llvm-svn: 127975
* Address comments from Frits van Bommel.Anders Carlsson2011-03-201-7/+16
| | | | llvm-svn: 127974
* Add an optimization to GlobalOpt that eliminates calls to __cxa_atexit, if ↵Anders Carlsson2011-03-201-0/+101
| | | | | | the function passed is empty. llvm-svn: 127970
* These llvm.dbg.* constants are not used anymore.Devang Patel2011-03-091-3/+0
| | | | llvm-svn: 127352
* Don't internalize available_externally functions. We already did the rightRafael Espindola2011-03-061-0/+2
| | | | | | thing for variables. llvm-svn: 127138
* Add an obvious missing safety check to DAE::RemoveDeadArgumentsFromCallers.Eli Friedman2011-03-011-1/+1
| | | | llvm-svn: 126720
* Instead of keeping two Value*->id# mappings, keep one Value->Value mapping andNick Lewycky2011-02-201-12/+14
| | | | | | | one Value set. This is faster because we only need to use the set when there isn't already an entry in the map. No functionality change! llvm-svn: 126076
* convert ConstantVector::get to use ArrayRef.Chris Lattner2011-02-151-2/+1
| | | | llvm-svn: 125537
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-141-1/+2
| | | | | | builders unhappy. llvm-svn: 125504
* Switch ConstantVector::get to use ArrayRef instead of a pointer+sizeChris Lattner2011-02-141-2/+1
| | | | | | idiom. Change various clients to simplify their code. llvm-svn: 125487
* When removing a function from the function set and adding it to deferred, weNick Lewycky2011-02-091-2/+19
| | | | | | | | | | | | | could end up removing a different function than we intended because it was functionally equivalent, then end up with a comparison of a function against itself in the next round of comparisons (the one in the function set and the one on the deferred list). To fix this, I introduce a choice in the form of comparison for ComparableFunctions, either normal or "pointer only" used to find exact Function*'s in lookups. Also add some debugging statements. llvm-svn: 125180
* Simplify away redundant test, and document what's going on.Nick Lewycky2011-02-061-2/+5
| | | | llvm-svn: 124977
* Remove specialized comparison of InlineAsm objects. They're uniqued on creationNick Lewycky2011-02-061-6/+2
| | | | | | now, and this wasn't comparing some of their relevant bits anyhow. llvm-svn: 124976
* Remove wasteful caching. This isn't needed for correctness because any functionNick Lewycky2011-02-021-23/+2
| | | | | | | | that might have changed been affected by a merge elsewhere will have been removed from the function set, and it isn't needed for performance because we call grow() ahead of time to prevent reallocations. llvm-svn: 124717
* Rename functions to follow coding standard. Also rejiggers comments. NoNick Lewycky2011-01-281-89/+88
| | | | | | functionality change. llvm-svn: 124482
* Add a doxygen comment for this class.Nick Lewycky2011-01-281-0/+2
| | | | llvm-svn: 124480
* Reorder for readability. (Chris, is this what you meant?)Nick Lewycky2011-01-281-148/+150
| | | | llvm-svn: 124479
* Reduce the number of functions we look at in the first pass, and preallocateNick Lewycky2011-01-281-1/+3
| | | | | | the function equality set. llvm-svn: 124475
* Unbreak the build.Benjamin Kramer2011-01-271-1/+1
| | | | llvm-svn: 124426
* Expound upon this comparison!Nick Lewycky2011-01-271-0/+2
| | | | llvm-svn: 124406
* Use dyn_cast instead of isa+cast.Nick Lewycky2011-01-271-2/+1
| | | | llvm-svn: 124404
* Fix surprising missed optimization in mergefunc where we forgot to considerNick Lewycky2011-01-271-3/+12
| | | | | | that relationships like "i8* null" is equivalent to "i32* null". llvm-svn: 124368
* AttrListPtr has an overloaded operator== which does this for us, we should useNick Lewycky2011-01-261-4/+2
| | | | | | it. No functionality change! llvm-svn: 124286
* Teach mergefunc that intptr_t is the same width as a pointer. We still can'tNick Lewycky2011-01-261-1/+7
| | | | | | | merge vector<intptr_t>::push_back() and vector<void*>::push_back() because Enumerate() doesn't realize that "i64* null" and "i8** null" are equivalent. llvm-svn: 124285
* There are no vectors of pointer or arrays, so we don't need to check vectorNick Lewycky2011-01-261-7/+1
| | | | | | elements for type equivalence. llvm-svn: 124284
* Teach mergefunc how to emit aliases safely again -- but keep it turned it offNick Lewycky2011-01-251-25/+79
| | | | | | | for now. It's controlled by the HasGlobalAliases variable which is not attached to any flag yet. llvm-svn: 124182
* Add unnamed_addr when we can show that address of a global is not used.Rafael Espindola2011-01-191-13/+42
| | | | llvm-svn: 123834
* Reduce indentation and remove commented out code.Rafael Espindola2011-01-181-122/+101
| | | | llvm-svn: 123729
* Teach DAE to look for functions whose arguments are unused, and change all ↵Anders Carlsson2011-01-161-1/+61
| | | | | | callers to pass in an undefvalue instead. llvm-svn: 123596
* Don't merge two constants if we care about the address of both.Rafael Espindola2011-01-161-22/+38
| | | | | | | | | | | | | | This fixes the original testcase in PR8927. It also causes a clang binary built with a patched clang to increase in size by 0.21%. We can probably get some of the size back by writing a pass that detects that a global never has its pointer compared and adds unnamed_addr to it (maybe extend global opt). It is also possible that there are some other cases clang could add unnamed_addr to. I will investigate extending globalopt next. llvm-svn: 123584
* fix PR8932, a case where arg promotion could infinitely promote.Chris Lattner2011-01-161-24/+51
| | | | llvm-svn: 123574
* Improve the safety of my globalopt enhancement by ensuring that the bitcastOwen Anderson2011-01-161-12/+22
| | | | | | of the stored value to the new store type is always. Also, add a testcase. llvm-svn: 123563
* simplify this code, it is still broken but will follow up on llvm-commits.Chris Lattner2011-01-161-15/+5
| | | | llvm-svn: 123558
* remove the partial specialization pass. It is unmaintained and has bugs.Chris Lattner2011-01-163-230/+0
| | | | llvm-svn: 123554
OpenPOWER on IntegriCloud