<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 24 Jan 2018, at 21:18, Quentin Colombet <<a href="mailto:qcolombet@apple.com" class="">qcolombet@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Amara,<br class=""><br class="">Falling back to FastISel was intended to get the best performance from the fallback path.<br class=""><br class="">Why are we doing this change now?<br class=""><br class="">Cheers,<br class="">-Quentin<br class=""><br class=""><blockquote type="cite" class="">On Jan 24, 2018, at 11:59 AM, Amara Emerson via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""><br class="">Author: aemerson<br class="">Date: Wed Jan 24 11:59:29 2018<br class="">New Revision: 323369<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=323369&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=323369&view=rev</a><br class="">Log:<br class="">[GlobalISel] Don't fall back to FastISel.<br class=""><br class="">Apparently checking the pass structure isn't enough to ensure that we don't fall<br class="">back to FastISel, as it's set up as part of the SelectionDAGISel.<br class=""><br class="">Added:<br class="">   llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll<br class="">Modified:<br class="">   llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp<br class="">   llvm/trunk/lib/CodeGen/TargetPassConfig.cpp<br class=""><br class="">Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=323369&r1=323368&r2=323369&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=323369&r1=323368&r2=323369&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)<br class="">+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jan 24 11:59:29 2018<br class="">@@ -1380,8 +1380,10 @@ void SelectionDAGISel::SelectAllBasicBlo<br class="">  FastISelFailed = false;<br class="">  // Initialize the Fast-ISel state, if needed.<br class="">  FastISel *FastIS = nullptr;<br class="">-  if (TM.Options.EnableFastISel)<br class="">+  if (TM.Options.EnableFastISel) {<br class="">+    DEBUG(dbgs() << "Enabling fast-isel\n");<br class="">    FastIS = TLI->createFastISel(*FuncInfo, LibInfo);<br class="">+  }<br class=""><br class="">  setupSwiftErrorVals(Fn, TLI, FuncInfo);<br class=""><br class=""><br class="">Modified: llvm/trunk/lib/CodeGen/TargetPassConfig.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetPassConfig.cpp?rev=323369&r1=323368&r2=323369&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetPassConfig.cpp?rev=323369&r1=323368&r2=323369&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/CodeGen/TargetPassConfig.cpp (original)<br class="">+++ llvm/trunk/lib/CodeGen/TargetPassConfig.cpp Wed Jan 24 11:59:29 2018<br class="">@@ -708,6 +708,8 @@ bool TargetPassConfig::addCoreISelPasses<br class="">  if (EnableGlobalISelOption == cl::BOU_TRUE ||<br class="">      (EnableGlobalISelOption == cl::BOU_UNSET &&<br class="">       TM->Options.EnableGlobalISel && EnableFastISelOption != cl::BOU_TRUE)) {<br class="">+    TM->setFastISel(false);<br class="">+<br class="">    if (addIRTranslator())<br class="">      return true;<br class=""><br class=""><br class="">Added: llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll?rev=323369&view=auto" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll?rev=323369&view=auto</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll (added)<br class="">+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll Wed Jan 24 11:59:29 2018<br class="">@@ -0,0 +1,10 @@<br class="">+; RUN: llc -mtriple=aarch64_be-- %s -o /dev/null -debug-only=isel -O0 2>&1 | FileCheck %s<br class="">+<br class="">+; This test uses big endian in order to force an abort since it's not currently supported for GISel.<br class="">+; The purpose is to check that we don't fall back to FastISel. Checking the pass structure is insufficient<br class="">+; because the FastISel is set up in the SelectionDAGISel, so it doesn't appear on the pass structure.<br class="">+<br class="">+; CHECK-NOT: Enabling fast-ise<br class="">+define void @empty() {<br class="">+  ret void<br class="">+}<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""><div class="">This was always the intention IIRC, Gerolf suggested it here: <a href="https://reviews.llvm.org/D41362" class="">https://reviews.llvm.org/D41362</a> unless there’s some discussion I’ve missed. The existing tests with the -debug-pass=Structure option doesn’t show the difference between falling back to fast-isel and SelectionDAG.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Amara</div></body></html>