harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "史成荣" <icyr...@gmail.com>
Subject Re: [drlvm][jitrino][optimizer]
Date Fri, 14 Dec 2007 08:06:52 GMT
You are right, it's a native method.

Thanks,
Chengrong


在07-12-11,Pavel Ozhdikhin <pavel.ozhdikhin@gmail.com> 写道:
>
> I'm catching up dev list meassages after vacation. Is the problem still
> exists?
> My guess is that you encountered a call to a native method. You may check
> this with methodDesc->isNative().
>
> Thanks,
> Pavel
>
>
> On 12/6/07, 史成荣 <icyrong@gmail.com> wrote:
> >
> > I try to get CFG of the callee of current method with the following code
> > just like the escape analysis pass does. But I found the methodDesc of
> > some
> > callees was abnormal,  the ByteCode size is 0 and the ByteCode Address
> is
> > invalid. Why does this happen?
> >
> > //call is a method invoke instruction
> >
> > MethodDesc* methodDesc = 0;
> >
> > if (call == NULL) {  // scanned Op_DirectCall, not scanned
> > Op_IndirectMemoryCall
> > return true;
> > }
> > methodDesc = call->asMethodCallInst()->getMethodDesc();
> >
> > OpndManager& _opndManager(irManager.getOpndManager());
> > Opnd *returnOpnd = 0;
> > if(call->getDst()->isNull())
> > returnOpnd = _opndManager.getNullOpnd();
> > else
> > returnOpnd = _opndManager.createSsaTmpOpnd(call->getDst()->getType());
> >
> > IRManager* inlinedIRM = new (mm) IRManager(irManager.getMemoryManager(),
> > irManager, *methodDesc, returnOpnd);
> > CompilationInterface& ci= inlinedIRM->getCompilationInterface();
> > bool cibcmap = ci.isBCMapInfoRequired();
> > if (cibcmap) {
> > ci.setBCMapInfoRequired(false);
> > }
> >
> >
> > CompilationContext inlineCC(irManager.getMemoryManager(), &ci,
> > irManager.getCurrentJITContext());
> > inlineCC.setPipeline(irManager.getCompilationContext()->getPipeline());
> > inlineCC.setHIRManager(inlinedIRM);
> > TranslatorSession* traSession =
> > (TranslatorSession*)translatorAction->createSession(
> > inlineCC.getCompilationLevelMemoryManager());
> > traSession->setCompilationContext(&inlineCC);
> > inlineCC.setCurrentSessionAction(traSession);
> > traSession->run();
> > inlineCC.setCurrentSessionAction(NULL);
> >
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message