[llvm] r295642 - [SLP] nullptr'ize initial value in `findBuildAggregate()`, NFC.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 04:15:56 PST 2017
Agree, thanks. Will fix it ASAP.
-------------
Best regards,
Alexey Bataev
22.02.2017 1:10, David Blaikie пишет:
If it's really unused, perhaps leave it uninitialized - that way Clang (& other static analysis tools) can warn if it's accidentally used.
On Mon, Feb 20, 2017 at 12:15 AM Alexey Bataev via llvm-commits <llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>> wrote:
Author: abataev
Date: Mon Feb 20 02:04:11 2017
New Revision: 295642
URL: http://llvm.org/viewvc/llvm-project?rev=295642&view=rev
Log:
[SLP] nullptr'ize initial value in `findBuildAggregate()`, NFC.
Initial value of V is sett nullptr, as it is not used.
Modified:
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=295642&r1=295641&r2=295642&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Mon Feb 20 02:04:11 2017
@@ -4614,7 +4614,7 @@ static bool findBuildVector(InsertElemen
static bool findBuildAggregate(InsertValueInst *IV,
SmallVectorImpl<Value *> &BuildVector,
SmallVectorImpl<Value *> &BuildVectorOpds) {
- Value *V = IV;
+ Value *V = nullptr;
do {
BuildVector.push_back(IV);
BuildVectorOpds.push_back(IV->getInsertedValueOperand());
_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170222/c1142bc5/attachment.html>
More information about the llvm-commits
mailing list