[PATCH] D61306: [NFC] Refactor visitIntrinsicCall so it doesn't return a const char*

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 01:39:23 PDT 2019


gchatelet marked an inline comment as done.
gchatelet added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7542
+
   if (I.countOperandBundlesOfType(LLVMContext::OB_deopt))
     LowerCallSiteWithDeoptBundle(&I, Callee, nullptr);
----------------
sanjoy wrote:
> courbet wrote:
> > So this is not really an NFC as this is is no longer executed on `setjmp`, `longjmp`, and `clear_cache`.  Here ends my knowledge, let's find reviewers who can comment on whether this is OK or not :)
> This change in behavior seems fine to me but CC @reames to be sure. 
Thx for the review @sanjoy . @reames do you mind having a look?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6511
   case Intrinsic::clear_cache:
-    return TLI.getClearCacheBuiltinName();
+    if(const char* FunctionName = TLI.getClearCacheBuiltinName())
+      lowerCallToExternalSymbol(I, FunctionName);
----------------
sanjoy wrote:
> Needs clang-format
> 
> Also is this ever null?
Thx.

It is indeed `nullptr` for X86 https://github.com/llvm-mirror/llvm/blob/master/lib/Target/X86/X86ISelLowering.h#L1124


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61306





More information about the llvm-commits mailing list