As a first step to simplify loads we only handle null and undef
underlying objects, as well as alloca instructions that have the load
as a single user. Loads of those values can be replaced by undef.
Proper reasoning is introduced in a follow up patch
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The code for the AAPotentialValues and AAValueSimplify is the same. Maybe we could move this to a separate function with a callback for doing the unions ?
llvm/lib/Transforms/IPO/AttributorAttributes.cpp | ||
---|---|---|
4507 | I don't understand why this case needs to be handled. I don't see how we would get something different from the getAssumedSimplified. getAssumedUnderlyingObjects just does genericValueTraversal and strips away casts. |
llvm/lib/Transforms/IPO/AttributorAttributes.cpp | ||
---|---|---|
4507 | The problem is that the object might be null but the pointer is not. p = nullptr; p[(intptr_t)q] = 1; |
I think there was a mistake during rebase or we should abandon https://reviews.llvm.org/D104432
llvm/include/llvm/Transforms/IPO/Attributor.h | ||
---|---|---|
3888 | Is AAPointerInfo supposed to be here ? |
Is AAPointerInfo supposed to be here ?