Commit Graph

9775 Commits

Author SHA1 Message Date
Chandler Carruth
bb00800ff4 Fix the enumerator names for ShuffleKind to match tho coding standards,
and make its comments doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171688 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 03:20:02 +00:00
Chandler Carruth
d1b8ef97c4 Make the popcnt support enums and methods have more clear names and
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
2013-01-07 03:16:03 +00:00
Chandler Carruth
be04929f7f Move TargetTransformInfo to live under the Analysis library. This no
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
2013-01-07 03:08:10 +00:00
Michael Gottesman
916d52a03e [ObjCARC Debug Message] - Added debug message when fuse a retain/autorelease pair in ObjCARCContract::ContractAutorelease.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171679 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 00:31:26 +00:00
Michael Gottesman
f93109a9b6 [ObjCARC Debug Message] - Added debug message when we zap a matching retain/autorelease pair in ObjCARCOpt::OptimizeReturns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 00:04:56 +00:00
Michael Gottesman
fbe4d6b1fa [ObjCARC Debug Message] - Added debug message when we erase ARC calls with null since they are no-ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171677 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 00:04:52 +00:00
Michael Gottesman
38bc25a52e [ObjCARC Debug Message] - Added debug message when we add a nounwind keyword to a function which can not throw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171676 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-06 23:39:13 +00:00
Michael Gottesman
817d4e942b [ObjCARC Debug Message] - Added debug message when we add a tail keyword to 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
2013-01-06 23:39:09 +00:00
Michael Gottesman
795612702e [ObjCARC Debug Messages] - Added missing newline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171674 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-06 22:56:54 +00:00
Michael Gottesman
20d9fff206 Added debug statement to ObjCARC when we replace objc_autorelease(x) with 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
2013-01-06 22:56:50 +00:00
Michael Gottesman
e549492c36 Added 2x Debug statements to ObjCARC that log when we handle the two 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
2013-01-06 21:54:30 +00:00
Michael Gottesman
4680abec92 Added debug message in ObjCARC when we remove a no-op cast which has only 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
2013-01-06 21:07:15 +00:00
Michael Gottesman
48239c753a Added debug message to ObjCARC when we transform an 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
2013-01-06 21:07:11 +00:00
Andrew Trick
c6b4936a59 Fix a crash in LSR replaceCongruentIVs.
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
2013-01-06 05:59:39 +00:00
Michael Gottesman
36e4bc406c Added debug message to ObjCARC when we transform 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
2013-01-05 17:55:42 +00:00
Michael Gottesman
87a0f02953 Added debug message for ObjCARC when we zap an objc_autoreleaseReturnValue/objc_retainAutoreleasedValue pair.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171628 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 17:55:35 +00:00
Chris Lattner
261304248f switch from pointer equality comparison to MDNode::getMostGenericTBAA
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
2013-01-05 16:44:07 +00:00
Chandler Carruth
be73c7b903 Switch the loop vectorizer from VTTI to just use TTI directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171620 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 10:16:02 +00:00
Chandler Carruth
abc227d9b3 Switch the BB vectorizer from the VTTI interface to the simple TTI
interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171618 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 10:05:28 +00:00
Chandler Carruth
b8f6cb7c49 Switch SimplifyCFG over to the TargetTransformInfo interface rather than
the ScalarTargetTransformInfo interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171617 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 10:05:26 +00:00
Chandler Carruth
9980b8a0bd Switch LoopIdiomRecognize to directly use the TargetTransformInfo
interface rather than the ScalarTargetTransformInterface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171616 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 10:00:09 +00:00
Chandler Carruth
b1a429fd1c Sink the AddressingModeMatcher helper class into an anonymous namespace
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
2013-01-05 02:09:22 +00:00
Nadav Rotem
d5b92c3891 iLoopVectorize: Non commutative operators can be used as reduction variables 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
2013-01-05 01:15:47 +00:00
Paul Redmond
5767d91956 Do not vectorize loops with subtraction reductions
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
2013-01-04 22:10:16 +00:00
Michael Gottesman
715f6a62a1 Added DEBUG message to ObjCARC when we optimize objc_retain => objc_retainAutorelasedReturnValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171535 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 21:30:38 +00:00
Michael Gottesman
5c0ae4727f Fixed up some DEBUG messages where I was putting in the text of a message 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
2013-01-04 21:29:57 +00:00
Nadav Rotem
608467d1e1 Fix a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 21:08:44 +00:00
Nadav Rotem
b7c772922e Move the loop vectorizer from O2 to O3. It looks like the increase in code 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
2013-01-04 17:57:44 +00:00
Nadav Rotem
e503319874 LoopVectorizer:
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
2013-01-04 17:48:25 +00:00
Michael Gottesman
ec21e2a05f Changed two debug statements that state that a queue had finished being 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
2013-01-03 08:09:27 +00:00
Michael Gottesman
df379f4ef4 Added DEBUG message for ObjCARC when we zap a push/pop pair in ObjCARCAPElim::OptimizeBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 08:09:17 +00:00
Michael Gottesman
1ebbdcfa1f Added DEBUG message to ObjCARC when we transform objc_initWeak(p, null) => *p = null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171463 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 07:32:53 +00:00
Michael Gottesman
50652cd89b Added DEBUG message for ObjCARC when an inline asm marker is inserted for 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
2013-01-03 07:32:41 +00:00
Nadav Rotem
e4159491a7 LoopVectorizer: Add support for loop-unrolling during vectorization for 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
2013-01-03 00:52:27 +00:00
Nadav Rotem
00a6bcaeb4 Avoid vectorization when the function has the "noimplicitflot" attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171429 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02 23:54:43 +00:00
Shuxin Yang
cbf5373603 - Add comment to two functions which might be considered as dead code.
- Fix a typo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171399 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02 18:26:31 +00:00
Chandler Carruth
351ba145a7 Actually update the CMake and Makefile builds correctly, and update the
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
2013-01-02 12:09:16 +00:00
Chandler Carruth
0b8c9a80f2 Move all of the header files which are involved in modelling the LLVM IR
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
2013-01-02 11:36:10 +00:00
Chandler Carruth
58a2cbef4a Resort the #include lines in include/... and lib/... with the
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
2013-01-02 10:22:59 +00:00
Benjamin Kramer
6c30749583 Add IRBuilder::CreateVectorSplat and use it to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171349 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-01 19:55:16 +00:00
Benjamin Kramer
0ea4c3d8c0 SROA: Clean up unused assignment warnings from clang's analyzer.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171348 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-01 16:13:35 +00:00
Michael Gottesman
a6e23cc535 Added DEBUG message when ObjCARC replaces a call which returns its argument 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
2013-01-01 16:05:54 +00:00
Michael Gottesman
8f22c8b5e1 Added DEBUG messages to the top of several processing loops in ObjCARC.cpp 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
2013-01-01 16:05:48 +00:00
Jakub Staszak
526057921d Add extra CHECK to make sure that 'or' instruction was replaced.
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
2012-12-31 18:26:42 +00:00
Chris Lattner
503fc1c488 Fix LICM's memory promotion optimization to preserve TBAA tags when
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
2012-12-31 08:37:17 +00:00
Chris Lattner
240b9b1d80 teach instcombine to preserve TBAA tag when merging two stores, part of
PR14753


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171279 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 08:10:58 +00:00
Jakub Staszak
b6d9c4181a Grammo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171272 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 01:40:44 +00:00
Bill Wendling
9d30e7208e Remove the getAttributesAtIndex and getNumAttrs methods in favor of using 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
2012-12-31 00:49:59 +00:00
Jakub Staszak
d60b8ac64f Transform (A == C1 || A == C2) into (A & ~(C1 ^ C2)) == C1
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
2012-12-31 00:34:55 +00:00
Nuno Lopes
98281a2050 convert a bunch of callers from DataLayout::getIndexedOffset() to GEP::accumulateConstantOffset().
The later API is nicer than the former, and is correct regarding wrap-around offsets (if anyone cares).
There are a few more places left with duplicated code, which I'll remove soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171259 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-30 16:25:48 +00:00