Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:30

0001 //===-- llvm/CodeGen/MachineCombinerPattern.h - Instruction pattern supported by
0002 // combiner  ------*- C++ -*-===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 //
0010 // This file defines instruction pattern supported by combiner
0011 //
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_CODEGEN_MACHINECOMBINERPATTERN_H
0015 #define LLVM_CODEGEN_MACHINECOMBINERPATTERN_H
0016 
0017 namespace llvm {
0018 
0019 /// The combiner's goal may differ based on which pattern it is attempting
0020 /// to optimize.
0021 enum class CombinerObjective {
0022   MustReduceDepth,            // The data dependency chain must be improved.
0023   MustReduceRegisterPressure, // The register pressure must be reduced.
0024   Default                     // The critical path must not be lengthened.
0025 };
0026 
0027 /// These are instruction patterns matched by the machine combiner pass.
0028 enum MachineCombinerPattern : unsigned {
0029   // These are commutative variants for reassociating a computation chain. See
0030   // the comments before getMachineCombinerPatterns() in TargetInstrInfo.cpp.
0031   REASSOC_AX_BY,
0032   REASSOC_AX_YB,
0033   REASSOC_XA_BY,
0034   REASSOC_XA_YB,
0035 
0036   TARGET_PATTERN_START
0037 };
0038 
0039 } // end namespace llvm
0040 
0041 #endif