Displaying 5 results from an estimated 5 matches for "formal_args".
Did you mean:
formal_args_3
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 argum...
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 th...
2007 Jul 26
0
[LLVMdev] How to access llvm Types from the codegen?
Code generator shouldn't introspect the LLVM type at all, except to
get the size of the type. Anything needed should be encoded by the
front-end. In the short term, please focus on getting parity with
what we already have. This means x86-64 will be wrong, but it
already is. As a second step we can then worry about x86-64-specific
param attributes that should be added to handle
2007 Jul 18
2
[LLVMdev] How to access llvm Types from the codegen?
In order to the code 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