Displaying 19 results from an estimated 19 matches similar to: "[LLVMdev] need to store the address of a variable"
2008 Jun 28
0
[LLVMdev] need to store the address of a variable
Paul Arndt wrote:
> Hello everybody,
>
> my problem is, that I want to get an array of pointers to all local variables
> in a function. This array will be used for transfering these Variables to
> another execution engine.
>
> I've code which generates this array, and a pointer to the target field of the
> array.
>
> name = variables.fname +
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
Can you give an example? And is this limited to C (not C++) only?
On Fri, Sep 21, 2012 at 2:52 PM, Liu, Yaxun (Sam) <Yaxun.Liu at amd.com> wrote:
> I think you may add restrict type qualifier.****
>
> ** **
>
> Sam****
>
> ** **
>
> *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] *On
> Behalf Of *Welson Sun
> *Sent:* Friday,
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
On Fri, Sep 21, 2012 at 3:08 PM, Welson Sun <welson.sun at gmail.com> wrote:
> OK, with the restrict type qualifier, it is a little bit better:
>
> The IR's function signature becomes:
> define void @foo(i32* noalias %a, i32* noalias %b, i32* noalias %c) nounwind
> {
>
> Now the AA result:
> Function: foo: 13 pointers, 0 call sites
> NoAlias: i32* %a,
2012 Sep 21
0
[LLVMdev] Alias Analysis accuracy
OK, with the restrict type qualifier, it is a little bit better:
The IR's function signature becomes:
define void @foo(i32* noalias %a, i32* noalias %b, i32* noalias %c)
nounwind {
Now the AA result:
Function: foo: 13 pointers, 0 call sites
NoAlias: i32* %a, i32* %b
NoAlias: i32* %a, i32* %c
NoAlias: i32* %b, i32* %c
NoAlias: i32* %a, i32** %a_addr
NoAlias:
2012 Sep 21
0
[LLVMdev] Alias Analysis accuracy
Here is the result of running mem2reg then basicaa, it is even worse: (%a
should be alias to %0, and partial alias to %3)
opt -mem2reg -basicaa -aa-eval -print-all-alias-modref-info < foo.s >
/dev/null
Function: foo: 6 pointers, 0 call sites
NoAlias: i32* %a, i32* %b
NoAlias: i32* %a, i32* %c
NoAlias: i32* %b, i32* %c
PartialAlias: i32* %1, i32* %a
NoAlias:
2010 Sep 23
3
[LLVMdev] where does %a_addr.0 come from?
Hi,
I am studying SSA and some time ago I asked on this list how to see the
phi nodes in the llvm ir output. I learned then to use this command:
opt -mem2reg test.ll -S > test_mem2reg.ll
However, if you look at the output (attached to this message) there is
something I do not understand. At the end of the function @f at line 18,
the function returns the variable %a_addr.0. However, this
2010 Sep 23
0
[LLVMdev] where does %a_addr.0 come from?
Hi Maarten,
If you look at the start of basic block 2 (bb2) you'll see the
following instruction:
%a_addr.0 = phi i32 [ 1, %bb ], [ 0, %bb1 ] ; <i32> [#uses=1]
This is an SSA phi node which assigns a value of either 1 or 0 to %a_addr.0
depending on whether control reached the PHI node from basic block bb, or
bb1.
- Lang.
On Thu, Sep 23, 2010 at 11:26 PM, maarten faddegon <
2011 Jul 15
2
[LLVMdev] Missing optimization in constant propagation?
Hi all,
I stumbled across a peculiarity regarding constant propagation that I don't understand. I'm not sure, if I oversee anything or if it's a missing feature.
I have created the following simple test function in C:
int times_zero(int a)
{
return (a * 0);
}
Compiling this with GCC using dragonegg generates the following code:
%int = type i32
define i32 @times_zero(i32 %a)
2010 Jan 25
0
[LLVMdev] 64bit MRV problem: { float, float, float} -> { double, float }
Hi Ralf,
> I do not understand why this behaviour is required. What is the problem
> in having a function receive a single struct-parameter with three floats
> compared to two scalar parameters?
>
> source-code (C++):
> struct Test3Float { float a, b, c; };
> void test(Test3Float param, Test3Float* result) { ... }
if you compile this with GCC, you will see that it too
2011 Jul 15
0
[LLVMdev] Missing optimization in constant propagation?
On Fri, Jul 15, 2011 at 12:21 AM, Martin Apel <martin.apel at simpack.de> wrote:
> Hi all,
>
> I stumbled across a peculiarity regarding constant propagation that I don't understand. I'm not sure, if I oversee anything or if it's a missing feature.
>
> I have created the following simple test function in C:
>
> int times_zero(int a)
> {
> return (a *
2010 Jan 25
2
[LLVMdev] 64bit MRV problem: { float, float, float} -> { double, float }
Uh, sorry, did not pay attention where I was replying ;)
Hey Duncan,
I do not understand why this behaviour is required. What is the problem
in having a function receive a single struct-parameter with three floats
compared to two scalar parameters?
source-code (C++):
struct Test3Float { float a, b, c; };
void test(Test3Float param, Test3Float* result) { ... }
bitcode:
2011 Nov 03
5
[LLVMdev] LLVM problem, please do not ignore
Dear sir or madam,
I am a 4-th year student at Yerevan State University, Armenia; and I am
studying LLVM in order to write my Bachelor thesis.
I am trying to write an llvm pass that just removes all "Add" commands and
gives some statstics.
Nevertheless, I get this segmentation fault:
................some rows about functions, that are not changed by my pass.
The errors occurs after it
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
Dear LLVM,
I would like to understand how to improve the LLVM alias analysis accuracy.
I am currently using llvmgcc 2.9 and llvm 3.0. Here is the C code:
void foo(int a[SIZE], int b[SIZE], int c[SIZE])
{
for(int i=0; i<SIZE; i++)
c[i] = a[i] + b[i];
}
Here is the IR:
target datalayout =
2010 Jan 29
2
[LLVMdev] 64bit MRV problem: { float, float, float} -> { double, float }
Hey Duncan, hey everybody else,
I just stumbled upon a problem in the latest llvm-gcc trunk which is
related to my previous problem with the 64bit ABI and structs:
Given the following code:
struct float3 { float x, y, z; };
extern "C" void __attribute__((noinline)) test(float3 a, float3* res) {
res->y = a.y;
}
int main(void) {
float3 a;
float3 res;
test(a,
2007 Jul 09
2
[LLVMdev] AsmParser fails
Hello everybody,
unfortunately, I have some problems using the LLVM assembler parser ...
- use llvm-gcc ( llvm-gcc -O0 -S --emit-llvm -o system2.ll system2.c)
to translate the following small example into LLVM assembly language:
int common_func1() {
return 5;
}
int common_func2(int a) {
return a + 5;
}
void Handler1() {
int e = 4;
int f = common_func1();
int ret = common_func2(e);
2011 Jan 06
0
[LLVMdev] Null address pointer in llvm.dbg.declare
Hi,
I'm encountering a problem with llvm.dbg.declare. My code looks
basically like this:
if(DbgDeclareInst *dbg = dyn_cast<DbgDeclareInst>(&inst)) {
const Value* addr = dbg->getAddress();
const MDNode* mvar = dbg->getVariable();
...
}
While the MDNode (mvar) contains the correct information (name of the
variable, etc...), getAddress always returns NULL. Am I
2011 Nov 03
0
[LLVMdev] LLVM problem, please do not ignore
On 11/3/2011 4:55 AM, Arshak Nazaryan wrote:
> Dear sir or madam,
>
> I am a 4-th year student at Yerevan State University, Armenia; and I
> am studying LLVM in order to write my Bachelor thesis.
Hi Arshak.
> I am trying to write an llvm pass that just removes all "Add" commands
> and gives some statstics.
> Nevertheless, I get this segmentation fault:
The
2008 Jun 10
3
[LLVMdev] DejaGNU test fixes
Hi all,
while writing a testcase thate needed to do a grep containg {, I found that
the DejaGNU test framework didn't handle those very well. It's a bit of a fuss
to escape accolades properly, but most of all the framework seemed to silently
ignore errors in the escaping (and just not run the command then). See [1].
Fixing the framework resulted in 80 of the tests failing. I spent the
2012 Jul 17
0
Wine release 1.5.9
The Wine development release 1.5.9 is now available.
What's new in this release (see below for details):
- Support for GPOS font tables in Uniscribe.
- Support for XRandr 1.2 and 1.3.
- Parser improvements for the HLSL compiler.
- More key exchange algorithms supported on Mac OS.
- Relay tracing on ARM.
- Various bug fixes.
The source is available from the following locations: