[PATCH] D111163: [UnknownProvenance] add support in ValueMapper

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 01:36:52 PST 2023


jeroen.dobbelaere updated this revision to Diff 488533.
jeroen.dobbelaere added a comment.
Herald added a subscriber: StephenFan.

Rebased to ef545ef62a833152d8975ff16333b57cc41befcc <https://reviews.llvm.org/rGef545ef62a833152d8975ff16333b57cc41befcc> (Jan 9, 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.488533.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230112/4e6e3e31/attachment.bin>


More information about the llvm-commits mailing list