summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2015-11-03 22:30:13 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2015-11-03 22:30:13 +0000
commit782c03bb7e80dc96043ee1d44bea8fcbb467cf76 (patch)
treeaf3ad877759bec9380f8148efb8660baa7888cb6 /llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
parentd9d659aa2317bab47e06b5733ef7caa98fe62051 (diff)
downloadbcm5719-llvm-782c03bb7e80dc96043ee1d44bea8fcbb467cf76.tar.gz
bcm5719-llvm-782c03bb7e80dc96043ee1d44bea8fcbb467cf76.zip
AMDGPU: Initialize SIFixSGPRCopies so -print-after works
llvm-svn: 251995
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp b/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
index 13a2abb268d..96e37c56624 100644
--- a/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
@@ -82,12 +82,10 @@ using namespace llvm;
namespace {
class SIFixSGPRCopies : public MachineFunctionPass {
-
-private:
+public:
static char ID;
-public:
- SIFixSGPRCopies(TargetMachine &tm) : MachineFunctionPass(ID) { }
+ SIFixSGPRCopies() : MachineFunctionPass(ID) { }
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -103,10 +101,15 @@ public:
} // End anonymous namespace
+INITIALIZE_PASS(SIFixSGPRCopies, DEBUG_TYPE,
+ "SI Fix SGPR copies", false, false)
+
char SIFixSGPRCopies::ID = 0;
-FunctionPass *llvm::createSIFixSGPRCopiesPass(TargetMachine &tm) {
- return new SIFixSGPRCopies(tm);
+char &llvm::SIFixSGPRCopiesID = SIFixSGPRCopies::ID;
+
+FunctionPass *llvm::createSIFixSGPRCopiesPass() {
+ return new SIFixSGPRCopies();
}
static bool hasVGPROperands(const MachineInstr &MI, const SIRegisterInfo *TRI) {
OpenPOWER on IntegriCloud