forked from OSchip/llvm-project
Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi! llvm-svn: 16152
This commit is contained in:
parent
cb46e66983
commit
a5c04ee50f
|
@ -177,7 +177,7 @@ private:
|
||||||
E = GT::child_end(Node); I != E; ++I)
|
E = GT::child_end(Node); I != E; ++I)
|
||||||
ProcessNode(Int, getSourceGraphNode(OrigContainer, *I));
|
ProcessNode(Int, getSourceGraphNode(OrigContainer, *I));
|
||||||
|
|
||||||
IntStack.push(make_pair(Int, succ_begin(Int)));
|
IntStack.push(std::make_pair(Int, succ_begin(Int)));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Support/GetElementPtrTypeIterator.h"
|
#include "llvm/Support/GetElementPtrTypeIterator.h"
|
||||||
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
// Make sure that anything that uses AliasAnalysis pulls in this file...
|
// Make sure that anything that uses AliasAnalysis pulls in this file...
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
#include "llvm/Analysis/IntervalIterator.h"
|
#include "llvm/Analysis/IntervalIterator.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -26,7 +27,7 @@ X("intervals", "Interval Partition Construction", true);
|
||||||
|
|
||||||
// destroy - Reset state back to before function was analyzed
|
// destroy - Reset state back to before function was analyzed
|
||||||
void IntervalPartition::destroy() {
|
void IntervalPartition::destroy() {
|
||||||
for_each(Intervals.begin(), Intervals.end(), deleter<Interval>);
|
std::for_each(Intervals.begin(), Intervals.end(), deleter<Interval>);
|
||||||
IntervalMap.clear();
|
IntervalMap.clear();
|
||||||
RootInterval = 0;
|
RootInterval = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "llvm/Support/CFG.h"
|
#include "llvm/Support/CFG.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -33,7 +33,7 @@ X("loops", "Natural Loop Construction", true);
|
||||||
// Loop implementation
|
// Loop implementation
|
||||||
//
|
//
|
||||||
bool Loop::contains(const BasicBlock *BB) const {
|
bool Loop::contains(const BasicBlock *BB) const {
|
||||||
return find(Blocks.begin(), Blocks.end(), BB) != Blocks.end();
|
return std::find(Blocks.begin(), Blocks.end(), BB) != Blocks.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Loop::isLoopExit(const BasicBlock *BB) const {
|
bool Loop::isLoopExit(const BasicBlock *BB) const {
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "llvm/Support/GetElementPtrTypeIterator.h"
|
#include "llvm/Support/GetElementPtrTypeIterator.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "VirtRegMap.h"
|
#include "VirtRegMap.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
|
|
@ -470,7 +470,7 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur)
|
||||||
// is active or inactive to properly update the PhysRegTracker
|
// is active or inactive to properly update the PhysRegTracker
|
||||||
// and the VirtRegMap
|
// and the VirtRegMap
|
||||||
IntervalPtrs::iterator it;
|
IntervalPtrs::iterator it;
|
||||||
if ((it = find(active_.begin(), active_.end(), i)) != active_.end()) {
|
if ((it = std::find(active_.begin(), active_.end(), i)) != active_.end()) {
|
||||||
active_.erase(it);
|
active_.erase(it);
|
||||||
if (MRegisterInfo::isPhysicalRegister(i->reg)) {
|
if (MRegisterInfo::isPhysicalRegister(i->reg)) {
|
||||||
prt_->delRegUse(i->reg);
|
prt_->delRegUse(i->reg);
|
||||||
|
@ -483,7 +483,7 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur)
|
||||||
vrm_->clearVirt(i->reg);
|
vrm_->clearVirt(i->reg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((it = find(inactive_.begin(), inactive_.end(), i)) != inactive_.end()) {
|
else if ((it = std::find(inactive_.begin(), inactive_.end(), i)) != inactive_.end()) {
|
||||||
inactive_.erase(it);
|
inactive_.erase(it);
|
||||||
if (MRegisterInfo::isPhysicalRegister(i->reg))
|
if (MRegisterInfo::isPhysicalRegister(i->reg))
|
||||||
unhandled_.push(i);
|
unhandled_.push(i);
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "llvm/Transforms/Utils/Local.h"
|
#include "llvm/Transforms/Utils/Local.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "llvm/Support/CFG.h"
|
#include "llvm/Support/CFG.h"
|
||||||
#include "llvm/Support/StableBasicBlockNumbering.h"
|
#include "llvm/Support/StableBasicBlockNumbering.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
/// isAllocaPromotable - Return true if this alloca is legal for promotion.
|
/// isAllocaPromotable - Return true if this alloca is legal for promotion.
|
||||||
|
|
|
@ -49,7 +49,7 @@ static bool PropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) {
|
||||||
// with incompatible values coming in from the two edges!
|
// with incompatible values coming in from the two edges!
|
||||||
//
|
//
|
||||||
for (pred_iterator PI = pred_begin(Succ), PE = pred_end(Succ); PI != PE; ++PI)
|
for (pred_iterator PI = pred_begin(Succ), PE = pred_end(Succ); PI != PE; ++PI)
|
||||||
if (find(BBPreds.begin(), BBPreds.end(), *PI) != BBPreds.end()) {
|
if (std::find(BBPreds.begin(), BBPreds.end(), *PI) != BBPreds.end()) {
|
||||||
// Loop over all of the PHI nodes checking to see if there are
|
// Loop over all of the PHI nodes checking to see if there are
|
||||||
// incompatible values coming in.
|
// incompatible values coming in.
|
||||||
for (BasicBlock::iterator I = Succ->begin();
|
for (BasicBlock::iterator I = Succ->begin();
|
||||||
|
|
Loading…
Reference in New Issue