https://bugs.llvm.org/show_bug.cgi?id=52175

            Bug ID: 52175
           Summary: [FuncSpec] Fully consider the user of the function.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected],
                    [email protected], [email protected],
                    [email protected]

In the test case, there are functions p(), o(), m() and main().
```
p() {
  o(0);
  o(1);
}

o() {
  p();
  m(j);
}

main() {
  m(0);
}
```

Before the function specialization starts, all functions are marked as
executable.
Executable: main(), m(), p(), o().

After the first iteration, o.1(), o.2() are generated, and in
specializeFunction(), o() is marked as unreachable.
But at this time, o.1() and o.2() are not marked as executable.
Executable: main(), m(), p()

In the second iteration, the function m() is specialized.  At this time, it is
considered that m() is only called by main(), because among all the functions
that call m(), only main() is considered executable. But actually m() is also
called by functions o.1() and o.2().
Therefore, for m(), it is wrong to think that isPartial is `false`, but in fact
it should be `true`.

After all iterations in the function specialization are completed, o.1() and
o.2() are marked as executable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to