From f3ca2577372eaae7056db24982abfc54be8f4cc1 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Fri, 14 Mar 2025 13:09:21 +0100 Subject: gvn/gcm review - Many stylistic nits. - Removed blkmerge(). - Some minor bug fixes. - GCM reassoc is now "sink"; a pass that moves trivial ops in their target block with the same goal of reducing register pressure, but starting from instructions that benefit from having their inputs close. --- ops.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'ops.h') diff --git a/ops.h b/ops.h index 00d62a0..80b0d9b 100644 --- a/ops.h +++ b/ops.h @@ -7,7 +7,7 @@ #endif #ifndef F -#define F(CanFold, HasId, IdVal, Commutes, Associates, Idemp, IsCmpEq, IsCmpLgte, CmpEqVal, IsPinned) +#define F(a,b,c,d,e,f,g,h,i,j) #endif #define T(a,b,c,d,e,f,g,h) { \ @@ -19,7 +19,17 @@ /* PUBLIC OPERATIONS */ /*********************/ -/* Arithmetic and Bits */ +/* can fold */ +/* | has identity */ +/* | | identity value for arg[1] */ +/* | | | commutative */ +/* | | | | associative */ +/* | | | | | idempotent */ +/* | | | | | | c{eq,ne}[wl] */ +/* | | | | | | | c[us][gl][et][wl] */ +/* | | | | | | | | value if = args */ +/* | | | | | | | | | pinned */ +/* Arithmetic and Bits v v v v v v v v v v */ O(add, T(w,l,s,d, w,l,s,d), F(1,1,0,1,1,0,0,0,0,0)) X(2,1,0) V(1) O(sub, T(w,l,s,d, w,l,s,d), F(1,1,0,0,0,0,0,0,0,0)) X(2,1,0) V(0) O(neg, T(w,l,s,d, x,x,x,x), F(1,0,0,0,0,0,0,0,0,0)) X(1,1,0) V(0) -- cgit v1.2.3