[llvm-bugs] [Bug 52175] New: [FuncSpec] Fully consider the user of the function.
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 14 04:08:00 PDT 2021
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: unassignedbugs at nondot.org
Reporter: polaris_jiang at 163.com
CC: arnaud.degrandmaison at arm.com,
llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
Ties.Stuij at arm.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211014/2340de84/attachment.html>
More information about the llvm-bugs
mailing list