similar to: [LLVMdev] Struct parameters being converted to other types

Displaying 20 results from an estimated 11000 matches similar to: "[LLVMdev] Struct parameters being converted to other types"

2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors... Each of these commands correctly prints "hello": echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit echo -e '#include <iostream>\nint main(){ std::cout <<
2012 Dec 14
0
[LLVMdev] StructType for dispatch_object_t changed by Linker
Le 14 déc. 2012 à 17:08, Jaymie Strecker <jstrecker at kosada.com> a écrit : > Duncan, thanks for your reply. > >> Probably the types are not defined precisely the same in each module (maybe you >> could send the exact definitions in each module to the mailing list?), > > > In the module loaded in Step 1 (otherModule): > > %struct.dispatch_group_s =
2012 Dec 14
2
[LLVMdev] StructType for dispatch_object_t changed by Linker
Hi, everyone. I've run into a strange problem generating code that contains the `dispatch_object_t` type. The problem happens when a program does these steps (all with the global LLVMContext): 1. Loads a module (otherModule) that uses `dispatch_object_t`. 2. Generates code that calls `dispatch_release`, which takes a `dispatch_object_t` argument, into a module (mainModule). 3. Links
2012 Dec 14
2
[LLVMdev] StructType for dispatch_object_t changed by Linker
Duncan, thanks for your reply. > Probably the types are not defined precisely the same in each module (maybe you > could send the exact definitions in each module to the mailing list?), In the module loaded in Step 1 (otherModule): %struct.dispatch_group_s = type opaque %union.dispatch_object_t = type { %struct.dispatch_object_s* } %struct.dispatch_object_s = type opaque In the
2010 Mar 04
1
[LLVMdev] Struct parameter
Hi, guys, If there is a struct {i8, i8, i32}, and there are several parameter GPRs(32bits), say, r0, r1~r5, I can make this struct to be passed in r0, r1 because LLVM_SHOULD_PASS_AGGREGATE_IN_INTEGER_REGS is true in DefaultABI, neither it passed by value, nor it passed as FCA. But if the first parameter register r0 is occupied by other argument, in DefaultABI, that struct passed as a i64, and
2017 Mar 08
3
Current preferred approach for handling 'byval' struct arguments
On 7 March 2017 at 17:58, Reid Kleckner <rnk at google.com> wrote: > Today, the vast majority of target in Clang coerce aggregates passed this > way into appropriate word-sized types. They all use their own custom > heuristics to compute the LLVM types used for the coercions. It's terrible, > but this is the current consensus. > > I would like to improve the situation
2014 Jan 24
2
[LLVMdev] byval attr for base+range parameters
Hello guys, For single scalar pointer parameter, we have 'byval' to specify the pointee is not changed. But for base+range parameters like: declare void @_gfortran_transfer_integer_write(%struct.__st_parameter_dt*, i8*, i32) (This is the fortran runtime api to 'printf' one integer) The 2nd & 3rd args are used to specify the memory of that integer. I didn't find a
2017 Mar 07
2
Current preferred approach for handling 'byval' struct arguments
As many of you will know, handling of struct arguments in LLVM is actually slightly more fiddly than you might expect. For targets where aggregates are always passed on the stack it's easy enough, the Clang ABI code marks these arguments as byval and the call lowering code in LLVM will copy the object to the stack when needed. There are more options for when the target has more complex ABI
2013 Jun 19
2
[LLVMdev] ARM struct byval size > 64 triggers failure
I missed that the testing case is returning a struct. You are right in VARegSaveSize. For callee: sub sp, sp, #16 push {r11, lr} mov r11, sp sub sp, sp, #8 str r3, [r11, #20] str r2, [r11, #16] str r1, [r11, #12] ldr r1, [r11, #76] The beginning of the input struct @ sp_at_entry - 16 - 8 + 12 = sp_at_entry -12 # of leftover bytes 67-12 = 55 r11+76 is @ sp_at_entry - 24 + 76 = sp_at_entry
2014 May 16
2
[LLVMdev] It is possible to somehow turn off coercion of struct parameters into ints?
In particular, I would for example like to prevent that two fields of type i32 are packed into an i64 parameter. And so on... Thanks! -- Zvonimir
2013 Jun 20
0
[LLVMdev] ARM struct byval size > 64 triggers failure
On 20 June 2013 13:35, Rajesh Viswabramana <rajesh.vis at samsung.com> wrote: > - What considerations will be made from llvm side to make abi > compatibile with gcc/other compilers for arm - struct byval size >64 bytes. > Hi Rajesh, I'm not sure I follow your question, but in general, the idea is to be compatible with ABIs, not with specific compilers. So, if compiler X
2015 Mar 09
3
[LLVMdev] byval in a world without pointee types
On Mon, Mar 9, 2015 at 12:38 PM, Reid Kleckner <rnk at google.com> wrote: > If we're keeping types on GEP, > You mean rather than just dropping gep entirely & doing manual pointer arithmetic? (& moving inbounds to an attribute on pointer addition, I guess?) > then IMO we should keep them on allocas and globals. It keeps the IR human > readable. > & what of
2013 Jun 20
1
[LLVMdev] ARM struct byval size > 64 triggers failure
> - "since ABI says the stack pointer needs to be 8 byte aligned at function entry point" (taken from Manman's reply) > What will be considered as entry point here? > Is it place of SP Adjustments "sub sp, sp, #16" > (Or) Is it place of first user instruction(end of prologue) "ldr r2, .LCPI0_0" Eight byte stack alignment is a
2013 Jun 18
0
[LLVMdev] ARM struct byval size > 64 triggers failure
Hi Rajesh, The callee code looks okay to me > Assembly for check114 > --------------------------------------------------------------- > sub sp, sp, #16 > push {r11, lr} > mov r11, sp > sub sp, sp, #8 > str r3, [r11, #20] > str r2, [r11, #16] > str r1, [r11, #12] > ldr r1,
2007 Aug 03
0
[LLVMdev] How to access llvm Types from the codegen?
On Fri, 3 Aug 2007, Rafael Espindola wrote: > Sorry for the delay. I am back from a vacation and have been busy > catching up.... Welcome back :) > That is why I need the types (just for the size). This is necessary to > implement both the current behavior and the correct ABI. Right. > consider the llvm code > --------------------------------------- > %struct.s = type {
2015 Mar 09
2
[LLVMdev] byval in a world without pointee types
Moving this to llvm-dev where I should've sent it in the first place (& +Chandler, because we discussed this offline a bit) On Thu, Feb 19, 2015 at 11:32 AM, Reid Kleckner <rnk at google.com> wrote: > On Thu, Feb 19, 2015 at 10:57 AM, David Blaikie <dblaikie at gmail.com> > wrote: > >> >> >> On Thu, Feb 19, 2015 at 8:31 AM, Rafael Espíndola <
2012 May 02
0
[LLVMdev] structs get decomposed when shouldn't
Hi Tim, On 02/05/12 10:51, Tim Northover wrote: > On Wednesday 02 May 2012 09:12:16 Duncan Sands wrote: >>> As I can understand, LLVM is trying to decompose datatypes into smaller >>> components in some circumstances. >> >> Can you please explain more what you are referring to here. LLVM itself >> shouldn't be changing function parameters or return
2018 Apr 21
0
How to add/use parameter attributes? Troubles with "byval"
I'm unable to figure out how IR attributes can be added via the C++ API. I need to create a function like this:     %1 = call i64 @abi_call_test_tuple_2p(%struct.abi_tuple_2p* byval align 8 %v) Where a structure is being passed by value. I need to add the `byval` attribute somewhere (I'm not clear if this is on the function arguments or the type). I'm also uncertain of why that
2016 Jan 19
2
[RFC] A proposal for byval in a world with opaque pointers
> Do all tests need it? Align is just for non-default alignment (> align(1)) so it may be OK for the tests to omit it & it's probably not right to /require/ an align attribute on a byval parameter. I've had to fix some of the tests which checked that the right alignment was applied, by looking at the generated asm, but had no "align A" attributes and relied on the
2003 May 28
1
Test for trend?
Hello R community, I would like to test for learning effects by subjects in my experiment. Each subject participates in six consecutive auction rounds of the same treatment. The response variable is the efficiency of an auction outcome measured by a real number. Since the efficiency increases over the six rounds, I suppose that subjects learn about the rules of the auction institution, but I