[PATCH] D87104: [OpenMPOpt] Assume indirect call always changes ICV

Wei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 11:27:38 PDT 2020


weiwang created this revision.
Herald added subscribers: llvm-commits, wenlei, guansong, hiraditya, yaxunl.
Herald added a project: LLVM.
weiwang requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87104

Files:
  llvm/lib/Transforms/IPO/OpenMPOpt.cpp


Index: llvm/lib/Transforms/IPO/OpenMPOpt.cpp
===================================================================
--- llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -1480,6 +1480,9 @@
     auto &SetterRFI = OMPInfoCache.RFIs[OMPInfoCache.ICVs[ICV].Setter];
     Function *CalledFunction = CB->getCalledFunction();
 
+    // Indirect call, assume ICV changes.
+    if (CalledFunction == nullptr)
+      return nullptr;
     if (CalledFunction == GetterRFI.Declaration)
       return None;
     if (CalledFunction == SetterRFI.Declaration) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87104.289773.patch
Type: text/x-patch
Size: 575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200903/a40244f0/attachment.bin>


More information about the llvm-commits mailing list