This is an archive of the discontinued LLVM Phabricator instance.

Add constructor DWARF calling convention for every supported LLVM CC
ClosedPublic

Authored by aguinet on Jan 21 2018, 3:48 AM.

Details

Summary

This is also associated with a clang commit that uses them to emit every supported clang/llvm CC in dwarf informations!

GCC's private calling conventions are also added.

Diff Detail

Repository
rL LLVM

Event Timeline

aguinet created this revision.Jan 21 2018, 3:48 AM
rnk added a comment.Jan 21 2018, 8:59 AM

I'm in favor of doing this. Any concerns, @aprantl? AAPCS is the only one I can think of that's so common this might upset some DWARF consumer.

I suppose the namespace for DW_CCs is large enough that doing this isn't very risky. Have you double-checked that this doesn't overlap with any other vendor extensions?

I suppose the namespace for DW_CCs is large enough that doing this isn't very risky. Have you double-checked that this doesn't overlap with any other vendor extensions?

Actually I didn't. I'm gonna try and find this for at least gcc and icc! I'll let you know.

By the way, if you can contribute patches that add more 3rd party DWARF extensions to LLVM, that would be awesome to help avoiding clashes in the future.

aguinet updated this revision to Diff 131005.Jan 22 2018, 11:13 PM
aguinet edited the summary of this revision. (Show Details)

By the way, if you can contribute patches that add more 3rd party DWARF extensions to LLVM, that would be awesome to help avoiding clashes in the future.

I've added the private ones of GCC according to this: https://github.com/gcc-mirror/gcc/blob/master/include/dwarf2.h#L182 .

I'll try to do the same with icc by tring the various ABI it supports (https://software.intel.com/en-us/node/522787), and getting the potential value with readelf (all with a script to be able to run this again!)

aguinet added a comment.EditedJan 31 2018, 11:16 PM

I'll try to do the same with icc by tring the various ABI it supports (https://software.intel.com/en-us/node/522787), and getting the potential value with readelf (all with a script to be able to run this again!)

Per this script https://pastebin.com/pDwJfRyt, it seems that ICC never emits DWARF calling convention attributes. One thing that seems weird thought is that they don't support the CC they say they suuport on the link I gave.

If someone with ICC could also try this please to see if I don't miss something.. !

I'll try to do the same with icc by tring the various ABI it supports (https://software.intel.com/en-us/node/522787), and getting the potential value with readelf (all with a script to be able to run this again!)

Per this script https://pastebin.com/pDwJfRyt, it seems that ICC never emits DWARF calling convention attributes. One thing that seems weird thought is that they don't support the CC they say they suuport on the link I gave.

If someone with ICC could also try this please to see if I don't miss something.. !]

Hi @mibintc; would you mind confirming that ICC doesn't emit DWARF CC attributes or (if it does) that they don't overlap with the ones in this diff?

Hi @mibintc; would you mind confirming that ICC doesn't emit DWARF CC attributes or (if it does) that they don't overlap with the ones in this diff?

Sure i don't mind checking. While icc does support the calling conventions, the compiler is not emitting the dwarf calling convention attributes.

Hi @mibintc; would you mind confirming that ICC doesn't emit DWARF CC attributes or (if it does) that they don't overlap with the ones in this diff?

Sure i don't mind checking. While icc does support the calling conventions, the compiler is not emitting the dwarf calling convention attributes.

Thanks!

This LGTM then.

This revision is now accepted and ready to land.Mar 21 2018, 10:35 AM
aguinet added a comment.EditedMar 21 2018, 3:11 PM

Thanks everyone for the review and comments!

BTW, I don't have any commit rights thought, so I guess someone needs to merge this at some point?

https://reviews.llvm.org/D42351 is in the same status!

This revision was automatically updated to reflect the committed changes.