ScalarOpts: Use std::list for Candidates, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 11 Sep 2016 21:29:34 +0000 (21:29 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 11 Sep 2016 21:29:34 +0000 (21:29 +0000)
There is nothing intrusive about the Candidate list; use std::list over
llvm::ilist for simplicity.

llvm-svn: 281177

llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp

index 420a41e83fe8b9656b2dffdce2e607161671fd59..b440db377e2d1be9a73326bf8875f887ba7571f4 100644 (file)
@@ -66,6 +66,7 @@
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Transforms/Utils/Local.h"
+#include <list>
 #include <vector>
 
 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<Candidate> {
+  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<Candidate> Candidates;
+  std::list<Candidate> Candidates;
   // Temporarily holds all instructions that are unlinked (but not deleted) by
   // rewriteCandidateWithBasis. These instructions will be actually removed
   // after all rewriting finishes.