I'm sharing initial set of patches that adds LLVM backend for Xtensa architecture. It is based on this LLVM fork https://github.com/espressif/llvm-xtensa. I prepared patches by similar way like it was already successfully done for RISCV, i.e. incrementally add an initial MC layer for Xtensa by small chunks which could be reviewable.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Is there a reason why this hasn't been committed yet?
@andreisfr if you don't have commit access, you can indicate that here so that someone else can commit it for you.
For details: https://llvm.org/docs/Contributing.html#how-to-submit-a-patch
(I'm just very excited about having Xtensa support in LLVM).
@aykevl, I'm not sure whether we currently could upload patch 1/10, because there are some questions in patch 4/10 about ISA(we currently have just opensource projects and unofficial documents with Xtensa ISA description). You could participate in this discussion to move the Xtensa backend forward.
I think the standard for what is committed for the triple is quite low. We already have out of tree targets included in the upstream triple, so it doesn't really matter what happens with the follow up patches. This should be fine to commit without waiting for the rest of the backend review
Patch is updated according to LLVM upstream version and latest Xtensa backend version.. Also updated CODE_OWNERS.txt.
One minor nit, but otherwise this looks good.
llvm/include/llvm/ADT/Triple.h | ||
---|---|---|
88 ↗ | (On Diff #425062) | Add a colon between Tensilica and Xtensa. |
llvm/include/llvm/ADT/Triple.h | ||
---|---|---|
88 ↗ | (On Diff #425062) | Corrected |
Hi everyone. Since this has been accepted for some time now, we're planning to commit this on Monday (December 16th). Please let us know if there is anything else we should address.
LGTM.
@sstefan1 consider test buildability of 3 build modes
- default
- -DBUILD_SHARED_LIBS=on
- -DLLVM_LINK_LLVM_DYLIB=on
(For all-but-one mode, just build, no need to test. Consider LIT_OPTS='--filter=nomatch --allow-empty-runs' ninja check-{llvm,clang,clang-tools,lldb})
For large patches which change a lot of the build system. I've seen many patches reverted and relanded because of some dependency issues.
If you want to test asan, use -DLLVM_USE_SANITIZER=Address -DLLVM_ENABLE_RUNTIMES=