Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] The order of GVN and IndVarSimplify"
2013 Nov 05
0
[LLVMdev] The order of GVN and IndVarSimplify
On Oct 31, 2013, at 10:59 AM, Richard Sandiford <rsandifo at linux.vnet.ibm.com> wrote:
> This might be hard cases making bad law, but the loop:
>
> void
> f (unsigned short *x, int *l)
> {
> int c = *l;
> int i;
> for (i = 0; i < c; i++)
> if (x[i])
> x[i]++;
> }
>
> is converted to decrement-and-branch form by
2011 Mar 14
1
[LLVMdev] IndVarSimplify too aggressive ?
Thanks Eli,
After digging thru mail archives & bugzilla, it seems fixing properly this issue would require a major change in the selectionDAG code --- to have it operate on a per function basis instead of per basic-block.
This however, does not seem to be the only issue. The following C code does not produce an efficicient assembly sequence either.
extern void f(unsigned long long v);
void
2011 Mar 13
0
[LLVMdev] IndVarSimplify too aggressive ?
On Sun, Mar 13, 2011 at 5:01 PM, Arnaud Allard de Grandmaison
<Arnaud.AllardDeGrandMaison at dibcom.com> wrote:
> Hi all,
>
> The IndVarSimplify pass seems to be too aggressive when it enlarge the induction variable type ; this can pessimize the generated code when the new induction variable size is not natively supported by the target. This is probably not an issue for x86_64,
2011 Mar 13
7
[LLVMdev] IndVarSimplify too aggressive ?
Hi all,
The IndVarSimplify pass seems to be too aggressive when it enlarge the induction variable type ; this can pessimize the generated code when the new induction variable size is not natively supported by the target. This is probably not an issue for x86_64, which supports natively all types, but it is a real one for several embedded targets, with very few native types.
I attached a patch to
2009 May 13
2
[LLVMdev] Compiler error: LoopStrengthReduce.cpp
On Tue, May 12, 2009 at 6:26 PM, Dale Johannesen <dalej at apple.com> wrote:
>
> On May 12, 2009, at 5:01 PMPDT, OvermindDL1 wrote:
>
>> On Tue, May 12, 2009 at 5:01 PM, Dale Johannesen <dalej at apple.com>
>> wrote:
>>>
>>> On May 12, 2009, at 3:09 PMPDT, OvermindDL1 wrote:
>>>
>>>> The error given:
>>>>
2009 May 13
3
[LLVMdev] MSVC compile error with trunk
Does not seem to be a straight error with LLVM itself, but rather the
tools, linking issues, here are the errors:
Opt:
30> Creating library
R:\SDKs\llvm\trunk_VC8_building\lib\Debug\opt.lib and object
R:\SDKs\llvm\trunk_VC8_building\lib\Debug\opt.exp
30>LLVMScalarOpts.lib(IndVarSimplify.obj) : error LNK2019: unresolved
external symbol "public: bool __thiscall
2011 Mar 16
0
[LLVMdev] IndVarSimplify too aggressive ?
On Mar 13, 2011, at 2:01 PM, Arnaud Allard de Grandmaison wrote:
> Hi all,
>
> The IndVarSimplify pass seems to be too aggressive when it enlarge the induction variable type ; this can pessimize the generated code when the new induction variable size is not natively supported by the target. This is probably not an issue for x86_64, which supports natively all types, but it is a real one
2009 May 13
0
[LLVMdev] Compiler error: LoopStrengthReduce.cpp
On May 12, 2009, at 5:01 PMPDT, OvermindDL1 wrote:
> On Tue, May 12, 2009 at 5:01 PM, Dale Johannesen <dalej at apple.com>
> wrote:
>>
>> On May 12, 2009, at 3:09 PMPDT, OvermindDL1 wrote:
>>
>>> The error given:
>>>
>>> ..\..\..\..\trunk\lib\Transforms\Scalar
>>> \LoopStrengthReduce.cpp(1016) :
>>> error C2668:
2009 May 13
2
[LLVMdev] Compiler error: LoopStrengthReduce.cpp
On Tue, May 12, 2009 at 5:01 PM, Dale Johannesen <dalej at apple.com> wrote:
>
> On May 12, 2009, at 3:09 PMPDT, OvermindDL1 wrote:
>
>> The error given:
>>
>> ..\..\..\..\trunk\lib\Transforms\Scalar\LoopStrengthReduce.cpp(1016) :
>> error C2668: 'abs' : ambiguous call to overloaded function
>>
>> It should be rather obvious from the
2014 Oct 18
2
[LLVMdev] Dereferencing NULL pointer in IndVarSimplify.cpp?
Hi,
Here is the code in IndVarSimplify.cpp.
SmallVector<WeakVH, 16> DeadInsts;
while (!DeadInsts.empty())
if (Instruction *Inst =
dyn_cast_or_null<Instruction>(&*DeadInsts.pop_back_val()))
RecursivelyDeleteTriviallyDeadInstructions(Inst, TLI);
Since DeadInsts.pop_back_val() is WeakVH which could hold a NULL
pointer, the expression,
2011 Mar 18
0
[LLVMdev] IndVarSimplify too aggressive ?
On Mar 13, 2011, at 2:01 PM, Arnaud Allard de Grandmaison wrote:
> Hi all,
>
> The IndVarSimplify pass seems to be too aggressive when it enlarge the induction variable type ; this can pessimize the generated code when the new induction variable size is not natively supported by the target. This is probably not an issue for x86_64, which supports natively all types, but it is a real one
2020 Feb 05
3
IndVarSimplify: getBackedgeTakenCount and Release vs Assert
Hi,
I am investigating a difference in code generation between release and assert builds of llvm.
The culprit is IndVarSimplify that comes up with different behavior on the same input:
in the assertion build, it does do an extra 'INDVARS: Rewriting loop exit condition'
After digging around, it seems that following change is the culprit:
-----
Author: Philip Reames <listmail at
2020 Apr 01
2
canonical form loops
Interesting, thanks for digging this up!
> As a consequence, any loop structure that is recognized
> by SCEV will (/should) not profit from rewriting.
As discussed in https://reviews.llvm.org/D68577#1742745 and PR40816 showed, there is still merit and profit in further simplifying loop induction variables, or at-least the primary one; somewhat independent of continuing to rely on SCEV for
2014 Oct 24
3
[LLVMdev] IndVar widening in IndVarSimplify causing performance regression on GPU programs
Hi,
I noticed a significant performance regression (up to 40%) on some internal
CUDA benchmarks (a reduced example presented below). The root cause of this
regression seems that IndVarSimpilfy widens induction variables assuming
arithmetics on wider integer types are as cheap as those on narrower ones.
However, this assumption is wrong at least for the NVPTX64 target.
Although the NVPTX64 target
2015 Aug 17
2
RFC for a design change in LoopStrengthReduce / ScalarEvolution
> To back up for a second, how much of this is self-inflicted damage?
> IndVarSimplify likes to preemptively widen induction variables. Is
> that why you have the extensions here in the first place?
In the specific example I was talking about the zext came from our
frontend (our FE used to insert these extensions for reasons that are
no longer relevant). But you can easily get the same
2019 Aug 09
4
How to best deal with undesirable Induction Variable Simplification?
Hi Hal,
I see. So LSR could theoretically counteract undesirable Ind Var transformations but it's not implemented at the moment?
I think I've managed to come up with a small reproducer that can also exhibit similar problem on x86, here it is: https://godbolt.org/z/_wxzut
As you can see, when rewriteLoopExitValues is not disabled Clang generates worse code due to additional spills,
2016 Jul 21
2
Remove zext-unfolding from InstCombine
Hi all,
I have a question regarding a transformation that is carried out in InstCombine, which has been introduced by r48715. It unfolds expressions of the form `zext(or(icmp, (icmp)))` to `or(zext(icmp), zext(icmp)))` to expose pairs of `zext(icmp)`. In a subsequent iteration these `zext(icmp)` pairs could then (possibly) be optimized by another optimization (which has already been there before
2019 Aug 13
2
How to best deal with undesirable Induction Variable Simplification?
I've noticed that there was an attempt to mitigate ExitValues problem in https://reviews.llvm.org/D12494 that went nowhere. Were there particular issues with that approach?
--
Danila
From: Philip Reames [mailto:listmail at philipreames.com]
Sent: Saturday, August 10, 2019 02:05
To: Danila Malyutin <Danila.Malyutin at synopsys.com>; Finkel, Hal J. <hfinkel at anl.gov>
Cc: llvm-dev
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
I now understand that IndVarSimplify.cpp is capable of reproducing array
references when the pointer initialization from the array address is found
inside the immediately enclosing loop, such that in the following code:
int A[20000], B[100], Z;
int main()
{
int i, j, *a, *b;
for ( a = &A[0], i = 0; i != 200; i++ )
for ( b = &B[0], j = 0; j != 100; j++
2010 May 07
2
[LLVMdev] getTripCount requires which optimization passes?
On May 6, 2010, at 6:32 PM, ether zhhb wrote:
> As the comment said:
> /// The IndVarSimplify pass transforms loops to have a form that
> this
> /// function easily understands.
>
> you could try -indvars.
After adding -indvars to the opt command, getTripCount still returns
null.
I suppose it's possible, depending on the scheduling of the pass
manager, that