This is mostly a copy of the AArch64PostLegalizerLoweringPass, except it removes all of the AArch64 combines. This pass allows us to lower instructions after the generic post-legalization combiner has had a chance to run. We will be adding combines to this pass in future patches.
35 lines
1.2 KiB
TableGen
35 lines
1.2 KiB
TableGen
//=- RISCVCombine.td - Define RISC-V Combine Rules -----------*- tablegen -*-=//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
include "llvm/Target/GlobalISel/Combine.td"
|
|
|
|
def RISCVPreLegalizerCombiner: GICombiner<
|
|
"RISCVPreLegalizerCombinerImpl", [all_combines]> {
|
|
}
|
|
|
|
def RISCVO0PreLegalizerCombiner: GICombiner<
|
|
"RISCVO0PreLegalizerCombinerImpl", [optnone_combines]> {
|
|
}
|
|
|
|
// Post-legalization combines which should happen at all optimization levels.
|
|
// (E.g. ones that facilitate matching for the selector) For example, matching
|
|
// pseudos.
|
|
def RISCVPostLegalizerLowering
|
|
: GICombiner<"RISCVPostLegalizerLoweringImpl", []> {
|
|
}
|
|
|
|
// Post-legalization combines which are primarily optimizations.
|
|
// TODO: Add more combines.
|
|
def RISCVPostLegalizerCombiner
|
|
: GICombiner<"RISCVPostLegalizerCombinerImpl",
|
|
[redundant_and, identity_combines]> {
|
|
}
|