- Dec 14, 2012
-
-
Nadav Rotem authored
llvm-svn: 170162
-
Nadav Rotem authored
Enable the Loop Vectorizer by default for O2 and O3. Disable if-conversion by default. I plan to revert this patch later today. llvm-svn: 170157
-
- Dec 13, 2012
-
-
NAKAMURA Takumi authored
This assumes (1 << n) is always not zero. Consider n is greater than word size. Although I know it is undefined, this transforms undefined behavior hidden. This led clang unexpected behavior with some failures. I will investigate to fix undefined shl in clang. llvm-svn: 170128
-
Eric Christopher authored
it seems to be breaking self-host for a few people and is PR14592. This reverts commit r170024. llvm-svn: 170106
-
Rafael Espindola authored
llvm-svn: 170094
-
Rafael Espindola authored
In a previous thread it was pointed out that isPowerOfTwo is not a very precise name since it can return false for powers of two if it is unable to show that they are powers of two. llvm-svn: 170093
-
Michael Ilseman authored
Provides m_Argument that allows matching against a CallSite's specified argument. Provides m_Intrinsic pattern that can be templatized over the intrinsic id and bind/match arguments similarly to other pattern matchers. Implementations provided for 0 to 4 arguments, though it's very simple to extend for more. Also provides example template specialization for bswap (m_BSwap) and example of code cleanup for its use. llvm-svn: 170091
-
Quentin Colombet authored
Better controls the inlining of functions when the caller function has MinSize attribute. Basically, when the caller function has this attribute, we do not "force" the inlining of callee functions carrying the InlineHint attribute (i.e., functions defined with inline keyword) llvm-svn: 170065
-
Nadav Rotem authored
Teach the cost model about the optimization in r169904: Truncation of induction variables costs the same as scalar trunc. llvm-svn: 170051
-
Chad Rosier authored
llvm-svn: 170050
-
- Dec 12, 2012
-
-
Michael Ilseman authored
llvm-svn: 170024
-
Michael Ilseman authored
llvm-svn: 170022
-
David Majnemer authored
llvm-svn: 170020
-
Nadav Rotem authored
llvm-svn: 170005
-
Nadav Rotem authored
LoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase the function size. llvm-svn: 170004
-
Rafael Espindola authored
been used in the first place. It simply was passed to the function and to the recursive invocations. Simply drop the parameter and update the callers for the new signature. Patch by Saleem Abdulrasool! llvm-svn: 169988
-
Alexey Samsonov authored
When ASan replaces <alloca instruction> with <offset into a common large alloca>, it should also patch llvm.dbg.declare calls and replace debug info descriptors to mark that we've replaced alloca with a value that stores an address of the user variable, not the user variable itself. See PR11818 for more context. llvm-svn: 169984
-
Nadav Rotem authored
llvm-svn: 169955
-
Nadav Rotem authored
llvm-svn: 169953
-
Nadav Rotem authored
LoopVectorizer: When -Os is used, vectorize only loops that dont require a tail loop. There is no testcase because I dont know of a way to initialize the loop vectorizer pass without adding an additional hidden flag. llvm-svn: 169950
-
Shuxin Yang authored
- Propagate "exact" bit of [l|a]shr instruction. llvm-svn: 169942
-
Michael Ilseman authored
Remove redunant optimizations from InstCombine, instead call the appropriate functions from SimplifyInstruction llvm-svn: 169941
-
- Dec 11, 2012
-
-
Nadav Rotem authored
llvm-svn: 169916
-
Nadav Rotem authored
Loop Vectorize: optimize the vectorization of trunc(induction_var). The truncation is now done on scalars. llvm-svn: 169904
-
Rafael Espindola authored
llvm-svn: 169881
-
Evgeniy Stepanov authored
Use explicitely aligned store and load instructions to deal with argument and retval shadow. This matters when an argument's alignment is higher than __msan_param_tls alignment (which is the case with __m128i). llvm-svn: 169859
-
Patrik Hagglund authored
llvm-svn: 169854
-
Patrik Hagglund authored
llvm-svn: 169840
-
Nadav Rotem authored
llvm-svn: 169813
-
- Dec 10, 2012
-
-
Nadav Rotem authored
llvm-svn: 169774
-
Nadav Rotem authored
llvm-svn: 169771
-
Bill Wendling authored
The `-mno-red-zone' flag wasn't being propagated to the functions that code coverage generates. This allowed some of them to use the red zone when that wasn't allowed. <rdar://problem/12843084> llvm-svn: 169754
-
Nadav Rotem authored
while (i--) sum+=A[i]; llvm-svn: 169752
-
Chandler Carruth authored
This visitor provides infrastructure for recursively traversing the use-graph of a pointer-producing instruction like an alloca or a malloc. It maintains a worklist of uses to visit, so it can handle very deep recursions. It automatically looks through instructions which simply translate one pointer to another (bitcasts and GEPs). It tracks the offset relative to the original pointer as long as that offset remains constant and exposes it during the visit as an APInt offset. Finally, it performs conservative escape analysis. However, currently it has some limitations that should be addressed going forward: 1) It doesn't handle vectors of pointers. 2) It doesn't provide a cheaper visitor when the constant offset tracking isn't needed. 3) It doesn't support non-instruction pointer values. The current functionality is exactly what is required to implement the SROA pointer-use visitors in terms of this one, rather than in terms of their own ad-hoc base visitor, which was always very poorly specified. SROA has been converted to use this, and the code there deleted which this utility now provides. Technically speaking, using this new visitor allows SROA to handle a few more cases than it previously did. It is now more aggressive in ignoring chains of instructions which look like they would defeat SROA, but in fact do not because they never result in a read or write of memory. While this is "neat", it shouldn't be interesting for real programs as any such chains should have been removed by others passes long before we get to SROA. As a consequence, I've not added any tests for these features -- it shouldn't be part of SROA's contract to perform such heroics. The goal is to extend the functionality of this visitor going forward, and re-use it from passes like ASan that can benefit from doing a detailed walk of the uses of a pointer. Thanks to Ben Kramer for the code review rounds and lots of help reviewing and debugging this patch. llvm-svn: 169728
-
Chandler Carruth authored
When SROA was evaluating a mixture of i1 and i8 loads and stores, in just a particular case, it would tickle a latent bug where we compared bits to bytes rather than bits to bits. As a consequence of the latent bug, we would allow integers through which were not byte-size multiples, a situation the later rewriting code was never intended to handle. In release builds this could trigger all manner of oddities, but the reported issue in PR14548 was forming invalid bitcast instructions. The only downside of this fix is that it makes it more clear that SROA in its current form is not capable of handling mixed i1 and i8 loads and stores. Sometimes with the previous code this would work by luck, but usually it would crash, so I'm not terribly worried. I'll watch the LNT numbers just to be sure. llvm-svn: 169719
-
- Dec 09, 2012
-
-
Paul Redmond authored
- added function to VectorTargetTransformInfo to query cost of intrinsics - vectorize trivially vectorizable intrinsic calls such as sin, cos, log, etc. Reviewed by: Nadav llvm-svn: 169711
-
Paul Redmond authored
llvm-svn: 169709
-
Jakub Staszak authored
No functionality change. llvm-svn: 169703
-
Jakub Staszak authored
llvm-svn: 169701
-
Chandler Carruth authored
This will more closely match the behavior of the new PtrUseVisitor that I am adding. Hopefully this will not change the actual behavior in any way, but by making the processing order more similar help in debugging. llvm-svn: 169697
-