[PATCH] D111163: [UnknownProvenance] add support in ValueMapper
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 14:07:16 PST 2023
jeroen.dobbelaere updated this revision to Diff 497791.
jeroen.dobbelaere added a comment.
Rebased to: 8c7cfa357280dd93d33b10bbba0fe33797e27d63 <https://reviews.llvm.org/rG8c7cfa357280dd93d33b10bbba0fe33797e27d63> (Feb 14, 2023)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111163/new/
https://reviews.llvm.org/D111163
Files:
llvm/lib/Transforms/Utils/ValueMapper.cpp
Index: llvm/lib/Transforms/Utils/ValueMapper.cpp
===================================================================
--- llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -527,6 +527,8 @@
return getVM()[V] = UndefValue::get(NewTy);
if (isa<ConstantAggregateZero>(C))
return getVM()[V] = ConstantAggregateZero::get(NewTy);
+ if (isa<UnknownProvenance>(C))
+ return getVM()[V] = UnknownProvenance::get(cast<PointerType>(NewTy));
assert(isa<ConstantPointerNull>(C));
return getVM()[V] = ConstantPointerNull::get(cast<PointerType>(NewTy));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111163.497791.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230215/5e911a2f/attachment.bin>
More information about the llvm-commits
mailing list