Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Tools

Smart Compilers -- But Smart Enough?


Flashback: Fortran, Parallelism, and Optimizing Compilers

The emergence of multicore processors is only one of the challenges driving significant smartness advances in compiler technology, although the consensus of those we polled is that it is the most important. Reliability is another biggie; more about that later. In a sense, though, these challenges and the advances they are driving are nothing new.

It seems strange today to realize that the very idea of compiling code was once controversial. But the prevailing view some 50 years ago was that these automatic-programming gimmicks couldn't possibly be smart enough to do the job.

"To them," John Backus wrote in 1980—"them" being the people he called the priesthood of early computing—"it was obviously a foolish and arrogant dream to imagine that any mechanical process could possibly perform the mysterious feats of invention required to write an efficient program." ("Programming in America in the 1950s: Some Personal Impressions," in A History of Computing in the Twentieth Century, Metropolis, 1980.)

Although Grace Hopper is rightly credited as the inventor of the compiler, when John Backus and his team invented Fortran they challenged conventional wisdom on compilation, articulated the bottom-line case for compilers, and came up with many key compiler optimizations in use today, such as moving computations out of inner loops, dead code elimination, and using expected frequency of execution estimates to optimize register allocation.

But "our plans and efforts," he wrote, "were regarded with a mixture of indifference and scorn until the final checking out of the compiler..."

The scenario of processors hitting a speed limit and a solution being offered in the form of multiprocessor machines with parallel-savvy compilers is not new, either. That's what Illiac IV was all about, with its 256 processors and massive parallelism supported by several parallel-optimized Fortran compilers. In the late 1970s, for problems that could be parallelized, Illiac was the fastest computer in the world. It did have a little problem with reliability, which, as mentioned, is another big issue today.

From the earliest Fortran compilers, developers were working to make them smart, to take up more of the slack from programmers. Today, competition drives compilers toward more smarts. "A landmark in compiler technology," Reinders says, "was the global optimizer in GCC 4.0 [in 2005]. It marked the end of the era of 'nonoptimizing compilers.' Every compiler needs to be very complex to compete these days."

In 1986, one programmer summed up the contemporary view of compilers: "People still get great satisfaction out of the fact that a compiler...can't write code as well as a human being. But...I think that within the next five years we'll have tools that will be able to do as good a job as a human programmer." (Bill Gates, Programmers at Work, Microsoft Press, 1986.)


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.