[llvm-dev] Getting the symbolic expression for an address calculation
Charith Mendis via llvm-dev
llvm-dev at lists.llvm.org
Tue Oct 4 11:49:15 PDT 2016
Is there a way to manipulate SCEVs? It seems like it is an opaque pointer.
This would be useful since I am trying to learn the structure of them.
Thanks
On Tue, Oct 4, 2016 at 2:26 PM, Charith Mendis <char.mendis1989 at gmail.com>
wrote:
> (((15 + %add144.sink230.i) * (%blocksize /u %bytesoftype)) +
> {%_dest,+,16}<%for.cond1.preheader.i59>)<nsw>
>
> On Tue, Oct 4, 2016 at 2:24 PM, Friedman, Eli <efriedma at codeaurora.org>
> wrote:
>
>> On 10/4/2016 11:13 AM, Charith Mendis wrote:
>>
>>> 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.
>>>
>>
>> You can dyn_cast if it's actually an AddRec... but not all expressions
>> can be represented as an AddRec.
>>
>> SCEV has a dump() method which can be helpful for debugging. What does
>> E->dump() on the SCEV in question look like? What does the IR look like?
>>
>>
>> -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
>
--
Kind regards,
Charith Mendis
Graduate Student,
CSAIL,
Massachusetts Institute of Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161004/b5053067/attachment.html>
More information about the llvm-dev
mailing list