A wild #blog post appears!

Let's study the #LLVM and #GCC optimizers around the question of increments and decrements and see how they differ. Then we can make a decision as to whether or not we want to teach those optimizations to our #QBE optimizer we've been working on.

https://briancallahan.net/blog/20220417.html

#compile #compilers #optimizer #optimizers #compile #optimize #unix #c #programming #program #bsd #openbsd #freebsd #netbsd #dragonflybsd #linux #cproc

Brian Robert Callahan

@bcallah are you aware of gcc's -dall flag, that will dump the rtl at each stage? You might be able to spot when it's making the change.
@penguin42 Is that different than the -da flag?
@bcallah No, you're right, it is -da - I imagined the ll 🙂
@penguin42 Then yes, I do :)
But! I'm glad you brought it up. I debated whether or not to read through some RTL but ultimately decided against it because I like writing to a level where true newbies won't get so lost they'll give up reading. But at some point I will have to ramp it up.
@bcallah Yeh it would be kind of interesting to see what stage makes the decision.

@penguin42 It seems my GCC doesn't understand -dall:

/home/brian $ gcc -dall -S inc.c
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: l

(But it does understand -da, which is what I normally use to dump RTL.)