Roman Gareev via llvm-dev
2015-Dec-06 10:24 UTC
[llvm-dev] Objects of MemoryLocation class are created for ‘llvm.memset.*‘ intrinsics
Dear llvm contributors, Could you please advise me where objects of MemoryLocation class are created for ‘llvm.memset.*‘ intrinsics? In the Bug 23077 (https://llvm.org/bugs/show_bug.cgi?id=23077) the AliasSetTracker constructs 128 alias sets for 0 pointer values, which contain only unknown instructions. In this case, all unknown instructions, which are added to new alias sets in the AliasSetTracker::addUnknown, have the following form: call void @llvm.memset.p0i8.i64(i8* %scevgep..., i8 0, i64 256, i32 8, i1 false) Furthermore, in this case, there aren’t any unknown instructions, which are added by AliasSetTracker::addUnknown to alias sets that are found by findAliasSetForUnknownInst. That’s why I would like to check objects of MemoryLocation class that are created for ‘llvm.memset.*‘ intrinsics. If I’m not mistaken, objects of MemoryLocation class are involved in alias analysis and, in particular, in work of findAliasSetForUnknownInst. Thank you for the attention! -- Cheers, Roman Gareev.
Hal Finkel via llvm-dev
2015-Dec-11 18:44 UTC
[llvm-dev] Objects of MemoryLocation class are created for ‘llvm.memset.*‘ intrinsics
Hi Roman, The MemoryLocation objects are involved in findAliasSetForUnknownInst, but none are created there for the memset intrinsic. MemoryLocation objects are only involved for the regular memory accesses being compared to the unknown instruction. See AliasSet::aliasesUnknownInst in lib/Analysis/AliasSetTracker.cpp. We do know how to create MemoryLocation objects for memsets, see MemoryLocation::getForDest, but we don't do so in the AliasSetTracker. We're taking advantage here of the fast that AA's getModRefInfo understands (or should understand) enough about memset to accurately answer the queries. -Hal ----- Original Message -----> From: "Roman Gareev via llvm-dev" <llvm-dev at lists.llvm.org> > To: llvm-dev at lists.llvm.org > Cc: "Tobias Grosser" <tobias at grosser.es> > Sent: Sunday, December 6, 2015 4:24:06 AM > Subject: [llvm-dev] Objects of MemoryLocation class are created for ‘llvm.memset.*‘ intrinsics > > Dear llvm contributors, > > Could you please advise me where objects of MemoryLocation class are > created for ‘llvm.memset.*‘ intrinsics? > > In the Bug 23077 (https://llvm.org/bugs/show_bug.cgi?id=23077) the > AliasSetTracker constructs 128 alias sets for 0 pointer values, which > contain only unknown instructions. In this case, all unknown > instructions, which are added to new alias sets in the > AliasSetTracker::addUnknown, have the following form: > > call void @llvm.memset.p0i8.i64(i8* %scevgep..., i8 0, i64 256, i32 > 8, i1 false) > > Furthermore, in this case, there aren’t any unknown instructions, > which are added by AliasSetTracker::addUnknown to alias sets that are > found by findAliasSetForUnknownInst. That’s why I would like to check > objects of MemoryLocation class that are created for ‘llvm.memset.*‘ > intrinsics. If I’m not mistaken, objects of MemoryLocation class are > involved in alias analysis and, in particular, in work of > findAliasSetForUnknownInst. > > Thank you for the attention! > > -- > Cheers, Roman Gareev. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory
Roman Gareev via llvm-dev
2015-Dec-12 07:36 UTC
[llvm-dev] Objects of MemoryLocation class are created for ‘llvm.memset.*‘ intrinsics
2015-12-11 23:44 GMT+05:00 Hal Finkel <hfinkel at anl.gov>:> Hi Roman, > > The MemoryLocation objects are involved in findAliasSetForUnknownInst, but none are created there for the memset intrinsic. MemoryLocation objects are only involved for the regular memory accesses being compared to the unknown instruction. See AliasSet::aliasesUnknownInst in lib/Analysis/AliasSetTracker.cpp. > > We do know how to create MemoryLocation objects for memsets, see MemoryLocation::getForDest, but we don't do so in the AliasSetTracker. We're taking advantage here of the fast that AA's getModRefInfo understands (or should understand) enough about memset to accurately answer the queries.Hi Hal, Thank you for the explanation! -- Cheers, Roman Gareev.