2 * abcremoval.h: Array bounds check removal
5 * Massimiliano Mantione (massi@ximian.com)
7 * (C) 2004 Ximian, Inc. http://www.ximian.com
10 #ifndef __MONO_ABCREMOVAL_H__
11 #define __MONO_ABCREMOVAL_H__
20 MONO_NE_RELATION = (MONO_LT_RELATION|MONO_GT_RELATION),
21 MONO_LE_RELATION = (MONO_LT_RELATION|MONO_EQ_RELATION),
22 MONO_GE_RELATION = (MONO_GT_RELATION|MONO_EQ_RELATION),
23 MONO_ANY_RELATION = (MONO_EQ_RELATION|MONO_LT_RELATION|MONO_GT_RELATION),
29 MONO_CONSTANT_SUMMARIZED_VALUE = 0,
30 MONO_VARIABLE_SUMMARIZED_VALUE,
31 MONO_PHI_SUMMARIZED_VALUE
32 } MonoSummarizedValueType;
35 typedef struct MonoSummarizedValue {
36 unsigned char relation_with_zero; /* MonoValueRelation */
37 unsigned char relation_with_one; /* MonoValueRelation */
38 unsigned char relation_with_value; /* MonoValueRelation */
39 unsigned char value_type; /* MonoSummarizedValueType */
45 } MonoSummarizedValue;
48 typedef struct MonoBranchCondition {
50 MonoSummarizedValue value;
51 } MonoBranchCondition;
53 typedef struct MonoBranchData {
54 MonoBasicBlock *destination_block;
55 int number_of_conditions;
56 MonoBranchCondition *conditions;
59 typedef struct MonoSummarizedBasicBlock {
60 MonoBasicBlock *block;
61 unsigned char has_array_access_instructions;
62 int number_of_branches;
63 MonoBranchData* branches;
64 } MonoSummarizedBasicBlock;
67 MONO_RELATIONS_EVALUATION_NOT_STARTED,
68 MONO_RELATIONS_EVALUATION_IN_PROGRESS,
69 MONO_RELATIONS_EVALUATION_COMPLETED
70 } MonoRelationsEvaluationStep;
72 typedef struct MonoVariableRelations {
73 unsigned char relation_with_zero; /* MonoValueRelation */
74 unsigned char relation_with_one; /* MonoValueRelation */
75 unsigned char evaluation_step; /* MonoRelationsEvaluationStep */
76 unsigned char definition_is_recursive;
77 unsigned char *relations_with_variables; /* many MonoValueRelation */
78 } MonoVariableRelations;
80 typedef struct MonoVariableRelationsEvaluationArea {
83 MonoVariableRelations *variable_relations;
84 MonoSummarizedValue *variable_definitions;
85 MonoSummarizedBasicBlock *blocks;
86 } MonoVariableRelationsEvaluationArea;
88 typedef struct MonoRelationsEvaluationContext {
89 struct MonoRelationsEvaluationContext *father_context;
91 } MonoRelationsEvaluationContext;
93 #endif /* __MONO_ABCREMOVAL_H__ */