Mercurial > hg > CbC > CbC_llvm
diff lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 60c9769439b8 |
children | 1172e4bd9c6f |
line wrap: on
line diff
--- a/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp Wed Feb 18 14:56:07 2015 +0900 +++ b/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp Tue Oct 13 17:48:58 2015 +0900 @@ -2,7 +2,7 @@ // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source +// This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// @@ -16,6 +16,7 @@ #include "NVPTX.h" #include "NVPTXMachineFunctionInfo.h" #include "NVPTXSubtarget.h" +#include "NVPTXTargetMachine.h" #include "llvm/ADT/DenseSet.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" @@ -114,7 +115,7 @@ replaceImageHandle(Handle, MF); - return true; + return true; } return false; @@ -142,8 +143,9 @@ case NVPTX::LD_i64_avar: { // The handle is a parameter value being loaded, replace with the // parameter symbol - const NVPTXSubtarget &ST = MF.getTarget().getSubtarget<NVPTXSubtarget>(); - if (ST.getDrvInterface() == NVPTX::CUDA) { + const NVPTXTargetMachine &TM = + static_cast<const NVPTXTargetMachine &>(MF.getTarget()); + if (TM.getDrvInterface() == NVPTX::CUDA) { // For CUDA, we preserve the param loads coming from function arguments return false; }