[PATCH] D69257: Outline non returning functions unless a longjmp

Ruijie Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 17:36:38 PDT 2020


rjf updated this revision to Diff 279983.
rjf added a comment.

Remove use of CallSite and update longjmp intrinsics


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69257/new/

https://reviews.llvm.org/D69257

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


Index: llvm/lib/Transforms/IPO/HotColdSplitting.cpp
===================================================================
--- llvm/lib/Transforms/IPO/HotColdSplitting.cpp
+++ llvm/lib/Transforms/IPO/HotColdSplitting.cpp
@@ -43,6 +43,7 @@
 #include "llvm/IR/DiagnosticInfo.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/InstrTypes.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
@@ -120,9 +121,8 @@
             dyn_cast_or_null<CallInst>(BB.getTerminator()->getPrevNode()))
       if (CI->hasFnAttr(Attribute::NoReturn)) {
         if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI))
-          return II->getIntrinsicID() != Intrinsic::longjmp;
-        CallSite CS(CI);
-        return !CS.getCalledFunction()->getName().startswith("longjmp");
+          return II->getIntrinsicID() != Intrinsic::eh_sjlj_longjmp;
+        return !CI->getCalledFunction()->getName().startswith("longjmp");
       }
     return true;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69257.279983.patch
Type: text/x-patch
Size: 1021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200723/9ba0b0e0/attachment.bin>


More information about the llvm-commits mailing list