This is an archive of the discontinued LLVM Phabricator instance.

[ARM][CMSE] Add CMSE header & builtins
AbandonedPublic

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.Sep 17 2019, 6:42 AM
sigvartmh added a subscriber: sigvartmh.
This comment was removed by sigvartmh.
This revision now requires changes to proceed.Sep 17 2019, 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.EditedSep 17 2019, 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.Sep 17 2019, 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.Sep 17 2019, 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?

javed.absar abandoned this revision.Oct 4 2019, 3:46 PM
chill added a comment.Oct 6 2019, 5:50 AM

I hope I will be able to pick this up in the following weeks and land patches a couple of weeks later. Sorry for the delay, but priorities shift all the time ;)