<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/152767>152767</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Provide SamplePGO users an option to retain debug information where otherwise it would be dropped
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
snehasish
</td>
</tr>
</table>
<pre>
Debug information based SamplePGO (a.k.a. AutoFDO) relies on source location information when mapping hardware sample profiles to the IR. Today LLVM policy biases towards dropping source location information where transformations may change the code in a manner which cannot be represented accurately. When merging instructions the policy was updated and a flag was introduced to allow SamplePGO users to preserve an arbitrary, deterministic source location in [this commit](https://github.com/llvm/llvm-project/commit/f9193f3b18f08547e2f92b5e354a44655bfc1b94). This serves to unblock performance gains until the source location representation can be extended to represent such cases accurately.
Filing this issue to track the implementation of another flag to address the category of non-representable transformations apart from (merged instructions) and to update the documentation at llvm/docs/HowToUpdateDebugInfo.rst.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVMFu5DYM_RrNhVjDlu3x-OBDtsG0C2yxQZu2Z0qibTWyZEhy3Pn7QnKapE2BoifDAslHvvdIDEFPlmhg7WfW3p9wi7PzQ7A0Y9BhPgmnbsM9iW0CbUfnF4zaWRAYSMHPuKyGHr7_BoxfsHgqsIC7Lbrr_TfGe_BkNAVwFoLbvCQwTh7p70vtM1lYcF21nWBGr3b0BCGXhtW7URsKEB3EmeDLTwU8OoU3-Pr11x9hdUbLGwiNIcfs6FUA5d1R7T9gPUH0aMPrY4AFbyBntBNlOOkUgbaAsKC15GGftZxBorUugiDwtHoKZCMpQCk3j5HMrYDf8lDkp9SGtiH6TR4IqexL2zsG2FaFOdkqQBgNTvlZ2-id2iSpNDka4_Z3bG-BfKYkg_tnArSAXujo0d8Y_w4URfKLtjpELf-FB2Dt5zjrANIti46svWf8Mse4BlbfMX5l_DrpOG-ikG5h_GrM81-fT6t3v5OMjF9fkvl17Ku-HmtRXcby0jYd8bHnoqW6bbBpzm0rRlmJvmG8L-Ax4ea28wybFcbJJ1jJZyGsJJhQ2wCbjdpkwv45wCvtx69Em8SgPyJZdVD2GgFhy4olg7xXiJV3rLy7apMUylToEDbKRvMonzKuTowvrzhuBLQuzuQPpZI0SnkKh6wSI03O31KcdfbTW5fCfLQarugjjN4taXuSV0j9zSpphZItEkfZJRlEObm9dYQRXqRRTgbGrz-4_dH9ksPz1n6xoyt8iAWc1FCrvu7xREPVtc25q_uKn-ahrM-oOt6cVUetRI6V6Lgoe8F5KfuWTnrgJW_LS3mpOt5WVVFeLmXXU4216M6XpmVNSQtqU6ReCuenU-ZyqFrenbuTQUEm5BPDuaX9YJpxni6OH7KpxDYF1pRGhxjeykQdDQ0P3j1rRR8WAC24NdOQBY-oLagPp-pY9KzargOBjrC7zajkmHwpSJ02b4b_7f48ReL8Zczngf8ZAAD__1rs30w">