Refactor insertAutoDestroyCalls() in callDestructors.cpp


Partitioned the business logic in insertAutoDestroyCalls() into a few
smaller functions

   a) to make it a little less opaque

   b) to support pending mods for the current Interpreter task


This submit does not contain any changes to the business logic.



Rationale (Short Version)
=========================

An effort to make "a small change" to the parser's AST for most
procedures caused just over 100 paratest failures.  I studied one
failure in some detail and determined that it could be fixed by an
"incomplete change" to insertAutoDestroyCalls().

To my surprise, and perhaps even partial dismay, my poorly conceived
change eliminated all of the failures.

A little more study using the memleaks option to start_test and
paratest indicated that my change appeared to cause a modest bump, 
about 10% or so, in memory leakage.

I'd like to spend a little more time on this issue to determine if
I can develop a more complete fix that enables my desired trivial
transformation without introducing an additional memory leak.

I believed this would be easier if the code were a little more
transparent.




insertAutoDestoryCalls() walks the statements of every BlockStmt
and performs 3 important tests on each stmt. The first test determines
whether the statement defines a variable that needs to be auto-destroyed
and the other two tests determine whether the statement includes control
flow that leaves the BlockStmt and requires the insertion of autoDestroy
code.


I have partitioned the logic in to several functions to better match
the apparent intent.  This is in preparation for some minor improvements
to the code and then a second attempt to implement a correct fix for the
issue that drove me in to this function.





Compiled:   STD on clang.  STD/LLVM on gcc

Tested:     paratest
            start_test with -memleaks on release/examples
            paratest   with -memleaks

Review:     Tom






git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23801 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
aprun launcher clean up and KNC support

[reviewed by Elliot]

This commit does a bit of sorely needed clean up to the aprun launcher
varieties, and also adds support for KNC launching.

- Unify the aprun command line generation and other aprun-related
  things.  I started this a while back and then didn't really have a
  good idea of how to really structure it, so I had replicated the
  logic in both the pbs-aprun and aprun launcher directories.  This
  commit removes the pbs-aprun version of aprun-utils.c and makes the
  build copy over the "master" copy in the aprun directory.  I tried a
  bit to have it refer to the version in the aprun directory directly,
  but they failed due to dependence generation.  Brad said that we
  have done/are doing such copying elsewhere, so I figured there must
  be some good reason for it (versus referring to it directly or
  symlinking).  I also pulled out all the header type info that was
  replicated in all the .c files and put it into aprun-utils.h.  Fixed
  some type-os in comments while there.

- Pull out the aprun command building functionality from the aprun
  launcher and put it into aprun-utils.c as chpl_create_aprun_cmd()
  and also use it in the pbs-aprun launcher.

- In the pbs-aprun launcher, do not bother passing all the extras
  flags to aprun when running 'ls' just to check if the file system is
  available.

- Added support for aprun launching when CHPL_TARGET_PLATFORM=knc.
  This includes changing the launch program Makefile to include the
  new chpl_complication_config.h file generated during compilation, so
  that we can get at that string.

- Change the name of the launcher .c file created by Makefile.launcher
  from config.c to launcher_support.c, since it now does more than
  provide support for config variable parsing.

- Fix build issue with pbs-aprun launcher for certain versions of gcc
  where popen/pclose were not made available by defining
  _XOPEN_SOURCE.

- Update README.knc to reflect the aprun support changes.





git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23802 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Enable user specifiable timer for performance runs

[reviewed by kyle]

Previously the presence of PERFTIMEEXEC or .perftimeexec file indicated that a
performance test should be run with time -p and then the timings were picked
out with the perfkeys functionality. However time -p is not a very precise
timer so it's not very useful for timing things like non-user code startup
(which is under .001 seconds for fifo.)

This patch changes it so that the PERFTIMEXEC or .perftimeexec files contains
the name of a timer to use. For instance you could have a PERFTIMEXEC with:

defaultTimer

And it would use util/test/timers/defaultTimer to time the program execution.

The timer must be located in $CHPL_HOME/util/test/timers. If the specified
timer cannot be found or the perftimeexec file was badly formatted it attempts
to use the defaultTimer, and if that too fails, it reverts to time -p and
prints out an error. The timer is also responsible for actually running the
executable as well.

The current timers are defaultTimer (a simple wrapper for time -p) and
highPrecisionTimer (very precise cross-platform timer provided by kyleb, which
uses python's timeit module.) It only captures real time, and not sys or user
though.

The rest of the changes just update the notes in start_test and replace all the
existing PERFTIMEEXEC and perftimeexec content with defaultTimer.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23803 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add a no-op performance test

[reviewed by kyle]

The no-op test is intended to measure the amount of time spent setting up
non-user code. It's been observed that this is non-insignificant for qthreads,
and it will be interesting to see the results for multi-locale runs as well. I
added a new suite for startup tracking with the thinking that we may want to
start tracking startup communications once we have multi-locale perf testing
running.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23804 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Update nightly to look for revision in both git and svn worlds.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23805 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Start using a high precision timer with meteor

[ok'd with kyle]

The fastest meteor is too fast for the default timer (time -p)

Using the high precision timer added with r23803 instead.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23806 3a8e244f-b0f2-452b-bcba-4c88e055c3ca