[Mesa-dev] [PATCH] R600: Clean up datalayout strings so they better match hardware capabilities
Tom Stellard
tom at stellard.net
Mon Feb 11 14:02:30 PST 2013
From: Tom Stellard <thomas.stellard at amd.com>
---
lib/Target/R600/AMDILDevice.cpp | 20 ++++++++++++++------
lib/Target/R600/AMDILSIDevice.cpp | 15 +++++++++------
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/lib/Target/R600/AMDILDevice.cpp b/lib/Target/R600/AMDILDevice.cpp
index eec5059..db8e01e 100644
--- a/lib/Target/R600/AMDILDevice.cpp
+++ b/lib/Target/R600/AMDILDevice.cpp
@@ -115,10 +115,18 @@ bool AMDGPUDevice::usesSoftware(AMDGPUDeviceInfo::Caps Mode) const {
std::string
AMDGPUDevice::getDataLayout() const {
- return std::string("e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16"
- "-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:32:32"
- "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64"
- "-v96:128:128-v128:128:128-v192:256:256-v256:256:256"
- "-v512:512:512-v1024:1024:1024-v2048:2048:2048"
- "-n8:16:32:64");
+ std::string DataLayout = std::string(
+ "e"
+ "-p:32:32:32"
+ "-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32"
+ "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128"
+ "-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-v2048:2048:2048"
+ "-n32:64"
+ );
+
+ if (usesHardware(AMDGPUDeviceInfo::DoubleOps)) {
+ DataLayout.append("-f64:64:64");
+ }
+
+ return DataLayout;
}
diff --git a/lib/Target/R600/AMDILSIDevice.cpp b/lib/Target/R600/AMDILSIDevice.cpp
index 7c2710f..70ee2b7 100644
--- a/lib/Target/R600/AMDILSIDevice.cpp
+++ b/lib/Target/R600/AMDILSIDevice.cpp
@@ -36,10 +36,13 @@ AMDGPUSIDevice::getGeneration() const {
std::string
AMDGPUSIDevice::getDataLayout() const {
- return std::string("e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16"
- "-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:32:32"
- "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64"
- "-v96:128:128-v128:128:128-v192:256:256-v256:256:256"
- "-v512:512:512-v1024:1024:1024-v2048:2048:2048"
- "-n8:16:32:64");
+ return std::string(
+ "e"
+ "-p:64:64:64"
+ "-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64"
+ "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128"
+ "-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024"
+ "-v2048:2048:2048"
+ "-n32:64"
+ );
}
--
1.7.11.4
More information about the mesa-dev
mailing list