This is an archive of the discontinued LLVM Phabricator instance.

Make Value::MaxAlignment(Exponent) constexpr
ClosedPublic

Authored by arichardson on Jan 20 2021, 7:48 AM.

Details

Summary

This avoids references to the variables be generated when using e.g. max().

Diff Detail

Event Timeline

arichardson created this revision.Jan 20 2021, 7:48 AM
arichardson requested review of this revision.Jan 20 2021, 7:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2021, 7:48 AM
dexonsmith accepted this revision.Jul 9 2021, 10:56 AM

LGTM. Is this worth adding a constexpr unit test for? (I don't see any for the other static constexpr stuff in LLVMCore, so maybe not...)

This revision is now accepted and ready to land.Jul 9 2021, 10:56 AM
This revision was automatically updated to reflect the committed changes.