Skip to content
Snippets Groups Projects
Commit ae09c518 authored by clc5q's avatar clc5q
Browse files

Provide SMPInstr methods to access uses and defs externally; add methods...

Provide SMPInstr methods to access uses and defs externally; add methods EmitAnnotations and MDUsesCalleeSavedReg.
parent 520bebbf
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,10 @@ public:
int operator==(const SMPInstr &rhs) const;
int operator<(const SMPInstr &rhs) const;
int operator!=(const SMPInstr &rhs) const;
inline op_t GetUse(size_t index) const { return Uses.GetRef(index); };
inline op_t GetDef(size_t index) const { return Defs.GetRef(index); };
inline size_t NumUses(void) const { return Uses.GetSize(); };
inline size_t NumDefs(void) const { return Defs.GetSize(); };
inline insn_t GetCmd(void) const { return SMPcmd; };
inline void SetCmd(insn_t cmd) { SMPcmd = cmd; return; };
// Does instruction write to memory?
......@@ -98,13 +102,15 @@ public:
bool MDIsPushInstr(void) const;
bool MDIsPopInstr(void) const;
bool MDIsReturnInstr(void) const;
bool MDIsFrameAllocInstr(asize_t LocSize) const;
bool MDIsFrameAllocInstr(void) const;
bool MDIsFrameDeallocInstr(bool UseFP, asize_t LocSize) const;
bool MDUsesCalleeSavedReg(void) const;
int GetOptType(void) const;
inline SMPitype GetDataFlowType(void) const { return type; };
void PrintOperands(void) const;
char *DestString(int OptType);
void AnnotateStackConstants(bool UseFP, FILE *AnnotFile);
void EmitAnnotations(bool UseFP, bool AllocSeen, FILE *AnnotFile);
private:
SMPitype type; // Data flow analysis category
int OptType; // Optimization category (see OptCategory[])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment