[PATCH] D143229: [FunctionImporter] Add flag to disable upgrading debug info
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 15:08:58 PST 2023
aeubanks added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:88
+ cl::desc("Assume that imported functions are built at the same revision of "
+ "LLVM as this consumer to avoid upgrading debug info"));
+
----------------
mehdi_amini wrote:
> I'll repeat my previous earlier comment: that seems to me like a very ad-hoc flag for some overly specific use-case.
I wouldn't consider this use case "overly specific", I'd guess that many uses of LLVM don't care about bitcode upgrading.
Given that it seems quite hard to put a consistent LLVM revision in the bitcode that can be understood everywhere, I think this is something that requires a flag and bitcode version guarantees at a higher level.
There are two options I can think of:
1) under a flag, when producing bitcode, add a marker saying "this bitcode will never need to be upgraded", then when seeing that marker when importing, don't upgrade debug info
2) under a flag, when reading/importing bitcode, assume it doesn't need to be upgraded (this patch)
1 seems more annoying than 2
do you have any other alternatives?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143229/new/
https://reviews.llvm.org/D143229
More information about the llvm-commits
mailing list