mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Fix a leak on the r600 backend.
This should bring the valgrind bot back to life. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
23e24bd284
commit
5110102f9f
@ -64,11 +64,11 @@ AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, StringRef TT,
|
||||
InstrItins(&Subtarget.getInstrItineraryData()) {
|
||||
// TLInfo uses InstrInfo so it must be initialized after.
|
||||
if (Subtarget.device()->getGeneration() <= AMDGPUDeviceInfo::HD6XXX) {
|
||||
InstrInfo = new R600InstrInfo(*this);
|
||||
TLInfo = new R600TargetLowering(*this);
|
||||
InstrInfo.reset(new R600InstrInfo(*this));
|
||||
TLInfo.reset(new R600TargetLowering(*this));
|
||||
} else {
|
||||
InstrInfo = new SIInstrInfo(*this);
|
||||
TLInfo = new SITargetLowering(*this);
|
||||
InstrInfo.reset(new SIInstrInfo(*this));
|
||||
TLInfo.reset(new SITargetLowering(*this));
|
||||
}
|
||||
initAsmInfo();
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ class AMDGPUTargetMachine : public LLVMTargetMachine {
|
||||
const DataLayout Layout;
|
||||
AMDGPUFrameLowering FrameLowering;
|
||||
AMDGPUIntrinsicInfo IntrinsicInfo;
|
||||
const AMDGPUInstrInfo *InstrInfo;
|
||||
AMDGPUTargetLowering *TLInfo;
|
||||
OwningPtr<AMDGPUInstrInfo> InstrInfo;
|
||||
OwningPtr<AMDGPUTargetLowering> TLInfo;
|
||||
const InstrItineraryData *InstrItins;
|
||||
|
||||
public:
|
||||
@ -48,12 +48,16 @@ public:
|
||||
virtual const AMDGPUIntrinsicInfo *getIntrinsicInfo() const {
|
||||
return &IntrinsicInfo;
|
||||
}
|
||||
virtual const AMDGPUInstrInfo *getInstrInfo() const { return InstrInfo; }
|
||||
virtual const AMDGPUInstrInfo *getInstrInfo() const {
|
||||
return InstrInfo.get();
|
||||
}
|
||||
virtual const AMDGPUSubtarget *getSubtargetImpl() const { return &Subtarget; }
|
||||
virtual const AMDGPURegisterInfo *getRegisterInfo() const {
|
||||
return &InstrInfo->getRegisterInfo();
|
||||
}
|
||||
virtual AMDGPUTargetLowering *getTargetLowering() const { return TLInfo; }
|
||||
virtual AMDGPUTargetLowering *getTargetLowering() const {
|
||||
return TLInfo.get();
|
||||
}
|
||||
virtual const InstrItineraryData *getInstrItineraryData() const {
|
||||
return InstrItins;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user