summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Add LLVMContext::emitWarning methods and use them. ↵Bob Wilson2013-02-083-8/+6
| | | | | | | | | | | | | <rdar://problem/12867368>" This reverts r171041. This was a nice idea that didn't work out well. Clang warnings need to be associated with warning groups so that they can be selectively disabled, promoted to errors, etc. This simplistic patch didn't allow for that. Enhancing it to provide some way for the backend to specify a front-end warning type seems like overkill for the few uses of this, at least for now. llvm-svn: 174748
* BBVectorize: Use TTI->getAddressComputationCostHal Finkel2013-02-081-0/+5
| | | | | | | | | | | | | This is a follow-up to the cost-model change in r174713 which splits the cost of a memory operation between the address computation and the actual memory access. In r174713, this cost is always added to the memory operation cost, and so BBVectorize will do the same. Currently, this new cost function is used only by ARM, and I don't have any ARM test cases for BBVectorize. Assistance in generating some good ARM test cases for BBVectorize would be greatly appreciated! llvm-svn: 174743
* [SimplifyLibCalls] Library call simplification doen't work if the call site Chad Rosier2013-02-081-1/+7
| | | | | | | | isn't using the default calling convention. However, if the transformation is from a call to inline IR, then the calling convention doesn't matter. rdar://13157990 llvm-svn: 174724
* Typos.Jakob Stoklund Olesen2013-02-081-4/+4
| | | | llvm-svn: 174723
* ARM cost model: Address computation in vector mem ops not freeArnold Schwaighofer2013-02-081-8/+14
| | | | | | | | | | | | | | | Adds a function to target transform info to query for the cost of address computation. The cost model analysis pass now also queries this interface. The code in LoopVectorize adds the cost of address computation as part of the memory instruction cost calculation. Only there, we know whether the instruction will be scalarized or not. Increase the penality for inserting in to D registers on swift. This becomes necessary because we now always assume that address computation has a cost and three is a closer value to the architecture. radar://13097204 llvm-svn: 174713
* Test CommitMichael Kuperstein2013-02-081-1/+1
| | | | llvm-svn: 174709
* Revert "Have InstCombine call SipmlifyCall when handling calls. Test case ↵Andrew Trick2013-02-081-6/+0
| | | | | | | | | | included." This reverts commit 3854a5d90fee52af1065edbed34521fff6cdc18d. This causes a clang unit test to hang: vtable-available-externally.cpp. llvm-svn: 174692
* Have InstCombine call SipmlifyCall when handling calls. Test case included.Michael Ilseman2013-02-071-0/+6
| | | | llvm-svn: 174675
* fix 80-col violation and fix the docs.Nadav Rotem2013-02-071-3/+7
| | | | llvm-svn: 174671
* Loop Vectorizer: Refactor Memory Cost ComputationArnold Schwaighofer2013-02-071-180/+52
| | | | | | | | | | We don't want too many classes in a pass and the classes obscure the details. I was going a little overboard with object modeling here. Replace classes by generic code that handles both loads and stores. No functionality change intended. llvm-svn: 174646
* Moved some comments due to the recent refactoring of ObjCARC.Michael Gottesman2013-02-072-5/+4
| | | | | | | | 1. Moved a comment from ObjCARCOpts.cpp -> ObjCARCContract.cpp. 2. Removed a comment from ObjCARCOpts.cpp that was already moved to ObjCARCAliasAnalysis.h/.cpp. llvm-svn: 174581
* Preserve fast-math flags after reassociation and commutation. Update test casesMichael Ilseman2013-02-071-5/+20
| | | | llvm-svn: 174571
* InstCombine: Fix and simplify the inttoptr side too.Benjamin Kramer2013-02-051-13/+8
| | | | llvm-svn: 174438
* Removed explicit inline as per the LLVM style guide.Michael Gottesman2013-02-051-7/+7
| | | | llvm-svn: 174432
* InstCombine: Harden code to work with vectors of pointers and simplify it a bit.Benjamin Kramer2013-02-051-11/+7
| | | | | | Found by running instcombine on a fabricated test case for the constant folder. llvm-svn: 174430
* Loop Vectorizer: Refactor code to compute vectorized memory instruction costArnold Schwaighofer2013-02-051-79/+178
| | | | | | | Introduce a helper class that computes the cost of memory access instructions. No functionality change intended. llvm-svn: 174422
* [SjLj Prepare] When demoting an invoke instructions to the stack, if the normalChad Rosier2013-02-051-5/+15
| | | | | | | edge is critical, then split it so we can insert the store. rdar://13126179 llvm-svn: 174418
* Loop Vectorizer: Handle pointer stores/loads in getWidestType()Arnold Schwaighofer2013-02-051-9/+31
| | | | | | | | | | | | | | | | | In the loop vectorizer cost model, we used to ignore stores/loads of a pointer type when computing the widest type within a loop. This meant that if we had only stores/loads of pointers in a loop we would return a widest type of 8bits (instead of 32 or 64 bit) and therefore a vector factor that was too big. Now, if we see a consecutive store/load of pointers we use the size of a pointer (from data layout). This problem occured in SingleSource/Benchmarks/Shootout-C++/hash.cpp (reduced test case is the first test in vector_ptr_load_store.ll). radar://13139343 llvm-svn: 174377
* Revert accidental commit (ran svn commit from wrong directory).Nick Lewycky2013-02-021-61/+7
| | | | llvm-svn: 174241
* This patch makes "&Cls::purevfn" not an odr use. This isn't what the standardNick Lewycky2013-02-021-7/+61
| | | | | | | | | says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use. Also fixes a bug in the previous patch that caused us to not mark the function referenced just because we didn't want to mark it odr used. llvm-svn: 174240
* This patch aims to improve compile time performance by increasingPreston Gurd2013-02-011-13/+13
| | | | | | | | | | | | | the SCEV vector size in LoopStrengthReduce. It is observed that the BaseRegs vector size is 4 in most cases, and elements are frequently copied when it is initialized as SmallVector<const SCEV *, 2> BaseRegs. Our benchmark results show that the compilation time performance improved by ~0.5%. Patch by Wan Xiaofei. llvm-svn: 174219
* Revert r174152. The shift amount may overflow and in that case this ↵Nadav Rotem2013-02-011-6/+0
| | | | | | transformation is illegal. llvm-svn: 174156
* Optimize shift lefts of a constant by a value plus constant into a single shift.Nadav Rotem2013-02-011-0/+6
| | | | llvm-svn: 174152
* Linker: correctly link in dbg.declareManman Ren2013-01-311-2/+17
| | | | | | | | | | | | | | | | | | | This is a re-worked version of r174048. Given source IR: call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15 we used to generate call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29 !27 = metadata !{null} With this patch, we will correctly generate call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28 Looking up %argc.addr in ValueMap will return null, since %argc.addr is already correctly set up, we can use identity mapping. rdar://problem/13089880 llvm-svn: 174093
* Revert r173946. This breaks compilation of googletest with ClangAlexey Samsonov2013-01-311-11/+2
| | | | llvm-svn: 174048
* Change GetPointerBaseWithConstantOffset's DataLayout argument from aDan Gohman2013-01-312-6/+6
| | | | | | | reference to a pointer, so that it can handle the case where DataLayout is not available and behave conservatively. llvm-svn: 174024
* Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.Bill Wendling2013-01-302-8/+10
| | | | llvm-svn: 173992
* Convert typeIncompatible to return an AttributeSet.Bill Wendling2013-01-302-6/+20
| | | | | | | There are still places which treat the Attribute object as a collection of attributes. I'm systematically removing them. llvm-svn: 173990
* Linker: correctly link in dbg.declareManman Ren2013-01-301-2/+11
| | | | | | | | | | | | | | | | Given source IR: call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15 we used to generate call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29 !27 = metadata !{null} With this patch, we will correctly generate call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28 Looking up %argc.addr in ValueMap will return null, since %argc.addr is already correctly set up, we can use identity mapping. llvm-svn: 173946
* InstCombine: canonicalize sext-and --> selectNadav Rotem2013-01-301-0/+28
| | | | | | | | sext-not-and --> select. Patch by Muhammad Tauqir Ahmad. llvm-svn: 173901
* Made certain small functions in PtrState inlined.Michael Gottesman2013-01-291-7/+7
| | | | llvm-svn: 173842
* LoopVectorize: convert TinyTripCountVectorThreshold constantPekka Jaaskelainen2013-01-291-1/+3
| | | | | | to a command line switch. llvm-svn: 173837
* Removed trailing comma in last element of enum declaration.Michael Gottesman2013-01-291-1/+1
| | | | llvm-svn: 173836
* Moved S_Stop back to its previous position in the sequence order.Michael Gottesman2013-01-291-1/+1
| | | | llvm-svn: 173834
* Fixed a few debug messages and some 80+ violations.Michael Gottesman2013-01-291-9/+10
| | | | llvm-svn: 173832
* Added some periods to some comments and added an overload for operator<< for ↵Michael Gottesman2013-01-291-6/+28
| | | | | | type Sequence so I can print out Sequences in debug statements. llvm-svn: 173831
* Changed DoesObjCBlockEscape => DoesRetainableObjPtrEscape so I can use it to ↵Michael Gottesman2013-01-291-14/+17
| | | | | | perform escape analysis of other retainable object pointers in other locations. llvm-svn: 173829
* Fixing warnings revealed by gcc release buildEdwin Vane2013-01-292-0/+2
| | | | | | | Fixed set-but-not-used warnings. Reviewer: gribozavr llvm-svn: 173810
* LoopVectorize: Clean up ValueMap a bit and avoid double lookups.Benjamin Kramer2013-01-291-10/+12
| | | | | | No intended functionality change. llvm-svn: 173809
* Hopefully fix the Windows build failure introduced in r173769Timur Iskhodzhanov2013-01-292-0/+2
| | | | llvm-svn: 173781
* Fixed 2 more header comments...Michael Gottesman2013-01-292-2/+2
| | | | llvm-svn: 173774
* Fixed header comment.Michael Gottesman2013-01-291-8/+4
| | | | llvm-svn: 173773
* Fixed some whitespace/80+ violations. Also added a space after a namespace ↵Michael Gottesman2013-01-294-6/+6
| | | | | | declaration. llvm-svn: 173772
* Added missing dashes from header declaration comment.Michael Gottesman2013-01-291-1/+1
| | | | llvm-svn: 173770
* Juggled Debug.h from ObjCARC.h to only the including cpp files thatMichael Gottesman2013-01-294-2/+7
| | | | | | | actually have DEBUG statements. Also changed raw_ostream in said header to be a forward declaration (removing an include). llvm-svn: 173769
* Sorted includes using utils/sort_includes.Michael Gottesman2013-01-298-15/+6
| | | | llvm-svn: 173767
* Added two missing headers from ObjCARCAliasAnalysis.h.Michael Gottesman2013-01-291-0/+3
| | | | | | | | This was missed since whenever I was including ObjCARCAliasAnalysis.h, I was including ObjCARC.h before it which included these includes (resulting in no compilation breakage). llvm-svn: 173764
* Removed InstCombine/Targets as library dependencies for libObjCARCOpts since ↵Michael Gottesman2013-01-291-1/+1
| | | | | | they are unnecessary. llvm-svn: 173763
* Extracted ObjCARCContract from ObjCARCOpts into its own file.Michael Gottesman2013-01-299-1181/+1387
| | | | | | | | This also required adding 2x headers Dependency Analysis.h/Provenance Analysis.h and a .cpp file DependencyAnalysis.cpp to unentangle the dependencies inbetween ObjCARCContract and ObjCARCOpts. llvm-svn: 173760
* Removed some cruft from ObjCARCAliasAnalysis.cpp.Michael Gottesman2013-01-291-10/+0
| | | | llvm-svn: 173759
OpenPOWER on IntegriCloud