summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/MergeFunctions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-0/+2
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-3/+3
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-3/+4
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* More LLVMContext-ification.Owen Anderson2009-07-061-1/+2
| | | | llvm-svn: 74811
* Unlike the other instructions, GEP really does need to look at the type of aNick Lewycky2009-06-131-0/+14
| | | | | | pointer. This fixes kimwitu++. Pointed out by Frits van Bommel on review! llvm-svn: 73299
* Give Instruction::isSameOperationAs a corresponding comment to noteDan Gohman2009-06-121-2/+3
| | | | | | | | | | | the relationship with MergeFunctions.cpp's isEquivalentOperation, and make a trivial code reordering so that the two functions are easier to compare. Fix the name of Instruction::isSameOperationAs in MergeFunction.cpp's isEquivalentOperation's comment, and fix a nearby 80-column violation. llvm-svn: 73241
* Keep callers of a weak function calling it, instead of the non-weak equivalent.Nick Lewycky2009-06-121-0/+1
| | | | llvm-svn: 73235
* Don't forget to match the calling convention when producing a thunk.Nick Lewycky2009-06-121-2/+2
| | | | llvm-svn: 73231
* Given two identical weak functions, produce one internal function and two weakNick Lewycky2009-06-121-4/+17
| | | | | | thunks. llvm-svn: 73230
* Add an "are types equivalent" operation that ignores the types that a pointerNick Lewycky2009-06-121-99/+354
| | | | | | | | | | | | | | | points to while analyzing all other fields. Use FoldingSetNodeID to produce a good hash. This dramatically decreases run times. Emit thunks. This means that it can look at all functions regardless of what the linkage is or if the address is taken, but unfortunately some small functions can be even shorter than the thunk because our backend doesn't yet realize it can just turn these into jumps. This means that this pass will pessimize code on average. llvm-svn: 73222
* Add the private linkage.Rafael Espindola2009-01-151-2/+2
| | | | llvm-svn: 62279
* Changes from Duncan's review:Nick Lewycky2008-11-021-9/+28
| | | | | | | | * merge two weak functions by making them both alias a third non-weak fn * don't reimplement CallSite::hasArgument * whitelist the safe linkage types llvm-svn: 58568
* Get this building on 64 bit machines (error:Duncan Sands2008-11-021-5/+5
| | | | | | | cast from ‘const llvm::PointerType*’ to ‘unsigned int’ loses precision). llvm-svn: 58561
* Add a new MergeFunctions pass. It finds identical functions and merges them.Nick Lewycky2008-11-021-0/+358
This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc) and so it probably wont be turned on by default. Also, may of those are likely to go away when PR2973 is fixed. llvm-svn: 58557
OpenPOWER on IntegriCloud