Before we did not follow casts and geps when we looked at the users of a pointer in the pointers must-be-executed-context. This caused us to fail to determine if it was accessed for sure. With this change we follow such users now. The above extension exposed problems in getKnownNonNullAndDerefBytesForUse which did not always check what the base pointer was. We also did not handle negative offsets as conservative as we have to without explicit loop handling. Finally, we should not derive a huge number if we access a pointer that was traversed backwards first. The problems exposed by this functional change are already tested in the existing test cases as is the functional change.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 40313 Build 40416: arc lint + arc unit
Event Timeline
llvm/test/Transforms/InferFunctionAttrs/dereferenceable.ll | ||
---|---|---|
1 | leftover, will be removed. |
Comment Actions
LGTM
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
1673–1678 | It might be better to insert early returns to these blocks |
It might be better to insert early returns to these blocks