[hackers] [scc] [cc1] Add TODO in identity() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 6 Mar 2017 15:52:19 +0100 (CET)

commit ba6fc8e2c447455483d2c41241c4d03d85bbb5fb
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Mar 6 15:51:13 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Mar 6 15:51:13 2017 +0100

    [cc1] Add TODO in identity()
    
    It is desirable to trasform power n modulo operations to
    and operations. It cannot be done at this moment because
    we need a way to detect if a constant is a power of 2.

diff --git a/cc1/fold.c b/cc1/fold.c
index ba7635d..4960ca1 100644
--- a/cc1/fold.c
+++ b/cc1/fold.c
_AT_@ -590,6 +590,7 @@ identity(Node *np)
                 return NULL;
         case OMOD:
                 /* i % 1 => i,1 */
+ /* TODO: i % 2^n => i & n-1 */
                 if (isoner)
                         goto change_to_comma;
         default:
Received on Mon Mar 06 2017 - 15:52:19 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 06 2017 - 16:00:23 CET