This is an archive of the discontinued LLVM Phabricator instance.

[AVR] Do not place functions in .progmem.data
ClosedPublic

Authored by aykevl on Apr 15 2020, 8:36 AM.

Details

Summary

Previously, the AVR backend would put functions in .progmem.data. This
is probably a regression from when functions still lived in address
space 0. With this change, only global constants are placed in
.progmem.data.

This is not complete: avr-gcc additionally respects -fdata-sections for
progmem global constants, which LLVM doesn't yet do. But fixing that is
a bit more complicated (and I believe other backends such as RISC-V
might also have similar issues).

Diff Detail

Event Timeline

aykevl created this revision.Apr 15 2020, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2020, 8:36 AM
aykevl updated this revision to Diff 257736.Apr 15 2020, 8:38 AM
dylanmckay accepted this revision.Apr 18 2020, 7:57 PM

Good catch, great fix.

This revision is now accepted and ready to land.Apr 18 2020, 7:57 PM
This revision was automatically updated to reflect the committed changes.