This is an archive of the discontinued LLVM Phabricator instance.

[Xtensa 1/10] Recognize Xtensa in triple parsing code.
ClosedPublic

Authored by andreisfr on Jul 16 2019, 3:16 PM.

Details

Summary

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.

Diff Detail

Event Timeline

andreisfr created this revision.Jul 16 2019, 3:16 PM
arsenm accepted this revision.Jul 16 2019, 3:25 PM
This revision is now accepted and ready to land.Jul 16 2019, 3:25 PM
appcs added a reviewer: appcs.Jul 16 2019, 3:49 PM
appcs added a subscriber: appcs.
appcs accepted this revision.Jul 16 2019, 3:53 PM
aykevl added a subscriber: aykevl.Jul 20 2019, 1:39 PM
aykevl added a comment.EditedAug 15 2019, 11:08 AM

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

lenary removed a subscriber: lenary.Jan 15 2020, 6:39 AM
andreisfr updated this revision to Diff 242199.Feb 3 2020, 2:58 PM

Patch is updated according to latest upstream version.

andreisfr updated this revision to Diff 328680.EditedMar 5 2021, 4:03 PM

Patch is updated according to LLVM upstream version and latest Xtensa backend version.. Also updated CODE_OWNERS.txt.

lmb added a subscriber: lmb.Mar 7 2021, 2:39 AM

Patch is updated according to LLVM upstream version

andreisfr updated this revision to Diff 425062.Apr 25 2022, 5:12 PM

Patch is updated according to LLVM upstream version

arsenm accepted this revision.Jul 15 2022, 6:28 AM
saugustine accepted this revision.Aug 19 2022, 9:10 AM
saugustine added a subscriber: saugustine.

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.

andreisfr updated this revision to Diff 455438.Aug 24 2022, 5:51 PM

Minor changes: corrected comment.

andreisfr marked an inline comment as done.Aug 24 2022, 6:11 PM
andreisfr added inline comments.
llvm/include/llvm/ADT/Triple.h
88 ↗(On Diff #425062)

Corrected

phosek added a subscriber: phosek.Sep 1 2022, 11:42 AM
arsenm accepted this revision.Sep 15 2022, 8:02 AM
andreisfr updated this revision to Diff 461110.Sep 18 2022, 6:15 PM
andreisfr marked an inline comment as done.

Updated according to latest changes in upstream source code

arsenm accepted this revision.Sep 19 2022, 6:14 AM

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.

MaskRay accepted this revision.EditedDec 17 2022, 11:51 AM
MaskRay added a subscriber: MaskRay.

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=

andreisfr updated this revision to Diff 484116.Dec 19 2022, 3:38 PM

Updated according to latest changes in upstream source code

andreisfr updated this revision to Diff 485246.Dec 25 2022, 4:20 PM

Updated according to latest changes in upstream source code

This revision was landed with ongoing or failed builds.Dec 26 2022, 4:39 AM
This revision was automatically updated to reflect the committed changes.