This is an archive of the discontinued LLVM Phabricator instance.

Support placing switch tables in target-specific address spaces
AbandonedPublic

Authored by dylanmckay on Jul 4 2017, 7:28 AM.

Details

Reviewers
arsenm
chandlerc
Summary

In the AVR architecture, switch tables need to be placed into a special
'program memory' address space (id=1).

In order to support this, add a hook to TargetTransformInfo that
targets can override.

If there are any more suitable reviewers I couldn't think of, please add them :)

Event Timeline

dylanmckay created this revision.Jul 4 2017, 7:28 AM
dylanmckay planned changes to this revision.Jul 9 2017, 8:50 AM

I have found a similar problem with a similar fix, I am currently looking into a nice way to generalise this patch.

WIP, not ready for review yet

Ka-Ka added a subscriber: Ka-Ka.Jul 11 2017, 12:44 AM
hfinkel added a subscriber: hfinkel.Aug 5 2017, 6:05 PM

FYI: TTI should not be required in order to the mid-level optimizer to correctly transform a program. If this is required for correctness, it should be in DataLayout.

dylanmckay abandoned this revision.Aug 18 2017, 9:45 PM

Will rewrite once D36916 lands