Charith Mendis via llvm-dev
2016-Sep-30 19:16 UTC
[llvm-dev] Getting the symbolic expression for an address calculation
Hi all, What is the best way to get the symbolic expression for an address calculation in llvm specially when memory addresses are calculated within a loop. Use case: I want to know what loop induction variables are used for a particular address calculation and in what symbolic context. Thereby, I want to identify which stores and loads will be contiguous in memory if I unroll each of the loops. Thanks -- Kind regards, Charith Mendis Graduate Student, CSAIL, Massachusetts Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.llvm.org/pipermail/llvm-dev/attachments/20160930/2862d3bc/attachment.html>
Friedman, Eli via llvm-dev
2016-Sep-30 20:16 UTC
[llvm-dev] Getting the symbolic expression for an address calculation
On 9/30/2016 12:16 PM, Charith Mendis via llvm-dev wrote:> > Hi all, > > What is the best way to get the symbolic expression for an address > calculation in llvm specially when memory addresses are calculated > within a loop.ScalarEvolution works with pointers as well as integers; if you call getSCEV on an address based on an induction variable, you'll get a SCEVAddRecExpr. -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Charith Mendis via llvm-dev
2016-Oct-04 18:13 UTC
[llvm-dev] Getting the symbolic expression for an address calculation
How do you generate a SCEVAddRecExpr from a SCEV? It tried dyn_casting and it seems like that the SCEV returned by getSCEV is not a SCEVAddRecExpr. Thanks On Fri, Sep 30, 2016 at 4:16 PM, Friedman, Eli <efriedma at codeaurora.org> wrote:> On 9/30/2016 12:16 PM, Charith Mendis via llvm-dev wrote: > >> >> Hi all, >> >> What is the best way to get the symbolic expression for an address >> calculation in llvm specially when memory addresses are calculated within >> a loop. >> > > ScalarEvolution works with pointers as well as integers; if you call > getSCEV on an address based on an induction variable, you'll get a > SCEVAddRecExpr. > > -Eli > > -- > Employee of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux > Foundation Collaborative Project > >-- Kind regards, Charith Mendis Graduate Student, CSAIL, Massachusetts Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.llvm.org/pipermail/llvm-dev/attachments/20161004/84bd7915/attachment.html>