public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Revert "Ensure we set TREE_SIDE_EFFECTS on call expressions"
@ 2022-08-12  9:23 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-08-12  9:23 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2f15ae7493579ac55d2a1e11ece43abaf4e1bc06

commit 2f15ae7493579ac55d2a1e11ece43abaf4e1bc06
Author: Philip Herron <philip.herron@embecosm.com>
Date:   Thu Aug 11 16:15:35 2022 +0100

    Revert "Ensure we set TREE_SIDE_EFFECTS on call expressions"
    
    This reverts commit f891a13aa2af912584176d2c595c295b77ff5ff9. This fix
    ensures the code is added to the block but still as the artifical function
    is marked READONLY it ends up being optimized out anyway.

Diff:
---
 gcc/rust/rust-gcc.cc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index c8eee0f4684..66fd8bce84e 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -1840,9 +1840,6 @@ Gcc_backend::call_expression (tree fn, const std::vector<tree> &fn_args,
       ret = build1_loc (location.gcc_location (), NOP_EXPR, rettype, ret);
     }
 
-  if (!TREE_SIDE_EFFECTS (ret))
-    TREE_SIDE_EFFECTS (ret) = TREE_SIDE_EFFECTS (fndecl);
-
   delete[] args;
   return ret;
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-12  9:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-12  9:23 [gcc/devel/rust/master] Revert "Ensure we set TREE_SIDE_EFFECTS on call expressions" Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).