Open main menu

CDOT Wiki β

Changes

GCC alwayszero function attribute

1,670 bytes added, 11:29, 25 November 2009
no edit summary
== Project Description ==
This project involves extending gcc to support an alwayszero function attribute for functions which always return zero (see [https://bugzilla.mozilla.org/show_bug.cgi?id=517370 Bug #517370]). This attribute rectifies the fact that GCC cannot determine the results of a call to a virtual member function at compile time (for example).
== Project Leader(s) ==
== Project Details ==
=== Relevant blog posts:===
10: [http://ehren.wordpress.com/2009/1011/2124/a-gimple-callreworking-flagsmy-mysteryanalysis/ A Gimple Call Flags MysteryReworking my analysis]
9: [http://ehren.wordpress.com/2009/1011/0723/adding-a-newbuild-function-attribute-to-gccissues/ Adding a new function attribute to Firefox build issues with GCC4.5]
8: [http://ehren.wordpress.com/2009/0911/3018/popping-myanalysis-gimplesand-atype-planmadness/ Popping My GIMPLES (a plan)Analysis and type madness]
7: [http://ehren.wordpress.com/2009/11/17/i686-vs-x86-64-issues/ i686 vs x86-64 issues] 6: [http://ehren.wordpress.com/2009/11/04/creating-a-gcc-optimization-plugin/ Creating a GCC optimization plugin] 5: [http://ehren.wordpress.com/2009/10/24/a-gcc-hack-my-0-1-release/ A GCC Hack (My 0.1 Release)] 4: [http://ehren.wordpress.com/2009/10/21/a-gimple-call-flags-mystery/ A Gimple Call Flags Mystery] 3: [http://ehren.wordpress.com/2009/10/07/adding-a-new-function-attribute-to-gcc/ Adding a new function attribute to GCC] 2: [http://ehren.wordpress.com/2009/09/30/popping-my-gimples-a-plan/ Popping My GIMPLES (a plan)] 1: [http://ehren.wordpress.com/2009/09/20/building-gcc-from-trunk/ Building GCC from trunk] === Breakdown of Releases === ==== 0.0 ====This involved getting acquainted with GCC as well as my initial plan (posts 1-2). ==== 0.1 ====A new attribute and a proof of concept optimization were hacked into GCC (posts 3-5). ==== 0.2 ====The optimization was developed as a separate compiled plugin (post 6). A number of refinements were made to the plugin. Post 7 contains a critical bug fix. Post 8 addresses a minor type safety issue. A Dehydra analysis was introduced in post 8 for identifying alwayszero functions. ==== ~0.2.5 ====A preliminary Treehydra analysis for alwayszero functions based on outparams.js was introduced in post 10. Post 9 details alternative steps required to run the plugin on mozilla-central.  Note: I'd be comfortable including the last two posts in either 0.2 or 0.3. If my 'release style', to be generous, for 0.2 is found lacking, they should perhaps count for 0.2.
== Possible Bug ==
#include "blah.h"
int Blah::blah() {
return 0;
}
1
edit