Update SpanBench test
authorJoseph Tremoulet <jotrem@microsoft.com>
Thu, 16 Mar 2017 00:43:01 +0000 (20:43 -0400)
committerJoseph Tremoulet <jotrem@microsoft.com>
Sat, 18 Mar 2017 16:26:27 +0000 (12:26 -0400)
commit02233550ec97bdcb640e168eed294b783df64177
tree2549d4d711674c5e9b4251fbd10ff64fec520796
parent2c54cc07f7cc7d0315af963d5e3a6313e6b90899
Update SpanBench test

 - Re-enable the tests that were disabled in e859c309.
 - Re-work how tests are invoked from the command line to require less
   boilerplate
     - Now each test has a single [Benchmark] entrypoint
     - That entrypoint invokes its test's single inner-loop by wrapping it
       in a lambda that it passes to a new helper Invoke method (shared
       across all tests) which handles the xunit vs. command-line
       differences..
     - Main finds the entrypoints by using reflection to search for the
       [Benchmark] attributes, so the explicit list of stringified test
       names is no longer needed and the command line will run the same
       set of tests that xunit-perf does.
 - The new SpanAPI tests now get invoked when this tests is run from the
   command line as well.
 - Add [NoInlining] to the SpanAPI tests' kernels.
 - Add some heap writes and conditional writes to prevent deadcode
   optimization from eliminating tests' kernels (assuming we don't do
   interprocedural constant propagation or deadcode, or store sinking and
   final value calculation, or PRE...).
 - Split the Index SpanAPI tests into one version that uses a
   loop-invariant index and thus should get hoisted out of the loop, and
   another version that uses variant indices.

Commit migrated from https://github.com/dotnet/coreclr/commit/65226a257f173edc03de3b4b43d001f801d0b379
src/coreclr/tests/src/Common/test_dependencies/project.json
src/coreclr/tests/src/JIT/Performance/CodeQuality/Span/SpanBench.cs