summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-04-26 18:32:24 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-04-26 18:32:24 +0000
commit456adc6c4e288bac5ea7306112b7e3cca7fb1815 (patch)
treeb786a41208ede0de4f2e6d234140438f6dc85633 /llvm/lib/Target
parenta8aa97d310ff940ddeb8c2eb339587bf38d26851 (diff)
downloadbcm5719-llvm-456adc6c4e288bac5ea7306112b7e3cca7fb1815.tar.gz
bcm5719-llvm-456adc6c4e288bac5ea7306112b7e3cca7fb1815.zip
R600: Initialize AMDGPUMachineFunction::ShaderType to ShaderType::COMPUTE
We need to intialize this to something and since clang does not set the shader type attribute and clang is used only for compute shaders, initializing it to COMPUTE seems like the best choice. Reviewed-by: Christian König <christian.koenig@amd.com> llvm-svn: 180620
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/R600/AMDGPUMachineFunction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp b/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp
index 0223ec8e4f3..04610254029 100644
--- a/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp
+++ b/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp
@@ -1,4 +1,5 @@
#include "AMDGPUMachineFunction.h"
+#include "AMDGPU.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
@@ -8,6 +9,7 @@ const char *AMDGPUMachineFunction::ShaderTypeAttribute = "ShaderType";
AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :
MachineFunctionInfo() {
+ ShaderType = ShaderType::COMPUTE;
AttributeSet Set = MF.getFunction()->getAttributes();
Attribute A = Set.getAttribute(AttributeSet::FunctionIndex,
ShaderTypeAttribute);
OpenPOWER on IntegriCloud