aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Make SimplifyCFG simply depend upon TargetTransformInfo and pass itChandler Carruth2013-01-072-46/+52
| | | | | | | | | | | | | through as a reference rather than a pointer. There is always *some* implementation of this available, so this simplifies code by not having to test for whether it is available or not. Further, it turns out there were piles of places where SimplifyCFG was recursing and not passing down either TD or TTI. These are fixed to be more pedantically consistent even though I don't have any particular cases where it would matter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171691 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the enumerator names for ShuffleKind to match tho coding standards,Chandler Carruth2013-01-071-2/+2
| | | | | | and make its comments doxygen comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171688 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the popcnt support enums and methods have more clear names andChandler Carruth2013-01-071-1/+1
| | | | | | | follow the conding conventions regarding enumerating a set of "kinds" of things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171687 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetTransformInfo to live under the Analysis library. This noChandler Carruth2013-01-075-5/+5
| | | | | | | longer would violate any dependency layering and it is in fact an analysis. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171686 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjCARC Debug Message] - Added debug message when fuse a retain/autorelease ↵Michael Gottesman2013-01-071-2/+10
| | | | | | pair in ObjCARCContract::ContractAutorelease. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171679 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjCARC Debug Message] - Added debug message when we zap a matching ↵Michael Gottesman2013-01-071-0/+3
| | | | | | retain/autorelease pair in ObjCARCOpt::OptimizeReturns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171678 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjCARC Debug Message] - Added debug message when we erase ARC calls with ↵Michael Gottesman2013-01-071-0/+2
| | | | | | null since they are no-ops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171677 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjCARC Debug Message] - Added debug message when we add a nounwind keyword ↵Michael Gottesman2013-01-061-0/+2
| | | | | | to a function which can not throw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171676 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjCARC Debug Message] - Added debug message when we add a tail keyword to ↵Michael Gottesman2013-01-061-0/+3
| | | | | | a function which can never be passed stack args. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171675 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjCARC Debug Messages] - Added missing newline.Michael Gottesman2013-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171674 91177308-0d34-0410-b5e6-96231b3b80d8
* Added debug statement to ObjCARC when we replace objc_autorelease(x) with ↵Michael Gottesman2013-01-061-0/+8
| | | | | | objc_release(x) when x is otherwise unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171673 91177308-0d34-0410-b5e6-96231b3b80d8
* Added 2x Debug statements to ObjCARC that log when we handle the two ↵Michael Gottesman2013-01-061-2/+16
| | | | | | | | undefined pointer-to-weak-pointer is NULL cases by replacing the given call inst with an undefined value. The reason that there are two cases is that the first case handles the unary cases and the second the binary cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171672 91177308-0d34-0410-b5e6-96231b3b80d8
* Added debug message in ObjCARC when we remove a no-op cast which has only ↵Michael Gottesman2013-01-061-0/+2
| | | | | | special semantic meaning in the frontend and thus in the optimizer can be deleted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171670 91177308-0d34-0410-b5e6-96231b3b80d8
* Added debug message to ObjCARC when we transform an ↵Michael Gottesman2013-01-061-0/+12
| | | | | | objc_autoreleaseReturnValue => objc_autorelease due to its operand not being used as a return value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171669 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a crash in LSR replaceCongruentIVs.Andrew Trick2013-01-061-1/+1
| | | | | | | Indirect branch in the preheader crashes replaceCongruentIVs. Fixes rdar://12910141. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171653 91177308-0d34-0410-b5e6-96231b3b80d8
* Added debug message to ObjCARC when we transform ↵Michael Gottesman2013-01-051-0/+11
| | | | | | objc_retainAutorelasedReturnValue => objc_retain since the operand to said function is not a return value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171629 91177308-0d34-0410-b5e6-96231b3b80d8
* Added debug message for ObjCARC when we zap an ↵Michael Gottesman2013-01-051-0/+5
| | | | | | objc_autoreleaseReturnValue/objc_retainAutoreleasedValue pair. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171628 91177308-0d34-0410-b5e6-96231b3b80d8
* switch from pointer equality comparison to MDNode::getMostGenericTBAA Chris Lattner2013-01-053-8/+9
| | | | | | | when merging two TBAA tags, pointed out by Nuno. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171627 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the loop vectorizer from VTTI to just use TTI directly.Chandler Carruth2013-01-052-58/+54
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171620 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the BB vectorizer from the VTTI interface to the simple TTIChandler Carruth2013-01-051-41/+38
| | | | | | interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171618 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch SimplifyCFG over to the TargetTransformInfo interface rather thanChandler Carruth2013-01-051-4/+2
| | | | | | the ScalarTargetTransformInfo interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171617 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch LoopIdiomRecognize to directly use the TargetTransformInfoChandler Carruth2013-01-051-11/+9
| | | | | | interface rather than the ScalarTargetTransformInterface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171616 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink the AddressingModeMatcher helper class into an anonymous namespaceChandler Carruth2013-01-053-579/+623
| | | | | | | | | | | | next to its only user. This helper relies on TargetLowering information that shouldn't be generally used throughout the Transfoms library, and so it made little sense as a generic utility. This also consolidates the file where we need to remove the remaining uses of TargetLowering in favor of the IR-layer abstract interface in TargetTransformInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171590 91177308-0d34-0410-b5e6-96231b3b80d8
* iLoopVectorize: Non commutative operators can be used as reduction variables ↵Nadav Rotem2013-01-051-4/+13
| | | | | | | | | | as long as the reduction chain is used in the LHS. PR14803. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171583 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not vectorize loops with subtraction reductionsPaul Redmond2013-01-041-1/+0
| | | | | | | | | | Since subtraction does not commute the loop vectorizer incorrectly vectorizes reductions such as x = A[i] - x. Disabling for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171537 91177308-0d34-0410-b5e6-96231b3b80d8
* Added DEBUG message to ObjCARC when we optimize objc_retain => ↵Michael Gottesman2013-01-041-0/+10
| | | | | | objc_retainAutorelasedReturnValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171535 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed up some DEBUG messages where I was putting in the text of a message ↵Michael Gottesman2013-01-041-8/+8
| | | | | | | | the method where it was being called when I should have just prefixed the actual message with Pass::Method. Additionally I fixed some whitespace issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171534 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a warningNadav Rotem2013-01-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171525 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the loop vectorizer from O2 to O3. It looks like the increase in code ↵Nadav Rotem2013-01-041-1/+1
| | | | | | size actually hurts the performance on many programs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171471 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorizer:Nadav Rotem2013-01-042-8/+190
| | | | | | | | | | 1. Add code to estimate register pressure. 2. Add code to select the unroll factor based on register pressure. 3. Add bits to TargetTransformInfo to provide the number of registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171469 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed two debug statements that state that a queue had finished being ↵Michael Gottesman2013-01-031-2/+2
| | | | | | processed when said queue was really a list to state a list had finished being processed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171465 91177308-0d34-0410-b5e6-96231b3b80d8
* Added DEBUG message for ObjCARC when we zap a push/pop pair in ↵Michael Gottesman2013-01-031-0/+3
| | | | | | ObjCARCAPElim::OptimizeBB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171464 91177308-0d34-0410-b5e6-96231b3b80d8
* Added DEBUG message to ObjCARC when we transform objc_initWeak(p, null) => ↵Michael Gottesman2013-01-031-0/+4
| | | | | | *p = null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171463 91177308-0d34-0410-b5e6-96231b3b80d8
* Added DEBUG message for ObjCARC when an inline asm marker is inserted for ↵Michael Gottesman2013-01-031-0/+2
| | | | | | architectures where this is required to perform a retainAutoreleasedReturnValue optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171462 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorizer: Add support for loop-unrolling during vectorization for ↵Nadav Rotem2013-01-032-169/+329
| | | | | | increasing the ILP. At the moment this feature is disabled by default and this commit should not cause any functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171436 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid vectorization when the function has the "noimplicitflot" attribute.Nadav Rotem2013-01-021-3/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171429 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add comment to two functions which might be considered as dead code. Shuxin Yang2013-01-021-2/+4
| | | | | | | - Fix a typo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171399 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually update the CMake and Makefile builds correctly, and update theChandler Carruth2013-01-021-1/+1
| | | | | | | | | | code that includes Intrinsics.gen directly. This never showed up in my testing because the old Intrinsics.gen was still kicking around in the make build system and was correct there. =[ Thankfully, some of the bots to clean rebuilds and that caught this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171373 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02110-468/+468
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Resort the #include lines in include/... and lib/... with theChandler Carruth2013-01-023-3/+3
| | | | | | | | | | utils/sort_includes.py script. Most of these are updating the new R600 target and fixing up a few regressions that have creeped in since the last time I sorted the includes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171362 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IRBuilder::CreateVectorSplat and use it to simplify code.Benjamin Kramer2013-01-012-24/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171349 91177308-0d34-0410-b5e6-96231b3b80d8
* SROA: Clean up unused assignment warnings from clang's analyzer.Benjamin Kramer2013-01-011-5/+4
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171348 91177308-0d34-0410-b5e6-96231b3b80d8
* Added DEBUG message when ObjCARC replaces a call which returns its argument ↵Michael Gottesman2013-01-011-2/+6
| | | | | | | | | | | verbatim with its argument to temporarily undo an optimization. Specifically these calls return their argument verbatim, as a low-level optimization. However, this makes high-level optimizations harder. We undo any uses of this optimization that the front-end emitted. We redo them later in the contract pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171346 91177308-0d34-0410-b5e6-96231b3b80d8
* Added DEBUG messages to the top of several processing loops in ObjCARC.cpp ↵Michael Gottesman2013-01-011-3/+32
| | | | | | | | | that emit what instructions are being visited. This is a part of a larger effort of adding DEBUG messages to the ARC Optimizer Backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171345 91177308-0d34-0410-b5e6-96231b3b80d8
* Add extra CHECK to make sure that 'or' instruction was replaced.Jakub Staszak2012-12-311-0/+2
| | | | | | | Also add an assert to avoid confusion in the code where is known that C1 <= C2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171310 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix LICM's memory promotion optimization to preserve TBAA tags whenChris Lattner2012-12-311-6/+18
| | | | | | | | promoting a store in a loop. This was noticed when working on PR14753, but isn't directly related. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171281 91177308-0d34-0410-b5e6-96231b3b80d8
* teach instcombine to preserve TBAA tag when merging two stores, part ofChris Lattner2012-12-311-0/+7
| | | | | | | PR14753 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171279 91177308-0d34-0410-b5e6-96231b3b80d8
* Grammo.Jakub Staszak2012-12-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171272 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the getAttributesAtIndex and getNumAttrs methods in favor of using ↵Bill Wendling2012-12-311-3/+2
| | | | | | the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171271 91177308-0d34-0410-b5e6-96231b3b80d8
* Transform (A == C1 || A == C2) into (A & ~(C1 ^ C2)) == C1Jakub Staszak2012-12-311-0/+12
| | | | | | | | if C1 and C2 differ only with one bit. Fixes PR14708. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171270 91177308-0d34-0410-b5e6-96231b3b80d8