DISubprogram *getSubprogram() const;
/// Returns true if we should emit debug info for profiling.
- bool isDebugInfoForProfiling() const;
+ bool shouldEmitDebugInfoForProfiling() const;
/// Check if null pointer dereferencing is considered undefined behavior for
/// the function.
bool MIRAddFSDiscriminators::runOnMachineFunction(MachineFunction &MF) {
if (!EnableFSDiscriminator)
return false;
- if (!MF.getFunction().isDebugInfoForProfiling())
+ if (!MF.getFunction().shouldEmitDebugInfoForProfiling())
return false;
bool Changed = false;
return cast_or_null<DISubprogram>(getMetadata(LLVMContext::MD_dbg));
}
-bool Function::isDebugInfoForProfiling() const {
+bool Function::shouldEmitDebugInfoForProfiling() const {
if (DISubprogram *SP = getSubprogram()) {
if (DICompileUnit *CU = SP->getUnit()) {
return CU->getDebugInfoForProfiling();
// When a FSDiscriminator is enabled, we don't need to add the multiply
// factors to the discriminators.
- if (Header->getParent()->isDebugInfoForProfiling() && !EnableFSDiscriminator)
+ if (Header->getParent()->shouldEmitDebugInfoForProfiling() &&
+ !EnableFSDiscriminator)
for (BasicBlock *BB : L->getBlocks())
for (Instruction &I : *BB)
if (!isa<DbgInfoIntrinsic>(&I))
// When a FSDiscriminator is enabled, we don't need to add the multiply
// factors to the discriminators.
- if (Header->getParent()->isDebugInfoForProfiling() && !EnableFSDiscriminator)
+ if (Header->getParent()->shouldEmitDebugInfoForProfiling() &&
+ !EnableFSDiscriminator)
for (BasicBlock *BB : L->getBlocks())
for (Instruction &I : *BB)
if (!isa<DbgInfoIntrinsic>(&I))
const DILocation *DIL = Inst->getDebugLoc();
// When a FSDiscriminator is enabled, we don't need to add the multiply
// factors to the discriminators.
- if (DIL && Inst->getFunction()->isDebugInfoForProfiling() &&
+ if (DIL && Inst->getFunction()->shouldEmitDebugInfoForProfiling() &&
!isa<DbgInfoIntrinsic>(Inst) && !EnableFSDiscriminator) {
// FIXME: For scalable vectors, assume vscale=1.
auto NewDIL =