[PATCH] D97891: Add register size info back to MCRegisterClass

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 17 11:39:39 PDT 2021


bjope added a comment.

In D97891#2632341 <https://reviews.llvm.org/D97891#2632341>, @kparzysz wrote:

> I'm inclined to accept this as is.  There is definitely a limitation here that cannot be easily worked around.

Well the usage in  https://github.com/facebookincubator/BOLT/blob/master/src/Target/X86/X86MCPlusBuilder.cpp#L1417 is a bit strange (at least my impression when reading the code comment the goal is to find out the width of a memory access and that is done by looking at register sizes). It might give wrong result for sextloads etc if X86 is doing such things. But I'm not sure if that can be done in any other way.

So I'm inclined to accept this as well. And I think it looks much better now after the cleanups, getting rid of the weird rounding down when converting bits-to-bytes that was there in the past.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97891



More information about the llvm-commits mailing list