[llvm] [RISC-V] Fix incorrect epilogue_begin (PR #120623)
Venkata Ramanaiah Nalamothu via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 03:51:21 PST 2025
RamNalamothu wrote:
> It seems like in general we cannot guarantee that prolog / epilog code is a contiguous region since instructions can be moved by optimisation. What is the solution in that case?
All the code here that assumes prolog / epilog code i.e. CSR save / restore instructions is a contiguous region is part of the _prologepilog_ pass alone. So, I think, we are good here.
If we have to assume prolog / epilog code is not a contiguous region outside the _prologepilog_ pass, then it's a concern for all the targets, not just for RISC-V / this patch, on how _AsmPrinter_ is going to handle that while emitting _prologue_end / epilogue_begin_ which, I think, can be discussed as a separate topic (?).
https://github.com/llvm/llvm-project/pull/120623
More information about the llvm-commits
mailing list