First, in Makefile.include, change the ordering of the make(1) variable
definitions to be generally:
  base and unique build dirs
  build dirs
  install dirs
  source dirs and files, if any
  lib dirs and files, if any

Second, these lines in Makefile were superfluous:

  GMP_ABS_DIR = $(shell pwd)
  GMP_INSTALL_DIR = $(GMP_ABS_DIR)/$(GMP_INSTALL_SUBDIR)
  GMP_BUILD_DIR = $(GMP_ABS_DIR)/$(GMP_BUILD_SUBDIR)
  GMP_DIR = $(GMP_ABS_DIR)

Because GMP_ABS_DIR isn't referenced anywhere else, they're equivalent
to:

  GMP_DIR = $(shell pwd)
  GMP_INSTALL_DIR = $(GMP_DIR)/$(GMP_INSTALL_SUBDIR)
  GMP_BUILD_DIR = $(GMP_DIR)/$(GMP_BUILD_SUBDIR)

But these latter two definitions of GMP_{INSTALL,BUILD}_DIR are
identical to the ones in Makefile.include, which is included here by
virtue of ../../make/Makefile.base being included at the top. So they
can go. And the first definition here is effectively the same as this
one that is already in Makefile.include:

  GMP_DIR = $(shell pwd)/../../third-party/qthread

So, it can go as well.

Assuming this creates no problems in nightly testing, I'll change the
other affected third-party packages in a follow-up commit.
Alphabetize the list of scripts in util/README
Merge pull request #1014 from Kyle-B/kb-alpha-util-readme

Alphabetize the list of scripts in util/README
Add tests for constructing a record from a type variable, type argument or type function result.

Also, remove an obsolete .bad file.
Update based on the morning's returns
Merge pull request #1016 from bradcray/triage-blc-dec-2014

REGRESSIONS update based on the morning's returns

Update to REGRESSIONS based on the morning's returns and some housecleaning:

Improvements:
* removed the general "Error running sub-test for studies/lsms/shemmy" which I think was fixed some time ago when Thomas changed the way start_test/sub_test report known failures

Regressions:
* added an entry for valgrind regressions that started Saturday, apparently due to standalone parallel iterators
* noted the sporadic failures of sub_test due to failed os.unlink calls on cygwin32 which are not resolved as hoped and added back dates for recent cases

Misc:
* tvandoren/enumerate is starting to pass, but hasn't worked its way out of the system yet, so I added an entry to track the remaining failing cases
* added a few recent dates to sporadic failures that happened to be in my inbox
Merge pull request #1015 from hildeth/addConstructorTests

Add tests for constructing a record from a type variable, type argument or type function result.
Default to fifo for cray compiler

