Wednesday, September 21, 2011

Women at Work


Ada Lovelace - World's First Programmer

Grace Hopper - World's First compiler developer

Just women :)

Thursday, August 18, 2011

Itanium Compiler - Perennial Wishlist


Knuth's interview: http://www.informit.com/articles/article.aspx?p=1193856


Donald: I don’t want to duck your question entirely. I might as well flame a bit about my personal unhappiness with the current trend toward multicore architecture. To me, it looks more or less like the hardware designers have run out of ideas, and that they’re trying to pass the blame for the future demise of Moore’s Law to the software writers by giving us machines that work faster only on a few key benchmarks! I won’t be surprised at all if the whole multithreading idea turns out to be a flop, worse than the "Itanium" approach that was supposed to be so terrific—until it turned out that the wished-for compilers were basically impossible to write.

Monday, August 8, 2011

Monday, July 18, 2011

GCC missing obvious optimizations on x86

         Give up on pushing CC_OPTIMIZE_FOR_SIZE
I still happen to believe that I$ miss costs are a major thing, but
sadly, -Os doesn't seem to be the solution. With or without it, gcc
will miss some obvious code size improvements, and with it enabled gcc
will sometimes make choices that aren't good even with high I$ miss
ratios.

For example, with -Os, gcc on x86 will turn a 20-byte constant memcpy
into a "rep movsl". While I sincerely hope that x86 CPU's will some day
do a good job at that, they certainly don't do it yet, and the cost is
higher than a L1 I$ miss would be.

Some day I hope we can re-enable this.

Signed-off-by: Linus Torvalds


Reference:  Linux Kernel GIT

Monday, May 2, 2011

iBurg

Grandpa code generator-generator in LCC


Linker Scripts VMA vs LMA


VMA is virtual memory address while LMA is load memory address. If both are not equal, which one of the addresses does linker consider while resolving symbols' addresses?

Let us consider a simple program test.c:

int i=10;
int main() {
return i++;
}

After compiling it to ELF-executable, dump the output sections. (I am compiling for AVR target using avr-gcc)

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000040  00000000  00000000  00000074  2**1
                    CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000002  00800060  00000040  000000b4  2**0
                     CONTENTS, ALLOC, LOAD, DATA

Notice the values in bold. VMA and LMA of .data section differ? Since 'i' is the only variable, what address will 'i' have? VMA or LMA ? When the text section is disassembled, what will be the address of memory accessed by instructions to read and write the value of variable 'i'?


Reference for linker script file:  Linker Script Documentation

Friday, March 25, 2011

Relocations - I

Link-Time/Load-Time/Run-Time Relocations vs Software and Hardware Relocations vs Linkers and Loaders.

I am in a zombie state.

Thursday, March 10, 2011

The case for Reduced Instruction Set Computer

This wonderful newsletter in SIGARCH(1980) by Patterson et.al explains the origins of RISC architectures in much simpler terms.



Particularly sections- 'irrational implementations' and 'Supporting HLLCS' accompanied by footnotes laid a strong case even though (I admit that) the argument against CISC seems a little incomplete without sound proof but then it is just a newsletter. Wish I read it 3 years ago :-(

Reference: http://portal.acm.org/citation.cfm?doid=641914.641917

Wednesday, March 9, 2011

Whole Program Analysis (WHOPR)



Google is after link time optimization - in big leaps.

Reference: http://gcc.gnu.org/projects/lto/whopr.pdf

Thursday, March 3, 2011

Kleene-Rosser Paradox

I wish I can understand what exactly is paradoxical in this...

What if a function negates itself? However much I try I am simply unable to do away with my C-language perspective.

An alternate solution is to re-interpret lambda calculus not as a theory of logical assertions, but rather as a means of expressing computation. In this way, the paradox can be "solved" by reinterpreting it as a recursive statement, that is, the infinite recursion implying

Time to realize that functional languages very much exist.

Wednesday, March 2, 2011

Evolution of Compilers



Citation : Evolution of Compilers, Priti Shankar, Resonance, August 2007.