LLVM  7.0.0
CombinerHelper.h
Go to the documentation of this file.
1 //== llvm/CodeGen/GlobalISel/CombinerHelper.h -------------- -*- C++ -*-==//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===--------------------------------------------------------------------===//
9 //
10 /// This contains common combine transformations that may be used in a combine
11 /// pass,or by the target elsewhere.
12 /// Targets can pick individual opcode transformations from the helper or use
13 /// tryCombine which invokes all transformations. All of the transformations
14 /// return true if the MachineInstruction changed and false otherwise.
15 //
16 //===--------------------------------------------------------------------===//
17 
18 #ifndef LLVM_CODEGEN_GLOBALISEL_COMBINER_HELPER_H
19 #define LLVM_CODEGEN_GLOBALISEL_COMBINER_HELPER_H
20 
21 namespace llvm {
22 
23 class MachineIRBuilder;
24 class MachineRegisterInfo;
25 class MachineInstr;
26 
28  MachineIRBuilder &Builder;
30 
31 public:
33 
34  /// If \p MI is COPY, try to combine it.
35  /// Returns true if MI changed.
37 
38  /// Try to transform \p MI by using all of the above
39  /// combine functions. Returns true if changed.
40  bool tryCombine(MachineInstr &MI);
41 };
42 } // namespace llvm
43 
44 #endif
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
bool tryCombine(MachineInstr &MI)
Try to transform MI by using all of the above combine functions.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
bool tryCombineCopy(MachineInstr &MI)
If MI is COPY, try to combine it.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
Definition: MachineInstr.h:60
CombinerHelper(MachineIRBuilder &B)
IRTranslator LLVM IR MI