[PATCH] D88684: llvm-reduce: Don't replace intrinsic calls with undef
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 15:09:21 PDT 2020
dblaikie added a comment.
In D88684#2317722 <https://reviews.llvm.org/D88684#2317722>, @fhahn wrote:
> In D88684#2317697 <https://reviews.llvm.org/D88684#2317697>, @arsenm wrote:
>
>> In D88684#2317657 <https://reviews.llvm.org/D88684#2317657>, @dblaikie wrote:
>>
>>> I worry a bit about using heuristics "some intrinsics have these properties, so let's ignore all intrinsics" - other intrinsics represent normal instruction operations, right? (for target intrinsic instructions, for instance) so some cases might benefit from such reductions.
>>
>> I think removing intrinsic calls is an unproductive reduction strategy in general. I think this will harm reducing any codegen issues since it changes the generated code so radically. It also assumes a target supports arbitrary call targets, which may not be the case. e.g. before AMDGPU supported calls, every testcase with an intrinsic would reduce to a call to undef
>
> IIUC the main benefit from this optimization is removing unrelated function definitions all together so we don't need to continue processing them and the fact that this also applies to declaration is a side effect of the implementation? The call sites themselves should get removed by the `remove instruction` part, if they are 'uninteresting', so we probably do not loose too much in terms of reductions?
fair enough - thanks for the explanations!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88684/new/
https://reviews.llvm.org/D88684
More information about the llvm-commits
mailing list