The MergeFunctions pass has a "preserve some debug-info" mode that tries to preserve parameter values. This patch generalises its decision-making so that it applies to both debug-info stored in intrinsics, and debug-info stored in DPValue objects. For the most part this involves using a generic lambda and applying it to each type of object. (Normally we avoid debug-info affecting the code generated, but this is hidden behind a command line switch, so won't usually be encountered by users). Note that this diff is messy, but that's because I'm hoisting some code into lambdas. The actual decision making processes here are identical.
37 KiB
37 KiB