Re: please help understanding what's the function and diffrence between hotspot compiler c1 and c2 ？
rednaxelafx at gmail.com
Wed Nov 2 08:28:50 UTC 2016
I don't think I understand your question, but I'll take a shot.
Are you trying to ask what the differences are between C1 and C2, with
regards to how they handle volatile field accesses?
For C1, yes, all Java fields accesses (load/store) are represented in the
HIR with LoadField and StoreField instructions. The ciField in these
instructions would carry the information about whether the field is
volatile or not.
When lowering HIR to LIR, the LIRGenerator::do_LoadField() and
do_StoreField() functions are called. What is it that you're trying to
learn about these functions?
For C2, it's a bit complicated, because volatile semantics involve the
memory graph portion of C2's Sea-of-nodes IR. You may want to refer to 
and  for some background information before you dive into the code.
Hope it helps,
On Wed, Nov 2, 2016 at 1:19 AM, 恶灵骑士 <1072213404 at qq.com> wrote:
> what's the function and diffrence between hotspot compiler c1 and c2 ？
> about c1，
> i have found something about ‘voaltile’ and
> methods LIRGenerator::do_StoreField(StoreField* x) and
> LIRGenerator::do_LoadField(LoadField* x) in
> when operating a variable with a volatile qualifier，will it finally
> invoke do_StoreField or do_LoadField method？
> if true， then method do_LoadField or do_StoreField by which method？
More information about the hotspot-dev