[llvm] r267013 - [LoopUtils] Rename {check->find}StringMetadata{Into->For}Loop. NFC

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 10:33:12 PDT 2016


Author: anemet
Date: Thu Apr 21 12:33:12 2016
New Revision: 267013

URL: http://llvm.org/viewvc/llvm-project?rev=267013&view=rev
Log:
[LoopUtils] Rename {check->find}StringMetadata{Into->For}Loop. NFC

"Into" was misleading.  I am also planning to use this helper to look
for loop metadata and return the argument, so find seems like a better
name.

Modified:
    llvm/trunk/include/llvm/Transforms/Utils/LoopUtils.h
    llvm/trunk/lib/Transforms/Scalar/LoopVersioningLICM.cpp

Modified: llvm/trunk/include/llvm/Transforms/Utils/LoopUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/LoopUtils.h?rev=267013&r1=267012&r2=267013&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/LoopUtils.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/LoopUtils.h Thu Apr 21 12:33:12 2016
@@ -385,9 +385,9 @@ void computeLICMSafetyInfo(LICMSafetyInf
 /// \brief Returns the instructions that use values defined in the loop.
 SmallVector<Instruction *, 8> findDefsUsedOutsideOfLoop(Loop *L);
 
-/// \brief Check string metadata into loop, if it exist return true,
-/// else return false.
-bool checkStringMetadataIntoLoop(Loop *TheLoop, StringRef Name);
+/// \brief Find string metadata for loop, if it exist return true, else return
+/// false.
+bool findStringMetadataForLoop(Loop *TheLoop, StringRef Name);
 
 /// \brief Set input string into loop metadata by keeping other values intact.
 void addStringMetadataToLoop(Loop *TheLoop, const char *MDString, 

Modified: llvm/trunk/lib/Transforms/Scalar/LoopVersioningLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopVersioningLICM.cpp?rev=267013&r1=267012&r2=267013&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopVersioningLICM.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopVersioningLICM.cpp Thu Apr 21 12:33:12 2016
@@ -121,9 +121,9 @@ static MDNode *createStringMetadata(Loop
   return MDNode::get(Context, MDs);
 }
 
-/// \brief Check string metadata in loop, if it exist return true,
-/// else return false.
-bool llvm::checkStringMetadataIntoLoop(Loop *TheLoop, StringRef Name) {
+/// \brief Find string metadata for loop, if it exist return true, else return
+/// false.
+bool llvm::findStringMetadataForLoop(Loop *TheLoop, StringRef Name) {
   MDNode *LoopID = TheLoop->getLoopID();
   // Return false if LoopID is false.
   if (!LoopID)
@@ -474,7 +474,7 @@ bool LoopVersioningLICM::legalLoopInstru
 /// else false.
 bool LoopVersioningLICM::isLoopAlreadyVisited() {
   // Check LoopVersioningLICM metadata into loop
-  if (checkStringMetadataIntoLoop(CurLoop, LICMVersioningMetaData)) {
+  if (findStringMetadataForLoop(CurLoop, LICMVersioningMetaData)) {
     return true;
   }
   return false;




More information about the llvm-commits mailing list