lvalues and rvalues

Dibyendu Majumdar mobile@majumdar.org.uk
Thu Jan 1 00:00:00 GMT 2015


I am still trying to get the lvalue / rvalue concepts so that I know
exactly what to use when.

I have struct with a pointer member.

struct X {
 struct Y *base;
};

Now this pointer base can be updated while the function is running so
I need the value of the pointer refreshed (loaded) whenever it can
potentially change. In LLVM I emit explicit load instructions which
are then optimized so that any redundant loads are deleted. What would
be the equivalent method here? Should I just use a rvalue reference?
Will this be automatically refreshed? Should I use a local variable
and assign the value of the base pointer to it explicitly (i.e.
similar to explicit load) ?

Thanks and Regards

Dibyendu



More information about the Jit mailing list