diff --git a/SMPDataFlowAnalysis.h b/SMPDataFlowAnalysis.h index 318c861dc2735f4d936ad3263d8800f7a9ab7729..14aba8aa4fadf3587a0f017dea97c802a0b7c99a 100644 --- a/SMPDataFlowAnalysis.h +++ b/SMPDataFlowAnalysis.h @@ -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[])