[LLVMdev] How to use get the memory location of a function argument correctly? (original) (raw)
Chandler Carruth chandlerc at google.com
Thu Jul 9 18:10:52 PDT 2015
- Previous message: [LLVMdev] How to use get the memory location of a function argument correctly?
- Next message: [LLVMdev] How to use get the memory location of a function argument correctly?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From your Pass, you can getAnalysis().getTLI().
Also, you can look at lib/Analysis/AliasAnalysis.cpp in LLVM to find places where we call this routine.
On Thu, Jul 9, 2015 at 1:16 PM Shen Liu <shl413 at lehigh.edu> wrote:
Hi all, i hope to get the MemoryLocation for argument %1 in a CallInst like "call void @function(i32* %1)", and i found an interface "getForArgument()" which seems available for this. However, i don't know how to correcly fill the 3rd argument TargetLibraryInfo in my own code and can't find an example in google. Does anybody know how to do it? Or some other advice for find the correct memory location more conveniently? Thank you very much!
MemoryLocation <https://urldefense.proofpoint.com/v2/url?u=http-3A_llvm.orgdocsdoxygenhtmlclassllvm-5F1-5F1MemoryLocation.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4bhmuhMHA&m=14hCVGSEXFOJbLT-lrL33L10WInzyEjQQuUU5blxs&s=LWHYiOIDiHX4MX1ORt4jQlHYfEFEerka-YVhKyFaK3A&e=> MemoryLocation::getForArgument <https://urldefense.proofpoint.com/v2/url?u=http-3A_llvm.orgdocsdoxygenhtmlclassllvm-5F1-5F1MemoryLocation.html-23a09ad77e77770d1e517466a7345227ccc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4bhmuhMHA&m=14hCVGSEXFOJbLT-lrL33L10WInzyEjQQuUU5blxs&s=ImO5-R6QI2ckuWdjOmBRSzmmkMIAJZ80mpVVCrxWOLk&e=> (ImmutableCallSite <https://urldefense.proofpoint.com/v2/url?u=http-3A_llvm.orgdocsdoxygenhtmlclassllvm-5F1-5F1ImmutableCallSite.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4bhmuhMHA&m=14hCVGSEXFOJbLT-lrL33L10WInzyEjQQuUU5blxs&s=Lr-6RTIG7djM107Ys--utTf2xcSUzzrOPWz6cGBcJHo&e=> CS,unsigned <https://urldefense.proofpoint.com/v2/url?u=http-3A_llvm.orgdocsdoxygenhtmlclassunsigned.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4bhmuhMHA&m=14hCVGSEXFOJbLT-lrL33L10WInzyEjQQuUU5blxs&s=pjmqGXNuIKaY-OKLJxmtFbgRNE00iN7-6dGXO9W90Zg&e=> ArgIdx,const <https://urldefense.proofpoint.com/v2/url?u=http-3A_llvm.orgdocsdoxygenhtmlAArch64PromoteConstant-5F8cpp.html-23a90f8350fecae261c25be85d38b451bff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4bhmuhMHA&m=14hCVGSEXFOJbLT-lrL33L10WInzyEjQQuUU5blxs&s=E51fXjSBZ5NPul4Rgg-AZvCh3zC-r2xggPb6zSOKQE&e=> TargetLibraryInfo <https://urldefense.proofpoint.com/v2/url?u=http-3A_llvm.orgdocsdoxygenhtmlclassllvm-5F1-5F1TargetLibraryInfo.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4bhmuhMHA&m=14hCVGSEXFOJbLT-lrL33L10WInzyEjQQuUU5blxs&s=M8iAN9Cs4xxnvd1DZvkSZBFKfHJqk7KNvNv-MUkITE&e=> & TLI )[static] Shen
LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150710/648ac5b4/attachment.html>
- Previous message: [LLVMdev] How to use get the memory location of a function argument correctly?
- Next message: [LLVMdev] How to use get the memory location of a function argument correctly?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]