summaryrefslogtreecommitdiff
path: root/polly/lib/CodeGen/PPCGCodeGeneration.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-08-06 03:04:15 +0000
committerTobias Grosser <tobias@grosser.es>2017-08-06 03:04:15 +0000
commit5b307cdb8a788c3c707dde4789720fbcff5d34e0 (patch)
tree97cd0e035ced4e83c47df4be6a2982bf95805a3d /polly/lib/CodeGen/PPCGCodeGeneration.cpp
parente53c924b0f06b993febc53c876ed57b6c436a73f (diff)
[GPGPU] Rename all, not only the first libdevice function
llvm-svn: 310194
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index 8daa562f98f4..5516fd995051 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -2298,6 +2298,7 @@ std::string GPUNodeBuilder::createKernelASM() {
}
bool GPUNodeBuilder::requiresCUDALibDevice() {
+ bool RequiresLibDevice = false;
for (Function &F : GPUModule->functions()) {
if (!F.isDeclaration())
continue;
@@ -2305,11 +2306,11 @@ bool GPUNodeBuilder::requiresCUDALibDevice() {
std::string CUDALibDeviceFunc = getCUDALibDeviceFuntion(&F);
if (CUDALibDeviceFunc.length() != 0) {
F.setName(CUDALibDeviceFunc);
- return true;
+ RequiresLibDevice = true;
}
}
- return false;
+ return RequiresLibDevice;
}
void GPUNodeBuilder::addCUDALibDevice() {