We have some things to address with qthreads and the cray compiler that are
causing noise in nightly testing (because cce doesn't support inline asm, but
qthreads doesn't properly detect or handle this.)

Until we get the issue resolved, default to fifo to quiet nightly testing.
Merge pull request #1013 from gbtitus/simplify-3p-gmp-makefiles

Simplify third-party/gmp Makefiles.

First, in Makefile.include, change the ordering of the make(1) variable
definitions to be generally:
  base and unique build dirs
  build dirs
  install dirs
  source dirs and files, if any
  lib dirs and files, if any

Second, these lines in Makefile were superfluous:

  GMP_ABS_DIR = $(shell pwd)
  GMP_INSTALL_DIR = $(GMP_ABS_DIR)/$(GMP_INSTALL_SUBDIR)
  GMP_BUILD_DIR = $(GMP_ABS_DIR)/$(GMP_BUILD_SUBDIR)
  GMP_DIR = $(GMP_ABS_DIR)

Because GMP_ABS_DIR isn't referenced anywhere else, they're equivalent to:

  GMP_DIR = $(shell pwd)
  GMP_INSTALL_DIR = $(GMP_DIR)/$(GMP_INSTALL_SUBDIR)
  GMP_BUILD_DIR = $(GMP_DIR)/$(GMP_BUILD_SUBDIR)

But these latter two definitions of GMP_{INSTALL,BUILD}_DIR are
identical to the ones in Makefile.include, which is included here by
virtue of ../../make/Makefile.base being included at the top. So they
can go. And the first definition here is effectively the same as this
one that is already in Makefile.include:

  GMP_DIR = $(shell pwd)/../../third-party/qthread

So, it can go as well.

Assuming this creates no problems in nightly testing, I'll change the
other affected third-party packages in a follow-up commit.
Merge pull request #1018 from ronawho/use-fifo-for-cce

Default to fifo for cray compiler

[ok'd by @gbtitus]

We have some things to address with qthreads and the cray compiler that are
causing noise in nightly testing (because cce doesn't support inline asm, but
qthreads doesn't properly detect or handle this.)

Until we get the issue resolved, default to fifo to quiet nightly testing.
Initial attempt to optimize anonymous range iteration

When iterating over a range such as:
  for i in 1..10 do ...

we end up constructing a range and then getting it's low and high values out.
The range creation adds additional overhead that is not needed and it
obfuscates the loop from the backend compiler (it probably can't figure out how
the number of iterations even though the chapel compiler knowns it at compile
time.)

Ideally we want to generate
  for i in 1..10
as
  for(i=1; i<=10; i+=1)

This removes the construction cost, and should allow the backend compiler to
optimize/auto-vectorize better.

To accomplish this, this work replaces anonymous ranges with direct iterator
calls in for loops. Ranges are iterable because they have a these method. This
replaces the range with a direct call to an iterator. It essentially replaces
the code:
  for i in 1..10
with:
  for i in _opt_range_iter(1, 10)

the end result is that
  for i in 1..10
is now generated as:
  int64_t i;
  for (i = INT64(1); ((i <= INT64(10))); i += INT64(1)) {}
which is exactly what we wanted

This also handles anonymous ranges whose stride is known at compile time

E.G it handles
  for i in 1..10 by 2

and it will call into a more optimized iterator

if the stride is not known at compile time we don't do anything because we need
the range iterator to use chpl__diffMod

Not that this does nothing for aligned ranges, and doesn't handle cases such as
for i in 1..10 by 2 by 2 since it doesn't seem like a common case

The first attempt to do this was to replace the entire for loop with a c for
loop directly, but you can't do that for zippered iterators and figuring out
the type of the stride is really difficult and you have to insert calls to the
overflow checking and the general iterator.

A better long term solution might be to expand scalarReplacementOfAggregates to
includes ranges. That would allow all ranges to be optimized, including
non-anonymous ranges, and ranges that are used in contexts other than direct
iteration.

I still need to clean up the direct iterators, and make use of them from other
iterators. I also need to add bounds checks and the general iterator around it.
Update elimination of range constructors for anonymous range iteration

Add bounds checking (kind of hacky for now) and call to general iterator if
optimized iterators are not being used.

Should replace anonymous range iteration for most simple ranges (including
zippered)

for i in 1..10
for i in 1..10 by 10
for i in varA..varB
for i in varA..varB by paramA
for (i, j) in zip(1..10 by 2, 1..10 by paramA)

If the range is aligned, or has multiple by's applied to it or the types don't
match then a non-anonymous range is created and iterated so that there don't
have to be a ton of versions of the _direct_range_iter.
Add different versions to support  arg coercion (like is done for build_range)
Swap the order of the iterators to separate them in a more logical manner

Also adds an all int param version of the iterator because it produces the
cleanest loops.

e.g. 'for i in 1..10' turns into 'for (i=1; i<=10; i+=1)' with no temp
variables
Fix general iterator
Comment out all param iter and add TODOS
Strengthen check for bounded iterator and add zippered iter check

Need to be sure this optimization only fires for bounded iterators. Currently
it fired for bounded and unbounded. The check to do so should be strengthened
more. Also when looking at the iteratorExpr we looked for a tuple so that we
could replace ranges in a zippered iterator. However, this also fired for non
zippered iterators over tuples, which we didn't want to do.
Update range overflow detection for direct range iterators

Instead of creating a range to perform the overflow check, directly perform it
with a helper function that the original range overflow check now uses.
Add checks for bad strides
make iters smaller by removing braces and using do loops