1 //===- CSEConfigBase.h - A CSEConfig interface ------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CODEGEN_CSECONFIG_BASE_H
10 #define LLVM_CODEGEN_CSECONFIG_BASE_H
13 // Class representing some configuration that can be done during GlobalISel's
14 // CSEInfo analysis. We define it here because TargetPassConfig can't depend on
15 // the GlobalISel library, and so we use this in the interface between them
16 // so that the derived classes in GISel can reference generic opcodes.
19 virtual ~CSEConfigBase() = default;
20 // Hook for defining which Generic instructions should be CSEd.
21 // GISelCSEInfo currently only calls this hook when dealing with generic
23 virtual bool shouldCSEOpc(unsigned Opc
) { return false; }
28 #endif // LLVM_CODEGEN_CSECONFIG_BASE_H