summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* SLP Vectorizer: Implement multi-block slp-vectorization.Nadav Rotem2013-06-224-1355/+1160
| | | | | | | | | Rewrote the SLP-vectorization as a whole-function vectorization pass. It is now able to vectorize chains across multiple basic blocks. It still does not vectorize PHIs, but this should be easy to do now that we scan the entire function. I removed the support for extracting values from trees. We are now able to vectorize more programs, but there are some serious regressions in many workloads (such as flops-6 and mandel-2). llvm-svn: 184647
* Revert "FunctionAttrs: Merge attributes once instead of doing it for every ↵Benjamin Kramer2013-06-221-46/+32
| | | | | | | | argument." It doesn't work as I intended it to. This reverts commit r184638. llvm-svn: 184641
* FunctionAttrs: Merge attributes once instead of doing it for every argument.Benjamin Kramer2013-06-221-32/+46
| | | | | | It has become an expensive operation. No functionality change. llvm-svn: 184638
* [objc-arc-opts] Make IsTrackingImpreciseReleases a const method.Michael Gottesman2013-06-211-1/+1
| | | | | | Thanks to Bill Wendling for pointing this out! llvm-svn: 184593
* [objc-arc-opts] Now that PtrState.RRI is encapsulated in PtrState, make ↵Michael Gottesman2013-06-211-5/+7
| | | | | | PtrState.RRI private and delete the TODO. llvm-svn: 184587
* [objc-arc-opts] Encapsulated PtrState.RRI.{Calls,ReverseInsertPts} into ↵Michael Gottesman2013-06-211-12/+28
| | | | | | several methods on PtrState. llvm-svn: 184586
* [objcarcopts] Encapsulated PtrState.RRI.IsTrackingImpreciseRelease() => ↵Michael Gottesman2013-06-211-4/+5
| | | | | | PtrState.IsTrackingImpreciseRelease(). llvm-svn: 184583
* [objcarcopts] Encapsulate PtrState.RRI.CFGHazardAfflicted via methods ↵Michael Gottesman2013-06-211-2/+10
| | | | | | PtrState.{IsCFGHazardAfflicted,SetCFGHazardAfflicted}. llvm-svn: 184582
* [objcarcopts] Encapsulate PtrState.RRI.ReleaseMetadata into the methods ↵Michael Gottesman2013-06-211-2/+10
| | | | | | PtrState.GetReleaseMetadata() and PtrState.SetReleaseMetadata(). llvm-svn: 184534
* [objcarcopts] Encapsulate PtrState.RRI.IsTailCallRelease into the method ↵Michael Gottesman2013-06-211-2/+10
| | | | | | PtrState.IsTailCallRelease() and PtrState.SetTailCallRelease(). llvm-svn: 184533
* [obcjarcopts] Encapsulate PtrState.RRI.KnownSafe in the methods ↵Michael Gottesman2013-06-211-6/+15
| | | | | | | | | | | | PtrState.IsKnownSafe and PtrState.SetKnownSafe. This is apart of a series of patches to encapsulate PtrState.RRI and make PtrState.RRI a private field of PtrState. *NOTE* This is actually the second commit in the patch stream. I should have put this note on the first such commit r184528. llvm-svn: 184532
* [objcarcopts] Some more minor code cleanups/comment additions.Michael Gottesman2013-06-211-1/+5
| | | | llvm-svn: 184531
* [objcarcopts] Refactor out the RRInfo merging code from PtrState into ↵Michael Gottesman2013-06-211-17/+28
| | | | | | | | RRInfo::Merge. I also added some comments and performed minor code cleanups. llvm-svn: 184528
* SLP Vectorizer: do not search for store-chains that are wider than the ↵Nadav Rotem2013-06-211-2/+4
| | | | | | vector-register size. llvm-svn: 184527
* Remove the simplify-libcalls pass (finally)Meador Inge2013-06-205-255/+52
| | | | | | | | | | | This commit completely removes what is left of the simplify-libcalls pass. All of the functionality has now been migrated to the instcombine and functionattrs passes. The following C API functions are now NOPs: 1. LLVMAddSimplifyLibCallsPass 2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls llvm-svn: 184459
* Clang-format the SLP vectorizer. No functionality change.Nadav Rotem2013-06-203-202/+259
| | | | llvm-svn: 184446
* SLPVectorization: Add a basic support for cross-basic block slp vectorization.Nadav Rotem2013-06-203-13/+80
| | | | | | | We collect gather sequences when we vectorize basic blocks. Gather sequences are excellent hints for vectorization of other basic blocks. llvm-svn: 184444
* Change the debug type to match the debug type that is used by vecutils.cpp.Nadav Rotem2013-06-201-1/+1
| | | | | | This change makes it easier to filter debug messages. llvm-svn: 184440
* [APFloat] Converted all references to APFloat::isNormal => ↵Michael Gottesman2013-06-192-10/+10
| | | | | | | | APFloat::isFiniteNonZero. Turns out all the references were in llvm and not in clang. llvm-svn: 184356
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-193-22/+22
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184352
* Move StructurizeCFG out of R600 to generic Transforms.Matt Arsenault2013-06-193-0/+881
| | | | | | Register it with PassManager llvm-svn: 184343
* LSR: Fix the parameters used to compute the scaling factor cost.Quentin Colombet2013-06-191-5/+13
| | | | | | | | | | | | | Prior to this change, the considered addressing modes may be invalid since the maximum and minimum offsets were not taking into account. This was causing an assertion failure. The added test case exercices that behavior. <rdar://problem/14199725> Assertion failed: (CurScaleCost >= 0 && "Legal addressing mode has an illegal cost!") llvm-svn: 184341
* SLPVectorizer: handle scalars that are extracted from vectors (using ↵Nadav Rotem2013-06-191-0/+44
| | | | | | ExtractElementInst). llvm-svn: 184325
* SLPVectorizer: start constructing chains at stores that are not power of two.Nadav Rotem2013-06-191-3/+17
| | | | | | | | The type <3 x i8> is a common in graphics and we want to be able to vectorize it. This changes accelerates bullet by 12% and 471_omnetpp by 5%. llvm-svn: 184317
* SLPVectorizer: vectorize compares and selects.Nadav Rotem2013-06-191-3/+75
| | | | llvm-svn: 184282
* Document the return value and fix a typo.Nadav Rotem2013-06-191-1/+2
| | | | llvm-svn: 184281
* Scan the successor blocks and use the PHI nodes as a hint for possible chain ↵Nadav Rotem2013-06-181-6/+40
| | | | | | roots. llvm-svn: 184201
* Add a return value to make this function more useful.Nadav Rotem2013-06-182-2/+4
| | | | llvm-svn: 184200
* Fix nondeterminism in .gcno file generation.Nick Lewycky2013-06-181-9/+25
| | | | llvm-svn: 184174
* Fix for a regression caused by the LoopVectorizer whenPekka Jaaskelainen2013-06-171-3/+3
| | | | | | | vectorizing loops with memory accesses to non-zero address spaces. It simply dropped the AS info. Fixes PR16306. llvm-svn: 184103
* Disable vectorization for -Oz.Nadav Rotem2013-06-171-1/+1
| | | | llvm-svn: 184089
* Enable the loop vectorizer by default for -Os and -O2.Nadav Rotem2013-06-171-7/+1
| | | | llvm-svn: 184084
* Use 0 instead of NULL.Jakub Staszak2013-06-151-5/+5
| | | | llvm-svn: 184044
* PruneEH: Only merge attribute sets when used. No functionality change.Benjamin Kramer2013-06-151-7/+5
| | | | llvm-svn: 184041
* Fix DeleteDeadVarargs not to crash on functions referenced by BlockAddressesDerek Schuff2013-06-131-2/+9
| | | | | | | | | | | | | | | This pass was assuming that if hasAddressTaken() returns false for a function, the function's only uses are call sites. That's not true because there can be references by BlockAddresses too. Fix the pass to handle this case. Fix BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type to be changed by RAUW'ing the function with a bitcast of the recreated function. Patch by Mark Seaborn. llvm-svn: 183933
* Always remove an alias when we rename the target.Rafael Espindola2013-06-121-3/+1
| | | | | | Should fix the dragonegg build bots. llvm-svn: 183845
* Move PathV2.h to Path.hRafael Espindola2013-06-111-1/+1
| | | | | | | Most clients have already been moved from Path V1 to V2. The ones using V1 now include PathV1.h explicitly. llvm-svn: 183801
* Change how globalopt handles aliases in llvm.used.Rafael Espindola2013-06-111-100/+156
| | | | | | | | | | | | | | | | | | | | | | | | Instead of a custom implementation of replaceAllUsesWith, we just call replaceAllUsesWith and recreate llvm.used and llvm.compiler-used. This change is particularity interesting because it makes llvm see through what clang is doing with static used functions in extern "C" contexts. With this change, running clang -O2 in extern "C" { __attribute__((used)) static void foo() {} } produces @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata" define internal void @foo() #0 { entry: ret void } llvm-svn: 183756
* Make DeadArgumentElimination more conservative on variadic functionsTim Northover2013-06-091-5/+17
| | | | | | | Variadic functions are particularly fragile in the face of ABI changes, so this limits how much the pass changes them llvm-svn: 183625
* Fix a potential bug in r183584.Shuxin Yang2013-06-081-4/+8
| | | | | | | | | | | | | r183584 tries to derive some info from the code *AFTER* a call and apply these derived info to the code *BEFORE* the call, which is not always safe as the call in question may never return, and in this case, the derived info is invalid. Thank Duncan for pointing out this potential bug. rdar://14073661 llvm-svn: 183606
* Fix an assertion in MemCpyOpt pass.Shuxin Yang2013-06-071-2/+4
| | | | | | | | | | | | | | | | | | | | | The MemCpyOpt pass is capable of optimizing: callee(&S); copy N bytes from S to D. into: callee(&D); subject to some legality constraints. Assertion is triggered when the compiler tries to evalute "sizeof(typeof(D))", while D is an opaque-typed, 'sret' formal argument of function being compiled. i.e. the signature of the func being compiled is something like this: T caller(...,%opaque* noalias nocapture sret %D, ...) The fix is that when come across such situation, instead of calling some utility functions to get the size of D's type (which will crash), we simply assume D has at least N bytes as implified by the copy-instruction. rdar://14073661 llvm-svn: 183584
* [objc-arc] Ensure that the cfg path count does not overflow when we multiply ↵Michael Gottesman2013-06-071-10/+38
| | | | | | | | TopDownPathCount/BottomUpPathCount. rdar://12480535 llvm-svn: 183489
* Simplify code. No functionality change.Jakub Staszak2013-06-061-2/+1
| | | | llvm-svn: 183461
* Jeffrey Yasskin volunteered to benchmark the vectorizer on -O2 or -Os when ↵Nadav Rotem2013-06-061-1/+7
| | | | | | compiling chrome. This patch adds a new flag to enable vectorization on all levels and not only on -O3. It should go away once we make a decision. llvm-svn: 183456
* Re-apply "Use IRBuilder instead of ConstantInt methods." with the fixed issues.Jakub Staszak2013-06-061-68/+55
| | | | llvm-svn: 183439
* Revert "Use IRBuilder instead of ConstantInt methods. It simplifies code a ↵Rafael Espindola2013-06-061-56/+70
| | | | | | | | little bit." This reverts commit 183328. It caused pr16244 and broke the bots. llvm-svn: 183422
* Remove unneeded cast<>.Jakub Staszak2013-06-061-2/+2
| | | | llvm-svn: 183363
* Use IRBuilder instead of ConstantInt methods.Jakub Staszak2013-06-061-27/+17
| | | | llvm-svn: 183360
* Use IRBuilder instead of ConstantInt methods. It simplifies code a little bit.Jakub Staszak2013-06-051-70/+56
| | | | llvm-svn: 183328
* IndVarSimplify: check if loop invariant expansion can trapDavid Majnemer2013-06-041-1/+1
| | | | | | | | | | | | | | | IndVarSimplify is willing to move divide instructions outside of their loop bodies if they are invariant of the loop. However, it may not be safe to expand them if we do not know if they can trap. Instead, check to see if it is not safe to expand the instruction and skip the expansion. This fixes PR16041. Testcase by Rafael Ávila de Espíndola. llvm-svn: 183239
OpenPOWER on IntegriCloud