mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-12 11:28:35 +00:00
8183271: VectorizeDebug compiler directive command is broken
Add parser support for uint Reviewed-by: kvn, thartmann
This commit is contained in:
parent
340108f92b
commit
5bd24e0c25
@ -64,7 +64,7 @@ NOT_PRODUCT(cflags(TraceOptoPipelining, bool, TraceOptoPipelining, TraceOptoPipe
|
||||
NOT_PRODUCT(cflags(TraceOptoOutput, bool, TraceOptoOutput, TraceOptoOutput)) \
|
||||
cflags(TraceSpilling, bool, TraceSpilling, TraceSpilling) \
|
||||
cflags(Vectorize, bool, false, Vectorize) \
|
||||
cflags(VectorizeDebug, uintx, 0, VectorizeDebug) \
|
||||
cflags(VectorizeDebug, uintx, 0, VectorizeDebug) \
|
||||
cflags(CloneMapDebug, bool, false, CloneMapDebug) \
|
||||
cflags(IGVPrintLevel, intx, PrintIdealGraphLevel, IGVPrintLevel) \
|
||||
cflags(MaxNodeLimit, intx, MaxNodeLimit, MaxNodeLimit)
|
||||
|
||||
@ -283,17 +283,18 @@ bool DirectivesParser::set_option_flag(JSON_TYPE t, JSON_VAL* v, const key* opti
|
||||
break;
|
||||
|
||||
case JSON_NUMBER_INT:
|
||||
if (option_key->flag_type != intxFlag) {
|
||||
if (option_key->flag_type == doubleFlag) {
|
||||
double dval = (double)v->int_value;
|
||||
(set->*test)((void *)&dval);
|
||||
break;
|
||||
}
|
||||
error(VALUE_ERROR, "Cannot use int value for an %s flag", flag_type_names[option_key->flag_type]);
|
||||
return false;
|
||||
} else {
|
||||
if (option_key->flag_type == intxFlag) {
|
||||
intx ival = v->int_value;
|
||||
(set->*test)((void *)&ival);
|
||||
} else if (option_key->flag_type == uintxFlag) {
|
||||
uintx ival = v->uint_value;
|
||||
(set->*test)((void *)&ival);
|
||||
} else if (option_key->flag_type == doubleFlag) {
|
||||
double dval = (double)v->int_value;
|
||||
(set->*test)((void *)&dval);
|
||||
} else {
|
||||
error(VALUE_ERROR, "Cannot use int value for an %s flag", flag_type_names[option_key->flag_type]);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -627,6 +628,8 @@ void DirectivesParser::test() {
|
||||
" match: \"foo/bar.*\"," "\n"
|
||||
" c2: {" "\n"
|
||||
" PrintInlining: false," "\n"
|
||||
" VectorizeDebug: 1," "\n"
|
||||
" VectorizeDebug: -1," "\n"
|
||||
" }" "\n"
|
||||
" }" "\n"
|
||||
"]" "\n", true);
|
||||
|
||||
@ -52,6 +52,7 @@ class JSON : public ResourceObj {
|
||||
|
||||
typedef union {
|
||||
int64_t int_value;
|
||||
uint64_t uint_value;
|
||||
double double_value;
|
||||
|
||||
struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user