CACAO
Macros | Functions
SSAConstructionPass.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_NAME   "compiler2/SSAConstruction"
 
#define SHOW_TARGET(OS, target)
 
#define SHOW_INT_CONST(OS, val)
 
#define SHOW_LNG_CONST(OS, val)
 
#define SHOW_ADR_CONST(OS, val)
 
#define SHOW_FLT_CONST(OS, val)
 
#define SHOW_DBL_CONST(OS, val)
 
#define SHOW_INDEX(OS, index)
 
#define SHOW_STRING(OS, val)
 
#define SHOW_CLASSREF_OR_CLASSINFO(OS, c)
 
#define SHOW_FIELD(OS, fmiref)
 
#define SHOW_VARIABLE(OS, v)   show_variable_intern_OS(OS, jd, (v), stage)
 
#define SHOW_S1(OS, iptr)
 
#define SHOW_S2(OS, iptr)
 
#define SHOW_S3(OS, iptr)
 
#define SHOW_DST(OS, iptr)
 
#define SHOW_S1_LOCAL(OS, iptr)
 
#define SHOW_DST_LOCAL(OS, iptr)
 

Functions

 STAT_REGISTER_GROUP_VAR (std::size_t, num_icmd_inst, 0,"icmd instructions","ICMD instructions processed (by the compiler2)", compiler2_stat) namespace cacao
 

Macro Definition Documentation

#define DEBUG_NAME   "compiler2/SSAConstruction"

Definition at line 44 of file SSAConstructionPass.cpp.

