On the 0x237 day of Apache Harmony Naveen Neelakantam wrote: > On Dec 5, 2006, at 1:12 PM, Egor Pasko wrote: > >On the 0x233 day of Apache Harmony Naveen Neelakantam wrote: > >> Hello Egor, > >> > >> I'm almost too embarrassed to ask, but if I started looking at your > >> ABCD code now, would it still be useful? > > > >It actually *is* useful! > > > >I have been busy with stability issues during this period, thus made > >no progress in ABCD since my last update to HARMONY-1788. I want to > >finish this work not later than January. If you have time to do it > >faster, you can take it. I will be fixing Jitrino.OPT here and there > >for a while yet... > > OK, great! I will try to move the code forward then. > > If I understand your code correctly, the pass currently builds the > ABCD inequality graph, but does not invoke the demand solver. As a > first step, I am considering invoking the demand solver on every > bounds check (for both the upper bound and lower bound problems). A > better choice might be to invoke the solver on "hot" checks, but > that can be investigated once things are working. Does this sound > reasonable?
I think, invoking the solver on each bound check is reasonable. It should not be slow. TODOs are: * run the solver on each instruction BTW, IMHO: we have to invoke demandProve twice for each bound check to be safe with integer overflows. For example, for LB check: * demandProve(-1 < x) * demandProve(x < +infinity), for UB check: * demandProve(x < A.length) * demandProve(-infinity < x) * make the per-VM-session counter of eliminated checks, use Jitrino::DeInit(), use -XcleanupOnExit * compare the numbers between old and new implementations * test (there are some great JIRAs on bounds checks: HARMONY-2144, HARMONY-2147, HARMONY-2191) any comments are welcome, thanks for doing this! -- Egor Pasko
