mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-17 00:50:58 +00:00
NVPTX: Don't even create a regalloc if we're not going to use it.
Fixes a leak found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183031 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
504e2da08c
commit
488401e9c9
@ -109,6 +109,7 @@ public:
|
|||||||
virtual bool addPreRegAlloc();
|
virtual bool addPreRegAlloc();
|
||||||
virtual bool addPostRegAlloc();
|
virtual bool addPostRegAlloc();
|
||||||
|
|
||||||
|
virtual FunctionPass *createTargetRegisterAllocator(bool) LLVM_OVERRIDE;
|
||||||
virtual void addFastRegAlloc(FunctionPass *RegAllocPass);
|
virtual void addFastRegAlloc(FunctionPass *RegAllocPass);
|
||||||
virtual void addOptimizedRegAlloc(FunctionPass *RegAllocPass);
|
virtual void addOptimizedRegAlloc(FunctionPass *RegAllocPass);
|
||||||
};
|
};
|
||||||
@ -147,12 +148,16 @@ bool NVPTXPassConfig::addPostRegAlloc() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FunctionPass *NVPTXPassConfig::createTargetRegisterAllocator(bool) {
|
||||||
|
return 0; // No reg alloc
|
||||||
|
}
|
||||||
|
|
||||||
void NVPTXPassConfig::addFastRegAlloc(FunctionPass *RegAllocPass) {
|
void NVPTXPassConfig::addFastRegAlloc(FunctionPass *RegAllocPass) {
|
||||||
// No reg alloc
|
assert(!RegAllocPass && "NVPTX uses no regalloc!");
|
||||||
addPass(&StrongPHIEliminationID);
|
addPass(&StrongPHIEliminationID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NVPTXPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) {
|
void NVPTXPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) {
|
||||||
// No reg alloc
|
assert(!RegAllocPass && "NVPTX uses no regalloc!");
|
||||||
addPass(&StrongPHIEliminationID);
|
addPass(&StrongPHIEliminationID);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user