Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] creating a variable structure, getting offset pointer"
2018 Mar 17
1
Migration from 3.8 to 6.0 questions (segfault most concerning)
I'm encountering a few problems in my migration that I haven't yet
figured out.
`getOrInsertFunction` is generating a SEGFAULT at
FunctionType::isValidArgumentType(llvm::Type*). I'm calling it as:
generic_ptr_ = llvm::PointerType::get(
llvm::Type::getInt8Ty(context), 0 );
f_natural_int = llvm::IntegerType::get(context, 64);
module->getOrInsertFunction(
2011 Sep 22
0
[LLVMdev] Need help in converting int to double
Hi Sarath,
It would have really helped if you had removed the commented out code and inlined the calls to your homemade helper functions before sending it...
You are doing this, in LLVM IR:
%0 = getelementptr %Value* %firstArg, i32 0 ; i8**
%1 = load i8** %0 ; i8*
%2 = bitcast i8* %1 to i64*
%3 = getelementptr %Value* %secondArg, i32 0 ; i8**
%4 = load i8** %3; i8*
%5 = bitcast i8* %4 to i64*
2011 Sep 22
1
[LLVMdev] Need help in converting int to double
Yeah, that's the fault...got the answer...... Thanks James for the help...
Struggling with this for so many days.......
On Thu, Sep 22, 2011 at 4:02 PM, James Molloy <James.Molloy at arm.com> wrote:
> Hi Sarath,****
>
> ** **
>
> It would have really helped if you had removed the commented out code and
> inlined the calls to your homemade helper functions before
2013 Feb 01
0
[LLVMdev] Structure declaration with IR builder
Hi,
I test your code and it works!!!
but I didn't understand if "create a function" it necessary for my aims.
What I tried to do is declare a structured to allow after declaration
global or local structured variables.
How I can I do?
Thanks,
Manuele
Il 31/01/2013 10:14, Garba,Peter ha scritto:
> Hi,
>
> that's what I'm doing ...
>
> //Init the struct type
2011 Sep 22
2
[LLVMdev] Need help in converting int to double
On Thu, Sep 22, 2011 at 3:46 PM, sarath chandra <sarathcse19 at gmail.com>wrote:
> Hi James,
>
> First i converted the void * to int* and then did FPToSI...then did SHL...(
> because CreateShl only accepts integers... i pointer casted it to int64 type
> first)... Below is the code snippet....
>
>
> lhs = mBuilder.CreateStructGEP(firstArg, 0);
> lhs =
2009 Jan 09
2
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
Hi all,
Please review this patch. It's fixing PR3232 comment #8. Function bar
from 2008-03-24-BitFiled-And-Alloca.c compiles to:
%struct.Key = type { { i32, i32 } }
...
define i32 @bar(i64 %key_token2) nounwind {
entry:
%key_token2_addr = alloca i64 ; <i64*> [#uses=2]
%retval = alloca i32 ; <i32*> [#uses=2]
%iospec =
2011 Feb 15
0
[LLVMdev] Structure Types and ABI sizes
Renato Golin <renato.golin at arm.com> writes:
> Example:
>
> // CHECK: %struct.I = type { i32, i8 }
> struct I {
> int a;
> char b;
> };
>
> // CHECK: %struct.J = type { [8 x i8], i8, [3 x i8] }
> struct J : I {
> char c;
> };
>
> What happens here is that "c" is placed in the base's tail padding and
> there are three bytes
2002 Dec 06
1
[LLVMdev] Tarjan+function_ptrs == trouble ?
Thanks,
I've been through the documentation, and if I visit main, i think
everything will turn out correctly... Printing out the Call graph reveals
that main is calling this external node i think you are making reference
to. Could this be the problem?
Dave
On Fri, 6 Dec 2002, Chris Lattner wrote:
> > if you take the time to print out the function each non-looping node iter
>
2002 Dec 06
0
[LLVMdev] Tarjan+function_ptrs == trouble ?
> if you take the time to print out the function each non-looping node iter
> traverses, it never reaches main...
Ok, first note that the CallGraph class does really stupid (but correct)
things for function pointers, so you're not going to see anything
remarkably nice here... Make sure to read the CallGraph.h comments to
understand exactly what is going on.
Despite that, I can verify
2002 Dec 06
3
[LLVMdev] Tarjan+function_ptrs == trouble ? (fwd)
Test Cases:
(attached)
Iteration code:
(...)
typedef TarjanSCC_iterator<CallGraph*> MyTarjan;
CallGraph& callGraph = getAnalysis<CallGraph>();
MyTarjan iter = tarj_begin(&callGraph);
MyTarjan end = tarj_end(&callGraph);
while(iter!=end)
iter++;
(...)
if you take the time to print out the function each non-looping node iter
traverses, it never reaches main...
2017 Jan 20
2
How to handle INT8 data
Hi,
I do have < INT_MAX.
This looks attractive but since they are unique identifiers, storing
them as factor will be likely to be counter-productive. (a string
version + an int32 for each)
I was looking to https://cran.r-project.org/web/packages/csvread/index.html
This looks like a good feet for my needs.
Any chances such an external package for int64 would be integrated in core ?
Le 20
2010 Dec 14
3
[LLVMdev] __used__ attributes in llvm-gcc's crtstuff.c
Hello,
I'm wondering why only some global static variables are marked with
__used__ attributes in llvm-gcc/gcc/crtstuff.c.
GCC compiles crtstuff.c with -fno-toplevel-reorder option, which ensures
that
unused static globals are not removed during optimization. However, since
LLVM does not support that option, I presume __used__ attribute is used
instead.
For example, __CTOR_LIST__[1]
2009 Feb 13
1
[LLVMdev] fastcc, tail calls, and gcc
Albert Graef wrote:
> Jeff Kuskin wrote:
>> Correct? If not, how do I call a LLVM JIT-generated fastcc function
>> from a function statically compiled by GCC?
>
> Well, you can always generate a little wrapper function with C calling
> convention which just calls the fastcc function.
>
I use the fastcall convention all the time.
LLVM-jitted code calling GCC-compile
2009 Sep 22
0
[LLVMdev] Verifier should not make any assumptions about calls to "malloc"
On Sep 22, 2009, at 6:11 AM, Duncan Sands wrote:
> Hi Victor, this code from the verifier broke the Ada front-end build:
>
> const Module* M = CI.getParent()->getParent()->getParent();
> Constant *MallocFunc = M->getFunction("malloc");
>
> if (CI.getOperand(0) == MallocFunc) {
> const PointerType *PTy =
>
>
2016 Jun 05
2
Migration help required for 3.3 to 3.8
I'm migrating from 3.3 to 3.8 and am having a few problems.
`CreateStructGEP` requires a type parameter now. I'm not sure what type it's expecting, so I converted `CreateStructGEP( valuePtr, index )` to `CreateStructGEP( valuePtr->getType(), valuePtr, index )`... would that be correct?
`arg_iterator` no longer converst to Value*, I have a lot of this now:
&*(args++)
This
2011 Jun 06
1
[LLVMdev] Explanation
On Jun 6, 2011, at 10:05 AM, Renato Golin wrote:
> On 6 June 2011 17:08, George Baah <georgebaah at gmail.com> wrote:
>> if(T == Type::getInt1PtrTy(Context, AS)) ...
>
> You don't need to care about address spaces to check for an int32*:
>
> if (T->isPointerTy()) {
> const Type* intT = cast<PointerType>(T)->getElementType();
> if
2013 Nov 17
0
[LLVMdev] opposite to CreateStructGEP
Does getelementptr have a counterpart function which unindexes a
pointer? In particular, I'm using CreateStructGEP from the builder and
want to get back to the struct pointer from a member pointer.
fptr = b.CreateStructGEP( sptr, 2 );
//I want to do this
sptr = b.CreateUnStructGEP( fptr, sptr_type, 2 );
I know I can calculate the offsets on my own, but it'd be nice to not
have to since
2013 Feb 03
0
[LLVMdev] BitCast for function type casting?
Shall I just use BitCast for function type conversion as well? For
example, in C notation, can I safely cast a pointer to the first
function to the second and back again:
void foo( T * )
to/from
void generic( int8 * )
--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive
2017 Jan 20
0
How to handle INT8 data
The lack of 64 bit integer support causes lots of problems when dealing
with certain types of data where the loss of precision from coercing to 53
bits with double is unacceptable.
Two packages were developed to deal with this: int64 and bit64.
You may need to find archival versions of these packages if they've fallen
off cran.
Murray (mobile phone)
On Jan 20, 2017 7:20 AM, "Gabriel
2017 Jan 20
0
How to handle INT8 data
2^53 == 2^53+1
TRUE
Which makes joining or grouping data sets with 64 bit identifiers
problematic.
Murray (mobile)
On Jan 20, 2017 9:15 AM, "Nicolas Paris" <nicolas.paris at aphp.fr> wrote:
Le 20 janv. 2017 ? 18h09, Murray Stokely ?crivait :
> The lack of 64 bit integer support causes lots of problems when dealing
with
> certain types of data where the loss of precision