[PATCH] D111163: [UnknownProvenance] add support in ValueMapper
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 05:56:05 PDT 2022
jeroen.dobbelaere updated this revision to Diff 440962.
jeroen.dobbelaere added a comment.
Rebased to ffe262a198a9f9030991df6d3ddd812e74fa3523 <https://reviews.llvm.org/rGffe262a198a9f9030991df6d3ddd812e74fa3523>
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
@@ -528,6 +528,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.440962.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220629/a17d5183/attachment.bin>
More information about the llvm-commits
mailing list