[llvm] [LTO] Preserve use list order in save-temps (PR #165882)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 31 09:31:39 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lto
Author: Nikita Popov (nikic)
<details>
<summary>Changes</summary>
save-temps is debugging functionality, so it should preserve use-lists to keep the optimization/codegen behavior of the dumped bitcode as close to the in-memory IR as possible.
---
Full diff: https://github.com/llvm/llvm-project/pull/165882.diff
1 Files Affected:
- (modified) llvm/lib/LTO/LTOBackend.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 93118becedbac..8efde8efb3cb1 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -124,7 +124,7 @@ Error Config::addSaveTemps(std::string OutputFileName, bool UseInputModulePath,
// directly and exit.
if (EC)
reportOpenError(Path, EC.message());
- WriteBitcodeToFile(M, OS, /*ShouldPreserveUseListOrder=*/false);
+ WriteBitcodeToFile(M, OS, /*ShouldPreserveUseListOrder=*/true);
return true;
};
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/165882
More information about the llvm-commits
mailing list