Fwd: [PATCH] Encode native floating point types in data layout string.

Cameron Esfahani dirty at apple.com
Tue Dec 16 16:16:50 PST 2014


My first attempt at using Phabricator didn't work so well.  Should I be adding llvm-commits as a reviewer or a subscriber?

Attached is patch proposal to encode native floating point types into the data layout string.  I've extended the "n" specifier to take "i" and "f" modifiers to indicate integer and floating point.  If neither the "i" nor "f" modifier is present, DataLayout::parseSpecifier() will assume it's an integer for backwards compatibility.

So to indicate support for single and double-precision floating point, a data layout string would have "-nf32:f64".

Below is a list of all the current targets and what level of floating point I've been able to determine that each supports:

AArch64: Single and double-precision.
ARM: 16-bit (if supported), single, and double (if supported) precision float.
Hexagon: If it's new enough, single-precision.
MIPS: Single and double-precision.
MSP430: No floating point.
NVPTX: Single-precision, and if it's new enough, double-precision.
PPC: Single and double-precision.  Support for long double on PPC64.
R600: Single-precision, and if it's new enough, double-precision.
SPARC: Single and double-precision.
SystemZ: Single and double-precision.
X86: Single, double, and double extended precision.
XCore: No floating point.

Cameron Esfahani
dirty at apple.com

"Americans are very skilled at creating a custom meaning from something that's mass-produced."

Ann Powers


> Begin forwarded message:
> 
> Date: December 16, 2014 at 4:12:31 PM PST
> To: dirty at apple.com
> From: Cameron Esfahani <dirty at apple.com>
> Cc: justin.holewinski at gmail.com, t.p.northover at gmail.com, mcrosier at codeaurora.org, ehostunreach at gmail.com
> Reply-To: reviews+D6701+public+90298f4cf9bcbfa2 at reviews.llvm.org
> Subject: [PATCH] Encode native floating point types in data layout string.
> 
> Add support for explicitly encoding native floating point types in the data layout string.
> 
> http://reviews.llvm.org/D6701
> 
> Files:
>  include/llvm/IR/DataLayout.h
>  lib/IR/DataLayout.cpp
>  lib/Target/AArch64/AArch64Subtarget.cpp
>  lib/Target/ARM/ARMSubtarget.cpp
>  lib/Target/ARM/ARMSubtarget.h
>  lib/Target/Hexagon/HexagonSubtarget.cpp
>  lib/Target/Mips/MipsSubtarget.cpp
>  lib/Target/NVPTX/NVPTXSubtarget.cpp
>  lib/Target/PowerPC/PPCSubtarget.cpp
>  lib/Target/R600/AMDGPUSubtarget.cpp
>  lib/Target/Sparc/SparcSubtarget.cpp
>  lib/Target/SystemZ/SystemZSubtarget.cpp
>  lib/Target/X86/X86Subtarget.cpp
> 
> EMAIL PREFERENCES
>  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6701.17375.patch
Type: text/x-patch
Size: 9693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141216/6af4d948/attachment.bin>
-------------- next part --------------
> 



More information about the llvm-commits mailing list