This is an archive of the discontinued LLVM Phabricator instance.

[ConstFold] Support opaque pointers in constexpr GEPs
ClosedPublic

Authored by nikic on Sep 5 2021, 12:51 PM.

Details

Reviewers
aeubanks
Group Reviewers
Restricted Project
Commits
rG58db5f6e9594: [ConstFold] Support opaque pointers in constexpr GEPs
Summary

Support opaque pointers in SymbolicallyEvaluateGEP by using the value type of a GlobalValue base or falling back to i8 if there isn't one. We don't unconditionally generate i8 GEPs here because that would lose inrange, and because some optimizations on globals currently rely on GEP types (e.g. the globals SROA mentioned in the comment).

Diff Detail