search for: objsize

Displaying 20 results from an estimated 23 matches for "objsize".

Did you mean: obj_size
2012 Nov 26
2
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
...tail call i8* @calloc(i64 1, i64 %elements) %memobj = bitcast i8* %mem to i64* %ptr = getelementptr inbounds i64* %memobj, i64 %index %4 = load i64* %ptr, align 8 Currently, the IR for bounds checking this load looks like this: %size = mul i64 8, %elements %offset = mul i64 %index, 8 %objsize = sub i64 %size, %offset %cmp2 = icmp ult i64 %size, %offset %cmp3 = icmp ult i64 %objsize, 8 %cmp1 = icmp slt i64 %offset, 0 %9 = or i1 %cmp2, %cmp3 %11 = or i1 %cmp1, %9 br i1 %11, label %trap, label %12 ┆ ┆ │ │ ╴╴╴╴╴╴╴╴╴╴...
2012 Nov 26
0
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
...ments) > %memobj = bitcast i8* %mem to i64* > %ptr = getelementptr inbounds i64* %memobj, i64 %index > %4 = load i64* %ptr, align 8 > > Currently, the IR for bounds checking this load looks like this: > > %size = mul i64 8, %elements > %offset = mul i64 %index, 8 > %objsize = sub i64 %size, %offset > > %cmp2 = icmp ult i64 %size, %offset > %cmp3 = icmp ult i64 %objsize, 8 > %cmp1 = icmp slt i64 %offset, 0 > > %9 = or i1 %cmp2, %cmp3 > %11 = or i1 %cmp1, %9 > br i1 %11, label %trap, label %12 > > ┆ ┆ >...
2013 Feb 27
4
[LLVMdev] Question about intrinsic function llvm.objectsize
...348 >> 349 ObjectSizeOffsetVisitor Visitor(TD, TLI, Ptr->getContext(), RoundToAlign); >> 350 SizeOffsetType Data = Visitor.compute(const_cast<Value*>(Ptr)); >> 351 if (!Visitor.bothKnown(Data)) >> 352 return false; >> 353 >> 354 APInt ObjSize = Data.first, Offset = Data.second; >> 355 // check for overflow >> 356 if (Offset.slt(0) || ObjSize.ult(Offset)) >> 357 Size = 0; >> 358 else >> 359 Size = (ObjSize - Offset).getZExtValue(); ??? What the hack is "object"?????? >...
2013 Feb 26
2
[LLVMdev] Question about intrinsic function llvm.objectsize
...346 if (!TD) 347 return false; 348 349 ObjectSizeOffsetVisitor Visitor(TD, TLI, Ptr->getContext(), RoundToAlign); 350 SizeOffsetType Data = Visitor.compute(const_cast<Value*>(Ptr)); 351 if (!Visitor.bothKnown(Data)) 352 return false; 353 354 APInt ObjSize = Data.first, Offset = Data.second; 355 // check for overflow 356 if (Offset.slt(0) || ObjSize.ult(Offset)) 357 Size = 0; 358 else 359 Size = (ObjSize - Offset).getZExtValue(); ??? What the hack is "object"?????? 360 return true; 361 } Figure...
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
...alse; > 348 > 349 ObjectSizeOffsetVisitor Visitor(TD, TLI, Ptr->getContext(), > RoundToAlign); > 350 SizeOffsetType Data = Visitor.compute(const_cast<Value*>(Ptr)); > 351 if (!Visitor.bothKnown(Data)) > 352 return false; > 353 > 354 APInt ObjSize = Data.first, Offset = Data.second; > 355 // check for overflow > 356 if (Offset.slt(0) || ObjSize.ult(Offset)) > 357 Size = 0; > 358 else > 359 Size = (ObjSize - Offset).getZExtValue(); ??? What the > hack is "object"?????? > 360...
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
...ectSizeOffsetVisitor Visitor(TD, TLI, Ptr->getContext(), RoundToAlign); >>> 350 SizeOffsetType Data = Visitor.compute(const_cast<Value*>(Ptr)); >>> 351 if (!Visitor.bothKnown(Data)) >>> 352 return false; >>> 353 >>> 354 APInt ObjSize = Data.first, Offset = Data.second; >>> 355 // check for overflow >>> 356 if (Offset.slt(0) || ObjSize.ult(Offset)) >>> 357 Size = 0; >>> 358 else >>> 359 Size = (ObjSize - Offset).getZExtValue(); ??? What the hack is &quo...
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
...ow whether an access is beyond the bounds of an underlying object (undefined behavior land) so we pass the underlying object (which in your example would be the "p" returned from malloc) to the getObjectSize function. > > In the first case (passing "p+50" to getObjectSize) ObjSize should be 56 and the Offset will be 50 yielding 6 in the second case your ObjSize will be 56 and the offset is zero because basicaa passed the underlying object "p". you figured out an alternative to fix the problem. In the context of alias analysis, it is up to the caller to pass the b...
2013 Feb 27
2
[LLVMdev] Question about intrinsic function llvm.objectsize
...sitor Visitor(TD, TLI, Ptr->getContext(), RoundToAlign); >>>> 350 SizeOffsetType Data = Visitor.compute(const_cast<Value*>(Ptr)); >>>> 351 if (!Visitor.bothKnown(Data)) >>>> 352 return false; >>>> 353 >>>> 354 APInt ObjSize = Data.first, Offset = Data.second; >>>> 355 // check for overflow >>>> 356 if (Offset.slt(0) || ObjSize.ult(Offset)) >>>> 357 Size = 0; >>>> 358 else >>>> 359 Size = (ObjSize - Offset).getZExtValue(); ??? What t...
2012 Oct 26
1
[LLVMdev] Properly handling mem-loc arguments when prologue adjusts FP.
...EVT RegisterValueType = VA.getLocVT(); ArgValue = DAG.getCopyFromReg(Chain, dl, Register, RegisterValueType); InVals.push_back(ArgValue); } else { // Sanity check assert(VA.isMemLoc()); // Load the argument to a virtual register unsigned ObjSize = VA.getLocVT().getSizeInBits()/8; if (ObjSize != 4) { llvm_unreachable("Memory argument is wrong size - not 32 bit!"); } // Create the frame index object for this incoming parameter... int FI = MFI->CreateFixedObject(ObjSize, VA.getLocMemO...
2012 Dec 04
2
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
...8* %mem to i64* >> %ptr = getelementptr inbounds i64* %memobj, i64 %index >> %4 = load i64* %ptr, align 8 >> >> Currently, the IR for bounds checking this load looks like this: >> >> %size = mul i64 8, %elements >> %offset = mul i64 %index, 8 >> %objsize = sub i64 %size, %offset >> >> %cmp2 = icmp ult i64 %size, %offset >> %cmp3 = icmp ult i64 %objsize, 8 >> %cmp1 = icmp slt i64 %offset, 0 >> >> %9 = or i1 %cmp2, %cmp3 >> %11 = or i1 %cmp1, %9 >> br i1 %11, label %trap, label %12 >> >&g...
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
...r->getContext(), RoundToAlign); >>>>> 350 SizeOffsetType Data = Visitor.compute(const_cast<Value*>(Ptr)); >>>>> 351 if (!Visitor.bothKnown(Data)) >>>>> 352 return false; >>>>> 353 >>>>> 354 APInt ObjSize = Data.first, Offset = Data.second; >>>>> 355 // check for overflow >>>>> 356 if (Offset.slt(0) || ObjSize.ult(Offset)) >>>>> 357 Size = 0; >>>>> 358 else >>>>> 359 Size = (ObjSize - Offset).g...
2009 Jun 24
1
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
..... int q = p[s - 2]; } then the access of p[s - 2] always stays in bound. I implemented a prototype using the Scalar Evolution pass. Here are the pseudo-code of the implementation: const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); const SCEV * bounds = SE->getSCEV(objSize); if (SE->getSMaxExpr(offset, bounds) == bounds) { ++safeGEPs; } But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, N-2). My question is, is there a plan to support something like this, or is it possible to do some refactoring to enhance the capability of Scalar E...
2009 Jun 24
2
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...stays in bound. > > > > I implemented a prototype using the Scalar Evolution pass. Here are the > > pseudo-code of the implementation: > > > > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); > > const SCEV * bounds = SE->getSCEV(objSize); > > > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > > ++safeGEPs; > > } > > > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, > > N-2). > > Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N...
2009 Jun 24
0
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...the access of p[s - 2] always stays in bound. > > I implemented a prototype using the Scalar Evolution pass. Here are the > pseudo-code of the implementation: > > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); > const SCEV * bounds = SE->getSCEV(objSize); > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > ++safeGEPs; > } > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, > N-2). Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is equal to INT_MAX, or 127. In that...
2009 Jun 24
4
[LLVMdev] killing vicmp and vfcmp
Now that icmp and fcmp have supported returning vectors of i1 for a while, I think it's time to remove the vicmp and vfcmp instructions from LLVM. The good news is that we've never shipped a release that included them so we won't be providing auto-upgrade support. There is some existing backend support for vicmp and vfcmp that looks different from what icmp and fcmp do. If this
2009 Jun 24
0
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...; > > > I implemented a prototype using the Scalar Evolution pass. Here are the > > > pseudo-code of the implementation: > > > > > > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); > > > const SCEV * bounds = SE->getSCEV(objSize); > > > > > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > > > ++safeGEPs; > > > } > > > > > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, > > > N-2). > > > > Consider 8-bit in...
2009 Jun 24
1
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...t;>> I implemented a prototype using the Scalar Evolution pass. Here are the >>>> pseudo-code of the implementation: >>>> >>>> const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); >>>> const SCEV * bounds = SE->getSCEV(objSize); >>>> >>>> if (SE->getSMaxExpr(offset, bounds) == bounds) { >>>> ++safeGEPs; >>>> } >>>> >>>> But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, >>>> N-2). >>> Consider 8-b...
2007 Feb 15
2
Re: [Linux-HA] OCFS2 - Memory hog?
...at is using the kernel memory? Here is what /proc/slabinfo shows (cut down for formatting). I don''t understand how to read this so maybe someone can indicate if something looks wrong? ======= # cat /proc/slabinfo # name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> nfsd4_delegations 0 0 596 13 2 nfsd4_stateids 0 0 72 53 1 nfsd4_files 0 0 36 101 1 nfsd4_stateowners 0 0 344 11 1 rpc_buffers 8 8 2048 2 1 rpc_...
2013 Oct 26
2
[PATCH] 1. changes for vdiskadm on illumos based platform
...SHIFT); break; - } else if ((errnum = zio_read(bp, tmpbuf, stack))) { + } else if (errnum = zio_read(bp, tmpbuf, stack)) { return (errnum); } @@ -465,13 +485,13 @@ dmu_read(dnode_phys_t *dn, uint64_t blki * errnum - failure */ static int -mzap_lookup(mzap_phys_t *zapobj, int objsize, char *name, +mzap_lookup(mzap_phys_t *zapobj, int objsize, const char *name, uint64_t *value) { int i, chunks; mzap_ent_phys_t *mzap_ent = zapobj->mz_chunk; - chunks = objsize/MZAP_ENT_LEN - 1; + chunks = objsize / MZAP_ENT_LEN - 1; for (i = 0; i < chunks; i++) { if (gr...
2006 Apr 09
0
Slab memory usage on dom0 increases by 128MB/day
...22724 kB Slab: 83672 kB CommitLimit: 622232 kB Committed_AS: 43236 kB PageTables: 468 kB VmallocTotal: 696312 kB VmallocUsed: 856 kB VmallocChunk: 695416 kB /dev/slabinfo slabinfo - version: 2.1 # name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active> rpc_buffers 8 8 2048 2 1 : tunables 24 12 8 : slabdata 4 4 0 rpc_tasks 8 15 256 15 1 : tun...