1 //===-- llvm/CodeGen/MachineCombinerPattern.h - Instruction pattern supported by 2 // combiner ------*- C++ -*-===// 3 // 4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 // See https://llvm.org/LICENSE.txt for license information. 6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file defines instruction pattern supported by combiner 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_CODEGEN_MACHINECOMBINERPATTERN_H 15 #define LLVM_CODEGEN_MACHINECOMBINERPATTERN_H 16 17 namespace llvm { 18 19 /// The combiner's goal may differ based on which pattern it is attempting 20 /// to optimize. 21 enum class CombinerObjective { 22 MustReduceDepth, // The data dependency chain must be improved. 23 MustReduceRegisterPressure, // The register pressure must be reduced. 24 Default // The critical path must not be lengthened. 25 }; 26 27 /// These are instruction patterns matched by the machine combiner pass. 28 enum MachineCombinerPattern : unsigned { 29 // These are commutative variants for reassociating a computation chain. See 30 // the comments before getMachineCombinerPatterns() in TargetInstrInfo.cpp. 31 REASSOC_AX_BY, 32 REASSOC_AX_YB, 33 REASSOC_XA_BY, 34 REASSOC_XA_YB, 35 36 TARGET_PATTERN_START 37 }; 38 39 } // end namespace llvm 40 41 #endif 42