- Oct 02, 2013
-
-
Chandler Carruth authored
infrastructure. This was essentially work toward PGO based on a design that had several flaws, partially dating from a time when LLVM had a different architecture, and with an effort to modernize it abandoned without being completed. Since then, it has bitrotted for several years further. The result is nearly unusable, and isn't helping any of the modern PGO efforts. Instead, it is getting in the way, adding confusion about PGO in LLVM and distracting everyone with maintenance on essentially dead code. Removing it paves the way for modern efforts around PGO. Among other effects, this removes the last of the runtime libraries from LLVM. Those are being developed in the separate 'compiler-rt' project now, with somewhat different licensing specifically more approriate for runtimes. llvm-svn: 191835
-
Alexey Samsonov authored
Summary: As discussed in http://llvm-reviews.chandlerc.com/D1754, this optimization isn't really valid for C, and fires too rarely anyway. Reviewers: rafael, nicholas Reviewed By: nicholas CC: rnk, llvm-commits, nicholas Differential Revision: http://llvm-reviews.chandlerc.com/D1769 llvm-svn: 191834
-
- Oct 01, 2013
-
-
Matt Arsenault authored
It's silly to merge functions like these: define void @foo(i32 %x) { ret void } define void @bar(i32 %x) { ret void } to get define void @bar(i32) { tail call void @foo(i32 %0) ret void } llvm-svn: 191786
-
Rafael Espindola authored
Patch by Alp Toker. llvm-svn: 191757
-
Matt Arsenault authored
llvm-svn: 191716
-
- Sep 30, 2013
-
-
Matt Arsenault authored
The test's output doesn't change, but this ensures this is actually hit with a different address space. llvm-svn: 191701
-
Matt Arsenault authored
llvm-svn: 191699
-
Benjamin Kramer authored
llvm-svn: 191676
-
Benjamin Kramer authored
llvm-svn: 191675
-
Benjamin Kramer authored
Defines away the issue where cast<Instruction> would fail because constant folding happened. Also slightly cleaner. llvm-svn: 191674
-
Benjamin Kramer authored
Inspired by the object from the SLPVectorizer. This found a minor bug in the debug loc restoration in the vectorizer where the location of a following instruction was attached instead of the location from the original instruction. llvm-svn: 191673
-
Joey Gouly authored
when it was actually a Constant*. There are quite a few other casts to Instruction that might have the same problem, but this is the only one I have a test case for. llvm-svn: 191668
-
- Sep 28, 2013
-
-
Robert Wilhelm authored
llvm-svn: 191611
-
Robert Wilhelm authored
llvm-svn: 191610
-
Matt Arsenault authored
llvm-svn: 191576
-
Matt Arsenault authored
llvm-svn: 191574
-
- Sep 27, 2013
-
-
Matt Arsenault authored
llvm-svn: 191564
-
Justin Bogner authored
Currently foldSelectICmpAndOr asserts if the "or" involves a vector containing several of the same power of two. We can easily avoid this by only performing the fold on integer types, like foldSelectICmpAnd does. Fixes <rdar://problem/15012516> llvm-svn: 191552
-
Justin Bogner authored
We were previously using getFirstInsertionPt to insert PHI instructions when vectorizing, but getFirstInsertionPt also skips past landingpads, causing this to generate invalid IR. We can avoid this issue by using getFirstNonPHI instead. llvm-svn: 191526
-
Puyan Lotfi authored
llvm-svn: 191491
-
- Sep 25, 2013
-
-
Arnold Schwaighofer authored
Put them under a separate flag for experimentation. They are more likely to interfere with loop vectorization which happens later in the pass pipeline. llvm-svn: 191371
-
Evgeniy Stepanov authored
llvm-svn: 191361
-
- Sep 24, 2013
-
-
Yi Jiang authored
llvm-svn: 191314
-
Benjamin Kramer authored
llvm-svn: 191309
-
Evgeniy Stepanov authored
llvm-svn: 191287
-
- Sep 23, 2013
-
-
Arnold Schwaighofer authored
Revert 191122 - with extra checks we are allowed to vectorize math library function calls. Standard library indentifiers are reserved names so functions with external linkage must not overrided them. However, functions with internal linkage can. Therefore, we can vectorize calls to math library functions with a check for external linkage and matching signature. This matches what we do during SelectionDAG building. llvm-svn: 191206
-
- Sep 22, 2013
-
-
Benjamin Kramer authored
This makes using array_pod_sort significantly safer. The implementation relies on function pointer casting but that should be safe as we're dealing with void* here. llvm-svn: 191175
-
Benjamin Kramer authored
llvm-svn: 191172
-
- Sep 21, 2013
-
-
Benjamin Kramer authored
SROA wants to convert any types of equivalent widths but it's not possible to convert vectors of pointers to an integer scalar with a single cast. As a workaround we add a bitcast to the corresponding int ptr type first. This type of cast used to be an edge case but has become common with SLP vectorization. Fixes PR17271. llvm-svn: 191143
-
Arnold Schwaighofer authored
llvm-svn: 191135
-
Arnold Schwaighofer authored
Reapply r191108 with a fix for a memory corruption error I introduced. Of course, we can't reference the scalars that we replace by vectorizing and then call their eraseFromParent method. I only 'needed' the scalars to get the DebugLoc. Just store the DebugLoc before actually vectorizing instead. As a nice side effect, this also simplifies the interface between BoUpSLP and the HorizontalReduction class to returning a value pointer (the vectorized tree root). radar://14607682 llvm-svn: 191123
-
Nadav Rotem authored
LoopVectorizer: Only allow vectorization of intrinsics. We can't know for sure that the functions 'abs' or 'round' are the functions from libm. rdar://15012650 llvm-svn: 191122
-
Arnold Schwaighofer authored
This reverts commit r191108. The horizontal.ll test case fails under libgmalloc. Thanks Shuxin for pointing this out to me. llvm-svn: 191121
-
Shuxin Yang authored
The problem of r191017 is that when GVN fabricate a val-number for a dead instruction (in order to make following expr-PRE happy), it forget to fabricate a leader-table entry for it as well. llvm-svn: 191118
-
Benjamin Kramer authored
llvm-svn: 191112
-
- Sep 20, 2013
-
-
Arnold Schwaighofer authored
Match reductions starting at binary operation feeding into a phi. The code handles trees like r += v1 + v2 + v3 ... and r += v1 r += v2 ... and r *= v1 + v2 + ... We currently only handle associative operations (add, fadd fast). The code can now also handle reductions feeding into stores. a[i] = v1 + v2 + v3 + ... The code is currently disabled behind the flag "-slp-vectorize-hor". The cost model for most architectures is not there yet. I found one opportunity of a horizontal reduction feeding a phi in TSVC (LoopRerolling-flt) and there are several opportunities where reductions feed into stores. radar://14607682 llvm-svn: 191108
-
Joerg Sonnenberger authored
llvm-svn: 191104
-
Benjamin Kramer authored
The GEP pattern is what SCEV expander emits for "ugly geps". The latter is what you get for pointer subtraction in C code. The rest of instcombine already knows how to deal with that so just canonicalize on that. llvm-svn: 191090
-
- Sep 19, 2013
-
-
Shuxin Yang authored
If "C1/X" were having multiple uses, the only benefit of this transformation is to potentially shorten critical path. But it is at the cost of instroducing additional div. The additional div may or may not incur cost depending on how div is implemented. If it is implemented using Newton–Raphson iteration, it dosen't seem to incur any cost (FIXME). However, if the div blocks the entire pipeline, that sounds to be pretty expensive. Let CodeGen to take care this transformation. This patch sees 6% on a benchmark. rdar://15032743 llvm-svn: 191037
-
Benjamin Kramer authored
The code below can't handle any pointers. PR17293. llvm-svn: 191036
-