search for: formal_arg

Displaying 5 results from an estimated 5 matches for "formal_arg".

Did you mean: formal_args
2024 Feb 17
2
Capturing Function Arguments
I'm wrapping a function in R and I want to record all the arguments passed to it, including default values and missing values. I want to be able to snoop on function calls in sourced scripts as part of a unit testing framework. I can capture the values fine, but I'm having trouble evaluating them as if `force()` had been applied to each of them. Here is a minimal example: f0 <-
2007 Aug 03
4
[LLVMdev] How to access llvm Types from the codegen?
...@f(%struct.s* byval %a) { entry: %tmp2 = getelementptr %struct.s* %a, i32 0, i32 0 ; <i64*> [#uses=1] %tmp3 = load i64* %tmp2 ; <i64> [#uses=1] ret i64 %tmp3 --------------------------------------- When the DAG is constructed it will contain a load from formal_args. It looks like a lot of work to modify the DAG so that instead it uses a copy. Even if we decide to do this, we would need to pass the size of the structure to the DAG, which currently is not available. I propose that structures that are passed on registers should be slip into many DAG level argu...
2007 Aug 03
0
[LLVMdev] How to access llvm Types from the codegen?
...y: > %tmp2 = getelementptr %struct.s* %a, i32 0, i32 0 > ; <i64*> [#uses=1] > %tmp3 = load i64* %tmp2 ; <i64> [#uses=1] > ret i64 %tmp3 > --------------------------------------- > > When the DAG is constructed it will contain a load from formal_args. It shouldn't contain a load: the "a" argument (which represents the address by-val arg) will be one of the results of the formal_arguments node. Ah, you probably mean the explicit load will turn into a load SDNode, which is right :) > It looks like a lot of work to modify t...
2007 Jul 26
0
[LLVMdev] How to access llvm Types from the codegen?
...unctions arguments that have > the "byval" attribute, they would have to access the original argument > Type. For example, on linux x86_64 {i64, i64} should be passed on > registers and {i64, i64, i64} goes on the stack. > > The problem is that when looking at (for example) FORMAL_ARGUMENTS, > the only thing that is present is the type of the pointer itself (i64 > for example). > > I can see three options to solve the problem: > > 1) Make FORMAL_ARGUMENTS have one SrcValueSDNode per argument in > addition to the flags and make CALL use SrcValueSDNode for the...
2007 Jul 18
2
[LLVMdev] How to access llvm Types from the codegen?
...de generators to lower functions arguments that have the "byval" attribute, they would have to access the original argument Type. For example, on linux x86_64 {i64, i64} should be passed on registers and {i64, i64, i64} goes on the stack. The problem is that when looking at (for example) FORMAL_ARGUMENTS, the only thing that is present is the type of the pointer itself (i64 for example). I can see three options to solve the problem: 1) Make FORMAL_ARGUMENTS have one SrcValueSDNode per argument in addition to the flags and make CALL use SrcValueSDNode for the arguments. The calling conventio...