@@ -277,8 +277,6 @@ using BlockSkipInstsMap =
277
277
278
278
namespace {
279
279
280
- class LDVImpl ;
281
-
282
280
// / A user value is a part of a debug info user variable.
283
281
// /
284
282
// / A DBG_VALUE instruction notes that (a sub-register of) a virtual register
@@ -531,6 +529,10 @@ class UserLabel {
531
529
void print (raw_ostream &, const TargetRegisterInfo *);
532
530
};
533
531
532
+ } // end anonymous namespace
533
+
534
+ namespace llvm {
535
+
534
536
// / Implementation of the LiveDebugVariables pass.
535
537
class LDVImpl {
536
538
LocMap::Allocator allocator;
@@ -673,7 +675,7 @@ class LDVImpl {
673
675
void print (raw_ostream&);
674
676
};
675
677
676
- } // end anonymous namespace
678
+ } // namespace llvm
677
679
678
680
static void printDebugLoc (const DebugLoc &DL, raw_ostream &CommentOS,
679
681
const LLVMContext &Ctx) {
@@ -1325,13 +1327,9 @@ LiveDebugVariablesPrinterPass::run(MachineFunction &MF,
1325
1327
return PreservedAnalyses::all ();
1326
1328
}
1327
1329
1328
- void LiveDebugVariables::Deleter::operator ()(void *Ptr) const {
1329
- delete static_cast <LDVImpl *>(Ptr);
1330
- }
1331
-
1332
1330
void LiveDebugVariables::releaseMemory () {
1333
1331
if (PImpl)
1334
- static_cast <LDVImpl *>( PImpl. get ()) ->clear ();
1332
+ PImpl->clear ();
1335
1333
}
1336
1334
1337
1335
bool LiveDebugVariables::invalidate (
@@ -1341,7 +1339,7 @@ bool LiveDebugVariables::invalidate(
1341
1339
// Some architectures split the register allocation into multiple phases based
1342
1340
// on register classes. This requires preserving analyses between the phases
1343
1341
// by default.
1344
- return PAC.preservedWhenStateless ();
1342
+ return ! PAC.preservedWhenStateless ();
1345
1343
}
1346
1344
1347
1345
void LiveDebugVariables::analyze (MachineFunction &MF, LiveIntervals *LIS) {
@@ -1357,7 +1355,7 @@ void LiveDebugVariables::analyze(MachineFunction &MF, LiveIntervals *LIS) {
1357
1355
// Have we been asked to track variable locations using instruction
1358
1356
// referencing?
1359
1357
bool InstrRef = MF.useDebugInstrRef ();
1360
- static_cast <LDVImpl *>( PImpl. get ()) ->runOnMachineFunction (MF, InstrRef);
1358
+ PImpl->runOnMachineFunction (MF, InstrRef);
1361
1359
}
1362
1360
1363
1361
// ===----------------------------------------------------------------------===//
@@ -1540,7 +1538,7 @@ void LDVImpl::splitRegister(Register OldReg, ArrayRef<Register> NewRegs) {
1540
1538
void LiveDebugVariables::
1541
1539
splitRegister (Register OldReg, ArrayRef<Register> NewRegs, LiveIntervals &LIS) {
1542
1540
if (PImpl)
1543
- static_cast <LDVImpl *>( PImpl. get ()) ->splitRegister (OldReg, NewRegs);
1541
+ PImpl->splitRegister (OldReg, NewRegs);
1544
1542
}
1545
1543
1546
1544
void UserValue::rewriteLocations (VirtRegMap &VRM, const MachineFunction &MF,
@@ -1992,7 +1990,7 @@ void LDVImpl::emitDebugValues(VirtRegMap *VRM) {
1992
1990
1993
1991
void LiveDebugVariables::emitDebugValues (VirtRegMap *VRM) {
1994
1992
if (PImpl)
1995
- static_cast <LDVImpl *>( PImpl. get ()) ->emitDebugValues (VRM);
1993
+ PImpl->emitDebugValues (VRM);
1996
1994
}
1997
1995
1998
1996
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
@@ -2001,5 +1999,5 @@ LLVM_DUMP_METHOD void LiveDebugVariables::dump() const { print(dbgs()); }
2001
1999
2002
2000
void LiveDebugVariables::print (raw_ostream &OS) const {
2003
2001
if (PImpl)
2004
- static_cast <LDVImpl *>( PImpl. get ()) ->print (OS);
2002
+ PImpl->print (OS);
2005
2003
}
0 commit comments