News for hackers. Stuff that matters.
Re:54-line if condition in gcc's reload.c by userbinator on Wednesday July 02, 2014 @04:53AM (#7975858)
The rest of that file also has a ton of redundancies and verboseness its in logic that could be simplified considerably; e.g. I see this pattern a lot (428 ~ 435):

    x && y || !x && z
In this absence of side-effects, this basically implements a 2-input multiplexer and is identical to

    x ? y : z
In the 54-line condition the first obvious thing I'd factor out is SUBREG_REG(in) and GET_MODE(SUBREG_REG(in)), and then work out what else is duplicated from there. Here's my attempt at making this a little more readable. It's only 2 lines less, but this gets rid of all the repeated uppercase:

http://pastebin.com/9zpr7Cd5

Re:54-line if condition in gcc's reload.c by wfunction on Wednesday July 02, 2014 @06:31AM (#7976122)
The way it was for me was that I only "got" the hang of the ternary operator once I learned what a multiplexer is and how it's implemented. Before that, it was something I used now and then (certainly didn't have any trouble understanding it or anything like that), but I never thought about it as some way to channel data through based on a condition. I just always thought of it as some handy form of conditional evaluation. Things "clicked" a lot when I learned about how digital hardware and muxes works.
Re:54-line if condition in gcc's reload.c by chillingeffect on Wednesday July 02, 2014 @10:28AM (#7977150)
I find "inmp > msrirp;" way more readable than "inmpgtmsrirp".

The same goes for "GET_MODE_PRECISION(msrirp)" which was replaced with "msrirp."