I'm sharing an initial set of patches that incrementally add an MC layer for RISC-V to LLVM. I've split everything up in to what are hopefully easily reviewable chunks (much like has been done with the incremental import of the AVR backend).
Before this can be committed to llvm, permission to contribute from everyone who's committed code to the upstream branch will need to be collected.
git log --format="%an <%ae>" llvm/master..riscv-llvm/riscv-trunk|sort |uniq -c
shows, it looks like, 11 people whose permission needs to be asked. Some of those only contributed a 1-line trivial fix, so possibly it's okay if they don't reply, but might as well try asking everyone first. Certainly the more major contributors need to say OK.
I believe that if you cc those authors on the proposal email for adding the backend to LLVM, and ask them to explicitly reply to the list that they're okay with their work in https://github.com/riscv/riscv-llvm getting contributed to LLVM, under the LLVM license, that will be sufficient.
It'd also be a good idea to put the names/emails of the relevant additional original authors in each patch.
Fix incorrect sort order issue in lib/Support/Triple.cpp reported by @bogner (the email doesn't seem to have triggered a Phabricator update...)
If comparing the diffs, ignore the lost lines in TripleTest.cpp. This is an upstream change visible because I rebased my patchset and because I am following the LLVM code review advice of generating diffs with -U99999