Remove all use of getDrvInterface off of NVPTXSubtarget and clean

up code accordingly. Delete code that was checking for all cases
of an enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229786 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2015-02-19 00:08:23 +00:00
parent 9d2ea22e2b
commit c72978539d
4 changed files with 23 additions and 51 deletions

View File

@@ -51,6 +51,12 @@ NVPTXSubtarget::NVPTXSubtarget(const std::string &TT, const std::string &CPU,
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
TSInfo(TM.getDataLayout()), FrameLowering(*this) {}
NVPTX::DrvInterface NVPTXSubtarget::getDrvInterface() const {
return TM.getDrvInterface();
bool NVPTXSubtarget::hasImageHandles() const {
// Enable handles for Kepler+, where CUDA supports indirect surfaces and
// textures
if (TM.getDrvInterface() == NVPTX::CUDA)
return (SmVersion >= 30);
// Disabled, otherwise
return false;
}