[PATCH] D87512: [IR] Add Type::getFloatingPointTy.

Bevin Hansson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 06:52:29 PDT 2020


ebevhan created this revision.
ebevhan added a reviewer: rjmccall.
Herald added subscribers: bjope, hiraditya.
Herald added a reviewer: ctetreau.
Herald added a project: LLVM.
ebevhan requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87512

Files:
  llvm/include/llvm/IR/Type.h
  llvm/lib/IR/Constants.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87512.291202.patch
Type: text/x-patch
Size: 5703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/afa6564b/attachment.bin>


More information about the llvm-commits mailing list