mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 12:02:58 +02:00
7932a6b01b
Reverting this to see if the clang-cmake-aarch64-global-isel and clang-cmake-aarch64-quick bots are failing because of this commit. We know it wasn't r331819. llvm-svn: 331846
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
//== llvm/CodeGen/GlobalISel/CombinerHelper.h -------------- -*- C++ -*-==//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===--------------------------------------------------------------------===//
|
|
//
|
|
/// This contains common combine transformations that may be used in a combine
|
|
/// pass,or by the target elsewhere.
|
|
/// Targets can pick individual opcode transformations from the helper or use
|
|
/// tryCombine which invokes all transformations. All of the transformations
|
|
/// return true if the MachineInstruction changed and false otherwise.
|
|
//
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_CODEGEN_GLOBALISEL_COMBINER_HELPER_H
|
|
#define LLVM_CODEGEN_GLOBALISEL_COMBINER_HELPER_H
|
|
|
|
namespace llvm {
|
|
|
|
class MachineIRBuilder;
|
|
class MachineRegisterInfo;
|
|
class MachineInstr;
|
|
|
|
class CombinerHelper {
|
|
MachineIRBuilder &Builder;
|
|
MachineRegisterInfo &MRI;
|
|
|
|
public:
|
|
CombinerHelper(MachineIRBuilder &B);
|
|
|
|
/// If \p MI is COPY, try to combine it.
|
|
/// Returns true if MI changed.
|
|
bool tryCombineCopy(MachineInstr &MI);
|
|
|
|
/// Try to transform \p MI by using all of the above
|
|
/// combine functions. Returns true if changed.
|
|
bool tryCombine(MachineInstr &MI);
|
|
};
|
|
} // namespace llvm
|
|
|
|
#endif
|