Pages

Showing posts with label Einstein. Show all posts
Showing posts with label Einstein. Show all posts

Wednesday, August 10, 2011

On Compilers, Insanity, and Global Variables

According to Einstein, the definition of insanity goes something like the following: "doing the same thing over and over again and expecting different results." Compilers should always produce the same code given the same input. However, I have noticed something now as well as before. I rely on gcc's predicate function for telling my analysis if a variable I am looking at is "global" or not. I have started to notice that I can run the compile once and the variable is not global (which is how the source code defines it). Although I can run the same compile again, and the variable is global?! The compiler is making me second-guess my sanity. How is this possible? Well, I know there is performance data that gcc can generate, which as I can imagine, aside from timestamps, is really the only non-deterministic event in gcc. I am not sure if this insanity-cause is from the front-end or from the middle-end. I have md5 summed my plugin and it is the same with both the "compiler thinks its global" and the "compiler thinks its not global" case. Hmmmmmmmmmm...

-Matt

Monday, July 4, 2011

Yeeee hawww!

Happy 4th all of my American friends. I just want to say that I genuinely believe nationalism is a terrible concept. It encourages a separation of people, and competition. In fact, Albert Einstein, whom I admire in many aspects, was against nationalism. Sure, competition is not always bad, but as a society, we should look beyond our geographical differences. The internet has made us one giant pulsating organism. But, if you are in America, blow something up for me! :-)

-Matt