[llvm] [RemoveDIs] Print non-intrinsic debug info in textual IR output (PR #79281)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 20:38:32 PST 2024
================
@@ -75,11 +78,10 @@ PrintFunctionPass::PrintFunctionPass(raw_ostream &OS, const std::string &Banner)
PreservedAnalyses PrintFunctionPass::run(Function &F,
FunctionAnalysisManager &) {
- // RemoveDIs: there's no textual representation of the DPValue debug-info,
- // convert to dbg.values before writing out.
- bool ShouldConvert = F.IsNewDbgInfoFormat;
- if (ShouldConvert)
- F.convertFromNewDbgValues();
+ // RemoveDIs: Regardless of the format we've processed this function in, use
+ // `WriteNewDbgInfoFormat` to determine which format we use to write it.
+ bool UsedNewDbgInfoFormat = F.IsNewDbgInfoFormat;
+ F.setIsNewDbgInfoFormat(WriteNewDbgInfoFormat);
----------------
dwblaikie wrote:
Could you make a scoped device for this idiom - for the set/reset rather than having them more loosely coupled like this?
https://github.com/llvm/llvm-project/pull/79281
More information about the llvm-commits
mailing list