[llvm] r323369 - [GlobalISel] Don't fall back to FastISel.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 16:14:58 PST 2018
Oh I missed Gerolf replied on that thread.
I am fine with that change if that’s what people want, my concern is that we will degrade potentially the compile time on fallback path even more.
> Le 24 janv. 2018 à 13:59, Amara Emerson <aemerson at apple.com> a écrit :
>
>> On 24 Jan 2018, at 21:18, Quentin Colombet <qcolombet at apple.com> wrote:
>>
>> Hi Amara,
>>
>> Falling back to FastISel was intended to get the best performance from the fallback path.
>>
>> Why are we doing this change now?
>>
>> Cheers,
>> -Quentin
>>
>>> On Jan 24, 2018, at 11:59 AM, Amara Emerson via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>>
>>> Author: aemerson
>>> Date: Wed Jan 24 11:59:29 2018
>>> New Revision: 323369
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=323369&view=rev
>>> Log:
>>> [GlobalISel] Don't fall back to FastISel.
>>>
>>> Apparently checking the pass structure isn't enough to ensure that we don't fall
>>> back to FastISel, as it's set up as part of the SelectionDAGISel.
>>>
>>> Added:
>>> llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll
>>> Modified:
>>> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
>>> llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
>>>
>>> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=323369&r1=323368&r2=323369&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
>>> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jan 24 11:59:29 2018
>>> @@ -1380,8 +1380,10 @@ void SelectionDAGISel::SelectAllBasicBlo
>>> FastISelFailed = false;
>>> // Initialize the Fast-ISel state, if needed.
>>> FastISel *FastIS = nullptr;
>>> - if (TM.Options.EnableFastISel)
>>> + if (TM.Options.EnableFastISel) {
>>> + DEBUG(dbgs() << "Enabling fast-isel\n");
>>> FastIS = TLI->createFastISel(*FuncInfo, LibInfo);
>>> + }
>>>
>>> setupSwiftErrorVals(Fn, TLI, FuncInfo);
>>>
>>>
>>> Modified: llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetPassConfig.cpp?rev=323369&r1=323368&r2=323369&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/lib/CodeGen/TargetPassConfig.cpp (original)
>>> +++ llvm/trunk/lib/CodeGen/TargetPassConfig.cpp Wed Jan 24 11:59:29 2018
>>> @@ -708,6 +708,8 @@ bool TargetPassConfig::addCoreISelPasses
>>> if (EnableGlobalISelOption == cl::BOU_TRUE ||
>>> (EnableGlobalISelOption == cl::BOU_UNSET &&
>>> TM->Options.EnableGlobalISel && EnableFastISelOption != cl::BOU_TRUE)) {
>>> + TM->setFastISel(false);
>>> +
>>> if (addIRTranslator())
>>> return true;
>>>
>>>
>>> Added: llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll?rev=323369&view=auto
>>> ==============================================================================
>>> --- llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll (added)
>>> +++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/fallback-nofastisel.ll Wed Jan 24 11:59:29 2018
>>> @@ -0,0 +1,10 @@
>>> +; RUN: llc -mtriple=aarch64_be-- %s -o /dev/null -debug-only=isel -O0 2>&1 | FileCheck %s
>>> +
>>> +; This test uses big endian in order to force an abort since it's not currently supported for GISel.
>>> +; The purpose is to check that we don't fall back to FastISel. Checking the pass structure is insufficient
>>> +; because the FastISel is set up in the SelectionDAGISel, so it doesn't appear on the pass structure.
>>> +
>>> +; CHECK-NOT: Enabling fast-ise
>>> +define void @empty() {
>>> + ret void
>>> +}
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
> This was always the intention IIRC, Gerolf suggested it here: https://reviews.llvm.org/D41362 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.
>
> Cheers,
> Amara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180124/0c373d0c/attachment.html>
More information about the llvm-commits
mailing list