Hi Jim: It's no problem with current approach, I just think it can simplify the .md file.
Thanks :) On Tue, Jul 3, 2018 at 11:22 AM Jim Wilson <j...@sifive.com> wrote: > > On Mon, Jul 2, 2018 at 8:04 PM, Kito Cheng <kito.ch...@gmail.com> wrote: > > Does it possible just combine those pattern into simple_return > > pattern, and then check the function type and output correct return > > instruction in riscv_output_return? > > There might be problems with optimizations thinking this is a regular > return when it isn't. But it might work if we have enough checks for > the interrupt attribute in the right places. > > Having different patterns for different types of return instructions > makes the RTL dumps self contained. You can tell what kind of > instruction it is without having to look at the source tree to see how > the function was declared. There is some minor benefit to that. > > Is there a problem with the current approach that needs fixing? > > Jim