From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: crosby@qwes.math.cmu.edu Cc: hubicka@atrey.karlin.mff.cuni.cz, egcs@cygnus.com Subject: Re: Benchmark suite... Date: Wed, 04 Nov 1998 23:31:00 -0000 Message-id: <199811050731.HAA25613@phal.cygnus.co.uk> References: X-SW-Source: 1998-11/msg00203.html > Another micro-benchmark to measure how well the compiler performs register > assignment: > > // Test register assignment, passing reg_assignXX an array of XX values. > reg_assign1_8(int *a, int *b) > b[0] = 1*a[1] + 2*a[2] + 3*a[3] + 4*a[4] .... 7*a[7]; > b[1] = 0*a[0] + 1*a[2] + 2*a[3] .... 6*a[7]; > .. > .. > b[7] = 0*a[0] + ... + 1*a[7]; > } > > Here, the constants in the right hand sides were chosen so that a simple > CSE would not work well on them, so this would test how well the compiler > performs register assignment.. (It could also test a much more advanced > CSE that could simplify this.) Again, a list of functons reg_assign1_16(), > reg_assign1_32(), are created... This does not work. a and b can be aliased.