From: Duncan P. N. Exon Smith Date: Sun, 11 Sep 2016 21:29:34 +0000 (+0000) Subject: ScalarOpts: Use std::list for Candidates, NFC X-Git-Tag: llvmorg-4.0.0-rc1~10101 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b4e4af5ed77adcca62380a85b7688045367c661;p=platform%2Fupstream%2Fllvm.git ScalarOpts: Use std::list for Candidates, NFC There is nothing intrusive about the Candidate list; use std::list over llvm::ilist for simplicity. llvm-svn: 281177 --- diff --git a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp index 420a41e83fe8..b440db377e2d 100644 --- a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp @@ -66,6 +66,7 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/Local.h" +#include #include using namespace llvm; @@ -79,7 +80,7 @@ class StraightLineStrengthReduce : public FunctionPass { public: // SLSR candidate. Such a candidate must be in one of the forms described in // the header comments. - struct Candidate : public ilist_node { + struct Candidate { enum Kind { Invalid, // reserved for the default constructor Add, // B + i * S @@ -199,7 +200,7 @@ private: DominatorTree *DT; ScalarEvolution *SE; TargetTransformInfo *TTI; - ilist Candidates; + std::list Candidates; // Temporarily holds all instructions that are unlinked (but not deleted) by // rewriteCandidateWithBasis. These instructions will be actually removed // after all rewriting finishes.