search for: make_pair

Displaying 20 results from an estimated 125 matches for "make_pair".

2011 Jul 16
0
[LLVMdev] TableGen and DenseMap Strangeness
...#else typedef std::pair< std::pair< std::pair<std::pair<unsigned, const Init *>, const Init *>, const Init * >, std::string > Key; #endif typedef DenseMap<Key, TernOpInit *> Pool; static Pool ThePool; #ifdef WORKS Key TheKey(std::make_pair(std::make_pair(std::make_pair(std::make_pair(opc, Type->getAsString()), lhs), mhs), rhs)); #el...
2018 Mar 16
0
[RFC] Updating googletest to non-release tagged version
...ues on each. The end "symptoms" being tested aren't much different in each case, so it makes sense to share the test code as much as possible. Without Combine, I have to do the following: INSTANTIATE_TEST_CASE_P( LineTableTestParams, DebugLineParameterisedFixture, Values(std::make_pair(2, DWARF32), std::make_pair(3, DWARF32), std::make_pair(4, DWARF32), std::make_pair(5, DWARF32), std::make_pair(2, DWARF64), std::make_pair(3, DWARF64), std::make_pair(4, DWARF64), std::make_pair(5, DWARF64))); I realised whilst typing this out, that I don't ne...
2018 Mar 15
2
[RFC] Updating googletest to non-release tagged version
On Thu, Mar 15, 2018 at 9:09 PM, David Blaikie via llvm-dev <llvm-dev at lists.llvm.org> wrote: > +Chandler who might have some thoughts on this. > > Could you provide an example here of the motivation for the feature you're > missing? Might help motivate the discussion (and/or we'll end up nitpicking > how it could be done differently without that feature... - which
2008 Apr 16
3
[LLVMdev] Possible bug in LiveIntervalAnalysis?
...nsigned MIIndex = 0; for (MachineFunction::iterator MBB = mf_->begin(), E = mf_->end(); MBB != E; ++MBB) { unsigned StartIdx = MIIndex; for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; ++I) { bool inserted = mi2iMap_.insert(std::make_pair(I, MIIndex)).second; assert(inserted && "multiple MachineInstr -> index mappings"); i2miMap_.push_back(I); MIIndex += InstrSlots::NUM; } // Set the MBB2IdxMap entry for this MBB. MBB2IdxMap[MBB->getNumber()] = std::make_pair(StartIdx, MIIndex -...
2007 Jun 22
4
[LLVMdev] df_ext_iterator in LiveIntervalAnalysis
..._ext_end(entry, visited); dfi != endi; ++dfi) { MachineBasicBlock *mbb = *dfi; for (MachineBasicBlock::iterator mi = mbb->begin(), miEnd = mbb->end(); mi != miEnd; ++mi) { bool inserted = mi2iMap_.insert(std::make_pair(mi, miIndex)).second; assert(inserted && "multiple MachineInstr -> index mappings"); i2miMap_.push_back(mi); miIndex += InstrSlots::NUM; } } this->maxInstrIndex_ = miIndex; //===--------------------------------------- // --> old co...
2011 Nov 19
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...;); > + AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer); > + > + if (isAffineExpr(&R, AccessFunction, *SE, BasePointer->getValue())) { > > - AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer); > - Functions.push_back(std::make_pair(IRAccess(Type, > + Functions.push_back(std::make_pair(IRAccess(Type, > BasePointer->getValue(), > - AccessFunction, Size), > +...
2012 Aug 09
3
[LLVMdev] Type inconsistency in LLVM 3.1: CGDebugInfo.cpp
...'m probably missing something simple here but in: CGDebugInfo.h: std::vector<std::pair<void *, llvm::WeakVH> >ReplaceMap; but then in CGDebugInfo.cpp: llvm::DIType TC = getTypeOrNull(Ty); void * v = Ty.getAsOpaquePtr(); std::pair<void *, llvm::WeakVH> tmp = std::make_pair(v, TC); if (TC.Verify() && TC.isForwardDecl()) ReplaceMap.push_back(Ty.getTypeOrNull(), TC); Note that TC is of type llvm:DIType and not WeakVH. What am I missing, as this does not compile under Visual Studio 2012 RC? Regards, Ben - Benedict R. Gaster Enjoy Berlin and submit a p...
2008 Apr 16
0
[LLVMdev] Possible bug in LiveIntervalAnalysis?
...achineFunction::iterator MBB = mf_->begin(), E = mf_->end(); > MBB != E; ++MBB) { > unsigned StartIdx = MIIndex; > > for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); > I != E; ++I) { > bool inserted = mi2iMap_.insert(std::make_pair(I, > MIIndex)).second; > assert(inserted && "multiple MachineInstr -> index mappings"); > i2miMap_.push_back(I); > MIIndex += InstrSlots::NUM; > } > > // Set the MBB2IdxMap entry for this MBB. > MBB2IdxMap[MBB->getNumber...
2012 Aug 09
1
[LLVMdev] Type inconsistency in LLVM 3.1: CGDebugInfo.cpp
...eakVH ] The reason it gives is std::pair<_Ty1,_Ty2>' to 'std::pair<_Ty3,_Ty4>, but as you point out there is indeed a conversion operator for DITYPE to WeakVH. Putting the explicit cast to give: if (T.Verify() && T.isForwardDecl()) ReplaceMap.push_back(std::make_pair(Ty.getAsOpaquePtr(), (llvm::MDNode *)T)); and all it well again. This does indeed seem to be a bug in VS, unless there is some C++11 changes that stops implicit conversion under std::pair. Regards, Ben - Benedict R. Gaster Enjoy Berlin and submit a paper to Multiprog 2013: http://multiprog.ac.u...
2012 Dec 01
1
llvm / clang does not build with new libc++
...langcodegen/../../../contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp -o CGDebugInfo.o /usr/src/lib/clang/libclangcodegen/../../../contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp:1695:16: error: no matching member function for call to 'push_back' ReplaceMap.push_back(std::make_pair(Ty.getAsOpaquePtr(), TC)); ~~~~~~~~~~~^~~~~~~~~ /usr/include/c++/v1/vector:676:36: note: candidate function not viable: no known conversion from 'pair<typename __make_pair_return<void *>::type, typename __make_pair_return<DIType &>::type>' to 'const...
2008 Apr 18
1
[LLVMdev] Possible bug in LiveIntervalAnalysis?
...rator MBB = mf_->begin(), E = mf_->end(); >> MBB != E; ++MBB) { >> unsigned StartIdx = MIIndex; >> >> for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); >> I != E; ++I) { >> bool inserted = mi2iMap_.insert(std::make_pair(I, >> MIIndex)).second; >> assert(inserted && "multiple MachineInstr -> index mappings"); >> i2miMap_.push_back(I); >> MIIndex += InstrSlots::NUM; >> } >> >> // Set the MBB2IdxMap entry for this MBB. >> MBB...
2018 Mar 08
1
[RFC] jump threading on std::pair<int, bool>
...return type is std::pair<int, bool> (actually, any pair of 32-bit values like std::pair<bool, int> and std::pair<int, int>). For example, jump threading does not work for the if statement in func. std::pair<int, bool> callee(int v) { int a = dummy(v); if (a) return std::make_pair(dummy(v), true); else return std::make_pair(v, v < 0); } int func(int v) { std::pair<int, bool> rc = callee(v); if (rc.second) { // do something } ... SROA executed before the method inlining replaces std::pair by i64 without splitting in both `callee` and `func` since at t...
2011 Nov 18
5
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...ctly, I don't know how this reverted back to this way in the >>> patch for the new version , I'll get it fixed. >> >> Wonderful. Very cool that you realized I added MayWrite exactly for this >> case. >> >>>>> +         Functions.push_back(std::make_pair(IRAccess(Type, >>>>> + >>>>>  BasePointer->getValue(), >>>>> +                                                  AccessFunction, Size, >>>>> false), >>>>> +&Inst)); >>>>> +      } >>>>> +...
2007 Jun 22
0
[LLVMdev] df_ext_iterator in LiveIntervalAnalysis
...i != endi; > ++dfi) { > MachineBasicBlock *mbb = *dfi; > for (MachineBasicBlock::iterator mi = mbb->begin(), miEnd = > mbb->end(); > mi != miEnd; > ++mi) { > bool inserted = mi2iMap_.insert(std::make_pair(mi, > miIndex)).second; > assert(inserted && "multiple MachineInstr -> index mappings"); > i2miMap_.push_back(mi); > miIndex += InstrSlots::NUM; > } > } > this->maxInstrIndex_ = miIndex; > //===-----------------------...
2007 Jun 22
0
[LLVMdev] df_ext_iterator in LiveIntervalAnalysis
...> ++dfi) { > MachineBasicBlock *mbb = *dfi; > for (MachineBasicBlock::iterator mi = mbb->begin(), miEnd = > mbb->end(); > mi != > miEnd; > ++mi) { > bool inserted = mi2iMap_.insert(std::make_pair(mi, > miIndex)).second; > assert(inserted && "multiple MachineInstr -> index > mappings"); > i2miMap_.push_back(mi); > miIndex += InstrSlots::NUM; > } > } > this->maxInstrIndex_ = miIndex; > //===----------...
2012 Oct 06
2
[LLVMdev] Pairing Registers on a Target Similar to Mips?
..., MVT::i32, Arg, DAG.getConstant(1, MVT::i32)); if (!Subtarget->isLittle()) std::swap(Lo, Hi); unsigned LocRegLo = VA.getLocReg(); unsigned LocRegHigh = getNextIntArgReg(LocRegLo); RegsToPass.push_back(std::make_pair(LocRegLo, Lo)); RegsToPass.push_back(std::make_pair(LocRegHigh, Hi)); I added this SDValue: SDValue Num = DAG.getNode(MIPSISD::CopyF64,dl,MVT::i32, Arg); But I need to create a Hi and a Lo SDValue to add to the RegsToPass pairs seen in the code above. If someone would help me figur...
2014 Dec 18
2
[LLVMdev] Please change the comment of 'insert' member function of SmallPtrSetImpl
...ent of the function is same with before as follows: /// insert - This returns true if the pointer was new to the set, false if it /// was already in the set. std::pair<iterator, bool> insert(PtrType Ptr) { auto p = insert_imp(PtrTraits::getAsVoidPointer(Ptr)); return std::make_pair(iterator(p.first, CurArray + CurArraySize), p.second); } If the comment is changed, please change it. Thanks, JinGu Kang
2012 Aug 09
0
[LLVMdev] Type inconsistency in LLVM 3.1: CGDebugInfo.cpp
...ugInfo.h: > > std::vector<std::pair<void *, llvm::WeakVH> >ReplaceMap; > > but then in > > CGDebugInfo.cpp: > > llvm::DIType TC = getTypeOrNull(Ty); > > void * v = Ty.getAsOpaquePtr(); > std::pair<void *, llvm::WeakVH> tmp = std::make_pair(v, TC); > > if (TC.Verify() && TC.isForwardDecl()) > ReplaceMap.push_back(Ty.getTypeOrNull(), TC); > > Note that TC is of type llvm:DIType and not WeakVH. > > What am I missing, as this does not compile under Visual Studio 2012 RC? Tricky code, DIType (or r...
2011 Sep 12
3
[LLVMdev] Possible bug in SimpleRegisterCoalescing
...lescing::runOnMachineFunction where the allocatable registers for each register class are initialised for the function, i.e. the lines: for (TargetRegisterInfo::regclass_iterator I = tri_->regclass_begin(), E = tri_->regclass_end(); I != E; ++I) allocatableRCRegs_.insert(std::make_pair(*I, tri_->getAllocatableSet(fn, *I))); If the allocatable registers are dependent on the function, such as might occur when a frame pointer isn't required, then it seems that every function will use the same allocatable set as the first function....
2011 Nov 20
2
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...n = SE->getMinusSCEV(AccessFunction, BasePointer); >> + >> +      if (isAffineExpr(&R, AccessFunction, *SE, BasePointer->getValue())) >> { >> >> -      AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer); >> -      Functions.push_back(std::make_pair(IRAccess(Type, >> +        Functions.push_back(std::make_pair(IRAccess(Type, >> >>  BasePointer->getValue(), >> -                                                  AccessFunction, Size), >> +                                                  AccessFunction, Size, >...