Code Listener
[unstable] git snapshot
|
object model that describes the analyzed code on the input More...
Namespaces | |
CallGraph | |
PointsTo | |
Data Structures | |
struct | Var |
high-level variable representation More... | |
class | VarDb |
lookup container for set of Var objects More... | |
class | TypeDb |
type lookup table More... | |
struct | NameDb |
name to UID mapping for global/static symbols More... | |
struct | KillVar |
value type describing a single 'kill variable' hint More... | |
struct | ltKillVar |
FIXME: inserting <id,0> and <id,1> could break the consistency of std::set. More... | |
struct | Insn |
high-level representation of an intermediate code instruction More... | |
class | Block |
Basic block - a single node in ControlFlow graph. More... | |
class | ControlFlow |
Control flow graph - an easy to analyse representation of the intermediate code. More... | |
struct | Fnc |
function definition More... | |
class | FncDb |
lookup container for set of Fnc objects More... | |
struct | Storage |
a value type representing the whole serialised model of code More... | |
Typedefs | |
typedef struct cl_operand[] | TOperandList |
generic STL-based list of cl_operand objects. More... | |
typedef const Block * | TTargetList |
generic STL-based list of Block pointers (useful to build CFG from Block objects) More... | |
typedef std::set< KillVar, ltKillVar > | TKillVarList |
list of variables to kill (a kill list) More... | |
typedef std::vector< TKillVarList > | TKillPerTarget |
list of kill lists (one per each target of a terminal instruction) More... | |
typedef std::vector< int > | TArgByPos |
typedef std::set< int > | TVarSet |
typedef std::vector< const Fnc * > | TFncList |
typedef std::vector< const Insn * > | TInsnList |
typedef std::map< Fnc *, TInsnList > | TInsnListByFnc |
Enumerations | |
enum | EVar { VAR_VOID, VAR_GL, VAR_LC, VAR_FNC_ARG } |
high-level variable (operand) classification More... | |
Functions | |
bool | isOnStack (const Var &) |
void | readTypeTree (TypeDb &db, const struct cl_type *clt) |
Add the given type into TypeDb instance, then descent into the type and add all the referred types recursively. More... | |
const char * | nameOf (const Fnc &) |
return the name of given Fnc object (if any) More... | |
struct cl_loc * | locationOf (const Fnc &) |
return the location info associated with the given Fnc object (if any) More... | |
int | uidOf (const Fnc &) |
return the uid of given Fnc object More... | |
bool | isDefined (const Fnc &) |
return true if the function is defined (means we have its CFG and the like) More... | |
const Fnc * | fncByCfg (const ControlFlow *cfg) |
return the pointer to the Fnc object that the cfg instance is wrapped by More... | |
bool | isBuiltInFnc (const struct cl_operand &op) |
return true if the given operand is a function recognized as cl built-in More... | |
bool | isBuiltInCall (const Insn &insn) |
return true if the given instruction is recognized as a call of cl built-in More... | |
void | destroyInsn (Insn *insn) |
void | killLocalVariables (Storage &stor) |
void | findLoopClosingEdges (Storage &stor) |
void | pointsToAnalyse (Storage &stor, const std::string &conf) |
object model that describes the analyzed code on the input
typedef std::vector<int> TArgByPos |
Definition at line 609 of file storage.hh.
Definition at line 819 of file storage.hh.
Definition at line 820 of file storage.hh.
typedef std::map<Fnc *, TInsnList> TInsnListByFnc |
Definition at line 821 of file storage.hh.
typedef std::vector<TKillVarList> TKillPerTarget |
list of kill lists (one per each target of a terminal instruction)
Definition at line 324 of file storage.hh.
typedef std::set<KillVar, ltKillVar> TKillVarList |
list of variables to kill (a kill list)
Definition at line 321 of file storage.hh.
typedef struct cl_operand [] TOperandList |
generic STL-based list of cl_operand objects.
They may or may not be deep-cloned, it depends on the particular purpose.
Definition at line 288 of file storage.hh.
typedef const Block* TTargetList |
generic STL-based list of Block pointers (useful to build CFG from Block objects)
Definition at line 294 of file storage.hh.
typedef std::set<int> TVarSet |
Definition at line 610 of file storage.hh.
enum EVar |
high-level variable (operand) classification
Definition at line 53 of file storage.hh.
void CodeStorage::destroyInsn | ( | Insn * | insn) |
void CodeStorage::findLoopClosingEdges | ( | Storage & | stor) |
const Fnc* CodeStorage::fncByCfg | ( | const ControlFlow * | cfg) |
return the pointer to the Fnc object that the cfg instance is wrapped by
bool CodeStorage::isBuiltInCall | ( | const Insn & | insn) |
return true if the given instruction is recognized as a call of cl built-in
bool CodeStorage::isBuiltInFnc | ( | const struct cl_operand & | op) |
return true if the given operand is a function recognized as cl built-in
bool CodeStorage::isDefined | ( | const Fnc & | ) |
return true if the function is defined (means we have its CFG and the like)
bool CodeStorage::isOnStack | ( | const Var & | ) |
void CodeStorage::killLocalVariables | ( | Storage & | stor) |
struct cl_loc* CodeStorage::locationOf | ( | const Fnc & | ) |
return the location info associated with the given Fnc object (if any)
const char* CodeStorage::nameOf | ( | const Fnc & | ) |
return the name of given Fnc object (if any)
void CodeStorage::pointsToAnalyse | ( | Storage & | stor, |
const std::string & | conf | ||
) |
void CodeStorage::readTypeTree | ( | TypeDb & | db, |
const struct cl_type * | clt | ||
) |
int CodeStorage::uidOf | ( | const Fnc & | ) |
return the uid of given Fnc object