You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed stack call implicit arg mismatch between caller/callee.
We are asserting in AddImplicitArgs pass due to the caller and callee not having the same set of implicit args.
Since stack calls do not inherently support implicit args, we inline them in BuiltinCallGraphAnalysis pass. However, we still need to add implicit args to their function signature in order for the Resolve passes to work before the inlining occurs.
The following two changes are needed to fix the mismatch:
1. BuiltinCallGraphAnalysis itself will change the implicit arg metadata, so we need to move the callgraph pruning function, which inlines stack functions that use implicit args, to the end of the pass, where it will not get affected by the rest of the pass.
2. We cannot remove the "visaStackCall" attribute inside the pruning loop, otherwise another search path in the DFS will miss it. Instead, save all pruned functions and process them outside the loop.
0 commit comments