[NFCI][SCEV] getPtrToIntExpr(): use SCEVRewriteVisitor<> for ptrtoint cast sinking
This is functionally-identical to the previous implementation, just using a generic interface to do that instead of hand-rolled one, with caching as a bonus. Thought the sinking is still recursive.. Note that SCEVRewriteVisitor<>'s default implementations don't preserve NoWrap flags on Add/Mul (but does on AddRec!), but here we know we can preserve them, so `visitAddExpr()`/`visitMulExpr()` are specialized.
Loading
Please sign in to comment