[PATCH] D124168: DeadMachineInstructionElim: Switch to using LiveRegUnits

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 06:52:07 PDT 2022


arsenm added a comment.

In D124168#3784951 <https://reviews.llvm.org/D124168#3784951>, @nikic wrote:

> In D124168#3784875 <https://reviews.llvm.org/D124168#3784875>, @arsenm wrote:
>
>> In D124168#3784598 <https://reviews.llvm.org/D124168#3784598>, @arsenm wrote:
>>
>>> In D124168#3784108 <https://reviews.llvm.org/D124168#3784108>, @nikic wrote:
>>>
>>>>> Theoretically improves compile time for targets with many overlapping registers
>>>>
>>>> In practice, this is a major compile time regression instead: http://llvm-compile-time-tracker.com/compare.php?from=6c44a7179f1747ec38d580e6b50bde98555ad811&to=b5041527c75de2f409aa9e2e6deba12b17834c59&stat=instructions
>>>
>>> This doesn't make much sense. My preliminary analysis says that this is somehow phys_regs_and_masks fault (which really doesn't buy any real code simplification over iterating the operands)
>>
>> Hopefully d90f7cb559e32c2cbf1f9839d7e8e0cc0be189ba <https://reviews.llvm.org/rGd90f7cb559e32c2cbf1f9839d7e8e0cc0be189ba> fixes this
>
> It does recover most of the regression: http://llvm-compile-time-tracker.com/compare.php?from=ab56719acd98778fb2e48fa425ac7c8d27bdea86&to=d90f7cb559e32c2cbf1f9839d7e8e0cc0be189ba&stat=instructions
>
> There is still a bit of residual regression left though: http://llvm-compile-time-tracker.com/compare.php?from=6c44a7179f1747ec38d580e6b50bde98555ad811&to=d90f7cb559e32c2cbf1f9839d7e8e0cc0be189ba&stat=instructions

I think this is explainable by LiveRegUnits::removeRegsNotPreserved being slower than clearBitsNotInMask. Ideally we would avoid this by switching from using regmasks to regunit masks


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124168/new/

https://reviews.llvm.org/D124168



More information about the llvm-commits mailing list