diff options
| author | Adam Nemet <anemet@apple.com> | 2016-04-21 17:33:17 +0000 |
|---|---|---|
| committer | Adam Nemet <anemet@apple.com> | 2016-04-21 17:33:17 +0000 |
| commit | 963341c87228565311f08ecae18cf8223278b7a8 (patch) | |
| tree | 85df0ef626b3769aea05b710c69802408f8a40d8 /llvm/lib/Transforms/Scalar | |
| parent | f787826b466e251efc20ab9c3486014e197cf3b5 (diff) | |
| download | bcm5719-llvm-963341c87228565311f08ecae18cf8223278b7a8.tar.gz bcm5719-llvm-963341c87228565311f08ecae18cf8223278b7a8.zip | |
[LoopUtils] Move def of findStringMetadataForLoop to LoopUtils.cpp. NFC
The decl is in LoopUtils.h. I think that this was added to
LoopVersioningLICM.cpp by mistake.
llvm-svn: 267014
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp index 59e51b99eea..df0094d97ec 100644 --- a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp +++ b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp @@ -121,28 +121,6 @@ static MDNode *createStringMetadata(Loop *TheLoop, StringRef Name, unsigned V) { return MDNode::get(Context, MDs); } -/// \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) - return false; - // Iterate over LoopID operands and look for MDString Metadata - for (unsigned i = 1, e = LoopID->getNumOperands(); i < e; ++i) { - MDNode *MD = dyn_cast<MDNode>(LoopID->getOperand(i)); - if (!MD) - continue; - MDString *S = dyn_cast<MDString>(MD->getOperand(0)); - if (!S) - continue; - // Return true if MDString holds expected MetaData. - if (Name.equals(S->getString())) - return true; - } - return false; -} - /// \brief Set input string into loop metadata by keeping other values intact. void llvm::addStringMetadataToLoop(Loop *TheLoop, const char *MDString, unsigned V) { |