#define SHOW_ADR_CONST (   OS,
  val 
)
Value:
if (stage >= SHOW_PARSE) \
OS << "0x" << hex << setw(8) << (ptrint) (val) << dec; \
OS << "aconst ";
static SetWidth setw(size_t w)
Definition: OStream.hpp:395
#define SHOW_PARSE
Definition: show.hpp:40
Hex hex
Definition: OStream.cpp:50
OStream & OS
uintptr_t ptrint
Definition: types.hpp:54
Dec dec
Definition: OStream.cpp:48
#define SHOW_CLASSREF_OR_CLASSINFO (   OS,
 
)
Value:
if (stage >= SHOW_PARSE) { \
OS << "class (TODO)"; \
} \
else { \
OS << "class "; \
}
#define SHOW_PARSE
Definition: show.hpp:40
OStream & OS
#define SHOW_DBL_CONST (   OS,
  val 
)
Value:
if (stage >= SHOW_PARSE) { \
imm_union v; \
v.d = (val); \
OS << (val) << hex << setw(16) << v.l << dec; \
} \
OS << "dconst ";
static SetWidth setw(size_t w)
Definition: OStream.hpp:395
#define SHOW_PARSE
Definition: show.hpp:40
Hex hex
Definition: OStream.cpp:50
OStream & OS
Dec dec
Definition: OStream.cpp:48
#define SHOW_DST (   OS,
  iptr 
)
Value:
if (stage >= SHOW_STACK) { \
OS << "=> "; \
SHOW_VARIABLE(OS, iptr->dst.varindex); \
}
#define SHOW_STACK
Definition: show.hpp:41
OStream & OS
#define SHOW_VARIABLE(OS, v)
#define SHOW_DST_LOCAL (   OS,
  iptr 
)
Value:
if (stage >= SHOW_STACK) { \
OS << "=> L" << iptr->dst.varindex << " "; \
} \
else { \
OS << "=> JavaL" << iptr->dst.varindex << " "; \
}
#define SHOW_STACK
Definition: show.hpp:41
OStream & OS
#define SHOW_FIELD (   OS,
  fmiref 
)
Value:
if (stage >= SHOW_PARSE) { \
OS << "field (TODO)"; \
} \
else { \
OS << "field "; \
}
#define SHOW_PARSE
Definition: show.hpp:40
OStream & OS
#define SHOW_FLT_CONST (   OS,
  val 
)
Value:
if (stage >= SHOW_PARSE) { \
imm_union v; \
v.f = (val); \
OS << (val) << hex << setw(8) << v.i << dec; \
} \
else { \
OS << "fconst "; \
}
static SetWidth setw(size_t w)
Definition: OStream.hpp:395
#define SHOW_PARSE
Definition: show.hpp:40
Hex hex
Definition: OStream.cpp:50
OStream & OS
Dec dec
Definition: OStream.cpp:48
#define SHOW_INDEX (   OS,
  index 
)
Value:
if (stage >= SHOW_PARSE) { \
OS << index << ""; \
} \
else { \
OS << "index"; \
}
std::size_t index
#define SHOW_PARSE
Definition: show.hpp:40
OStream & OS
#define SHOW_INT_CONST (   OS,
  val 
)
Value:
if (stage >= SHOW_PARSE) { \
OS << (int32_t) (val) << "0x" << hex << setw(8) << (int32_t) (val) << dec; \
} \
else { \
OS << "iconst "; \
}
static SetWidth setw(size_t w)
Definition: OStream.hpp:395
#define SHOW_PARSE
Definition: show.hpp:40
Hex hex
Definition: OStream.cpp:50
OStream & OS
Dec dec
Definition: OStream.cpp:48
#define SHOW_LNG_CONST (   OS,
  val 
)
Value:
if (stage >= SHOW_PARSE) \
OS << (val) << "0x" << hex << setw(16) << (val) << dec;\
OS << "lconst ";
static SetWidth setw(size_t w)
Definition: OStream.hpp:395
#define SHOW_PARSE
Definition: show.hpp:40
Hex hex
Definition: OStream.cpp:50
OStream & OS
Dec dec
Definition: OStream.cpp:48
#define SHOW_S1 (   OS,
  iptr 
)
Value:
if (stage >= SHOW_STACK) { \
SHOW_VARIABLE(OS, iptr->s1.varindex); \
}
#define SHOW_STACK
Definition: show.hpp:41
OStream & OS
#define SHOW_VARIABLE(OS, v)
#define SHOW_S1_LOCAL (   OS,
  iptr 
)
Value:
if (stage >= SHOW_STACK) { \
OS << "L" << iptr->s1.varindex; \
} \
else { \
OS << "JavaL" << iptr->s1.varindex << " "; \
}
#define SHOW_STACK
Definition: show.hpp:41
OStream & OS
#define SHOW_S2 (   OS,
  iptr 
)
Value:
if (stage >= SHOW_STACK) { \
SHOW_VARIABLE(OS, iptr->sx.s23.s2.varindex); \
}
#define SHOW_STACK
Definition: show.hpp:41
OStream & OS
#define SHOW_VARIABLE(OS, v)
#define SHOW_S3 (   OS,
  iptr 
)
Value:
if (stage >= SHOW_STACK) { \
SHOW_VARIABLE(OS, iptr->sx.s23.s3.varindex); \
}
#define SHOW_STACK
Definition: show.hpp:41
OStream & OS
#define SHOW_VARIABLE(OS, v)
#define SHOW_STRING (   OS,
  val 
)
Value:
if (stage >= SHOW_PARSE) { \
OS << "\""; \
OS << "\" "; \
} \
else { \
OS << "string "; \
}
Utf8String to_utf8() const
Definition: string.cpp:437
#define SHOW_PARSE
Definition: show.hpp:40
OStream & OS
#define SHOW_TARGET (   OS,
  target 
)
Value:
if (stage >= SHOW_PARSE) { \
OS << "--> L" << setw(3) << (target).block->nr; \
} \
else { \
OS << "--> insindex " << (target).insindex; \
}
static SetWidth setw(size_t w)
Definition: OStream.hpp:395
#define SHOW_PARSE
Definition: show.hpp:40
BeginInst *& block
OStream & OS
BeginInst * target
#define SHOW_VARIABLE (   OS,
 
)    show_variable_intern_OS(OS, jd, (v), stage)

Function Documentation

STAT_REGISTER_GROUP_VAR ( std::size_t  ,
num_icmd_inst  ,
,
"icmd instructions"  ,
"ICMD instructions processed (by the compiler2)"  ,
compiler2_stat   
)

There are two kinds of variables in the baseline ir. The javalocals as defined in the JVM specification (2.6.1.). These are used for arguments and other values not stored on the JVM stack. These variables are addressed using an index. Every 'slot' can contain values of each basic type. The type is defined by the access instruction (e.g. ILOAD, ISTORE for integer). These instructions are introduced by the java compiler (usually javac). The other group of variables are intended to replace the jvm stack and are created by the baseline parse/stackanalysis pass. In contrast to the javalocals these variables have a fixed typed. They are used as arguments and results for baseline IR instructions. For simplicity of the compiler2 IR both variables groups are treated the same way. Their current definitions are stored in a value numbering table. The number of variables is already known at this point for both types.

Definition at line 48 of file SSAConstructionPass.cpp.