[llvm] r215343 - In LVI(Lazy Value Info), originally value on a BB can only be caculated once,

Jiangning Liu liujiangning1 at gmail.com
Mon Sep 22 20:08:18 PDT 2014


Hi Dan,

>
> So can you explain how you aren't doing this?
>
> It looksl ike you think the lattice goes
> undefined
> overdefined
> constant
>
> That should 100% not be the case
> the lattice order should be
> undefined
> constant
> overdefined
>
> undefined means you don't know
> constant means it has one value.
> overdefined means it has too many values
>
> This is a traditional value range lattice (though sometimes there are more
> things in the middle).
> There is no way you should go from overdefined back to constant.
>
> Ah, I see. Thanks for your explanation! I think you are absolutely
correct, and I misunderstood lattice value 'overdefined'. The original code
is like this,

  if ((!BBLV.isUndefined() {
     ...
     return;
  }

  // Otherwise, this is the first time we're seeing this block.  Reset the
  // lattice value to overdefined, so that cycles will terminate and be
  // conservatively correct.
  BBLV.markOverdefined();

So this algorithm is really conservative. I think the solution might be
removing this lowering or adding threshold control for this lowering. Do
you have any suggestions?

Thanks,
-Jiangning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140923/8ae423df/attachment.html>


More information about the llvm-commits mailing list