[NFC][GlobalISel] Don't return `bool` from apply functions
authorpvanhout <pierre.vanhoutryve@amd.com>
Fri, 23 Jun 2023 10:26:57 +0000 (12:26 +0200)
committerpvanhout <pierre.vanhoutryve@amd.com>
Mon, 26 Jun 2023 07:23:58 +0000 (09:23 +0200)
commit5eb8cb094981f17364d5e7689b9e284918598a11
tree65ce0a8350b9f1666bb71bb319aa20026de3ee76
parentf6932007ab4e047e17e04ae8a024105700b7d906
[NFC][GlobalISel] Don't return `bool` from apply functions

There is no case where those functions return false. It's always return true.
Even if they were to return false, it's not really something we should rely on I think.
With the current combiner implementation, it would just make `tryCombineAll` return false without retrying anymore rules.

I also believe that if an applyer were to return false, it would mean that the match function is not good enough. Asserting on failure in an apply function is a better idea, IMO.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D153619
llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/lib/Target/AArch64/AArch64Combine.td
llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp