Displaying 1 result from an estimated 1 matches for "_z1fp5state".
2016 Feb 29
2
Jit: use @llvm.lifetime.end to optimize away stores to globals used as temporaries
...engine to generate code for the following function 'f':
struct State {
int a;
int tmp;
int b;
};
void f0(State* s) { s->tmp = s->a; }
void f1(State* s) { s->b = s->tmp; }
void f(State* s)
{
f0(s);
f1(s);
}
The Jit engine generates the following code:
define void @_Z1fP5State(%struct.State* %s) #1 {
%1 = getelementptr inbounds %struct.State, %struct.State* %s, i64 0, i32 0
%2 = load i32, i32* %1, align 4, !tbaa !1
%3 = getelementptr inbounds %struct.State, %struct.State* %s, i64 0, i32 1
store i32 %2, i32* %3, align 4, !tbaa !6
%4 = getelementptr inbounds %str...