[llvm] r281177 - ScalarOpts: Use std::list for Candidates, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 11 14:29:35 PDT 2016
Author: dexonsmith
Date: Sun Sep 11 16:29:34 2016
New Revision: 281177
URL: http://llvm.org/viewvc/llvm-project?rev=281177&view=rev
Log:
ScalarOpts: Use std::list for Candidates, NFC
There is nothing intrusive about the Candidate list; use std::list over
llvm::ilist for simplicity.
Modified:
llvm/trunk/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp?rev=281177&r1=281176&r2=281177&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp Sun Sep 11 16:29:34 2016
@@ -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 : publi
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.
More information about the llvm-commits
mailing list