Skip to content
  • Dan Gohman's avatar
    Generalize target-independent folding rules for sizeof to handle more · e5e1b7b0
    Dan Gohman authored
    cases, and implement target-independent folding rules for alignof and
    offsetof. Also, reassociate reassociative operators when it leads to
    more folding.
    
    Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
    arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
    to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.
    
    Make the target-dependent folder promote GEP array indices to
    pointer-sized integers, to make implicit casting explicit and exposed
    to subsequent folding.
    
    And add a bunch of testcases for this new functionality, and a bunch
    of related existing functionality.
    
    llvm-svn: 94987
    e5e1b7b0
Loading