Displaying 20 results from an estimated 118 matches for "instsimplify".
2017 Apr 17
2
InstSimplify and computeKnownBits
Today, InstSimplify calls computeKnownBits to try to fold to a constant
ONLY if it can't find any other simplifications for an instruction.
I think this means if we are able to find an earlier simplification we are
LESS aggressive about creating a constant because we won't even look at
known bits. This seems...
2011 Jan 20
1
[LLVMdev] [llvm-commits] [llvm] r123754 - in /llvm/trunk: lib/Analysis/InstructionSimplify.cpp test/Transforms/InstSimplify/2010-12-20-Distribute.ll
...king because building a tool to generate the instruction simplifier
> automatically is relatively high on my TODO list and I don't want to duplicate
> work :)
The auto-simplifier is a very simple kind of super-optimizer. It tries to find
optimizations suitable for InstructionSimplify [instsimplify]. The difference
between instsimplify and instcombine is that instcombine is allowed to create
new instructions while instsimplify needs to simplify expressions to already
existing subexpressions present inside the existing expression. For example
instsimplify can turn this
(X + Y) - X
into...
2011 Dec 02
5
[LLVMdev] Passes propose passes
...rying to find a solution for this bug
http://llvm.org/bugs/show_bug.cgi?id=11235 ,
I came to the conclusion that the following things can happen while
optimizing:
- after gvn, I get new constants which are inserted into br and
add/sum/..., so there should be at least one more jump-threading and/or
instsimplify
- after instsimplify, I get new constants which are inserted into br, so
there should be one more jump-threading pass
- after jump-threading, new bigger blocks occur with redundant loads which
need an other gvn pass
At least for -O3 we will need those optimizations.
Is there a kind of "I ne...
2017 Jul 13
2
failing to optimize boolean ops on cmps
This can't be an instsimplify though? The values we want in these cases do
not exist already:
%res = or i8 %b, %a
%res = or i1 %cmp, %c
On Thu, Jul 13, 2017 at 5:10 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
>
>
> On Thu, Jul 13, 2017 at 2:12 PM, Sanjay Patel <spatel at rotateright.com>
>...
2019 Jan 31
6
[RFC] Vector Predication
...vm.org/D57504
The prototype demonstrates:
- Predicated vector intrinsics with an explicit mask and vector length
parameter on IR level.
- First-class predicated SDNodes on ISel level. Mask and vector length
are value operands.
- An incremental strategy to generalize
PatternMatch/InstCombine/InstSimplify and DAGCombiner to work on both
regular instructions and EVL intrinsics.
- DAGCombiner example: FMA fusion.
- InstCombine/InstSimplify example: FSub pattern re-writes.
- Early experiments on the LNT test suite (Clang static release, O3
-ffast-math) indicate that compile time on non-EVL IR is n...
2011 Dec 02
0
[LLVMdev] Passes propose passes
...his bug
> http://llvm.org/bugs/show_bug.cgi?id=11235 ,
> I came to the conclusion that the following things can happen while
> optimizing:
> - after gvn, I get new constants which are inserted into br and
> add/sum/..., so there should be at least one more jump-threading and/or
> instsimplify
> - after instsimplify, I get new constants which are inserted into br, so
> there should be one more jump-threading pass
> - after jump-threading, new bigger blocks occur with redundant loads which
> need an other gvn pass
>
> At least for -O3 we will need those optimizations....
2011 Mar 09
1
[LLVMdev] Is InstructionSimplify still a good place to contribute?
I'm looking for some opportunities to contribute to the LLVM core without
too big of a learning curve. The open projects
page<http://llvm.org/OpenProjects.html#misc_imp>suggests moving logic
from the instruction combining transformation to the
InstructionSimplify analysis. But it looks like some work has been done
there since the projects page was last edited. Is there more benefit to
2013 Jan 15
2
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Dec 12, 2012 at 01:59:55PM -0800, Dan Gohman wrote:
> The bug here isn't in clang's use of noalias or in BasicAliasAnalysis'
> implementation of noalias; it's in the code that's optimizing the
> icmp.
Let's come back to this. The attached patch decouples InstSimplify from
the alias analysis and provides the conservative logic for when pointers
are not equal. The only really problematic part would be InlineCost.cc,
since that could try to replace NoAlias/ByVal arguments with allocas in
the same function. For the moment, the inline cost estimation doesn't
use...
2017 May 19
5
[llvm] r303387 - [InstCombine] add more tests for xor-of-icmps; NFC
...es.
3. I assumed that matching an (xor icmp, icmp) pattern can be done
efficiently in InstCombine. In fact, I knew that we already did that match,
so there is zero incremental cost to find this pattern in InstCombine.
4. I knew that we already handle related and-of-cmps and or-of-cmps
patterns in InstSimplify/InstCombine.
5. Based on that, I have proposed a patch that mostly uses existing logic
in those passes to solve this bug in the most general way I am aware of. It
makes 2 calls to InstSimplify to find a potential fold before
morphing/creating new instructions that may get folded by other existing...
2011 Dec 05
0
[LLVMdev] Passes propose passes
...ind a solution for this bug http://llvm.org/bugs/show_bug.cgi?id=11235 ,
> I came to the conclusion that the following things can happen while optimizing:
> - after gvn, I get new constants which are inserted into br and add/sum/..., so there should be at least one more jump-threading and/or instsimplify
> - after instsimplify, I get new constants which are inserted into br, so there should be one more jump-threading pass
> - after jump-threading, new bigger blocks occur with redundant loads which need an other gvn pass
>
> At least for -O3 we will need those optimizations.
> Is t...
2013 Jan 16
0
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Jan 16, 2013 at 12:53:55AM +0100, Joerg Sonnenberger wrote:
> Let's come back to this. The attached patch decouples InstSimplify from
> the alias analysis and provides the conservative logic for when pointers
> are not equal.
Let's take the version with the cleanup from IRC. *sigh* Dealing with
too many copies.
Joerg
-------------- next part --------------
Index: lib/Analysis/InlineCost.cpp
======================...
2012 Feb 27
2
[LLVMdev] How to unroll loop with non-constant boundary
Hi Benjamin,
> LLVM misses this optimization because ScalarEvolution's ComputeExitLimitFromICmp doesn't handle signed<= (SLE) and thus can't compute the number of times the loop is executed. I wonder if there's a reason for this, it seems like something simple to add.
instsimplify could also be enhanced to clean it up in this particular case, but
it would be better to make scev smarter.
Ciao, Duncan.
2012 Jun 29
0
[LLVMdev] ConstantExpr refactoring
...go all the way to fold if
> both arguments are constants (I guess).
>
> So, is the idea to transform ConstantFolding into a new function pass,
> or to recode another pass (like InstCombine) to deal with such things?
No new passes; the idea is that all constant folding should be done by
InstSimplify.
-Eli
2016 Mar 25
1
[GSOC] Potential Project Ideas
Hello,
My name is Siddharth. I’m a student studying math and computer science at the University of Toronto.
I’m interested in learning more about the LLVM compiler through GSoC. I have no prior experience with LLVM, but I have a strong interest in compilers, and I look forward to learning more.
I would like to pursue one of two potential projects: rewriting bugpoint, and moving optimizations
2010 Nov 11
5
[LLVMdev] Simplifying selects + arm stuff
...if some or all uses of the select would be simplified by InstructionSimplify,
> and not perform the transform if so.
Instead of turning this into a phase ordering issue, I'd rather increase the power of the folding logic to catch the general form. In this case, instead of handling this in instsimplify, why not handle this in reassociate?
This is conceptually no different than (x & y & x) -> (x & y), it's just that in this case you have: (x & y & (x or -1)) which should fold to (x & y) just the same.
-Chris
2017 Sep 28
3
[RFC] PT.2 Add IR level interprocedural outliner for code size.
...the result of a value number
> analysis (NewGVN) to assign numbers.
>
> While the problem NewGVN solves is that of finding all the Herbrand
> equivalences (structural equivalence, same operation and operand
> structurally congruent), it also does a canonicalization step calling
> InstSimplify to canonicalize (so, in this sense it catches more
> stuffs, e.g.:
>
> %x = add %a, 0
> %y = sub %b, 0
> not equivalent
>
> instSimplify(%y) -> add %a, 0
> now they're equivalent.
>
> Note: The current IR outlliner doesn't really use the approach I just
&...
2017 Jul 14
2
failing to optimize boolean ops on cmps
On 07/13/2017 06:40 PM, Daniel Berlin via llvm-dev wrote:
> Ah yes, it can only return one instruction and you need two.
>
> NewGVN could still handle it if instsimplify was changed to return the
> right binary operators because it has infrastructure that can handle
> insertion.
> (it would need a little work).
>
>
> (At this point, InstCombine seems to have become worse to me than
> GCC's combining infrastructure, so i'd really like...
2017 Sep 27
0
[RFC] PT.2 Add IR level interprocedural outliner for code size.
...ussed with Dan) is leveraging the result of a value number
analysis (NewGVN) to assign numbers.
While the problem NewGVN solves is that of finding all the Herbrand
equivalences (structural equivalence, same operation and operand
structurally congruent), it also does a canonicalization step calling
InstSimplify to canonicalize (so, in this sense it catches more
stuffs, e.g.:
%x = add %a, 0
%y = sub %b, 0
not equivalent
instSimplify(%y) -> add %a, 0
now they're equivalent.
Note: The current IR outlliner doesn't really use the approach I just
described, yet, but it's not hard to imagine ex...
2012 Feb 09
2
[LLVMdev] Your commit 149912 "Remove some dead code and tidy things up"...
...t type is one of i8, i16, etc.
So vectors of funky types, or not so funky types like i1, are no longer
matched. I noticed this while working on PR11948. The good thing is that
the testcase there no longer crashes the compiler because earlier patterns
now fail to match :) The bad thing is that a -instsimplify testcase like the
following no longer passes:
define <2 x i1> @vectorselect1(<2 x i1> %cond) {
; CHECK: @vectorselect1
%invert = xor <2 x i1> %cond, <i1 1, i1 1>
%s = select <2 x i1> %invert, <2 x i32> <i32 0, i32 0>, <2 x i32> <i32...
2012 Dec 12
0
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Dec 12, 2012 at 1:26 PM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Wed, Dec 12, 2012 at 11:01:01AM -0800, Dan Gohman wrote:
>> > Is that
>> > assumption violated if I explicitly cast away const and pass the result
>> > to a function with NoAlias argument?
>>
>> Not immediately, no. It means that you can't access the