search for: objectsizeoffsetvisitor

Displaying 10 results from an estimated 10 matches for "objectsizeoffsetvisitor".

2020 Jan 29
2
Question about ObjectSizeOffsetVisitor::visitGlobalVariable
In this function (used to check the size of a global) there is an initial check for whether the initializer to this function is "definitive." My question is: why do we need this? How does the object's size change if a global's initializer is defined at link time? Thanks, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL:
2020 Jan 30
3
Question about ObjectSizeOffsetVisitor::visitGlobalVariable
Interesting, so I guess we can check for whether it's an array type and adjust accordingly instead? Blocking *all* global variables without definitive initializers feels a bit much to me, especially if they have primitive types (i.e. integers) that don't have the potential to be screwed around with like this. On Wed, Jan 29, 2020 at 8:14 PM George Burgess IV < george.burgess.iv at
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
...he context of alias analysis, it is up to the caller to pass the base addr of the "object" to getObjectSize() by calling getUnderlyingObject(). However, if the base-addr is bit complicated, say, one needs to go through U-D chain (including phi node). In this situation, a helper class ObjectSizeOffsetVisitor will help. My take is to implement another function, call getEntireObjectSize(p) which returns the size of the entire object no matter where the p is pointing to. How does this sound to you? Thanks
2013 Feb 27
4
[LLVMdev] Question about intrinsic function llvm.objectsize
...ysis/MemoryBuiltins.cpp >> 344 bool llvm::getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout *TD, >> 345 const TargetLibraryInfo *TLI, bool RoundToAlign) { >> 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; &...
2013 Feb 26
2
[LLVMdev] Question about intrinsic function llvm.objectsize
...ot; is wrong. Figure 1 cat -n lib/Analysis/MemoryBuiltins.cpp 344 bool llvm::getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout *TD, 345 const TargetLibraryInfo *TLI, bool RoundToAlign) { 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 3...
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
...Analysis/MemoryBuiltins.cpp > 344 bool llvm::getObjectSize(const Value *Ptr, uint64_t &Size, > const DataLayout *TD, > 345 const TargetLibraryInfo *TLI, bool > RoundToAlign) { > 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; > 35...
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
...nst Value *Ptr, uint64_t &Size, const DataLayout *TD, >>>>> 345 const TargetLibraryInfo *TLI, bool RoundToAlign) { >>>>> 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 >>>&gt...
2013 Feb 27
2
[LLVMdev] Question about intrinsic function llvm.objectsize
...ol llvm::getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout *TD, >>>> 345 const TargetLibraryInfo *TLI, bool RoundToAlign) { >>>> 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 ObjSi...
2013 Feb 27
0
[LLVMdev] Question about intrinsic function llvm.objectsize
...t;> 344 bool llvm::getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout *TD, >>> 345 const TargetLibraryInfo *TLI, bool RoundToAlign) { >>> 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...
2019 Dec 18
5
RFC: Opaque pointer status and future direction
...Lowering::LowerCallTo 7 llvm::InterleavedAccessInfo::collectConstStrideAccesses 7 llvm::IRBuilderBase::CreateMaskedStore 6 llvm::ObjectSizeOffsetVisitor::visitArgument 6 genLoopLimit 6 llvm::getCallsiteCost 6 llvm::InvokeInst...