Open Quuxplusone opened 7 years ago
Bugzilla Link | PR31724 |
Status | NEW |
Importance | P enhancement |
Reported by | Reid Kleckner (rnk@google.com) |
Reported on | 2017-01-23 12:04:20 -0800 |
Last modified on | 2017-01-23 12:33:04 -0800 |
Version | unspecified |
Hardware | PC Windows NT |
CC | dberlin@dberlin.org, llvm-bugs@lists.llvm.org |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
In general, we can't do anything with pointer to int'd pointers. We can't tell
where they point to.
In an IPA analysis, we can't easily join them up, etc.
We also assume they escape.
BasicAA only handles bitcasts, it doesn't go back through ptrtoint/inttoptr to
see if they are the same thing, unmodified (and doing so is expensive), so even
inlining won't help until the inttoptr/ptrtoint pair is eliminated.
There are a couple ways to solve this.
Truthfully, the best way is to make them pointers again if possible.
If that really can't be solved, we should add metadata saying they are special,
and really pointers, and include the real pointer address expression somewhere,
but this seems .. hard.
(and by special, i mean "only escape/etc as much as a pointer would, and not 'complete lost to the void'", which is usually how ptrtoint is treated)