If the callsite is in a single BB loop, we need to exclude the BB from
the successor set (in which it'd be a member), because that set forms a
boundary at which we stop traversing the CFG, when re-ingesting BBs
after inlining; but after inlining, the callsite BB's new successors
should be visited.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thank you for the fix. LGTM modulo some rewording of the comment.
llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp | ||
---|---|---|
138–142 | I understand the motivation and the fix, but I am wondering if we can make the comment a little easier to understand. // Exclude the CallSiteBB. finish() traverses the resulting CFG from CallSiteBB // up to and including Successors. Including the CallSiteBB in Successors would // prematurely stop the traversal when it happens to be its own successor. Nit: "would prematurely stop the traversal" sounds more natural than "would stop prematurely the traversal". |
I understand the motivation and the fix, but I am wondering if we can make the comment a little easier to understand.
Nit: "would prematurely stop the traversal" sounds more natural than "would stop prematurely the traversal".