#include "llvm/Type.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include <map>
-#include <list>
namespace llvm {
class Value;
// Div utility functions
//
SDOperand BuildSDIV(SDNode *N, SelectionDAG &DAG,
- std::list<SDNode*>* Created) const;
+ std::vector<SDNode*>* Created) const;
SDOperand BuildUDIV(SDNode *N, SelectionDAG &DAG,
- std::list<SDNode*>* Created) const;
+ std::vector<SDNode*>* Created) const;
protected:
/// multiplying by a magic number. See:
/// <http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html>
SDOperand DAGCombiner::BuildSDIV(SDNode *N) {
- std::list<SDNode*> Built;
+ std::vector<SDNode*> Built;
SDOperand S = TLI.BuildSDIV(N, DAG, &Built);
- for (std::list<SDNode*>::iterator ii = Built.begin(), ee = Built.end();
+ for (std::vector<SDNode*>::iterator ii = Built.begin(), ee = Built.end();
ii != ee; ++ii)
AddToWorkList(*ii);
return S;
/// multiplying by a magic number. See:
/// <http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html>
SDOperand DAGCombiner::BuildUDIV(SDNode *N) {
- std::list<SDNode*> Built;
+ std::vector<SDNode*> Built;
SDOperand S = TLI.BuildUDIV(N, DAG, &Built);
- for (std::list<SDNode*>::iterator ii = Built.begin(), ee = Built.end();
+ for (std::vector<SDNode*>::iterator ii = Built.begin(), ee = Built.end();
ii != ee; ++ii)
AddToWorkList(*ii);
return S;
/// multiplying by a magic number. See:
/// <http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html>
SDOperand TargetLowering::BuildSDIV(SDNode *N, SelectionDAG &DAG,
- std::list<SDNode*>* Created) const {
+ std::vector<SDNode*>* Created) const {
MVT::ValueType VT = N->getValueType(0);
// Check to see if we can do this.
/// multiplying by a magic number. See:
/// <http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html>
SDOperand TargetLowering::BuildUDIV(SDNode *N, SelectionDAG &DAG,
- std::list<SDNode*>* Created) const {
+ std::vector<SDNode*>* Created) const {
MVT::ValueType VT = N->getValueType(0);
// Check to see if we can do this.