[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation
Nikita Popov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 20 01:02:31 PDT 2023
nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.
> This commit is in support of future uninitialized memory handling and adds
> alloca instruction support to getInitialValueOfAllocation. This unifies initial
> memory state querying (both stack and heap) to a single utility function.
Could you explain in more detail what future work you have based on this? Is this about the promotion of malloc (and similar) memory?
In any case, I don't think it's acceptable to go through TLI as a required dependency for mem2reg. Alloca promotion doesn't need it, and that's what all the existing code is doing. This should at least be an optional dependency.
However, I think it would be better to directly pass the initial value to mem2reg instead (defaulting to UndefValue), rather than making it query it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155773/new/
https://reviews.llvm.org/D155773
More information about the cfe-commits
mailing list