Development
GCC gets a new Optimizer Framework
Earlier this week, the first bits a major compiler internals overhaul have been merged into the development mainline of the GNU Compiler Collection (GCC) for inclusion in the next release.GCC is used as the system compiler for GNU/Linux and many other operating systems. The system compiler is one of the components of an operating system that has a massive impact on the performance of the system as a whole. From the kernel to productivity applications, from the C library to even the compiler itself, almost all executable binaries are compiled with the system compiler, so it has to be stable and produce good code. It is therefore not surprising that major changes to the internals of a stable compiler almost never happen. But computer architectures change, so at some point an aging compiler will have to undergo big surgery or risk becoming irrelevant. And GCC is aging.
While GCC produces reasonably good code for a large number of architectures, even its most recent version essentially builds on the compiler framework started by Richard Stallman in the early 1980's. In this framework, code improving transformations are performed on an intermediate representation called Register Transfer Language (RTL), an architecture independent, lisp-like assembly language. Older versions of GCC used this framework mostly for local optimizations, but such limited optimizations are insufficient for modern architectures with RISC-like properties and a significant difference between the speed of the chip and of memory access.
So, with the release of GCC 3.0, a number of global optimizations acting on RTL were introduced. Unfortunately, for many code transformations, RTL is not a suitable and effective representation because it is too close to the actual machine language. This hinders several of the high-level analyses performed by modern compilers. It has become more and more obvious that a new, high-level intermediate representation needs to be added to GCC. The Tree SSA project has been started to address this need.
The goal of the Tree SSA project is to build a completely machine-independent optimization framework based on the Static Single Assignment (SSA) form. SSA is an intermediate representation (IR) that is becoming increasingly popular because it allows efficient implementations of data flow analysis and optimizing transformations.
In SSA form, every temporary variable is only assigned a value once. Actual programs are seldom in SSA form initially, because variables tend to be assigned multiple times, not just once. An SSA-based compiler modifies the program representation so that every time a variable is assigned in the original program, a new version of the variable is created. Different versions of the same variable are distinguished by subscripting the variable name with its version number.
Variables used in the right-hand side of expressions are renamed so that their version number matches that of the most recent assignment. It is not always possible to statically determine what is the most recent assignment for a given use. These ambiguities are the result of branches and loops in the program's flow of control. To solve them, the SSA form introduces a new type of operation called PHI functions, these merge multiple incoming assignments to generate a new definition; they are placed at points in the program where the flow of control causes more than one assignment to be available.
![]() |
![]() |
Figure 1 | Figure 2 |
For example, consider the code fragment in Figure 1, where it may not be known at compile time which of the branches will execute. The USE-DEF chains for 'x' are drawn in the figure. In the second 'switch', the compiler has to assume that any of the assignments to 'x' in the first switch may have been executed. In this case, the SSA conversion process will introduce a PHI function for 'x' to create the needed unique definition, as shown in figure 2.
Notice that PHI functions are an artifact used internally by the SSA form and are never emitted in the final code. The PHI function that defines 'x_4' in the previous example simply means that 'x_4' can take the value of 'x_1', 'x_2', or 'x_3' at run time.
Once the program is in SSA form, flow of control and USE-DEF chains are explicitly represented in the intermediate representation, giving almost instantaneous information to passes like constant propagation and folding. The properties of the SSA form greatly simplify data flow analysis, and indeed many traditional compiler optimizations, such as constant and copy propagation and also some forms of common subexpression elimination, are relatively straightforward and fast on functions and even whole programs represented in SSA form.
Before work on these optimizations could start, a whole new optimization framework had to be implemented:
- A new intermediate representation. GCC already constructed each function as an abstract syntax tree (AST), but there was no single AST representation in GCC. Instead, each language defined its own trees which were translated piecewise to RTL and then optimized in the old framework. With Tree SSA, two new language independent representations have been added to resolve this issue.
- Analyses for rewriting the GIMPLE representation in SSA form. In the old framework, no optimizations were performed on the AST. This meant that there was no need for a control flow graph, or for data flow analysis to be performed. All of this is now necessary before a representation can be rewritten into SSA form.
- Passes for performing the actual code optimizations. Passes that have already been implemented include sparse conditional constant propagation, partial redundancy elimination, dead code and dead store elimination, and scalar replacement of aggregates. Also, a lot of dominator tree based optimizations and some conditional execution conversions have been implemented. Many of these passes replace equivalent passes that work on RTL.
All the language front-ends now emit a very high-level IR called GENERIC. Each function is handed over to the language independent parts of the compiler as a tree in GENERIC form. Next, this tree is lowered to GIMPLE form, another new IR derived from the SIMPLE representation proposed by the McCAT project out of McGill University.
The GIMPLE representation looks like three-address code. All side effects are explicit so that a function in GIMPLE form is ready for analysis. Most of the existing front-ends have been modified to emit GENERIC so that they can be optimized using Tree SSA. The next release will also include a Fortran 95 front-end, which is the first front-end built directly to emit GENERIC.
To avoid unnecessary code duplication, a lot of effort was spent on rewriting the old framework so that it was possible to share many of the basic control flow graph manipulations between the old and the new framework. Data flow analyses had to be implemented from scratch.
One particularly interesting analysis is alias analysis. GCC now implements several types of alias analysis: type-based flow-insensitive analysis, flow-insensitive points-to analysis, and flow-sensitive points-to analysis. Most analyses are currently intra-procedural, although some inter-procedural analyses are partially implemented or planned.
All the new parts together account for about 100,000 lines of new code, not including the many changes to existing parts of the compiler. The framework implemented as part of the Tree SSA project adds a whole new path to the compilation process, while no RTL passes have been disabled yet.
Still, a compiler with the Tree SSA passes enabled is not significantly slower than the recently released GCC 3.4.0, and a number of very expensive passes in the RTL framework have already been subsumed by Tree SSA passes. Once these RTL passes have been disabled and removed, the resulting compiler will be a lot faster than GCC 3.4.0, while the generated code is at least as good, and often better.
System Applications
Audio Projects
Planet CCRMA Changes
The latest changes from the Planet CCRMA audio utility packaging project include new versions of Ecasound, Seq24, Libfishsound, and Aeolus.
Database Software
SQL Database Access with DBTags (O'ReillyNet)
Deepak Vohra explains the use of Jakarta DBTags on O'Reilly. "Jakarta DBTags is a custom tag library that consists of tags to access and modify a database. This tutorial explains the procedure to incorporate Apache Jakarta DBTags custom tag library tags in an example JSP."
PostgreSQL Weekly News
The May 11, 2004 edition of the PostgreSQL Weekly News is out with several new PostgreSQL database articles.
Interoperability
New stable Samba releases
The Samba project has announced the release of Samba 3.0.4. This is the version that production Samba servers should be running. Samba 2.2.9 is also out.
Libraries
libxml++ 2.6.1 (stable) released
Version 2.6.1 of libxml++, a C++ wrapper for the libxml XML parser library, is out."This release fixes 2 annoying bugs found in libxml++ 2.6.0."
libxml++ 1.0.3 (stable) released
Version 1.0.3 of libxml++, a C++ wrapper for the libxml XML parser library, is available and features bug fixes.
Mail Software
Milter.org announcements
The milter.org mail filtering site lists new versions of SPF Milter and milter-spamc.
Medical Software
FreeMED 0.7.0 Beta 4 Released (LinuxMedNews)
Version 0.7.0 Beta 4 of FreeMED, an open source medical practice management and electronic and computer records system, has been announced. "This release consists mostly of packaging fixes and user contributed bugfixes, as well as more specialized reports. All users who are currently testing the 0.7.0 beta series should upgrade to this release."
Printing
LinuxPrinting.org changes
The LinuxPrinting.org site mentions the availability of new from Kyocera PPD files.LPRng-3.8.27 released
Version 3.8.27 of the LPRng printing system is available. Change information is in the source code.
Web Site Development
Bricolage 1.8.0 Arrives (use Perl)
Version 1.8.0 of Bricolage, a Perl-based content management and publishing system, has been announced. "Version 1.8.0 represents a significant new pinnacle for the much-lauded open source content management and publishing system. This release offers more new features, improvements, and performance gains than any previous release."
CPS 3.1.0 (development branch) has been released today.
Development version 3.1.0 of CPS, a collaborative Web content management system, is out. "CPS 3.1.0 (development branch) is an intermediate release that takes place in the development process of the future stable release of CPS3, which will be CPS 3.2.0 (stable branch). It is fairly stable, and most of the products are currently used in production, but, except for unit tests which are usually written along the code, it has not received yet a thourough QA process. Some API may also change until CPS 3.2."
mnoGoSearch-php-3.2.5 is out
Version 3.2.5 of mnoGoSearch-php, the PHP front-end to the mnoGoSearch-php web site search engine, is available. See the ChangeLog for more information.Also, version 1.88 of mnoGoSearch-php-extension has been released.
OpenPSA 1.9.0 Released
Version 1.9.0 of OpenPSA is available. "Nemein has released the first Open Source licensed version of the OpenPSA suite. OpenPSA is a management software package for consultancies including project tracking, CRM, help desk, group calendaring and document management functionalities."
SC-Track Roundup 0.7 available
Version 0.7 of the Roundup, an Issue-Tracking System for Knowledge Workers with command-line, web, and e-mail interfaces, is available. This version adds a lot of new features.TBNL toolkit announced
The TBNL toolkit project has been announced. "TBNL is a new "toolkit for building dynamic websites with Common Lisp" by Edi Weitz. It is based on Apache for HTTP communication between the server and the browser, and mod_lisp for communication between the server and Lisp."
UnCommon Web 0.2.1 released
Version 0.2.1 of UnCommon Web, a common Lisp-based web application development framework, is out. "The new features in this version are component threads, improved error handling and application administration, improved TAL environments."
ZopeMag Weekly News
Issue #30 of the ZopeMag Weekly News is available with another collection of Zope related articles.
Miscellaneous
Ganymede 1.0.12 archive fixed
The recently released version 1.0.12 of the Ganymede metadirectory system had installation problems. The version has been re-released.
Desktop Applications
Audio Applications
Audacity 1.2.1 released
Version 1.2.1 of Audacity is available. "Audacity 1.2.1 is a new stable version of the free Audacity sound editor. This release fixes several minor bugs that were found in Audacity 1.2.0. It also includes several new and updated translations."
Ecasound 2.3.3 released
Version 2.3.3 of Ecasound, an audio processing utility, is out. This is the first stable release for 2004, numerous bugs have been fixed.Muine 0.6.1 released
Version 0.6.1 of Muine, a GUI-based music player, is out. "This release mainly includes a workaround for a Mono bug that caused compilation problems with 0.6.0 for many people. Upgrade to 0.6.1 if 0.6.0 didn't compile for you." Version 0.6.0 featured some performance improvements.
WaveSurfer 1.6.4 released
Version 1.6.4 of WaveSurfer, a sound visualization and manipulation tool, is out. The changes include a new chooser dialog, file splitting by transcriptions, updated demos, bug fixes, and more.
Desktop Environments
GDM 2.6.0.2 stable is out
Version 2.6.0.2 stable of GDM, the GNOME Display Manager, is out. "This release has some major bugfixes especially some long pending PAM fixes and basically I integrated a bunch of patches from bugzilla. Also the IPv6 support is now off by default since it's still not as reliable as the IPv4 code, and really, if you need IPv6 for your private lab of X terminals, there is something wrong with your head."
Metacity 2.8.1 released
Version 2.8.1 of Metacity, a window manager for GNOME 2, is out with bug fixes and improved translations.Bag of Software (GnomeDesktop)
GnomeDesktop.org mentions the release of new versions of three GNOME applications. "New releases of Passpartout, the GNOME CPUFreq Applet and Notify are now available."
KDE 3.3 Release to Coincide with KDE Community World Summit (KDE.News)
A new release of KDE is being planned. "Developers should make sure to get the stuff listed they plan to have ready for 3.3 in the planned-features document as soon as possible. KDE 3.3 Alpha is prepared around May 23rd and June 1st will see the first freeze (excluding outstanding listed features and i18n strings) kicking in."
KDE-CVS-Digest (KDE.News)
The May 7, 2004 KDE-CVS-Digest is out, here's the content summary: "KMail adds filter for attachments and Evolution import. KDE has a new configuration creator and editor. Work continues on Quanta PHP debugger, KJSEmbed with more examples, KDevelop documentation browser, Kexi query designer and much more."
Tutorial: Write your own KFile Plugins (KDE.News)
KDE.News points to a tutorial on KFile plugins. "For those not familiar, a KFile plugin is the meta-data magic that powers the "MetaInfo" tab when you display the properties of a file, and the Info List View in Konqueror. It's easy to write one, and there are a lot of file formats we don't have support for yet. This is a fun way to get into KDE development!"
Electronics
XCircuit 3.2.16 released
Version 3.2.16 of XCircuit, an electronic schematic drawing program, is out. Here are the changes for this version: "Autoconf fix for Solaris, to handle the gcc compiler with the non-gcc linker. Created local version of strdup() to do its allocation through Tcl_Alloc(). Modified the library manager "library import" routine to load any library instances of an object in addition to the object itself. Added the ability to ignore a specific element when selecting."
Financial Applications
SQL-Ledger 2.2.7 released
Version 2.2.7 of SQL-Ledger, a web-based accounting system, is out. The changes include a revised reconciliation screen, a new reconciliation report capability, a new backup routine, and more.
Games
WorldForge Weekly News
The May 7, 2004 edition of the WorldForge Weekly News is out with the latest WorldForge game project developments.
Graphics
An Introduction to GraphViz and dot (O'Reilly)
Michele Simionato explores dot and GraphViz on O'Reilly. "First of all, let me make clear that dot is not just another paint program, nor a vector graphics program. dot is a scriptable, batch-oriented graphing tool; it is to vector drawing programs as LaTeX is to word processors. If you want to control every single pixel in your diagram, or if you are an artistic person who likes to draw free hand, then dot is not for you. dot is a tool for the lazy developer, the one who wants the job done with the minimum effort and without caring too much about the details."
GIMP Animation Package version 2.0.2 Released
Version 2.0.2 of gimp-gap is out. "gimp-gap 2.0.2 is a bug-fix release of the GIMP Animation Package. If you had problems to use GAP with GIMP 2.0.1, please upgrade to this version."
GUI Packages
vtkFLTK 0.4.5 released
Version 0.4.5 of vtkFLTK, a C++ class library for interfacing with VTK, has been announced. "The 0.4.5 release of vtkFLTK eliminates annoying improper redrawing of sibling widgets upon parent resize. This was the last of the known runtime bugs experienced with vtkFLTK and represents a major milestone for the quality of the library."
Interoperability
Wine 20040505 released
Version 20040505 of Wine has been announced. Changes include filesystem improvements, drive autodetection, Direct3D improvements, sound driver fixes, and other bug fixes.
Music Applications
galan 0.3.0-beta6 released
Version 0.3.0-beta6 of galan, The Graphical Audio Language, has been released. "This release has vst(i) support through libfst. So if you ever wanted to wire up networks of vst plugins and instruments, you can do this now."
jMax 4.1.0 released (SourceForge)
Version 4.1.0 of jMax is available. "jMax is a visual programming environment for building interactive real-time musical and multimedia applications. This release is the first release with ASIO support for Windows. There is also a lot of bug fixes."
Office Suites
OpenOffice.org build 1.1.55 is out
Build 1.1.55 of OpenOffice.org is available. "This package contains the desktop integration work for OpenOffice.org, and a much simplified build wrapper, making an OO.o build / install possible for the common man. It is a staging ground for up-streaming patches to OO.o."
PDA Software
Guikachu 1.4.0 released
Version 1.4.0 Guikachu, the premiere solution for creating PalmOS resource files on UNIX operating systems, is out. This release has many new features and improvements.
Web Browsers
Mozilla 1.4.2 Released (MozillaZine)
Stable version 1.4.2 of the Mozilla browser has been announced. "This latest release from the 1.4 branch features only bug fixes (no new features) and will be mainly of interest to developers building products from the stable branch. Most end-users will want Mozilla 1.6 or the upcoming Mozilla 1.7."
mozilla.org Status Update (MozillaZine)
The May 3, 2004 edition of the Mozilla.org Status Update has been announced. "It includes news on Mozilla 1.7 Release Candidate 1, Mozilla Thunderbird 0.6, Camino, the default build configuration, Mozilla Firefox and Mozilla Thunderbird extensions, the Mozilla newsgroups, the RDF module, newsgroup filters, Find in This Page , FTP upload, the UIEvent interface, junk mail controls, phishing, XPI software installation, cookies and more."
Minutes of the mozilla.org Staff Meeting (MozillaZine)
The minutes of the April 26, 2004 Mozilla.org staff meeting are available. "Issues discussed include Mozilla 1.7 final and Mozilla Thunderbird 0.6."
Miscellaneous
gi8k 1.2.2 released
Version 1.2.2 of gi8k is out with minor bug fixes. "gi8k is a small Gnome applet that reads the CPU temperature and fan speeds on Dell laptops. It also allows direct control over the fans by simply clicking on the applet."
HylaFAX/libtiff incompatibility
Users of the HylaFAX fax modem software who have libtiff 3.6.1 should be sure to apply this patch, which fixes an incompatibility problem.Quanta 3.3 BE 2 Released (KDE.News)
Version 3.3 BE (Bleeding Edge) 2 of Quanta, a web development tool for the K Desktop Environment, has been announced. "The Quanta team has just released the first Bleeding Edge technology preview of Quanta from the new kdewebdev module. This includes KMDI, CSS enhancements, a new link checker, imagemap editor and a new embedded PHP debugging interface".
Languages and Tools
Assembly Language
Why Learning Assembly Language Is Still a Good Idea (O'Reilly)
Randall Hyde talks about code efficiency and assembly language skills on O'Reilly. "Because greatness is a multifaceted attribute, a short article such as this one cannot begin to describe all the possible components of a great piece of software. Instead, this article will describe one component of writing great code that has been neglected in recent years as computer systems have increased in capacity and power: efficiency."
C++
Use shared objects on Linux
Sachin O. Agrawal explains shared objects on IBM's developerWorks. "Making the most of shared memory isn't always easy. In this article, IBM's Sachin Agrawal shares his expertise in C++, showing how the object-oriented among us can take key advantage of a uniquely useful interprocess communications channel."
Java
XDoclet v1.2.1 released (SourceForge)
Version 1.2.1 of XDoclet, a java code generator, is available. "v1.2.1 is mainly a bug fix release, plus a couple of new modules have been added to support the Spring framework and OpenEJB application server."
Perl
This Week on perl5-porters (use Perl)
The May 3-9, 2004 edition of This Week on perl5-porters is available. "On the menu of the P5P summary this week, you will find language constructions, segmentation faults, proposals for new tied methods, pronunciation issues, and (in fine) a few bugs."
This Week on Perl 6
The May 07, 2004 edition of This Week on Perl 6 is available with the latest Perl 6 discussion topics.Building Testing Libraries (O'Reilly)
Casey West covers Perl testing issues on O'Reilly. "Testing is an important step in developing any important body of work. In today's pragmatic culture, we're taught to test first, test often, and design with tests. The expectation is that chanting "test test test" forgives all sins. To a large extent, this is true. Testing helps us produce quality software at all scales. The extreme code produced by this extreme lifestyle hides in the test suite itself. Often the ugliest code we write resides in files with a .t extension. Riddled with redundant, ghastly expressions, the test suite is the collateral damage on our road to beautiful production code. Let's review some common pitfalls made when testing."
Python
Dr. Dobb's Python-URL!
The May 10, 2004 edition of Dr. Dobb's Python-URL! is out with this week's Python language article links.Dive Into Python
Version 5.3 of Dive Into Python, a free online Python book, is out. See the revision history for details on what's new.PyAlsa 0.0.1 is available
Version 0.0.1 of PyAlsa is available. PyAlsa is a Python language wrapper for the ALSA audio driver's mixer.
Tcl/Tk
Dr. Dobb's Tcl-URL!
The May 10, 2004 edition of Dr. Dobb's Tcl-URL! is available with more Tcl/Tk article links.
XML
UML, XMI, and code generation, Part 2 (IBM developerWorks)
Benoît Marchal continues his IBM developerWorks series on UML with part two. "In the second part of this series on UML and XML, Benoît introduces the UML metamodel. He proceeds to XMI, the XML-based specification for the exchange of models. He then shows how to map from the metamodel to XML schema. As an illustration, he includes two stylesheets that provide simple round-trip engineering between UML and XML."
Utility Stylesheets, Part Two (O'Reilly)
Bob DuCharme continues his series on XML Stylesheets with part two. "Last month we looked at some short utility stylesheets, each dedicated to a specific task that may be necessary with a wide variety of XML documents: stripping empty paragraphs, converting mixed content to element content, and adding ID values to elements. Stylesheets like these can serve as building blocks in the creation of a large, complex workflow composed of pipelined modular processes. This week, we'll look at several more such stylesheets."
Editors
MlView 0.6.3 released
Version 0.6.3 of MlView, an XML editor for GNOME, is out. "This release adds tons of bug fixes, a lot of polishing and also some internal architecture enhancements to prepare the future. It's also the first version of MlView that is 100% gtk+2 based."
IDEs
Build GUIs with the Eclipse Visual Editor project (IBM developerWorks)
David Gallardo introduces the Eclipse Visual Editor project on IBM's developerWorks. "Like many Eclipse.org projects, the goal of the Visual Editor project is to build a tool for building tools -- in this case, tools for building graphical user interfaces. The most interesting thing about the Visual Editor Project is that it has already released a reference implementation. The Visual Editor release 0.5 is a GUI builder for AWT/Swing applications, an Eclipse feature that has long been awaited. Coming soon in release 1.0, slated for delivery in mid-2004, is added support for SWT. In this article, you'll get an overview of Visual Editor and the technology behind it, along with a short demonstration of Visual Editor 0.5's features for building AWT/Swing applications and a preview of the SWT support in Visual Editor 1.0."
Profilers
OProfile 0.8 released
Version 0.8 of OProfile, a code profiler, has been released. "New in this release is experimental call-graph profiling support, new hardware support, support for separate debug files, and some important bug fixes."
Test Suites
Use Jython to build JUnit test suites
Michael Nadel works with JUnit TestSuite classes on IBM's developerWorks. "Developers decide to automate unit tests for a number of reasons. Many take it even a step further and automate the location and execution of those tests. But what if you need your test harness to act as if it were statically defined? Follow along with developer Michael Nadel and see how to use Python to feign statically defined JUnit TestSuite classes."
Version Control
cvsdelta 1.7.0 Released
Version 1.7.0 of cvsdelta, a utility that lists what has changed in a CVS repository, is out. The news file says: "Fixed handling of newly added files. Fixed so that files pending removal are not attempted to be re-removed. Made banner (header and footer) optional. Fixed errors in --no-changes mode. Fixed to handle different output for files not found for a revision or date."
Page editor: Forrest Cook
Next page:
Linux in the news>>