From patchwork Mon Nov 26 12:09:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Remove redundant variable in hash_set Date: Mon, 26 Nov 2012 02:09:25 -0000 From: Marek Polacek X-Patchwork-Id: 201661 Message-Id: <20121126120925.GG17362@redhat.com> To: GCC Patches I don't see why we need the `hash' variable, when we can use the `regno' variable directly. Regtested/bootstrapped on x86_64-linux. Ok for trunk? 2012-11-26 Marek Polacek * cprop.c (hash_set): Remove hash variable. Use regno variable directly. Marek --- gcc/cprop.c.mp 2012-11-26 12:13:08.631193625 +0100 +++ gcc/cprop.c 2012-11-26 12:13:25.836238566 +0100 @@ -170,10 +170,7 @@ reg_available_p (const_rtx x, const_rtx static unsigned int hash_set (int regno, int hash_table_size) { - unsigned int hash; - - hash = regno; - return hash % hash_table_size; + return (unsigned) regno % hash_table_size; } /* Insert assignment DEST:=SET from INSN in the hash table.