[llvm] r297252 - [NVPTX] Remove unnecessary isImageReadoOnly(), isImageWriteOnly(), & isImageReadWrite calls
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 17:14:16 PST 2017
Author: jlebar
Date: Tue Mar 7 19:14:15 2017
New Revision: 297252
URL: http://llvm.org/viewvc/llvm-project?rev=297252&view=rev
Log:
[NVPTX] Remove unnecessary isImageReadoOnly(), isImageWriteOnly(), & isImageReadWrite calls
This is repetition of isImage() function in NVPTXUtilities.cpp.
Patch by Briana Grace!
Differential Revision: https://reviews.llvm.org/D30706
Modified:
llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp?rev=297252&r1=297251&r2=297252&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXImageOptimizer.cpp Tue Mar 7 19:14:15 2017
@@ -96,9 +96,7 @@ bool NVPTXImageOptimizer::replaceIsTypeP
// This is an OpenCL sampler, so it must be a samplerref
replaceWith(&I, ConstantInt::getTrue(I.getContext()));
return true;
- } else if (isImageWriteOnly(*TexHandle) ||
- isImageReadWrite(*TexHandle) ||
- isImageReadOnly(*TexHandle)) {
+ } else if (isImage(*TexHandle)) {
// This is an OpenCL image, so it cannot be a samplerref
replaceWith(&I, ConstantInt::getFalse(I.getContext()));
return true;
More information about the llvm-commits
mailing list