- Constant expressions may not be added in strict postorder as the forward instruction scan order. Thus, for a constant express (CE0), if its operand (CE1) is used in an previous instruction, they are not in postorder. However, different from cloneInstructionWithNewAddressSpace, cloneConstantExprWithNewAddressSpace doesn't bookkeep uninferred instructions for later resolving. That results in failure of inferring constant address.
- This patch adds the support to infer constant expression operand recursively, since there won't be loop, if that operand is another constant expression.
Details
Details
- Reviewers
arsenm - Commits
- rZORGff70ee4bd35b: [InferAddressSpaces] Enhance the handling of cosntexpr.
rZORGabe3ea0ec1ba: [InferAddressSpaces] Enhance the handling of cosntexpr.
rGff70ee4bd35b: [InferAddressSpaces] Enhance the handling of cosntexpr.
rGabe3ea0ec1ba: [InferAddressSpaces] Enhance the handling of cosntexpr.
rGb284414a1bf1: [InferAddressSpaces] Enhance the handling of cosntexpr.
rL360431: [InferAddressSpaces] Enhance the handling of cosntexpr.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM, though I’m not sure I follow the part of the message where you conclude there can’t be a loop. You can have cycles in constant expressions, which I thought this already handles correctly