diff options
author | Mael Cravero <mael.cravero@embecosm.com> | 2024-04-30 12:04:50 +0200 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2024-05-06 13:06:59 +0000 |
commit | 3a31617b48a4840b0aa90726333e4e7dedf1493b (patch) | |
tree | 7407e8f30b6308ab35f396c7e886c4537811c9b3 /gcc/rust/rust-gcc.cc | |
parent | 45d5c01fdba6e4c09a3ec4497b9be355bb2db106 (diff) | |
download | gcc-3a31617b48a4840b0aa90726333e4e7dedf1493b.zip gcc-3a31617b48a4840b0aa90726333e4e7dedf1493b.tar.gz gcc-3a31617b48a4840b0aa90726333e4e7dedf1493b.tar.bz2 |
Remove unnecessary SIDE_EFFECTS/READONLY macros
Closes #2357
gcc/rust/ChangeLog:
* rust-gcc.cc: remove unnecessary TREE_SIDE_EFFECTS and TREE_READONLY
macros used in arithmetic overflow checks.
Signed-off-by: Mael Cravero <mael.cravero@embecosm.com>
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r-- | gcc/rust/rust-gcc.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index f17e19a..6f547ee 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -1149,15 +1149,6 @@ fetch_overflow_builtins (ArithmeticOrLogicalOperator op) rust_assert (abort); rust_assert (builtin); - // FIXME: ARTHUR: This is really ugly. The builtin context should take care of - // that - TREE_SIDE_EFFECTS (abort) = 1; - TREE_READONLY (abort) = 0; - - // FIXME: ARTHUR: Same here. Remove these! - TREE_SIDE_EFFECTS (builtin) = 1; - TREE_READONLY (builtin) = 0; - return {abort, builtin}; } @@ -1192,10 +1183,6 @@ arithmetic_or_logical_expression_checked (ArithmeticOrLogicalOperator op, auto abort_call = build_call_expr_loc (location, abort, 0); - // FIXME: ARTHUR: Is that needed? - TREE_SIDE_EFFECTS (abort_call) = 1; - TREE_READONLY (abort_call) = 0; - auto builtin_call = build_call_expr_loc (location, builtin, 3, left, right, result_ref); auto overflow_check @@ -1205,10 +1192,6 @@ arithmetic_or_logical_expression_checked (ArithmeticOrLogicalOperator op, auto if_block = build3_loc (location, COND_EXPR, void_type_node, overflow_check, abort_call, NULL_TREE); - // FIXME: ARTHUR: Needed? - TREE_SIDE_EFFECTS (if_block) = 1; - TREE_READONLY (if_block) = 0; - return if_block; } |