This is an archive of the discontinued LLVM Phabricator instance.

[IR] Add Type::getFloatingPointTy.
ClosedPublic

Authored by ebevhan on Sep 11 2020, 6:52 AM.

Details

Summary

It is possible to get a fltSemantics of a particular Type,
but there is no way to produce a Type based on a
fltSemantics.

This adds the function Type::getFloatingPointTy, which
will return the appropriate floating point Type for a given
fltSemantics.

ConstantFP is modified to use this function instead of
implementing it itself. Also some minor refactors to use
Type::getFltSemantics instead of a hand-rolled version.

Diff Detail

Event Timeline

ebevhan created this revision.Sep 11 2020, 6:52 AM
Herald added a project: Restricted Project. · View Herald Transcript
ebevhan requested review of this revision.Sep 11 2020, 6:52 AM
rjmccall accepted this revision.Sep 11 2020, 10:53 AM

LGTM, thanks!

This revision is now accepted and ready to land.Sep 11 2020, 10:53 AM
This revision was landed with ongoing or failed builds.Oct 9 2020, 1:31 AM
This revision was automatically updated to reflect the committed changes.