[PATCH] D20248: Rename getLargestLegalIntTypeSize to getLargestLegalIntTypeSizeInBits(). NFC.

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 11:44:56 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL269456: Rename getLargestLegalIntTypeSize to getLargestLegalIntTypeSizeInBits(). NFC. (authored by junbuml).

Changed prior to commit:
  http://reviews.llvm.org/D20248?vs=57217&id=57226#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20248

Files:
  llvm/trunk/include/llvm/IR/DataLayout.h
  llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp
  llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
  llvm/trunk/lib/IR/DataLayout.cpp
  llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp

Index: llvm/trunk/lib/IR/DataLayout.cpp
===================================================================
--- llvm/trunk/lib/IR/DataLayout.cpp
+++ llvm/trunk/lib/IR/DataLayout.cpp
@@ -718,7 +718,7 @@
   return nullptr;
 }
 
-unsigned DataLayout::getLargestLegalIntTypeSize() const {
+unsigned DataLayout::getLargestLegalIntTypeSizeInBits() const {
   auto Max = std::max_element(LegalIntWidths.begin(), LegalIntWidths.end());
   return Max != LegalIntWidths.end() ? *Max : 0;
 }
Index: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
@@ -1690,7 +1690,7 @@
   // Only handle legal scalar cases. Anything else requires too much work.
   Type *Ty = CountZeros->getType();
   unsigned SizeInBits = Ty->getPrimitiveSizeInBits();
-  if (Ty->isVectorTy() || SizeInBits > DL->getLargestLegalIntTypeSize())
+  if (Ty->isVectorTy() || SizeInBits > DL->getLargestLegalIntTypeSizeInBits())
     return false;
 
   // The intrinsic will be sunk behind a compare against zero and branch.
Index: llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp
+++ llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp
@@ -951,7 +951,7 @@
   // call a sized libcall that doesn't actually exist. There should
   // really be some more reliable way in LLVM of determining integer
   // sizes which are valid in the target's C ABI...
-  unsigned LargestSize = DL.getLargestLegalIntTypeSize() >= 64 ? 16 : 8;
+  unsigned LargestSize = DL.getLargestLegalIntTypeSizeInBits() >= 64 ? 16 : 8;
   return Align >= Size &&
          (Size == 1 || Size == 2 || Size == 4 || Size == 8 || Size == 16) &&
          Size <= LargestSize;
Index: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
===================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2201,7 +2201,7 @@
   // truncated to i8 or i16.
   bool TruncCond = false;
   if (NewWidth > 0 && BitWidth > NewWidth &&
-      NewWidth >= DL.getLargestLegalIntTypeSize()) {
+      NewWidth >= DL.getLargestLegalIntTypeSizeInBits()) {
     TruncCond = true;
     IntegerType *Ty = IntegerType::get(SI.getContext(), NewWidth);
     Builder->SetInsertPoint(&SI);
Index: llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -185,7 +185,7 @@
   // size. If so, check to see whether we will end up actually reducing the
   // number of stores used.
   unsigned Bytes = unsigned(End-Start);
-  unsigned MaxIntSize = DL.getLargestLegalIntTypeSize() / 8;
+  unsigned MaxIntSize = DL.getLargestLegalIntTypeSizeInBits() / 8;
   if (MaxIntSize == 0)
     MaxIntSize = 1;
   unsigned NumPointerStores = Bytes / MaxIntSize;
Index: llvm/trunk/include/llvm/IR/DataLayout.h
===================================================================
--- llvm/trunk/include/llvm/IR/DataLayout.h
+++ llvm/trunk/include/llvm/IR/DataLayout.h
@@ -427,13 +427,13 @@
 
   /// \brief Returns the largest legal integer type, or null if none are set.
   Type *getLargestLegalIntType(LLVMContext &C) const {
-    unsigned LargestSize = getLargestLegalIntTypeSize();
+    unsigned LargestSize = getLargestLegalIntTypeSizeInBits();
     return (LargestSize == 0) ? nullptr : Type::getIntNTy(C, LargestSize);
   }
 
   /// \brief Returns the size of largest legal integer type size, or 0 if none
   /// are set.
-  unsigned getLargestLegalIntTypeSize() const;
+  unsigned getLargestLegalIntTypeSizeInBits() const;
 
   /// \brief Returns the offset from the beginning of the type for the specified
   /// indices.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20248.57226.patch
Type: text/x-patch
Size: 3984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160513/baeaf48e/attachment-0001.bin>


More information about the llvm-commits mailing list