If parameters are passed by stack and their stack offsets are consistent
with stack offsets of caller's passed by stack parameters, tail call
optimization is feasible.
Details
Details
- Reviewers
asb craig.topper jrtc27 luismarques
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I haven't noticed any specific issue so far but these things are fiddly, the patch needs more eye balls.
See if you can think of additional test coverage scenarios that might be relevant. Does this handle, say, when part of a value is passed on a register and part on the stack?
(OT: I just noticed that Phabricator is not syntax highlighting RISCVISelLowering.cpp. Is it because it's too big?)
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
11278 | Is this for sure the only problematic flag? Having more test coverage of weird scenarios would help. | |
llvm/test/CodeGen/RISCV/tail-calls.ll | ||
116 | Nit: keep the comment but update it to explain that tail call optimization is possible if the stack layout is compatible |
Is this for sure the only problematic flag? Having more test coverage of weird scenarios would help.