[LLVMdev] Construction of SCEVAddRecExpr

Beckert Frey beckert.frey at yahoo.com
Mon Mar 31 17:54:49 PDT 2014


Hello,

I'm studying how the SCEV analyzis works and how to use it and I could not create an example where the SCEV analyzis identifies an expression as "SCEVAddRecExpr". 


Aren't the expressions below the kind of pattern that should be represented as a "AddRecExpr" ?

SCEV: (1 + (2 * %3)
or
SCEV: (%1 + (2 * %3)
or
SCEV: (%1 + (%2 * %3)


In my experiments they are always recognized as just "AddExpr" (not *Rec*). Can someone help me on this? What I'm misunderstanding here?


I'm using the attached code to perform my experiments and this example as test input:


int main() {
    int vet1[100], i=0;

    for (i=0; i<10; i++) {
        vet1[3*i + 2] = vet1[i];
    }

    return 0;
}


Any help will be apreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140331/b4760dab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OnFunction.cpp
Type: text/x-c++src
Size: 4013 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140331/b4760dab/attachment.cpp>


More information about the llvm-dev mailing list