Displaying 2 results from an estimated 2 matches for "getxinstance".
Did you mean:
getinstance
2020 Aug 14
2
Fwd: Deterministic function return attribute
...o annotate their code. That said, I'm still hoping this will soon
become a viable alternative to LTO:
https://www.youtube.com/watch?v=elmio6AoyK0&list=PL_R5A0lGi1AAxLTNN21BA0w8CA_xDR0F8&index=14&t=6s
> Examples:
>
> ```
> static Type* data;
>
> Type* getXInstance(){
> if (data==nullptr)
> data = new Type();
> return data;
> }
> ```
>
> or with `static Type* data` inside the function (I don't know whether
> LLVM makes a distinction, haven't had the time to check.)
>
> For the memoized function, an examp...
2020 Aug 13
3
Deterministic function return attribute
Hi!
I'm interested in what attributes in LLVM mean, specifically how to
say that the result is always the same for the given input parameters.
The main thing would be to merge two calls with the same parameters
when the function is declared but not defined. (just like two stores).
I'll call this property mergability.
%1 := call @test(%0)
%2 := call @test(%0)
and the optimization would