This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Define __riscv_cmodel_medlow and __riscv_cmodel_medany correctly
ClosedPublic

Authored by kito-cheng on Sep 2 2019, 2:11 AM.

Details

Summary

RISC-V LLVM was only implement small/medlow code model, so it defined
__riscv_cmodel_medlow directly without check.

Now, we have medium/medany code model in RISC-V back-end, it should
define according the actually code model.

Diff Detail

Repository
rL LLVM

Event Timeline

kito-cheng created this revision.Sep 2 2019, 2:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2019, 2:11 AM
lewis-revill accepted this revision.Sep 2 2019, 2:39 AM

Thanks Kito. This looks good to me.

This revision is now accepted and ready to land.Sep 2 2019, 2:39 AM
lenary added inline comments.Sep 2 2019, 12:32 PM
clang/lib/Basic/Targets/RISCV.cpp
91 ↗(On Diff #218312)

This TODO can probably be deleted - now it's more obvious where to add more code when we support more code models.

LGTM, now I've looked at how LLVM itself supports code models. I don't mind if that TODO is or isn't deleted.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 17 2019, 1:08 AM