[PATCH] D73630: [InstCombine][DebugInfo] Fold constants wrapped in metadata
David Stenberg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 04:21:22 PST 2020
dstenb marked 3 inline comments as done.
dstenb added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3570
+ V = VAM->getValue();
+ WrapAsMetadata = true;
+ }
----------------
vsk wrote:
> I think this is the right way to implement this change at the moment. If a similar need comes up in other contexts, we might consider adding a helper API to Use e.g. `std::pair<Value *, bool /* IsMetadataAsValue */> Use::getUnderlyingValue()`.
That sounds like a good future improvement! I now skimmed through the `MetadataAsValue` uses in lib/ to find some similar code pattern, but I did not find any.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73630/new/
https://reviews.llvm.org/D73630
More information about the llvm-commits
mailing list