LLVM 23.0.0git
RDFCopy.h
Go to the documentation of this file.
1//===--- RDFCopy.h ----------------------------------------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIB_TARGET_HEXAGON_RDFCOPY_H
10#define LLVM_LIB_TARGET_HEXAGON_RDFCOPY_H
11
12#include "RDFCopyBase.h"
17#include <map>
18#include <vector>
19
20namespace llvm {
21
22namespace rdf {
23
26
27 virtual ~CopyPropagation() = default;
28
29 bool run();
30 virtual bool interpretAsCopy(const MachineInstr *MI, EqualityMap &EM);
31
32private:
33 std::vector<NodeId> Copies;
34
35 void recordCopy(NodeAddr<StmtNode *> SA, EqualityMap &EM);
36 void updateMap(NodeAddr<InstrNode *> IA);
37 bool scanBlock(MachineBasicBlock *B);
38};
39
40} // end namespace rdf
41} // end namespace llvm
42
43#endif // LLVM_LIB_TARGET_HEXAGON_RDFCOPY_H
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
IRTranslator LLVM IR MI
Representation of each machine instruction.
This is an optimization pass for GlobalISel generic memory operations.
std::map< RegisterRef, RegisterRef, RegisterRefLess > EqualityMap
Definition RDFCopyBase.h:37
CopyPropagationBase(DataFlowGraph &dfg)
Definition RDFCopyBase.h:28
CopyPropagation(DataFlowGraph &dfg)
Definition RDFCopy.h:25
virtual bool interpretAsCopy(const MachineInstr *MI, EqualityMap &EM)
Definition RDFCopy.cpp:41
virtual ~CopyPropagation()=default