As ScalarEvolution will already do the heavy lifting on all pointer related computations we can just treat them simply as integer expression.
Details
- Reviewers
grosser
Diff Detail
Event Timeline
Hi Johannes,
thank you very much. I think this approach really allows us to handle pointer type variables correctly.
Two points:
- Why do you call ensureIntegerType() on each expression?
I would have expected to call it directly on the leaves of the isl_ast_expr? To my understanding pointer type expressions can _only_ be introduced at IslExprBuilder::createId()'. Would it be sufficient to add the call there instead of on each operation?
it seems the current patch misses createOpSelect and createOpNAry. If we already expand at the leaves, we should not need to add ensureIntegerType() on each operation and probably have a lower risk on missing them now or when later on operations are added.
- Under which conditions (if every) will we (or do we need to) convert integers back to pointers?
Some of your test cases introduce inttoptr operations. The patch is silent about if/when they are introduced. Maybe we already do the right thing automatically, but a little comment on top of ensureIntegerType() that describe this would be very helpful for someone who wants to understand the whole idea.
Hi Johannes,
I just started to go through old patches. This is one that I got never feedback on, but I think it is rather easy to review and commit. Is there any reason you never followed up on this patch?