mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[C++11] Replace llvm::tie with std::tie.
The old implementation is no longer needed in C++11. llvm-svn: 202644
This commit is contained in:
parent
6e284b6c8f
commit
3ac154a395
@ -145,43 +145,6 @@ inline mapped_iterator<ItTy, FuncTy> map_iterator(const ItTy &I, FuncTy F) {
|
||||
// Extra additions to <utility>
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// tie - this function ties two objects and returns a temporary object
|
||||
// that is assignable from a std::pair. This can be used to make code
|
||||
// more readable when using values returned from functions bundled in
|
||||
// a std::pair. Since an example is worth 1000 words:
|
||||
//
|
||||
// typedef std::map<int, int> Int2IntMap;
|
||||
//
|
||||
// Int2IntMap myMap;
|
||||
// Int2IntMap::iterator where;
|
||||
// bool inserted;
|
||||
// tie(where, inserted) = myMap.insert(std::make_pair(123,456));
|
||||
//
|
||||
// if (inserted)
|
||||
// // do stuff
|
||||
// else
|
||||
// // do other stuff
|
||||
template <typename T1, typename T2>
|
||||
struct tier {
|
||||
typedef T1 &first_type;
|
||||
typedef T2 &second_type;
|
||||
|
||||
first_type first;
|
||||
second_type second;
|
||||
|
||||
tier(first_type f, second_type s) : first(f), second(s) { }
|
||||
tier& operator=(const std::pair<T1, T2>& p) {
|
||||
first = p.first;
|
||||
second = p.second;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T1, typename T2>
|
||||
inline tier<T1, T2> tie(T1& f, T2& s) {
|
||||
return tier<T1, T2>(f, s);
|
||||
}
|
||||
|
||||
/// \brief Function object to check whether the first component of a std::pair
|
||||
/// compares less than the first component of another std::pair.
|
||||
struct less_first {
|
||||
|
@ -1143,7 +1143,7 @@ public:
|
||||
/// low/high part.
|
||||
std::pair<SDValue, SDValue> SplitVector(const SDValue &N, const SDLoc &DL) {
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) = GetSplitDestVTs(N.getValueType());
|
||||
std::tie(LoVT, HiVT) = GetSplitDestVTs(N.getValueType());
|
||||
return SplitVector(N, DL, LoVT, HiVT);
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ static bool matchVectorSplittingReduction(const ExtractElementInst *ReduxRoot,
|
||||
|
||||
Value *NextRdxOp;
|
||||
ShuffleVectorInst *Shuffle;
|
||||
tie(NextRdxOp, Shuffle) = getShuffleAndOtherOprd(BinOp);
|
||||
std::tie(NextRdxOp, Shuffle) = getShuffleAndOtherOprd(BinOp);
|
||||
|
||||
// Check the current reduction operation and the shuffle use the same value.
|
||||
if (Shuffle == 0)
|
||||
|
@ -525,9 +525,9 @@ bool CallAnalyzer::visitCmpInst(CmpInst &I) {
|
||||
// a common base.
|
||||
Value *LHSBase, *RHSBase;
|
||||
APInt LHSOffset, RHSOffset;
|
||||
llvm::tie(LHSBase, LHSOffset) = ConstantOffsetPtrs.lookup(LHS);
|
||||
std::tie(LHSBase, LHSOffset) = ConstantOffsetPtrs.lookup(LHS);
|
||||
if (LHSBase) {
|
||||
llvm::tie(RHSBase, RHSOffset) = ConstantOffsetPtrs.lookup(RHS);
|
||||
std::tie(RHSBase, RHSOffset) = ConstantOffsetPtrs.lookup(RHS);
|
||||
if (RHSBase && LHSBase == RHSBase) {
|
||||
// We have common bases, fold the icmp to a constant based on the
|
||||
// offsets.
|
||||
@ -575,9 +575,9 @@ bool CallAnalyzer::visitSub(BinaryOperator &I) {
|
||||
Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
|
||||
Value *LHSBase, *RHSBase;
|
||||
APInt LHSOffset, RHSOffset;
|
||||
llvm::tie(LHSBase, LHSOffset) = ConstantOffsetPtrs.lookup(LHS);
|
||||
std::tie(LHSBase, LHSOffset) = ConstantOffsetPtrs.lookup(LHS);
|
||||
if (LHSBase) {
|
||||
llvm::tie(RHSBase, RHSOffset) = ConstantOffsetPtrs.lookup(RHS);
|
||||
std::tie(RHSBase, RHSOffset) = ConstantOffsetPtrs.lookup(RHS);
|
||||
if (RHSBase && LHSBase == RHSBase) {
|
||||
// We have common bases, fold the subtract to a constant based on the
|
||||
// offsets.
|
||||
|
@ -130,7 +130,7 @@ VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &li) {
|
||||
|
||||
// Calculate instr weight.
|
||||
bool reads, writes;
|
||||
tie(reads, writes) = mi->readsWritesVirtualRegister(li.reg);
|
||||
std::tie(reads, writes) = mi->readsWritesVirtualRegister(li.reg);
|
||||
weight = LiveIntervals::getSpillWeight(
|
||||
writes, reads, &MBFI, mi);
|
||||
|
||||
|
@ -476,7 +476,7 @@ MachineInstr *InlineSpiller::traceSiblingValue(unsigned UseReg, VNInfo *UseVNI,
|
||||
// Check if a cached value already exists.
|
||||
SibValueMap::iterator SVI;
|
||||
bool Inserted;
|
||||
tie(SVI, Inserted) =
|
||||
std::tie(SVI, Inserted) =
|
||||
SibValues.insert(std::make_pair(UseVNI, SibValueInfo(UseReg, UseVNI)));
|
||||
if (!Inserted) {
|
||||
DEBUG(dbgs() << "Cached value " << PrintReg(UseReg) << ':'
|
||||
@ -495,7 +495,7 @@ MachineInstr *InlineSpiller::traceSiblingValue(unsigned UseReg, VNInfo *UseVNI,
|
||||
do {
|
||||
unsigned Reg;
|
||||
VNInfo *VNI;
|
||||
tie(Reg, VNI) = WorkList.pop_back_val();
|
||||
std::tie(Reg, VNI) = WorkList.pop_back_val();
|
||||
DEBUG(dbgs() << " " << PrintReg(Reg) << ':' << VNI->id << '@' << VNI->def
|
||||
<< ":\t");
|
||||
|
||||
@ -554,7 +554,7 @@ MachineInstr *InlineSpiller::traceSiblingValue(unsigned UseReg, VNInfo *UseVNI,
|
||||
for (unsigned i = 0, e = NonPHIs.size(); i != e; ++i) {
|
||||
VNInfo *NonPHI = NonPHIs[i];
|
||||
// Known value? Try an insertion.
|
||||
tie(SVI, Inserted) =
|
||||
std::tie(SVI, Inserted) =
|
||||
SibValues.insert(std::make_pair(NonPHI, SibValueInfo(Reg, NonPHI)));
|
||||
// Add all the PHIs as dependents of NonPHI.
|
||||
for (unsigned pi = 0, pe = PHIs.size(); pi != pe; ++pi)
|
||||
@ -587,8 +587,8 @@ MachineInstr *InlineSpiller::traceSiblingValue(unsigned UseReg, VNInfo *UseVNI,
|
||||
<< SrcVNI->id << '@' << SrcVNI->def
|
||||
<< " kill=" << unsigned(SVI->second.KillsSource) << '\n');
|
||||
// Known sibling source value? Try an insertion.
|
||||
tie(SVI, Inserted) = SibValues.insert(std::make_pair(SrcVNI,
|
||||
SibValueInfo(SrcReg, SrcVNI)));
|
||||
std::tie(SVI, Inserted) = SibValues.insert(
|
||||
std::make_pair(SrcVNI, SibValueInfo(SrcReg, SrcVNI)));
|
||||
// This is the first time we see Src, add it to the worklist.
|
||||
if (Inserted)
|
||||
WorkList.push_back(std::make_pair(SrcReg, SrcVNI));
|
||||
@ -745,7 +745,7 @@ void InlineSpiller::eliminateRedundantSpills(LiveInterval &SLI, VNInfo *VNI) {
|
||||
|
||||
do {
|
||||
LiveInterval *LI;
|
||||
tie(LI, VNI) = WorkList.pop_back_val();
|
||||
std::tie(LI, VNI) = WorkList.pop_back_val();
|
||||
unsigned Reg = LI->reg;
|
||||
DEBUG(dbgs() << "Checking redundant spills for "
|
||||
<< VNI->id << '@' << VNI->def << " in " << *LI << '\n');
|
||||
@ -804,7 +804,7 @@ void InlineSpiller::markValueUsed(LiveInterval *LI, VNInfo *VNI) {
|
||||
SmallVector<std::pair<LiveInterval*, VNInfo*>, 8> WorkList;
|
||||
WorkList.push_back(std::make_pair(LI, VNI));
|
||||
do {
|
||||
tie(LI, VNI) = WorkList.pop_back_val();
|
||||
std::tie(LI, VNI) = WorkList.pop_back_val();
|
||||
if (!UsedValues.insert(VNI))
|
||||
continue;
|
||||
|
||||
|
@ -121,7 +121,7 @@ bool InterferenceCache::Entry::valid(LiveIntervalUnion *LIUArray,
|
||||
|
||||
void InterferenceCache::Entry::update(unsigned MBBNum) {
|
||||
SlotIndex Start, Stop;
|
||||
tie(Start, Stop) = Indexes->getMBBRange(MBBNum);
|
||||
std::tie(Start, Stop) = Indexes->getMBBRange(MBBNum);
|
||||
|
||||
// Use advanceTo only when possible.
|
||||
if (PrevPos != Start) {
|
||||
@ -198,7 +198,7 @@ void InterferenceCache::Entry::update(unsigned MBBNum) {
|
||||
BI = &Blocks[MBBNum];
|
||||
if (BI->Tag == Tag)
|
||||
return;
|
||||
tie(Start, Stop) = Indexes->getMBBRange(MBBNum);
|
||||
std::tie(Start, Stop) = Indexes->getMBBRange(MBBNum);
|
||||
}
|
||||
|
||||
// Check for last interference in block.
|
||||
|
@ -459,7 +459,7 @@ void LiveIntervals::pruneValue(LiveInterval *LI, SlotIndex Kill,
|
||||
|
||||
MachineBasicBlock *KillMBB = Indexes->getMBBFromIndex(Kill);
|
||||
SlotIndex MBBStart, MBBEnd;
|
||||
tie(MBBStart, MBBEnd) = Indexes->getMBBRange(KillMBB);
|
||||
std::tie(MBBStart, MBBEnd) = Indexes->getMBBRange(KillMBB);
|
||||
|
||||
// If VNI isn't live out from KillMBB, the value is trivially pruned.
|
||||
if (LRQ.endPoint() < MBBEnd) {
|
||||
@ -486,7 +486,7 @@ void LiveIntervals::pruneValue(LiveInterval *LI, SlotIndex Kill,
|
||||
MachineBasicBlock *MBB = *I;
|
||||
|
||||
// Check if VNI is live in to MBB.
|
||||
tie(MBBStart, MBBEnd) = Indexes->getMBBRange(MBB);
|
||||
std::tie(MBBStart, MBBEnd) = Indexes->getMBBRange(MBB);
|
||||
LiveQueryResult LRQ = LI->Query(MBBStart);
|
||||
if (LRQ.valueIn() != VNI) {
|
||||
// This block isn't part of the VNI segment. Prune the search.
|
||||
|
@ -114,7 +114,7 @@ void LiveRangeCalc::updateLiveIns() {
|
||||
MachineBasicBlock *MBB = I->DomNode->getBlock();
|
||||
assert(I->Value && "No live-in value found");
|
||||
SlotIndex Start, End;
|
||||
tie(Start, End) = Indexes->getMBBRange(MBB);
|
||||
std::tie(Start, End) = Indexes->getMBBRange(MBB);
|
||||
|
||||
if (I->Kill.isValid())
|
||||
// Value is killed inside this block.
|
||||
@ -212,7 +212,7 @@ bool LiveRangeCalc::findReachingDefs(LiveRange &LR, MachineBasicBlock &KillMBB,
|
||||
}
|
||||
|
||||
SlotIndex Start, End;
|
||||
tie(Start, End) = Indexes->getMBBRange(Pred);
|
||||
std::tie(Start, End) = Indexes->getMBBRange(Pred);
|
||||
|
||||
// First time we see Pred. Try to determine the live-out value, but set
|
||||
// it as null if Pred is live-through with an unknown value.
|
||||
@ -247,7 +247,7 @@ bool LiveRangeCalc::findReachingDefs(LiveRange &LR, MachineBasicBlock &KillMBB,
|
||||
for (SmallVectorImpl<unsigned>::const_iterator I = WorkList.begin(),
|
||||
E = WorkList.end(); I != E; ++I) {
|
||||
SlotIndex Start, End;
|
||||
tie(Start, End) = Indexes->getMBBRange(*I);
|
||||
std::tie(Start, End) = Indexes->getMBBRange(*I);
|
||||
// Trim the live range in KillMBB.
|
||||
if (*I == KillMBBNum && Kill.isValid())
|
||||
End = Kill;
|
||||
@ -342,7 +342,7 @@ void LiveRangeCalc::updateSSA() {
|
||||
++Changes;
|
||||
assert(Alloc && "Need VNInfo allocator to create PHI-defs");
|
||||
SlotIndex Start, End;
|
||||
tie(Start, End) = Indexes->getMBBRange(MBB);
|
||||
std::tie(Start, End) = Indexes->getMBBRange(MBB);
|
||||
LiveRange &LR = I->LR;
|
||||
VNInfo *VNI = LR.getNextValue(Start, *Alloc);
|
||||
I->Value = VNI;
|
||||
|
@ -944,7 +944,7 @@ static bool pushDepHeight(const DataDep &Dep,
|
||||
// Update Heights[DefMI] to be the maximum height seen.
|
||||
MIHeightMap::iterator I;
|
||||
bool New;
|
||||
tie(I, New) = Heights.insert(std::make_pair(Dep.DefMI, UseHeight));
|
||||
std::tie(I, New) = Heights.insert(std::make_pair(Dep.DefMI, UseHeight));
|
||||
if (New)
|
||||
return true;
|
||||
|
||||
|
@ -585,7 +585,7 @@ RAFast::defineVirtReg(MachineInstr *MI, unsigned OpNum,
|
||||
"Not a virtual register");
|
||||
LiveRegMap::iterator LRI;
|
||||
bool New;
|
||||
tie(LRI, New) = LiveVirtRegs.insert(LiveReg(VirtReg));
|
||||
std::tie(LRI, New) = LiveVirtRegs.insert(LiveReg(VirtReg));
|
||||
if (New) {
|
||||
// If there is no hint, peek at the only use of this register.
|
||||
if ((!Hint || !TargetRegisterInfo::isPhysicalRegister(Hint)) &&
|
||||
@ -618,7 +618,7 @@ RAFast::reloadVirtReg(MachineInstr *MI, unsigned OpNum,
|
||||
"Not a virtual register");
|
||||
LiveRegMap::iterator LRI;
|
||||
bool New;
|
||||
tie(LRI, New) = LiveVirtRegs.insert(LiveReg(VirtReg));
|
||||
std::tie(LRI, New) = LiveVirtRegs.insert(LiveReg(VirtReg));
|
||||
MachineOperand &MO = MI->getOperand(OpNum);
|
||||
if (New) {
|
||||
LRI = allocVirtReg(MI, LRI, Hint);
|
||||
|
@ -952,7 +952,7 @@ void RegisterCoalescer::updateRegDefsUses(unsigned SrcReg,
|
||||
|
||||
SmallVector<unsigned,8> Ops;
|
||||
bool Reads, Writes;
|
||||
tie(Reads, Writes) = UseMI->readsWritesVirtualRegister(SrcReg, &Ops);
|
||||
std::tie(Reads, Writes) = UseMI->readsWritesVirtualRegister(SrcReg, &Ops);
|
||||
|
||||
// If SrcReg wasn't read, it may still be the case that DstReg is live-in
|
||||
// because SrcReg is a sub-register.
|
||||
|
@ -4472,12 +4472,12 @@ static
|
||||
std::pair<SDValue, SDValue> SplitVSETCC(const SDNode *N, SelectionDAG &DAG) {
|
||||
SDLoc DL(N);
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
|
||||
// Split the inputs.
|
||||
SDValue Lo, Hi, LL, LH, RL, RH;
|
||||
llvm::tie(LL, LH) = DAG.SplitVectorOperand(N, 0);
|
||||
llvm::tie(RL, RH) = DAG.SplitVectorOperand(N, 1);
|
||||
std::tie(LL, LH) = DAG.SplitVectorOperand(N, 0);
|
||||
std::tie(RL, RH) = DAG.SplitVectorOperand(N, 1);
|
||||
|
||||
Lo = DAG.getNode(N->getOpcode(), DL, LoVT, LL, RL, N->getOperand(2));
|
||||
Hi = DAG.getNode(N->getOpcode(), DL, HiVT, LH, RH, N->getOperand(2));
|
||||
@ -4535,9 +4535,9 @@ SDValue DAGCombiner::visitVSELECT(SDNode *N) {
|
||||
return SDValue();
|
||||
|
||||
SDValue Lo, Hi, CCLo, CCHi, LL, LH, RL, RH;
|
||||
llvm::tie(CCLo, CCHi) = SplitVSETCC(N0.getNode(), DAG);
|
||||
llvm::tie(LL, LH) = DAG.SplitVectorOperand(N, 1);
|
||||
llvm::tie(RL, RH) = DAG.SplitVectorOperand(N, 2);
|
||||
std::tie(CCLo, CCHi) = SplitVSETCC(N0.getNode(), DAG);
|
||||
std::tie(LL, LH) = DAG.SplitVectorOperand(N, 1);
|
||||
std::tie(RL, RH) = DAG.SplitVectorOperand(N, 2);
|
||||
|
||||
Lo = DAG.getNode(N->getOpcode(), DL, LL.getValueType(), CCLo, LL, RL);
|
||||
Hi = DAG.getNode(N->getOpcode(), DL, LH.getValueType(), CCHi, LH, RH);
|
||||
|
@ -78,8 +78,8 @@ void DAGTypeLegalizer::ExpandRes_BITCAST(SDNode *N, SDValue &Lo, SDValue &Hi) {
|
||||
assert(!(InVT.getVectorNumElements() & 1) && "Unsupported BITCAST");
|
||||
InOp = GetWidenedVector(InOp);
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(InVT);
|
||||
llvm::tie(Lo, Hi) = DAG.SplitVector(InOp, dl, LoVT, HiVT);
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(InVT);
|
||||
std::tie(Lo, Hi) = DAG.SplitVector(InOp, dl, LoVT, HiVT);
|
||||
if (TLI.isBigEndian())
|
||||
std::swap(Lo, Hi);
|
||||
Lo = DAG.getNode(ISD::BITCAST, dl, NOutVT, Lo);
|
||||
@ -518,7 +518,7 @@ void DAGTypeLegalizer::SplitRes_SELECT(SDNode *N, SDValue &Lo,
|
||||
if (getTypeAction(Cond.getValueType()) == TargetLowering::TypeSplitVector)
|
||||
GetSplitVector(Cond, CL, CH);
|
||||
else
|
||||
llvm::tie(CL, CH) = DAG.SplitVector(Cond, dl);
|
||||
std::tie(CL, CH) = DAG.SplitVector(Cond, dl);
|
||||
}
|
||||
|
||||
Lo = DAG.getNode(N->getOpcode(), dl, LL.getValueType(), CL, LL, RL);
|
||||
@ -540,7 +540,7 @@ void DAGTypeLegalizer::SplitRes_SELECT_CC(SDNode *N, SDValue &Lo,
|
||||
|
||||
void DAGTypeLegalizer::SplitRes_UNDEF(SDNode *N, SDValue &Lo, SDValue &Hi) {
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
Lo = DAG.getUNDEF(LoVT);
|
||||
Hi = DAG.getUNDEF(HiVT);
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ void DAGTypeLegalizer::SplitVecRes_BITCAST(SDNode *N, SDValue &Lo,
|
||||
// We know the result is a vector. The input may be either a vector or a
|
||||
// scalar value.
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
SDLoc dl(N);
|
||||
|
||||
SDValue InOp = N->getOperand(0);
|
||||
@ -691,7 +691,7 @@ void DAGTypeLegalizer::SplitVecRes_BUILD_VECTOR(SDNode *N, SDValue &Lo,
|
||||
SDValue &Hi) {
|
||||
EVT LoVT, HiVT;
|
||||
SDLoc dl(N);
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
unsigned LoNumElts = LoVT.getVectorNumElements();
|
||||
SmallVector<SDValue, 8> LoOps(N->op_begin(), N->op_begin()+LoNumElts);
|
||||
Lo = DAG.getNode(ISD::BUILD_VECTOR, dl, LoVT, &LoOps[0], LoOps.size());
|
||||
@ -712,7 +712,7 @@ void DAGTypeLegalizer::SplitVecRes_CONCAT_VECTORS(SDNode *N, SDValue &Lo,
|
||||
}
|
||||
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
|
||||
SmallVector<SDValue, 8> LoOps(N->op_begin(), N->op_begin()+NumSubvectors);
|
||||
Lo = DAG.getNode(ISD::CONCAT_VECTORS, dl, LoVT, &LoOps[0], LoOps.size());
|
||||
@ -728,7 +728,7 @@ void DAGTypeLegalizer::SplitVecRes_EXTRACT_SUBVECTOR(SDNode *N, SDValue &Lo,
|
||||
SDLoc dl(N);
|
||||
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
|
||||
Lo = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, LoVT, Vec, Idx);
|
||||
uint64_t IdxVal = cast<ConstantSDNode>(Idx)->getZExtValue();
|
||||
@ -752,7 +752,7 @@ void DAGTypeLegalizer::SplitVecRes_InregOp(SDNode *N, SDValue &Lo,
|
||||
SDLoc dl(N);
|
||||
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) =
|
||||
std::tie(LoVT, HiVT) =
|
||||
DAG.GetSplitDestVTs(cast<VTSDNode>(N->getOperand(1))->getVT());
|
||||
|
||||
Lo = DAG.getNode(N->getOpcode(), dl, LHSLo.getValueType(), LHSLo,
|
||||
@ -816,7 +816,7 @@ void DAGTypeLegalizer::SplitVecRes_SCALAR_TO_VECTOR(SDNode *N, SDValue &Lo,
|
||||
SDValue &Hi) {
|
||||
EVT LoVT, HiVT;
|
||||
SDLoc dl(N);
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
Lo = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, LoVT, N->getOperand(0));
|
||||
Hi = DAG.getUNDEF(HiVT);
|
||||
}
|
||||
@ -826,7 +826,7 @@ void DAGTypeLegalizer::SplitVecRes_LOAD(LoadSDNode *LD, SDValue &Lo,
|
||||
assert(ISD::isUNINDEXEDLoad(LD) && "Indexed load during type legalization!");
|
||||
EVT LoVT, HiVT;
|
||||
SDLoc dl(LD);
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(LD->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(LD->getValueType(0));
|
||||
|
||||
ISD::LoadExtType ExtType = LD->getExtensionType();
|
||||
SDValue Ch = LD->getChain();
|
||||
@ -840,7 +840,7 @@ void DAGTypeLegalizer::SplitVecRes_LOAD(LoadSDNode *LD, SDValue &Lo,
|
||||
const MDNode *TBAAInfo = LD->getTBAAInfo();
|
||||
|
||||
EVT LoMemVT, HiMemVT;
|
||||
llvm::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT);
|
||||
std::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT);
|
||||
|
||||
Lo = DAG.getLoad(ISD::UNINDEXED, ExtType, LoVT, dl, Ch, Ptr, Offset,
|
||||
LD->getPointerInfo(), LoMemVT, isVolatile, isNonTemporal,
|
||||
@ -871,12 +871,12 @@ void DAGTypeLegalizer::SplitVecRes_SETCC(SDNode *N, SDValue &Lo, SDValue &Hi) {
|
||||
|
||||
EVT LoVT, HiVT;
|
||||
SDLoc DL(N);
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
|
||||
// Split the input.
|
||||
SDValue LL, LH, RL, RH;
|
||||
llvm::tie(LL, LH) = DAG.SplitVectorOperand(N, 0);
|
||||
llvm::tie(RL, RH) = DAG.SplitVectorOperand(N, 1);
|
||||
std::tie(LL, LH) = DAG.SplitVectorOperand(N, 0);
|
||||
std::tie(RL, RH) = DAG.SplitVectorOperand(N, 1);
|
||||
|
||||
Lo = DAG.getNode(N->getOpcode(), DL, LoVT, LL, RL, N->getOperand(2));
|
||||
Hi = DAG.getNode(N->getOpcode(), DL, HiVT, LH, RH, N->getOperand(2));
|
||||
@ -887,7 +887,7 @@ void DAGTypeLegalizer::SplitVecRes_UnaryOp(SDNode *N, SDValue &Lo,
|
||||
// Get the dest types - they may not match the input types, e.g. int_to_fp.
|
||||
EVT LoVT, HiVT;
|
||||
SDLoc dl(N);
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
|
||||
|
||||
// If the input also splits, handle it directly for a compile time speedup.
|
||||
// Otherwise split it by hand.
|
||||
@ -895,7 +895,7 @@ void DAGTypeLegalizer::SplitVecRes_UnaryOp(SDNode *N, SDValue &Lo,
|
||||
if (getTypeAction(InVT) == TargetLowering::TypeSplitVector)
|
||||
GetSplitVector(N->getOperand(0), Lo, Hi);
|
||||
else
|
||||
llvm::tie(Lo, Hi) = DAG.SplitVectorOperand(N, 0);
|
||||
std::tie(Lo, Hi) = DAG.SplitVectorOperand(N, 0);
|
||||
|
||||
if (N->getOpcode() == ISD::FP_ROUND) {
|
||||
Lo = DAG.getNode(N->getOpcode(), dl, LoVT, Lo, N->getOperand(1));
|
||||
@ -924,7 +924,7 @@ void DAGTypeLegalizer::SplitVecRes_ExtendOp(SDNode *N, SDValue &Lo,
|
||||
EVT SrcVT = N->getOperand(0).getValueType();
|
||||
EVT DestVT = N->getValueType(0);
|
||||
EVT LoVT, HiVT;
|
||||
llvm::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(DestVT);
|
||||
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(DestVT);
|
||||
|
||||
// We can do better than a generic split operation if the extend is doing
|
||||
// more than just doubling the width of the elements and the following are
|
||||
@ -950,7 +950,7 @@ void DAGTypeLegalizer::SplitVecRes_ExtendOp(SDNode *N, SDValue &Lo,
|
||||
EVT SplitSrcVT =
|
||||
EVT::getVectorVT(Ctx, SrcVT.getVectorElementType(), NumElements / 2);
|
||||
EVT SplitLoVT, SplitHiVT;
|
||||
llvm::tie(SplitLoVT, SplitHiVT) = DAG.GetSplitDestVTs(NewSrcVT);
|
||||
std::tie(SplitLoVT, SplitHiVT) = DAG.GetSplitDestVTs(NewSrcVT);
|
||||
if (TLI.isTypeLegal(SrcVT) && !TLI.isTypeLegal(SplitSrcVT) &&
|
||||
TLI.isTypeLegal(NewSrcVT) && TLI.isTypeLegal(SplitLoVT)) {
|
||||
DEBUG(dbgs() << "Split vector extend via incremental extend:";
|
||||
@ -959,7 +959,7 @@ void DAGTypeLegalizer::SplitVecRes_ExtendOp(SDNode *N, SDValue &Lo,
|
||||
SDValue NewSrc =
|
||||
DAG.getNode(N->getOpcode(), dl, NewSrcVT, N->getOperand(0));
|
||||
// Get the low and high halves of the new, extended one step, vector.
|
||||
llvm::tie(Lo, Hi) = DAG.SplitVector(NewSrc, dl);
|
||||
std::tie(Lo, Hi) = DAG.SplitVector(NewSrc, dl);
|
||||
// Extend those vector halves the rest of the way.
|
||||
Lo = DAG.getNode(N->getOpcode(), dl, LoVT, Lo);
|
||||
Hi = DAG.getNode(N->getOpcode(), dl, HiVT, Hi);
|
||||
@ -1172,13 +1172,13 @@ SDValue DAGTypeLegalizer::SplitVecOp_VSELECT(SDNode *N, unsigned OpNo) {
|
||||
"Lo and Hi have differing types");
|
||||
|
||||
EVT LoOpVT, HiOpVT;
|
||||
llvm::tie(LoOpVT, HiOpVT) = DAG.GetSplitDestVTs(Src0VT);
|
||||
std::tie(LoOpVT, HiOpVT) = DAG.GetSplitDestVTs(Src0VT);
|
||||
assert(LoOpVT == HiOpVT && "Asymmetric vector split?");
|
||||
|
||||
SDValue LoOp0, HiOp0, LoOp1, HiOp1, LoMask, HiMask;
|
||||
llvm::tie(LoOp0, HiOp0) = DAG.SplitVector(Src0, DL);
|
||||
llvm::tie(LoOp1, HiOp1) = DAG.SplitVector(Src1, DL);
|
||||
llvm::tie(LoMask, HiMask) = DAG.SplitVector(Mask, DL);
|
||||
std::tie(LoOp0, HiOp0) = DAG.SplitVector(Src0, DL);
|
||||
std::tie(LoOp1, HiOp1) = DAG.SplitVector(Src1, DL);
|
||||
std::tie(LoMask, HiMask) = DAG.SplitVector(Mask, DL);
|
||||
|
||||
SDValue LoSelect =
|
||||
DAG.getNode(ISD::VSELECT, DL, LoOpVT, LoMask, LoOp0, LoOp1);
|
||||
@ -1293,7 +1293,7 @@ SDValue DAGTypeLegalizer::SplitVecOp_STORE(StoreSDNode *N, unsigned OpNo) {
|
||||
GetSplitVector(N->getOperand(1), Lo, Hi);
|
||||
|
||||
EVT LoMemVT, HiMemVT;
|
||||
llvm::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT);
|
||||
std::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT);
|
||||
|
||||
unsigned IncrementSize = LoMemVT.getSizeInBits()/8;
|
||||
|
||||
@ -1382,7 +1382,7 @@ SDValue DAGTypeLegalizer::SplitVecOp_TRUNCATE(SDNode *N) {
|
||||
|
||||
// Extract the halves of the input via extract_subvector.
|
||||
SDValue InLoVec, InHiVec;
|
||||
llvm::tie(InLoVec, InHiVec) = DAG.SplitVector(InVec, DL);
|
||||
std::tie(InLoVec, InHiVec) = DAG.SplitVector(InVec, DL);
|
||||
// Truncate them to 1/2 the element size.
|
||||
EVT HalfElementVT = EVT::getIntegerVT(*DAG.getContext(), InElementSize/2);
|
||||
EVT HalfVT = EVT::getVectorVT(*DAG.getContext(), HalfElementVT,
|
||||
|
@ -188,7 +188,7 @@ bool SplitAnalysis::calcLiveBlockInfo() {
|
||||
BlockInfo BI;
|
||||
BI.MBB = MFI;
|
||||
SlotIndex Start, Stop;
|
||||
tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
|
||||
std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
|
||||
|
||||
// If the block contains no uses, the range must be live through. At one
|
||||
// point, RegisterCoalescer could create dangling ranges that ended
|
||||
@ -888,7 +888,7 @@ bool SplitEditor::transferValues() {
|
||||
// LiveInBlocks.
|
||||
MachineFunction::iterator MBB = LIS.getMBBFromIndex(Start);
|
||||
SlotIndex BlockStart, BlockEnd;
|
||||
tie(BlockStart, BlockEnd) = LIS.getSlotIndexes()->getMBBRange(MBB);
|
||||
std::tie(BlockStart, BlockEnd) = LIS.getSlotIndexes()->getMBBRange(MBB);
|
||||
|
||||
// The first block may be live-in, or it may have its own def.
|
||||
if (Start != BlockStart) {
|
||||
@ -1183,7 +1183,7 @@ void SplitEditor::splitLiveThroughBlock(unsigned MBBNum,
|
||||
unsigned IntvIn, SlotIndex LeaveBefore,
|
||||
unsigned IntvOut, SlotIndex EnterAfter){
|
||||
SlotIndex Start, Stop;
|
||||
tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(MBBNum);
|
||||
std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(MBBNum);
|
||||
|
||||
DEBUG(dbgs() << "BB#" << MBBNum << " [" << Start << ';' << Stop
|
||||
<< ") intf " << LeaveBefore << '-' << EnterAfter
|
||||
@ -1286,7 +1286,7 @@ void SplitEditor::splitLiveThroughBlock(unsigned MBBNum,
|
||||
void SplitEditor::splitRegInBlock(const SplitAnalysis::BlockInfo &BI,
|
||||
unsigned IntvIn, SlotIndex LeaveBefore) {
|
||||
SlotIndex Start, Stop;
|
||||
tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
|
||||
std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
|
||||
|
||||
DEBUG(dbgs() << "BB#" << BI.MBB->getNumber() << " [" << Start << ';' << Stop
|
||||
<< "), uses " << BI.FirstInstr << '-' << BI.LastInstr
|
||||
@ -1378,7 +1378,7 @@ void SplitEditor::splitRegInBlock(const SplitAnalysis::BlockInfo &BI,
|
||||
void SplitEditor::splitRegOutBlock(const SplitAnalysis::BlockInfo &BI,
|
||||
unsigned IntvOut, SlotIndex EnterAfter) {
|
||||
SlotIndex Start, Stop;
|
||||
tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
|
||||
std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
|
||||
|
||||
DEBUG(dbgs() << "BB#" << BI.MBB->getNumber() << " [" << Start << ';' << Stop
|
||||
<< "), uses " << BI.FirstInstr << '-' << BI.LastInstr
|
||||
|
@ -1145,7 +1145,7 @@ void TargetLoweringBase::computeRegisterProperties() {
|
||||
for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) {
|
||||
const TargetRegisterClass* RRC;
|
||||
uint8_t Cost;
|
||||
tie(RRC, Cost) = findRepresentativeClass((MVT::SimpleValueType)i);
|
||||
std::tie(RRC, Cost) = findRepresentativeClass((MVT::SimpleValueType)i);
|
||||
RepRegClassForVT[i] = RRC;
|
||||
RepRegClassCostForVT[i] = Cost;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ ModuleAnalysisManager::ResultConceptT &
|
||||
ModuleAnalysisManager::getResultImpl(void *PassID, Module *M) {
|
||||
ModuleAnalysisResultMapT::iterator RI;
|
||||
bool Inserted;
|
||||
llvm::tie(RI, Inserted) = ModuleAnalysisResults.insert(std::make_pair(
|
||||
std::tie(RI, Inserted) = ModuleAnalysisResults.insert(std::make_pair(
|
||||
PassID, polymorphic_ptr<detail::AnalysisResultConcept<Module *> >()));
|
||||
|
||||
// If we don't have a cached result for this module, look up the pass and run
|
||||
@ -115,7 +115,7 @@ FunctionAnalysisManager::ResultConceptT &
|
||||
FunctionAnalysisManager::getResultImpl(void *PassID, Function *F) {
|
||||
FunctionAnalysisResultMapT::iterator RI;
|
||||
bool Inserted;
|
||||
llvm::tie(RI, Inserted) = FunctionAnalysisResults.insert(std::make_pair(
|
||||
std::tie(RI, Inserted) = FunctionAnalysisResults.insert(std::make_pair(
|
||||
std::make_pair(PassID, F), FunctionAnalysisResultListT::iterator()));
|
||||
|
||||
// If we don't have a cached result for this function, look up the pass and
|
||||
|
@ -42,7 +42,7 @@ LockFileManager::readLockFile(StringRef LockFileName) {
|
||||
|
||||
StringRef Hostname;
|
||||
StringRef PIDStr;
|
||||
tie(Hostname, PIDStr) = getToken(MB->getBuffer(), " ");
|
||||
std::tie(Hostname, PIDStr) = getToken(MB->getBuffer(), " ");
|
||||
PIDStr = PIDStr.substr(PIDStr.find_first_not_of(" "));
|
||||
int PID;
|
||||
if (!PIDStr.getAsInteger(10, PID))
|
||||
|
@ -135,7 +135,7 @@ size_t Process::GetMallocUsage() {
|
||||
void Process::GetTimeUsage(TimeValue &elapsed, TimeValue &user_time,
|
||||
TimeValue &sys_time) {
|
||||
elapsed = TimeValue::now();
|
||||
llvm::tie(user_time, sys_time) = getRUsageTimes();
|
||||
std::tie(user_time, sys_time) = getRUsageTimes();
|
||||
}
|
||||
|
||||
#if defined(HAVE_MACH_MACH_H) && !defined(__GNU__)
|
||||
|
@ -481,7 +481,8 @@ void MipsSEInstrInfo::expandCvtFPInt(MachineBasicBlock &MBB,
|
||||
DebugLoc DL = I->getDebugLoc();
|
||||
bool DstIsLarger, SrcIsLarger;
|
||||
|
||||
tie(DstIsLarger, SrcIsLarger) = compareOpndSize(CvtOpc, *MBB.getParent());
|
||||
std::tie(DstIsLarger, SrcIsLarger) =
|
||||
compareOpndSize(CvtOpc, *MBB.getParent());
|
||||
|
||||
if (DstIsLarger)
|
||||
TmpReg = getRegisterInfo().getSubReg(DstReg, Mips::sub_lo);
|
||||
|
@ -225,7 +225,7 @@ bool LUAnalysisCache::countLoop(const Loop *L, const TargetTransformInfo &TTI) {
|
||||
|
||||
LoopPropsMapIt PropsIt;
|
||||
bool Inserted;
|
||||
llvm::tie(PropsIt, Inserted) =
|
||||
std::tie(PropsIt, Inserted) =
|
||||
LoopsProperties.insert(std::make_pair(L, LoopProperties()));
|
||||
|
||||
LoopProperties &Props = PropsIt->second;
|
||||
|
@ -556,7 +556,7 @@ private:
|
||||
// they both point to the same alloca.
|
||||
bool Inserted;
|
||||
SmallDenseMap<Instruction *, unsigned>::iterator MTPI;
|
||||
llvm::tie(MTPI, Inserted) =
|
||||
std::tie(MTPI, Inserted) =
|
||||
MemTransferSliceMap.insert(std::make_pair(&II, S.Slices.size()));
|
||||
unsigned PrevIdx = MTPI->second;
|
||||
if (!Inserted) {
|
||||
@ -615,7 +615,7 @@ private:
|
||||
Size = 0;
|
||||
do {
|
||||
Instruction *I, *UsedI;
|
||||
llvm::tie(UsedI, I) = Uses.pop_back_val();
|
||||
std::tie(UsedI, I) = Uses.pop_back_val();
|
||||
|
||||
if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
|
||||
Size = std::max(Size, DL.getTypeStoreSize(LI->getType()));
|
||||
|
@ -1977,7 +1977,7 @@ void InnerLoopVectorizer::createEmptyLoop() {
|
||||
// sequence of instructions that form a check.
|
||||
Instruction *StrideCheck;
|
||||
Instruction *FirstCheckInst;
|
||||
tie(FirstCheckInst, StrideCheck) =
|
||||
std::tie(FirstCheckInst, StrideCheck) =
|
||||
addStrideCheck(BypassBlock->getTerminator());
|
||||
if (StrideCheck) {
|
||||
// Create a new block containing the stride check.
|
||||
@ -2001,7 +2001,7 @@ void InnerLoopVectorizer::createEmptyLoop() {
|
||||
// checks into a separate block to make the more common case of few elements
|
||||
// faster.
|
||||
Instruction *MemRuntimeCheck;
|
||||
tie(FirstCheckInst, MemRuntimeCheck) =
|
||||
std::tie(FirstCheckInst, MemRuntimeCheck) =
|
||||
addRuntimeCheck(LastBypassBlock->getTerminator());
|
||||
if (MemRuntimeCheck) {
|
||||
// Create a new block containing the memory check.
|
||||
|
Loading…
Reference in New Issue
Block a user