LLVM: include/llvm/MCA/CodeEmitter.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#ifndef LLVM_MCA_CODEEMITTER_H
17#define LLVM_MCA_CODEEMITTER_H
18
27
28namespace llvm {
29namespace mca {
30
31
32
33
34
38
41
42
43
44 using EncodingInfo = std::pair<unsigned, unsigned>;
45
46
48
49 LLVM_ABI EncodingInfo getOrCreateEncodingInfo(unsigned MCID);
50
51public:
54 : STI(ST), MCE(CE), Sequence(S), Encodings(S.size()) {}
55
57 EncodingInfo EI = getOrCreateEncodingInfo(MCID);
58 return StringRef(&Code[EI.first], EI.second);
59 }
60};
61
62}
63}
64
65#endif
This file defines the SmallString class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Generic interface to target specific assembler backends.
MCCodeEmitter - Generic instruction encoding interface.
Generic base class for all target subtargets.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
CodeEmitter(const MCSubtargetInfo &ST, const MCAsmBackend &AB, const MCCodeEmitter &CE, ArrayRef< MCInst > S)
Definition CodeEmitter.h:52
StringRef getEncoding(unsigned MCID)
Definition CodeEmitter.h:56
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.