search for: idx_end

Displaying 15 results from an estimated 15 matches for "idx_end".

2014 Nov 22
2
[LLVMdev] How to get the indices in an getelementptr Value?
Hi Michael, Thank you very much. But idx_begin/idx_end iterators can only be used through a getelementptr instruction, right? However, I think value "i32* getelementptr inbounds (%struct.Args* @globalArg, i64 0, i32 2)" itself is not a getelementptr instruction, so? Or could you tell me how can I get a getelementptr instruction first from thi...
2014 Nov 22
3
[LLVMdev] How to get the indices in an getelementptr Value?
...t; -- Sanjoy > > [1]: > http://llvm.org/docs/doxygen/html/classllvm_1_1GetElementPtrConstantExpr.html > > On Sat, Nov 22, 2014 at 1:10 AM, Qiuping Yi <yiqiuping at gmail.com> wrote: > > Hi Michael, > > > > Thank you very much. > > > > But idx_begin/idx_end iterators can only be used through a getelementptr > > instruction, right? However, I think value "i32* getelementptr inbounds > > (%struct.Args* @globalArg, i64 0, i32 2)" itself is not a getelementptr > > instruction, so? Or could you tell me how can I get a getelement...
2012 Apr 23
0
[LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
...// Collect GEP operand pairs (FIXME: use GetGEPOperands from BasicAA), adding* * // trailing zeroes to the smaller GEP, if needed.* * GEPOpdsTy destOpds, srcOpds;* * for(GEPOperator::const_op_iterator destIdx = destGEP->idx_begin(),* * destEnd = destGEP->idx_end(),* * srcIdx = srcGEP->idx_begin(),* * srcEnd = srcGEP->idx_end();* * destIdx != destEnd && srcIdx != srcEnd;* * destIdx += (destIdx != destEnd), srcIdx += (srcIdx != srcEnd)) {* * const SCEV* destSCE...
2014 Nov 22
2
[LLVMdev] How to get the indices in an getelementptr Value?
Hi, all I am a LLVM user. I want to get every element in the next instruction: %0 = load i32* getelementptr inbounds (%struct.Args* @globalArg, i64 0, i32 2), align 4, !dbg !85, !clap !86 Now I can only get value "i32* getelementptr inbounds (%struct.Args* @globalArg, i64 0, i32 2)" through "getOperand(0)", but I can not get "%struct.Args* @globalArg", "i64
2017 Dec 13
0
[PATCH v19 3/7] xbitmap: add more operations
...or this. I plan to change the implementation a little bit to avoid such overflow (has passed the test case that I have, just post out for another set of eyes): { ... unsigned long idx = start / IDA_BITMAP_BITS; unsigned long bit = start % IDA_BITMAP_BITS; unsigned long idx_end = end / IDA_BITMAP_BITS; unsigned long ret; for (idx = start / IDA_BITMAP_BITS; idx <= idx_end; idx++) { unsigned long ida_start = idx * IDA_BITMAP_BITS; bitmap = __radix_tree_lookup(root, idx, &node, &slot); if (radi...
2012 Apr 12
6
[LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
Hi, Here is a preliminary (monolithic) version you can comment on. This is still buggy, however, and I'll be testing for and fixing bugs over the next few days. I've used your version of the strong siv test. Thanks! -- Sanjoy Das. http://playingwithpointers.com -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream
2017 Dec 14
0
[PATCH v19 3/7] xbitmap: add more operations
...oid such overflow (has passed the test >> case that I have, just post out for another set of eyes): >> >> { >> ... >> unsigned long idx = start / IDA_BITMAP_BITS; >> unsigned long bit = start % IDA_BITMAP_BITS; >> unsigned long idx_end = end / IDA_BITMAP_BITS; >> unsigned long ret; >> >> for (idx = start / IDA_BITMAP_BITS; idx <= idx_end; idx++) { >> unsigned long ida_start = idx * IDA_BITMAP_BITS; >> >> bitmap = __radix_tree_lookup(roo...
2013 Aug 25
1
[LLVMdev] Puzzles on DenseMap
I wrote some program using DensMap like this: =============================== SmallDenseMap<Value*, StringRef, 4> OpResult; Value *VP = GEP->getPointerOperand(); OpResult[VP] = parseVariable(VP); for(User::op_iterator sId = GEP->idx_begin(), eId = GEP->idx_end(); sId != eId; ++sId) { Value *VI = *sId; if(dyn_cast<ConstantInt>(*sId)) OpResult[VI] = parseConstant(VI); else OpResult[VI] = parseVariable(VI); } .... =============================== When I visit OpResult like this: ===================== std::string result =...
2008 Jul 21
2
[LLVMdev] Casting between address spaces and address space semantics
...EP = NULL; + // Create a new instruction + if (isa<StoreInst>(*I)) + NewInst = new StoreInst(I->getOperand(0), NewVal); + else if ((GEP = dyn_cast<GetElementPtrInst>(*I))) { + // Insert a new GEP + std::vector<Value*> Indices(GEP->idx_begin(), GEP->idx_end()); + NewInst = GetElementPtrInst::Create(NewVal, Indices.begin(), Indices.end()); + } else // Must be LoadInst + NewInst = new LoadInst(NewVal); + + // Replace the old instruction + InsertNewInstBefore(NewInst, *OldInst); + NewInst->takeName(OldInst); + + // Put...
2012 May 04
3
[LLVMdev] Extending GetElementPointer, or Premature Linearization Considered Harmful
...= dyn_cast<StoreInst>(inst)) {* * Value *operand = SI->getPointerOperand();* * if (const GEPOperator *GEP = dyn_cast<GEPOperator>(operand)) {* * for (GEPOperator::const_op_iterator idx = GEP->idx_begin(),* * end = GEP->idx_end();* * idx != end;** idx += 1) {* * const SCEV *scev = SE->getSCEV(*idx);* * errs() << *scev << "\n";* * }* * }* * }* * }* * return false;* } Basically, it zips though the instructions in a routine, dumping them out. When it f...
2008 Jul 21
0
[LLVMdev] Casting between address spaces and address space semantics
...a new instruction > + if (isa<StoreInst>(*I)) > + NewInst = new StoreInst(I->getOperand(0), NewVal); > + else if ((GEP = dyn_cast<GetElementPtrInst>(*I))) { > + // Insert a new GEP > + std::vector<Value*> Indices(GEP->idx_begin(), GEP->idx_end()); > + NewInst = GetElementPtrInst::Create(NewVal, Indices.begin(), > Indices.end()); > + } else // Must be LoadInst > + NewInst = new LoadInst(NewVal); > + > + // Replace the old instruction > + InsertNewInstBefore(NewInst, *OldInst); > + NewInst-&g...
2008 Jul 18
0
[LLVMdev] Casting between address spaces and address space semantics
Hi Eli, Mon Ping, > In ISO/IEC WG14 n1169 on the C extensions to support embedded > processors, any two address spaces must be disjoint, must be > equivalent, or must be nested. Ah, that standard is a lot clearer on this subject than the DSP-C one I read was. > As Eli indicated, the actual relationship is platform specific depending on > what makes the most sense for
2008 Jul 17
4
[LLVMdev] Casting between address spaces and address space semantics
In ISO/IEC WG14 n1169 on the C extensions to support embedded processors, any two address spaces must be disjoint, must be equivalent, or must be nested. As Eli indicated, the actual relationship is platform specific depending on what makes the most sense for your hardware and how the program will behave will depend on that relationship. -- Mon Ping On Jul 17, 2008, at 7:25 AM, Eli
2017 Dec 12
21
[PATCH v19 0/7] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks using sgs, instead of one array each time; and 2) free page block reporting: a new virtqueue to report guest free pages to the host. The second feature can be used to accelerate live migration of VMs. Here are some details: Live
2017 Dec 12
21
[PATCH v19 0/7] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks using sgs, instead of one array each time; and 2) free page block reporting: a new virtqueue to report guest free pages to the host. The second feature can be used to accelerate live migration of VMs. Here are some details: Live