This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Projects for beginners


On Tue, Jan 30, 2001 at 08:42:06PM -0800, Zack Weinberg wrote:
> Here's my list of GCC-related projects that could usefully be
> attempted by beginners to GCC.

I thought of a few more myself.

> Code cleanliness:

  Find and expunge all the places where one .c file includes another.

> Port cleanup:

  Convert text peepholes to RTL peepholes.  Targets affected: 
  1750a arm avr c4x dsp16xx fr30 i860 i960 m32r m68hc11 m68k
  mcore mips mn10200 mn10300 ns32k pa romp rs6000 sh sparc.

  Convert text prologue/epilogue generation to insn-based.  The
  situation here is a bit weird.  Targets which only have
  FUNCTION_PROLOGUE/EPILOGUE in tm.h:
	1750a a29k arc avr clipper dsp16xx elxsi h8300 i370 i860 i960
	m68k ns32k pdp11 romp vax
  Targets which only have "prologue" and "epilogue" named expanders:
	alpha c4x fr30 m68hc11 mcore mn10200 mn10300 pj sh
  Targets which have *both*: 
	arm convex d30v i386 ia64 m32r m88k mips pa rs6000 sparc
  I'd suggest starting with the targets that have both.

  Correct all warnings and errors emitted by gen*.c in the course of a
  bootstrap.  (You can usually start by building a cross-compiler from
  whatever you have to <processor>-unknown-none.)

  Find magic numbers in .md files and make them use define_constants.

>   Migrate default definitions of tm.h macros out of random source files
>   into defaults.h.
	- To consider: include defaults.h *first*, have it define
	everything unconditionally, then have tm.h's #undef whatever
	they need to override.

> Library infrastructure:

  Implement a macro preprocessor for .md files.  It should act like
  the preprocessor for CGEN (http://sources.redhat.com/cgen/) which
  also uses RTL-ish definition files.
	- You can start with conditional blocks and include files.
	- We already have define_constants.
	- You probably want to rip the RTL reader out of rtl.c before
	it gets too big.

Optimizer/back end improvements:

These require some knowledge of compiler internals and substantial
programming skills, but not detailed knowledge of GCC internals.
I think.

  Make insn-recog.c use a byte-coded DFA.
	- RTH and I started this back in 1999 but never finished.  I
	may still be able to find the code.
	- Order of 10x size reduction in insn-recog.o, which is huge
	(432K on i386)

  Make GCSE (and CSE?) capable of digging inside PARALLELs.
	- Needed for GCSE to do any good at all on i386.

  Teach the combiner to delete no-op moves it generates.
	- Including unrecognizable no-op moves.  You can get things
	like (set (cc0) (cc0)) or (set (pc) (pc)) neither of which is
	a valid insn, but throwing them out would win.  See thread at
	http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00580.html.

  Find all the places that simplify RTL and make them use
  simplify-rtx.c.

  Convert reorg.c to use the flow graph.  Then we can throw away
  resource.c.
	- Long term we want reorg folded into the scheduler, but
	that's much harder.

  Improve dwarf2out.c.
	- DWARF2 can handle all kinds of heavy optimizations that we'd
	like to do, but our generator doesn't know how just yet.  At
	the very least it'd be nice if -gdwarf-2 -fomit-frame-pointer
	could give you a clean backtrace on all targets.  (This is
	definitely possible.)
	- Need to coordinate with gdb team.

  Teach collect2 to recognize when an object module requires a
  specific runtime support library and link it in automatically.
	- i.e. if the first linker invocation spits out undefined
	symbols, see if they are from libstdc++, libf2c, etc. and
	throw in the appropriate library on the second pass.
	- Pretty much eliminates need for language specific drivers.
	- Be neat if it would recognize when libm was necessary, too
	(no more "where's sqrt()?!" bug reports!)

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]