8322759: Eliminate -Wparentheses warnings in compiler code
Reviewed-by: kvn, shade
This commit is contained in:
parent
8a4dc79e1a
commit
ca9635df33
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1315,8 +1315,8 @@ void GraphBuilder::if_node(Value x, If::Condition cond, Value y, ValueStack* sta
|
||||
Instruction *i = append(new If(x, cond, false, y, tsux, fsux, (is_bb || compilation()->is_optimistic()) ? state_before : nullptr, is_bb));
|
||||
|
||||
assert(i->as_Goto() == nullptr ||
|
||||
(i->as_Goto()->sux_at(0) == tsux && i->as_Goto()->is_safepoint() == tsux->bci() < stream()->cur_bci()) ||
|
||||
(i->as_Goto()->sux_at(0) == fsux && i->as_Goto()->is_safepoint() == fsux->bci() < stream()->cur_bci()),
|
||||
(i->as_Goto()->sux_at(0) == tsux && i->as_Goto()->is_safepoint() == (tsux->bci() < stream()->cur_bci())) ||
|
||||
(i->as_Goto()->sux_at(0) == fsux && i->as_Goto()->is_safepoint() == (fsux->bci() < stream()->cur_bci())),
|
||||
"safepoint state of Goto returned by canonicalizer incorrect");
|
||||
|
||||
if (is_profiling()) {
|
||||
@ -1451,7 +1451,7 @@ void GraphBuilder::table_switch() {
|
||||
if (res->as_Goto()) {
|
||||
for (i = 0; i < l; i++) {
|
||||
if (sux->at(i) == res->as_Goto()->sux_at(0)) {
|
||||
assert(res->as_Goto()->is_safepoint() == sw.dest_offset_at(i) < 0, "safepoint state of Goto returned by canonicalizer incorrect");
|
||||
assert(res->as_Goto()->is_safepoint() == (sw.dest_offset_at(i) < 0), "safepoint state of Goto returned by canonicalizer incorrect");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1500,7 +1500,7 @@ void GraphBuilder::lookup_switch() {
|
||||
if (res->as_Goto()) {
|
||||
for (i = 0; i < l; i++) {
|
||||
if (sux->at(i) == res->as_Goto()->sux_at(0)) {
|
||||
assert(res->as_Goto()->is_safepoint() == sw.pair_at(i).offset() < 0, "safepoint state of Goto returned by canonicalizer incorrect");
|
||||
assert(res->as_Goto()->is_safepoint() == (sw.pair_at(i).offset() < 0), "safepoint state of Goto returned by canonicalizer incorrect");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -4857,8 +4857,8 @@ void IntervalWalker::next_interval() {
|
||||
// intervals may start at same position -> prefer fixed interval
|
||||
kind = fixed != Interval::end() && fixed->from() <= any->from() ? fixedKind : anyKind;
|
||||
|
||||
assert (kind == fixedKind && fixed->from() <= any->from() ||
|
||||
kind == anyKind && any->from() <= fixed->from(), "wrong interval!!!");
|
||||
assert((kind == fixedKind && fixed->from() <= any->from()) ||
|
||||
(kind == anyKind && any->from() <= fixed->from()), "wrong interval!!!");
|
||||
assert(any == Interval::end() || fixed == Interval::end() || any->from() != fixed->from() || kind == fixedKind, "if fixed and any-Interval start at same position, fixed must be processed first");
|
||||
|
||||
} else if (fixed != Interval::end()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -60,7 +60,7 @@ class ValueStack: public CompilationResourceObj {
|
||||
Values* _locks; // the monitor stack (holding the locked values)
|
||||
|
||||
Value check(ValueTag tag, Value t) {
|
||||
assert(tag == t->type()->tag() || tag == objectTag && t->type()->tag() == addressTag, "types must correspond");
|
||||
assert(tag == t->type()->tag() || (tag == objectTag && t->type()->tag() == addressTag), "types must correspond");
|
||||
return t;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -150,8 +150,8 @@ void RelocIterator::initialize(CompiledMethod* nm, address begin, address limit)
|
||||
|
||||
RelocIterator::RelocIterator(CodeSection* cs, address begin, address limit) {
|
||||
initialize_misc();
|
||||
assert((cs->locs_start() != nullptr) && (cs->locs_end() != nullptr) ||
|
||||
(cs->locs_start() == nullptr) && (cs->locs_end() == nullptr), "valid start and end pointer");
|
||||
assert(((cs->locs_start() != nullptr) && (cs->locs_end() != nullptr)) ||
|
||||
((cs->locs_start() == nullptr) && (cs->locs_end() == nullptr)), "valid start and end pointer");
|
||||
_current = cs->locs_start()-1;
|
||||
_end = cs->locs_end();
|
||||
_addr = cs->start();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,7 +57,7 @@ inline bool CompilerConfig::is_c1_only() {
|
||||
}
|
||||
|
||||
inline bool CompilerConfig::is_c1_or_interpreter_only_no_jvmci() {
|
||||
assert(is_jvmci_compiler() && is_jvmci() || !is_jvmci_compiler(), "JVMCI compiler implies enabled JVMCI");
|
||||
assert(!is_jvmci_compiler() || is_jvmci(), "JVMCI compiler implies enabled JVMCI");
|
||||
return !is_jvmci() && (is_interpreter_only() || is_c1_only());
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ inline bool CompilerConfig::is_c2_or_jvmci_compiler_only() {
|
||||
|
||||
// Tiered is basically C1 & (C2 | JVMCI) minus all the odd cases with restrictions.
|
||||
inline bool CompilerConfig::is_tiered() {
|
||||
assert(is_c1_simple_only() && is_c1_only() || !is_c1_simple_only(), "c1 simple mode must imply c1-only mode");
|
||||
assert(!is_c1_simple_only() || is_c1_only(), "c1 simple mode must imply c1-only mode");
|
||||
return has_tiered() && !is_interpreter_only() && !is_c1_only() && !is_c2_or_jvmci_compiler_only();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user