[llvm-dev] RFC/bikeshedding: Separation of instruction and pattern definitions in LLVM backends

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 18 03:05:24 PDT 2017


On 18 Aug 2017, at 10:55, Alex Bradbury <asb at asbradbury.org> wrote:
> 
> I've demonstrated both the "conventional" approach
> <https://gist.github.com/asb/0c61ebc131076c6186052c29968a491d#file-riscvinstrinfo_conventional-td>
> and the "separate patterns" approach
> <https://gist.github.com/asb/0c61ebc131076c6186052c29968a491d#file-riscvinstrinfo_separate_pats-td>.
> Obviously once patterns and pseudo-instructions are separated out, you may
> want to move them to a different .td file.
> 
> Does anyone have strong views on these sort of choices one way or another?

I do find the second easier to follow, though both are a lot easier to read than the MIPS back end.

David



More information about the llvm-dev mailing list