harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Chow" <simon.harm...@gmail.com>
Subject Re: [drlvm][jit] Instoptimizer in MemoryValueNumberingPass
Date Wed, 14 May 2008 03:33:55 GMT
Egor,
Thank you every much, it is very helpful.
AFAIK, only write barrier has been implemented in harmony, my goal is
implementing read barrier for gen GC and concurrent GC,
As a result, a command option such as generate_read_barrier=true/false is
added to DRLVM.
If it is true, GC use information intercepted by read barrier to perform gen
or concurrent collection instead of using write barrier.
Maybe the performance will not be better than write barrier, but I think it
is a good practice to understand the internal of both JIT and GC, do you
think so?


2008/5/13 Egor Pasko <egor.pasko@gmail.com>:

> On the 0x442 day of Apache Harmony Simon Chow wrote:
> > Hi all
> > I am trying to add read barriers mechanism in DRLVM ( just for practice
> :=)
> > )
> > As the first step, I am inserting read barrier inst in HIR,
> > I define a new modifier set like this:
> > enum LoadModifier {
> >     Load_NoReadBarrier       = 0x1 << 27,
> >     Load_ReadBarrier       = 0x2 << 27,
> >     Load_Mask         = 0x3 << 27,
> >     LoadModifier_IsShiftedBy = 27,
> >     LoadModifier_BitsToEncode = 1,
> >     LoadModifier_BitsConsumed = 2
> > };
> > it will be used in TauLdInd.
>
> you want to optimise some barriers out, right?
> looks good
>
> > My question is about Instoptimizer of MemoryValueNumberingPass, I am not
> > familiar with it.
> > First,
> > What is this pass mainly used for?
>
> MemOpt is used to eliminate unnecessary store+load pairs. It puts
> corresponding operations into a hash. Then eliminates loads if sees
> loads in this hash.
>
> > Second,
> > In the caseTauStInd case of the switch in dispatch method:
> >
> > Modifier mod(Modifier(inst->getAutoCompressModifier()) |
> > Modifier(Speculative_No) );
> > setHashToInst(inst, getKey(Operation(Op_TauLdInd, inst->getType(), mod),
> > addrOp->getId()));
> >
> > What does it do here? Why is Op_TauLdInd  used in a caseTauStInd case?
>
> load operation is stored as if it is there. So, if you have a new load
> op you search if there is the same one in the hash.
>

Why does it use Modifier(Speculative_No) instead of
inst->getSpeculativeModifier() ?
Thanks


> --
> Egor Pasko
>
>


-- 
>From : Simon.Chow@Software School of Fudan University

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message