projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[NVPTX] Update sub-target feature detection
[oota-llvm.git]
/
lib
/
Target
/
NVPTX
/
NVPTXInstrInfo.cpp
diff --git
a/lib/Target/NVPTX/NVPTXInstrInfo.cpp
b/lib/Target/NVPTX/NVPTXInstrInfo.cpp
index 1f54d3e6ed39a952bb55979d165a85a88e4ba391..b5b4fbed079919b99faacdea5f3ce6e44239f6f4 100644
(file)
--- a/
lib/Target/NVPTX/NVPTXInstrInfo.cpp
+++ b/
lib/Target/NVPTX/NVPTXInstrInfo.cpp
@@
-14,8
+14,6
@@
#include "NVPTX.h"
#include "NVPTXInstrInfo.h"
#include "NVPTXTargetMachine.h"
#include "NVPTX.h"
#include "NVPTXInstrInfo.h"
#include "NVPTXTargetMachine.h"
-#define GET_INSTRINFO_CTOR
-#include "NVPTXGenInstrInfo.inc"
#include "llvm/IR/Function.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/IR/Function.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineFunction.h"
@@
-24,9
+22,15
@@
using namespace llvm;
using namespace llvm;
+#define GET_INSTRINFO_CTOR_DTOR
+#include "NVPTXGenInstrInfo.inc"
+
+// Pin the vtable to this file.
+void NVPTXInstrInfo::anchor() {}
+
// FIXME: Add the subtarget support on this constructor.
// FIXME: Add the subtarget support on this constructor.
-NVPTXInstrInfo::NVPTXInstrInfo(NVPTX
TargetMachine &tm
)
- : NVPTXGenInstrInfo(),
TM(tm), RegInfo(*TM.getSubtargetImpl()
) {}
+NVPTXInstrInfo::NVPTXInstrInfo(NVPTX
Subtarget &STI
)
+ : NVPTXGenInstrInfo(),
RegInfo(STI
) {}
void NVPTXInstrInfo::copyPhysReg(
MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL,
void NVPTXInstrInfo::copyPhysReg(
MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL,
@@
-253,7
+257,7
@@
unsigned NVPTXInstrInfo::InsertBranch(
"NVPTX branch conditions have two components!");
// One-way branch.
"NVPTX branch conditions have two components!");
// One-way branch.
- if (
FBB == 0
) {
+ if (
!FBB
) {
if (Cond.empty()) // Unconditional branch
BuildMI(&MBB, DL, get(NVPTX::GOTO)).addMBB(TBB);
else // Conditional branch
if (Cond.empty()) // Unconditional branch
BuildMI(&MBB, DL, get(NVPTX::GOTO)).addMBB(TBB);
else // Conditional branch