Page MenuHomePhabricator

[ARM][CMSE] Add CMSE header & builtins
Needs RevisionPublic

Authored by javed.absar on May 24 2019, 7:49 AM.

Details

Summary

This is patch C2 as mentioned in RFC http://lists.llvm.org/pipermail/cfe-dev/2019-March/061834.html

This adds cmse builtin functions, and introduces arm_cmse.h header which has useful macros, functions and data types for end-users of cmse.

Diff Detail

Event Timeline

javed.absar created this revision.May 24 2019, 7:49 AM
sigvartmh requested changes to this revision.Tue, Sep 17, 6:42 AM
sigvartmh added a subscriber: sigvartmh.
This comment was removed by sigvartmh.
This revision now requires changes to proceed.Tue, Sep 17, 6:42 AM

Maybe I'm doing something wrong tried to apply these patches but when trying to build code which uses cmse I get

Cannot select: intrinsic %llvm.arm.cmse.tt
fatal error: error in backend: Cannot select: intrinsic %llvm.arm.cmse.tt
clang-10: error: clang frontend command failed with exit code 70 (use -v to see invocation)

Built llvm with clang,compiler-rt,lld from master.

Did you try to build and run lit tests successfully with this patch before trying your own tests?

sigvartmh added a comment.EditedTue, Sep 17, 7:32 AM

Maybe I'm doing something wrong tried to apply these patches but when trying to build code which uses cmse I get

Cannot select: intrinsic %llvm.arm.cmse.tt
fatal error: error in backend: Cannot select: intrinsic %llvm.arm.cmse.tt
clang-10: error: clang frontend command failed with exit code 70 (use -v to see invocation)

Built llvm with clang,compiler-rt,lld from master.

Did you try to build and run lit tests successfully with this patch before trying your own tests?

Unfortunately I did not will try to run the test first. I assumed that this patch was working, is it?

dmgreen added a subscriber: chill.Tue, Sep 17, 10:50 AM

I'm afraid the upstreaming of CMSE has stalled, and this is not all that would be needed to get it working. This adds some header files and clang builtins, the selection of them in the backend isn't yet present, hence the error you are seeing. There are more patches to follow around lowering intrinsics and clearing registers correctly.

sigvartmh resigned from this revision.Tue, Sep 17, 1:33 PM

Not used to phabricator tried to remove my request for change. So no one is working on upstreaming CMSE to LLVM now?

Hi, CMSE upstreaming is indeed one of our priorities. So yes, we are very interested in your feedback. And no, CMSE upstreaming is not abandoned, just going a bit slow ATM :( but any help reviewing is much appreciated! :)

@chill would it make sense to start upstream other self-contained pieces of codegen before this patch?