On Tue, 2014-08-12 at 20:26 -0400, David Malcolm wrote: > On Tue, 2014-08-12 at 14:39 -0600, Jeff Law wrote: > > On 08/06/14 11:19, David Malcolm wrote: > > > > > > The aim of the patch series is to improve the type-safety and > > > readability of the backend by introducing subclasses of rtx (actually > > > rtx_def) for *instructions*, and also for EXPR_LIST, INSN_LIST, SEQUENCE. > > > > > > That way we can document directly in the code the various places that > > > manipulate insn chains vs other kinds of rtx node. > > Right. And by catching this stuff at compile time developers working on > > RTL bits should become at least a tiny bit more efficient.
[...snip...] > > > Performance > > > =========== > > > > > > I tested the performance with --enable-checking=release using > > > two large files (kdecore.cc, bigcode.c), comparing a control build > > > to a patched build. > > > > > > There were no significant differences in compilation time: > > OK. A bit of a surprise, but then again perhaps not because we don't > > enable RTL checking by default. And I suspect a goodly amount of the > > RTL checking overhead is in the operands, not on the chain itself. > > > > > > >> > > > > > > As for the performance of a regular build i.e. with as_a<> > > > checks *enabled*; looking at the wallclock time taken for a bootstrap and > > > regression test, for my s390 builds (with -j3) I saw: > > > > > > s390 control: > > > "make" time: 68 mins > > > "make check" time: 122 mins > > > total time: 190 mins > > > > > > s390 experiment: > > > "make" time: 70 mins > > > "make check" time: 126 mins > > > total time: 196 mins > > > > > > showing a 3% increase, presumably due to the as_a and as_a_nullable > > > checks. > > You want to be real careful benchmarking on ppc/s390 hardware as they're > > partitioned and what goes on in a different partition can affect your > > partition. > > Ah. This suggests my testing may need redoing. I'll try to redo this > on a dedicated x86_64 box. I've now redone timed bootstrap testing on a dedicated x86_64 box (64 core Opteron with 128GB, with -j64). These were "regular" builds i.e. without setting --enable-checking. Unpatched build: "make" time: 15 mins "make check" time: 115 mins total time: 130 mins Patched build (with the full patchkit): "make" time: 16 mins "make check" time: 116 mins total time: 132 mins (and equal results from the regrtest) > > > i.e. a release build shows no change in performance; a debug build shows > > > a 3% increase in time taken to bootstrap and regression test. I believe > > > the debug build could be sped up with further patches to eliminate the > > > checked casts. > > Yea. As I've mentioned, my vision is to try and push out the casts as > > much as reasonably possible. (FWIW, I have been working on further optimizations to remove checked casts, but the above is without those optimizations)