[PATCH] D89108: [NFC] Add the getSize() interface for MachineConstantPoolValue
    Qing Shan Zhang via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Oct  9 22:10:19 PDT 2020
    
    
  
steven.zhang added a comment.
In D89108#2323163 <https://reviews.llvm.org/D89108#2323163>, @MaskRay wrote:
> Can you please post the dependent patch to make it clear whether this refactoring is suitable?
Ok, I will post the dependent patches later.
================
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();
----------------
MaskRay wrote:
> if `const unsigned` works, please change as well.
Sorry, do you mean const unsigned Size = ... ? I don't think there is any benefit to have the cv-qualifier here but increasing the code size.
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