Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] [DragonEgg] Mysterious FRAME coming from gimple to LLVM"
2012 Jul 31
0
[LLVMdev] [DragonEgg] Mysterious FRAME coming from gimple to LLVM
According to comment in tree-nested.c, these frames should be only
introduced in case of debug or OpenMP lowering:
/* A subroutine of convert_nonlocal_reference_op. Create a local variable
in the nested function with DECL_VALUE_EXPR set to reference the true
variable in the parent function. This is used both for debug info
and in OpenMP lowering. */
However, in this code example we
2013 Oct 28
2
[LLVMdev] loop vectorizer says Bad stride
Verifying function
running passes ...
LV: Checking a loop in "bar"
LV: Found a loop: L0
LV: Found an induction variable.
LV: We need to do 0 pointer comparisons.
LV: Checking memory dependencies
LV: Bad stride - Not an AddRecExpr pointer %13 = getelementptr float*
%arg2, i32 %1 SCEV: ((4 * (sext i32 {(256 + %arg0),+,1}<nw><%L0> to
i64)) + %arg2)
LV: Src Scev: {((4 * (sext
2015 Aug 22
3
loop unrolling introduces conditional branch
Hi, Mehdi,
For example, I have this very simple source code:
void foo( int n, int array_x[])
{
for (int i=0; i < n; i++)
array_x[i] = i;
}
After I use "clang -emit-llvm -o bc_from_clang.bc -c try.cc", I get
bc_from_clang.bc. With my code (using LLVM IRbuilder API), I get
bc_from_api.bc. Attachment please find thse two files. I also past the IR
here.
2015 Aug 22
2
loop unrolling introduces conditional branch
Thanks for your point that out. I just add DataLayout in my code such as
"mod->setDataLayout("e-m:e-i64:64-f80:128-n8:16:32:64-S128");", still no
luck.
I'm really confused about this. Do I need to add more passes before
-loop-unroll?
On Sat, Aug 22, 2015 at 11:36 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
> On Aug 22, 2015, at 7:27 AM, Xiangyang
2013 Oct 28
0
[LLVMdev] loop vectorizer says Bad stride
Frank,
It looks like the loop vectorizer is unable to tell that the two stores in your code never overlap. This is probably because of the sign-extend in your code. Can you extend the indices to 64bit ?
Thanks,
Nadav
On Oct 28, 2013, at 1:38 PM, Frank Winter <fwinter at jlab.org> wrote:
> Verifying function
> running passes ...
> LV: Checking a loop in "bar"
> LV:
2012 Dec 31
3
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
Dear all,
In our compiler we use a modified version LLVM Polly, which is very
sensitive to proper code generation. Among the number of limitations, the
loop region (enclosed by phi node on induction variable and branch) is
required to be free of additional memory-dependent branches. In other
words, there must be no conditional "br" instructions below phi nodes. The
problem we are facing
2014 Feb 19
2
[LLVMdev] better code for IV
Hi Andrew,
The issue below refers to LSR, so I'll appreciate your feedback. It also refers to instruction combining and might impact backends other than X86, so if you know of others that might be interested you are more than welcome to add them.
Thanks, Anat
_____________________________________________
From: Shemer, Anat
Sent: Tuesday, February 18, 2014 15:07
To: 'llvmdev at
2013 Nov 08
1
[LLVMdev] loop vectorizer and storing to uniform addresses
I changed the input C to using a 64 bit type for the loop index (this
eliminates 'sext' instructions in the IR)
Here the IR produced with clang -O0
define float @foo(i64 %start, i64 %end, float* %A) #0 {
entry:
%start.addr = alloca i64, align 8
%end.addr = alloca i64, align 8
%A.addr = alloca float*, align 8
%sum = alloca [4 x float], align 16
%i = alloca i64, align 8
2015 Sep 28
4
varargs, the x86, and clang
When I use clang on an x86-64 to spit out the LLVM, like this
clang -O -S -emit-llvm varargstest.c
where varargstest.c looks like this
int add_em_up(int count, ...) {
va_list ap;
int i, sum;
va_start(ap, count);
sum = 0;
for (i = 0; i < count; i++)
sum += va_arg(ap, int);
va_end(ap);
return sum;
}
I see LLVM that looks like it's been customized for the x86-64,
versus
2019 Jan 19
2
What does "preds" mean in a .ll file?
Hi,
I see things like this. What does it mean? Is it documented somewhere? Thanks.
; preds = %for.body
https://llvm.org/docs/LangRef.html
; <label>:91: ; preds = %88
%92 = load i8**, i8*** @glob_complete_word.matches, align 8, !dbg !99798
%93 = load i32, i32* @glob_complete_word.ind, align 4, !dbg !99799
%94 = sext i32 %93 to i64, !dbg !99798
2016 May 19
4
GEP index canonicalization
Hi,
InstCombine canonicalizes index operands (unless they are into struct
types) to pointer size. The comment says: "If we are using a wider
index than needed for this platform, shrink it to what we need. If
narrower, sign-extend it to what we need. This explicit cast can make
subsequent optimizations more obvious.".
For our architecture, the canonicalization is a bit
2015 Aug 22
2
loop unrolling introduces conditional branch
Hi,
I just tried llvm-3.8 (LLVM SVN Repository). With this version, -fno-rtti
can help me to compile my code and -irce can help me to do a better job for
loop unrolling. However, I still have one question. If I use Clang to
compile a piece of c++ code to .bc and then use 'opt -loop-rotate
-loop-unroll -irce', I can get what I want. I mean, there is no conditional
branch at the end of each
2015 Apr 25
3
[LLVMdev] alias analysis on llvm internal globals
Hi
I have this program in which fooBuf can only take on NULL or the
address of local_fooBuf, and fooBuf and local_fooBuf have scope of the
foo function.
Therefore there is no way for the fooPtr argument to alias with
fooBuf. However, LLVM basicaa and globalsmodref-aa say the 2 pointers
may alias.
I am thinking whether i should implement a limited form of point-to
alias on the fooBuf pointer in
2017 Dec 19
4
MemorySSA question
Hi,
I am new to MemorySSA and wanted to understand its capabilities. Hence I
wrote the following program (test.c):
int N;
void test(int *restrict a, int *restrict b, int *restrict c, int *restrict
d, int *restrict e) {
int i;
for (i = 0; i < N; i = i + 5) {
a[i] = b[i] + c[i];
}
for (i = 0; i < N - 5; i = i + 5) {
e[i] = a[i] * d[i];
}
}
I compiled this program using
2013 Nov 11
2
[LLVMdev] What's the Alias Analysis does clang use ?
Hi, LLVM community:
I found basicaa seems not to tell must-not-alias for __restrict__ arguments
in c/c++. It only compares two pointers and the underlying objects they
point to. I wonder how clang does alias analysis
for c/c++ keyword restrict.
let assume we compile the following code:
$cat myalias.cc
float foo(float * __restrict__ v0, float * __restrict__ v1, float *
__restrict__ v2, float *
2012 Jan 26
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Thu, Jan 26, 2012 at 3:41 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> On Thu, 2012-01-26 at 15:36 -0600, Sebastian Pop wrote:
>> arm-none-linux-gnueabi
>
> Indeed, adding -ccc-host-triple arm-none-linux-gnueabi I also get
Minor remark: please use -target instead of -ccc-host-triple that is
now deprecated.
Thanks for looking at this testcase.
Sebastian
--
Qualcomm
2012 Jan 26
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Thu, 2012-01-26 at 15:36 -0600, Sebastian Pop wrote:
> arm-none-linux-gnueabi
Indeed, adding -ccc-host-triple arm-none-linux-gnueabi I also get
vectorization (even though I don't get vectorization when targeting
x86_64). I'll let you know what I find.
-Hal
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
2012 Jul 18
2
[LLVMdev] [NVPTX] PTXAS - Unimplemented feature: labels as initial values
Dear NVPTX community,
PTXAS fails to compile the ptx code generated by NVPTX. Is it an issue of
backend or an issue of PTXAS or a known reasonable restriction?
Thanks,
- Dima.
> cat test.ll
; ModuleID = '__kernelgen_main_module'
target datalayout = "e-p:64:64-i64:64:64-f64:64:64-n1:8:16:32:64"
target triple = "ptx64-unknown-unknown"
%struct.__st_parameter_dt.0.4
2015 Jun 11
4
[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
[+Arnold]
> On Jun 10, 2015, at 1:29 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote:
>
> [+CC Andy]
>
>> Can anyone familiar with ScalarRevolution tell me whether this is an
>> expected behavior or a bug?
>
> Assuming you're talking about 2*k, this is a bug. ScalarEvolution
> should be able to prove that {0,+,4} is <nsw> and
2020 Jul 23
2
How to optimize out the duplicated memory load instructions?
Hi Johannes,
Thanks for your help. I tried with something like below and nothing
changes. Maybe I am doing something wrong?
246001 check_exce_succ59: ; preds =
%check_exce_succ40
**246002 %mem_base60 = load i8*, i8** %mem_base_addr_ptr, align 8,
!alias.scope !3
246003 %offset161 = add i32 %call56, 4
246004 %12 = sext i32 %offset161 to i64
246005 %maddr62 =