Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove unused STL header includes. | Jay Foad | 2011-04-23 | 2 | -2/+0 |
| | | | | llvm-svn: 130068 | ||||
* | Fix a ton of comment typos found by codespell. Patch by | Chris Lattner | 2011-04-15 | 2 | -8/+8 |
| | | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558 | ||||
* | remove the StructRetPromotion pass. It is unused, not maintained and | Chris Lattner | 2011-04-11 | 3 | -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't | Nick Lewycky | 2011-04-11 | 1 | -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 Foad | 2011-04-11 | 2 | -0/+2 |
| | | | | llvm-svn: 129271 | ||||
* | Add back a couple checks removed by r129128; the fact that an intitializer | Eli Friedman | 2011-04-09 | 1 | -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 array | Nick Lewycky | 2011-04-08 | 1 | -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 for | Jay Foad | 2011-04-04 | 1 | -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 to | Jay Foad | 2011-03-30 | 3 | -5/+3 |
| | | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537 | ||||
* | (Almost) always call reserveOperandSpace() on newly created PHINodes. | Jay Foad | 2011-03-30 | 3 | -1/+5 |
| | | | | llvm-svn: 128535 | ||||
* | No functionality change, just adjust some whitespace for coding style ↵ | Nick Lewycky | 2011-03-25 | 1 | -2/+2 |
| | | | | | | compliance. llvm-svn: 128257 | ||||
* | Handle another case that Frits suggested. | Anders Carlsson | 2011-03-22 | 1 | -2/+4 |
| | | | | llvm-svn: 128068 | ||||
* | More cleanups to the OptimizeEmptyGlobalCXXDtors GlobalOpt function. | Anders Carlsson | 2011-03-21 | 1 | -15/+9 |
| | | | | llvm-svn: 127997 | ||||
* | As suggested by Nick Lewycky, ignore debugging intrinsics when trying to ↵ | Anders Carlsson | 2011-03-21 | 1 | -0/+7 |
| | | | | | | decide whether a destructor is empty or not. llvm-svn: 127985 | ||||
* | Fix comments | Nick Lewycky | 2011-03-21 | 1 | -2/+2 |
| | | | | llvm-svn: 127984 | ||||
* | Don't try to eliminate invokes to __cxa_atexit. | Anders Carlsson | 2011-03-20 | 1 | -0/+6 |
| | | | | llvm-svn: 127976 | ||||
* | Don't segfault on mutual recursion, as pointed out by Frits. | Anders Carlsson | 2011-03-20 | 1 | -4/+6 |
| | | | | llvm-svn: 127975 | ||||
* | Address comments from Frits van Bommel. | Anders Carlsson | 2011-03-20 | 1 | -7/+16 |
| | | | | llvm-svn: 127974 | ||||
* | Add an optimization to GlobalOpt that eliminates calls to __cxa_atexit, if ↵ | Anders Carlsson | 2011-03-20 | 1 | -0/+101 |
| | | | | | | the function passed is empty. llvm-svn: 127970 | ||||
* | These llvm.dbg.* constants are not used anymore. | Devang Patel | 2011-03-09 | 1 | -3/+0 |
| | | | | llvm-svn: 127352 | ||||
* | Don't internalize available_externally functions. We already did the right | Rafael Espindola | 2011-03-06 | 1 | -0/+2 |
| | | | | | | thing for variables. llvm-svn: 127138 | ||||
* | Add an obvious missing safety check to DAE::RemoveDeadArgumentsFromCallers. | Eli Friedman | 2011-03-01 | 1 | -1/+1 |
| | | | | llvm-svn: 126720 | ||||
* | Instead of keeping two Value*->id# mappings, keep one Value->Value mapping and | Nick Lewycky | 2011-02-20 | 1 | -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 Lattner | 2011-02-15 | 1 | -2/+1 |
| | | | | llvm-svn: 125537 | ||||
* | revert my ConstantVector patch, it seems to have made the llvm-gcc | Chris Lattner | 2011-02-14 | 1 | -1/+2 |
| | | | | | | builders unhappy. llvm-svn: 125504 | ||||
* | Switch ConstantVector::get to use ArrayRef instead of a pointer+size | Chris Lattner | 2011-02-14 | 1 | -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, we | Nick Lewycky | 2011-02-09 | 1 | -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 Lewycky | 2011-02-06 | 1 | -2/+5 |
| | | | | llvm-svn: 124977 | ||||
* | Remove specialized comparison of InlineAsm objects. They're uniqued on creation | Nick Lewycky | 2011-02-06 | 1 | -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 function | Nick Lewycky | 2011-02-02 | 1 | -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. No | Nick Lewycky | 2011-01-28 | 1 | -89/+88 |
| | | | | | | functionality change. llvm-svn: 124482 | ||||
* | Add a doxygen comment for this class. | Nick Lewycky | 2011-01-28 | 1 | -0/+2 |
| | | | | llvm-svn: 124480 | ||||
* | Reorder for readability. (Chris, is this what you meant?) | Nick Lewycky | 2011-01-28 | 1 | -148/+150 |
| | | | | llvm-svn: 124479 | ||||
* | Reduce the number of functions we look at in the first pass, and preallocate | Nick Lewycky | 2011-01-28 | 1 | -1/+3 |
| | | | | | | the function equality set. llvm-svn: 124475 | ||||
* | Unbreak the build. | Benjamin Kramer | 2011-01-27 | 1 | -1/+1 |
| | | | | llvm-svn: 124426 | ||||
* | Expound upon this comparison! | Nick Lewycky | 2011-01-27 | 1 | -0/+2 |
| | | | | llvm-svn: 124406 | ||||
* | Use dyn_cast instead of isa+cast. | Nick Lewycky | 2011-01-27 | 1 | -2/+1 |
| | | | | llvm-svn: 124404 | ||||
* | Fix surprising missed optimization in mergefunc where we forgot to consider | Nick Lewycky | 2011-01-27 | 1 | -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 use | Nick Lewycky | 2011-01-26 | 1 | -4/+2 |
| | | | | | | it. No functionality change! llvm-svn: 124286 | ||||
* | Teach mergefunc that intptr_t is the same width as a pointer. We still can't | Nick Lewycky | 2011-01-26 | 1 | -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 vector | Nick Lewycky | 2011-01-26 | 1 | -7/+1 |
| | | | | | | elements for type equivalence. llvm-svn: 124284 | ||||
* | Teach mergefunc how to emit aliases safely again -- but keep it turned it off | Nick Lewycky | 2011-01-25 | 1 | -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 Espindola | 2011-01-19 | 1 | -13/+42 |
| | | | | llvm-svn: 123834 | ||||
* | Reduce indentation and remove commented out code. | Rafael Espindola | 2011-01-18 | 1 | -122/+101 |
| | | | | llvm-svn: 123729 | ||||
* | Teach DAE to look for functions whose arguments are unused, and change all ↵ | Anders Carlsson | 2011-01-16 | 1 | -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 Espindola | 2011-01-16 | 1 | -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 Lattner | 2011-01-16 | 1 | -24/+51 |
| | | | | llvm-svn: 123574 | ||||
* | Improve the safety of my globalopt enhancement by ensuring that the bitcast | Owen Anderson | 2011-01-16 | 1 | -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 Lattner | 2011-01-16 | 1 | -15/+5 |
| | | | | llvm-svn: 123558 | ||||
* | remove the partial specialization pass. It is unmaintained and has bugs. | Chris Lattner | 2011-01-16 | 3 | -230/+0 |
| | | | | llvm-svn: 123554 |