[llvm] r182820 - LoopVectorize.cpp: Fix abuse of StringRef on Twine. Twine captures the pointer of StringRef.
NAKAMURA Takumi
geek4civic at gmail.com
Tue May 28 20:13:48 PDT 2013
Author: chapuni
Date: Tue May 28 22:13:47 2013
New Revision: 182820
URL: http://llvm.org/viewvc/llvm-project?rev=182820&view=rev
Log:
LoopVectorize.cpp: Fix abuse of StringRef on Twine. Twine captures the pointer of StringRef.
Modified:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=182820&r1=182819&r2=182820&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Tue May 28 22:13:47 2013
@@ -812,8 +812,7 @@ struct LoopVectorizeHints {
for (unsigned i = 1, ie = LoopID->getNumOperands(); i < ie; ++i)
Vals.push_back(LoopID->getOperand(i));
- Twine Name = Prefix() + "width";
- Vals.push_back(createHint(Context, Name.str(), Width));
+ Vals.push_back(createHint(Context, Twine(Prefix(), "width").str(), Width));
MDNode *NewLoopID = MDNode::get(Context, Vals);
// Set operand 0 to refer to the loop id itself.
More information about the llvm-commits
mailing list