mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
change Target.getInstructionsByEnumValue to return a reference
to a vector that CGT stores instead of synthesizing it on every call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -70,6 +70,8 @@ class CodeGenTarget {
|
||||
void ReadRegisterClasses() const;
|
||||
void ReadInstructions() const;
|
||||
void ReadLegalValueTypes() const;
|
||||
|
||||
std::vector<const CodeGenInstruction*> InstrsByEnum;
|
||||
public:
|
||||
CodeGenTarget();
|
||||
|
||||
@@ -210,13 +212,18 @@ public:
|
||||
|
||||
/// getInstructionsByEnumValue - Return all of the instructions defined by the
|
||||
/// target, ordered by their enum value.
|
||||
void getInstructionsByEnumValue(std::vector<const CodeGenInstruction*>
|
||||
&NumberedInstructions);
|
||||
const std::vector<const CodeGenInstruction*> &getInstructionsByEnumValue() {
|
||||
if (InstrsByEnum.empty()) ComputeInstrsByEnum();
|
||||
return InstrsByEnum;
|
||||
}
|
||||
|
||||
|
||||
/// isLittleEndianEncoding - are instruction bit patterns defined as [0..n]?
|
||||
///
|
||||
bool isLittleEndianEncoding() const;
|
||||
|
||||
private:
|
||||
void ComputeInstrsByEnum();
|
||||
};
|
||||
|
||||
/// ComplexPattern - ComplexPattern info, corresponding to the ComplexPattern
|
||||
|
||||
Reference in New Issue
Block a user