From 94253c183583ed5b43ebdd8d6b3b1d7ca595aaa9 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Thu, 21 Apr 2016 17:33:12 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267013 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/LoopUtils.h | 6 +++--- lib/Transforms/Scalar/LoopVersioningLICM.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/llvm/Transforms/Utils/LoopUtils.h b/include/llvm/Transforms/Utils/LoopUtils.h index 9705e5c6872..e23a6712cc5 100644 --- a/include/llvm/Transforms/Utils/LoopUtils.h +++ b/include/llvm/Transforms/Utils/LoopUtils.h @@ -385,9 +385,9 @@ void computeLICMSafetyInfo(LICMSafetyInfo *, Loop *); /// \brief Returns the instructions that use values defined in the loop. SmallVector 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, diff --git a/lib/Transforms/Scalar/LoopVersioningLICM.cpp b/lib/Transforms/Scalar/LoopVersioningLICM.cpp index 18182b6c448..59e51b99eea 100644 --- a/lib/Transforms/Scalar/LoopVersioningLICM.cpp +++ b/lib/Transforms/Scalar/LoopVersioningLICM.cpp @@ -121,9 +121,9 @@ static MDNode *createStringMetadata(Loop *TheLoop, StringRef Name, unsigned V) { 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::legalLoopInstructions() { /// else false. bool LoopVersioningLICM::isLoopAlreadyVisited() { // Check LoopVersioningLICM metadata into loop - if (checkStringMetadataIntoLoop(CurLoop, LICMVersioningMetaData)) { + if (findStringMetadataForLoop(CurLoop, LICMVersioningMetaData)) { return true; } return false;