[PATCH] D89108: [NFC] Add the getSize() interface for MachineConstantPoolValue

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 20:36:36 PDT 2020


MaskRay added a comment.

Can you please post the dependent patch to make it clear whether this refactoring is suitable?



================
Comment at: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:513
   for (unsigned i = 0, e = CPs.size(); i != e; ++i) {
-    unsigned Size = TD.getTypeAllocSize(CPs[i].getType());
+    unsigned Size = CPs[i].getSize(TD);
     Align Alignment = CPs[i].getAlign();
----------------
if `const unsigned` works, please change as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89108



More information about the llvm-commits mailing list