[Soot-list] MHGPostDominatorFinder issues

Patrick Meredith pmeredit at gmail.com
Sat Apr 13 20:39:41 EDT 2013


It appears that I need to be using BriefUnitGraph instead of
CompleteUnitGraph.  The exception edges seem to be very conservative.
Sorry for the false alarm.

-Patrick

On Sat, Apr 13, 2013 at 7:24 PM, Patrick Meredith <pmeredit at gmail.com> wrote:
> MHGPostDominatorFinder does not seem to work within the body of a
> loop.  I would expect given instructions X and Y in the same basic
> block within a loop that X post dominates Y if X follows Y, but that
> is not the result I am getting.  Within a loop the
> MHGPostDominatorFinder claims that X post dominates Y iff X == Y.
>
> Here is my example loop:
>
> label1:
>   $i1 = <emp.Simple: int y>
>   $i2 = $i1 + 1
>   <emp.Simple: int y> = $i2
>   $i3 = <emp.Simple: int x>
>   $i4 = $i3 + 1
>   <emp.Simple: int x> = $i4
>   i0 = i0 + 1
>
> if i0 < 20 goto label 1
>
> And the only instruction that post dominates:
>
> $i1 = <emp.Simple: int y>
>
> is
>
> $i1 = <emp.Simple: int y> itself.  It returns false for every other instruction.
>
> I am initializing the Post Dominantor Finder with:
>
> new MHGPostDominatorsFinder(new CompleteUnitGraph(body));
>
> Here is the output of checking every Stmt in the Loop pairwise:
>
> %%%%% if i0 < 20 goto $i1 = <emp.Simple: int y>
> Post Dominated by
>       if i0 < 20 goto $i1 = <emp.Simple: int y>
> %%%%% $i1 = <emp.Simple: int y>
> Post Dominated by
>       $i1 = <emp.Simple: int y>
> %%%%% $i2 = $i1 + 1
> Post Dominated by
>       $i2 = $i1 + 1
> %%%%% <emp.Simple: int y> = $i2
> Post Dominated by
>       <emp.Simple: int y> = $i2
> %%%%% $i3 = <emp.Simple: int x>
> Post Dominated by
>       $i3 = <emp.Simple: int x>
> %%%%% $i4 = $i3 + 1
> Post Dominated by
>       $i4 = $i3 + 1
> %%%%% <emp.Simple: int x> = $i4
> Post Dominated by
>       <emp.Simple: int x> = $i4
> %%%%% i0 = i0 + 1
> Post Dominated by
>       i0 = i0 + 1
>
> --
> -Patrick



-- 
-Patrick


More information about the Soot-list mailing list