Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] Figuring out the parameters of the Call Instruction"
2010 Jul 15
0
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi Shankha,
> 24 p_ptr ((unsigned long)&abc);
> call void @p_ptr(i64 ptrtoint (%struct.my_struct* @abc to i64))
> nounwind, !dbg !31
>
> Q.1 At line no 24 I try to read the address of global variable abc.
> The address is type casted
> from struct * to int * for which ptrtoint.
I guess you mean "is type casted from struct * to unsigned
2010 Jul 15
1
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi Duncan,
Thanks for pointing out my mistake. I will reword my questions.
//C code
int var1; //global
int a, b;
foo(a, b);
bar(c);
generates following
//LLVM IR
%1 = load a;
%2 = load b;
call foo(%1, %2)
call bar(@var1)
CallInst.getOperand(1).getNameStr() on foo, returns null,
but on bar returns var1.
Similarly, for
call void @p_ptr(i64 ptrtoint (%struct.my_struct* @abc to i64))
nounwind,
2015 Mar 17
2
[LLVMdev] Alias analysis issue with structs on PPC
Hal Finkel <hfinkel at anl.gov> wrote on 16.03.2015 17:56:20:
> If you want to do it at a clang level, the right thing to do is to
> fixup the ABI lowerings for pointers to keep them pointers in this case.
> So this is an artifact of the way that we pass structures, and
> constructing a general solution at the ABI level might be tricky.
> I've cc'd Uli, who did most
2015 Mar 13
2
[LLVMdev] Alias analysis issue with structs on PPC
Hi,
I have the following C loop to vectorize:
struct box {
double* source;
};
void test(double* restrict result, struct box my_struct, int len)
{
for (int i=0 ; i<len; i++) {
result[i] = my_struct.source[i] * my_struct.source[i];
}
}
There are two references in the loop, result[i] (restrict) and
my_struct.source[i] (readonly). The compiler should easily figure out that
2005 Apr 22
1
Beginner in R
hello ( and sorry for my poor english ... )
I'm a newbie on R software and I need to obtain this kind of system :
a structure, like a liste :
my_struct <- list()
my_struct$a <- a_value
my_struct$b <- another_value
my_struct$c <- one_more_value
and a function with two args : the first is a instance of the structure,
and the second is any component of the structure (here $a, $b
2015 Mar 13
2
[LLVMdev] Alias analysis issue with structs on PPC
On Fri, Mar 13, 2015 at 2:54 PM Daniel Berlin <dberlin at dberlin.org> wrote:
> On Fri, Mar 13, 2015 at 2:39 PM Olivier H Sallenave <ohsallen at us.ibm.com>
> wrote:
>
>> Hi,
>>
>> I have the following C loop to vectorize:
>>
>> struct box {
>> double* source;
>> };
>>
>> void test(double* restrict result, struct box
2015 Mar 15
5
[LLVMdev] Alias analysis issue with structs on PPC
On Sun, Mar 15, 2015 at 4:34 PM Olivier Sallenave <ol.sall at gmail.com> wrote:
> Hi Daniel,
>
> Thanks for your feedback. I would prefer not to write a new AA. Can't we
> directly implement that traversal in BasicAA?
>
Can I ask why?
Outside of the "well, it's another pass", i mean?
BasicAA is stateless, so you can't cache, and you really don't
2012 Oct 12
2
[LLVMdev] Target backend not converting char* to struct properly.
I'm having trouble getting my backend to properly treat the situation where
a char* is converted into a struct, i.e. something like:
char* pointer_representation = ...;
MyStruct* my_struct = (MyStruct*) pointer_representation;
my_struct->an_int_field = 5;
When this occurs, LLVM seems to fold the struct and char* into one assembly
'object', which is perfectly fine. However, it also
2012 Oct 12
0
[LLVMdev] Target backend not converting char* to struct properly.
On Fri, Oct 12, 2012 at 10:43 AM, Stephen McGruer
<stephen.mcgruer at gmail.com> wrote:
> I'm having trouble getting my backend to properly treat the situation where
> a char* is converted into a struct, i.e. something like:
>
> char* pointer_representation = ...;
> MyStruct* my_struct = (MyStruct*) pointer_representation;
> my_struct->an_int_field = 5;
>
>
2004 Nov 29
1
data is getting corrupted
I've been attempting to perform some analysis on a model that was
interfaced with R (R calls a library that takes SEXPs and converts the
data frames into the internal structures of data), and I notice that for
small data.frames the vectors don't get corrupt (n<200-ish). When I pass
in larger data.frames, the vectors will become corrupt. I've been
PROTECTING the heck out of
1997 Nov 14
0
Linux IP fragment overlap bug (fwd)
---------- Forwarded message ----------
Received: from brimstone.netspace.org (brimstone.netspace.org [128.148.157.143]) by blues.jpj.net (backatcha) with ESMTP id CAA13949; Fri, 14 Nov 1997 02:08:13 -0500 (EST)
Received: from unknown@netspace.org (port 25452 [128.148.157.6]) by brimstone.netspace.org with ESMTP id <818-20257>; Fri, 14 Nov 1997 01:41:22 -0500
Received: from NETSPACE.ORG by
2012 Nov 23
2
[LLVMdev] clang code-completion question
Dear developers,
First of all, thank you for your job on clang, now I use clang as
autocompletion tool with my Vim, and it seems to work awesome. But I have
some questions:
1) Is it possible to make clang to complete pointers to functions as a
functions? I mean, I want to get function prototype, with returning value
type and all the parameters.
2) Is it possible to make completion work inside
2012 Feb 22
1
[LLVMdev] Size of structs & arrays
Eli Friedman-2 wrote:
>
>
> Try llvm::Constant::getNullValue().
>
>
I'm trying this:
llvm::Constant* one =
llvm::Constant::getNullValue(llvm::IntegerType::get(mod->getContext(), 64));
llvm::ConstantInt* two = llvm::ConstantInt::get(mod->getContext(),
llvm::APInt(32, llvm::StringRef("1"), 10));
std::vector<llvm::Value*> indices;
2010 Oct 13
2
[LLVMdev] Possibility of Corruption of debug metadata
Hi Devang,
Is there any particular reason as to why debug info support for tls
hasn't been implemented.
Is the feature in pipeline ? How hard is it to implement ?
On Wed, Oct 13, 2010 at 4:12 PM, Devang Patel <dpatel at apple.com> wrote:
>
> On Oct 13, 2010, at 10:09 AM, shankha wrote:
>
> Hi Devang,
>
> On Wed, Oct 13, 2010 at 12:44 PM, Devang Patel <dpatel at
2008 Jun 06
1
calling a C function with a struct
I am trying to call a precompiled C function that uses a struct as one of
it's arguments.
I could write a wrapper function in C, but I was hoping there is some way
to
pack fields into an array of type raw that could be passed directly to the
function.
Here is some more detail. The C struct is simple, but has mixed types:
struct STRUCT1 {
long type;
long nx;
double
2004 Aug 06
1
minor suggestions
> How did you do it without the pragma?
I understood that the problem was a mismatch between the the declaration
and definition in for some codebooks (exc_*_tables.c).
> I saw you added the pragmas to disable the float/double warnings to misc.h
> though that header isn't included by the files that generate the warnings.
What are the offending files then? BTW, aside from the
2010 Oct 12
2
[LLVMdev] Possibility of Corruption of debug metadata
Hi,
If I convert global variables to thread-local variables or vice versa
at the IR stage do I have to take care of the debug metadata.
I looked at the IR generated and I couldn't find any difference
between the debug metadata generated for global variables and
thread-local variables.
--
Thanks
Shankha
2010 Oct 13
2
[LLVMdev] Possibility of Corruption of debug metadata
Hi Devang,
On Wed, Oct 13, 2010 at 12:44 PM, Devang Patel <dpatel at apple.com> wrote:
> In your example, you do not need to update debug info for @global_var at the moment. We are not identifying tls in debug info yet.
Does that mean I will not be able to debug applications which use tls
through gdb if they are build with gcc-lllvm or clang.
> On Oct 13, 2010, at 8:30 AM, shankha
2010 Oct 20
0
[LLVMdev] Possibility of Corruption of debug metadata
Shankha,
AFAIK, nobody is actively working on debug info for TLS at the moment.
On Oct 13, 2010, at 3:19 PM, shankha wrote:
> Hi Devang,
> Is there any particular reason as to why debug info support for tls
> hasn't been implemented.
> Is the feature in pipeline ? How hard is it to implement ?
-
Devang
2010 Oct 13
0
[LLVMdev] Possibility of Corruption of debug metadata
On Oct 12, 2010, at 4:28 PM, shankha <shankhabanerjee at gmail.com> wrote:
> Hi,
> If I convert global variables to thread-local variables or vice versa
> at the IR stage do I have to take care of the debug metadata.
If you provide an small concrete example then it would help,
Devang
> I looked at the IR generated and I couldn't find any difference
> between the debug