Testing changes to Go SSA?

67 views
Skip to first unread message

Mohit Verma

unread,
Sep 19, 2019, 6:28:04 PM9/19/19
to golang-nuts
Hi,

I added a new pass to Go SSA for experimental purposes. Is there a testsuite to make sure Go's SSA backend works as intended? I do see some test files in ssa/ and gc/ directory but they seem to be testing specific cases in the code.
For example, Are there 
1. tests that would test the compilation of big files?
OR, 2. tests to make sure high-level code constructs (like FOR LOOP) compile down to no more than "x" instructions for some value of x?

Or is there a general testsuite that language developers use to test compiler changes? I see this: https://github.com/Byron/benchmarksgame-cvs-mirror but I am not sure if this is the right place to look at. 


Thanks!
Mohit

keith....@gmail.com

unread,
Sep 19, 2019, 8:09:46 PM9/19/19
to golang-nuts
In addition to the tests you saw, there are a bunch of tests in test/codegen that makes sure specific sequences of instructions are or are not generated.
Tests for specific issues that have been fixed are in test/fixedbugs.
Generally the whole test suite is one giant compiler test. Run all.bash and if it passes, you can be pretty sure the compiler is generating correct code.
There are other tests, like compilebench, which you can use to check the resource use of the compiler.

keith....@gmail.com

unread,
Sep 19, 2019, 8:11:45 PM9/19/19
to golang-nuts
In addition to the tests you saw, there are a bunch of tests in test/codegen that makes sure specific sequences of instructions are or are not generated.
Tests for specific issues that have been fixed are in test/fixedbugs.
Generally the whole test suite is one giant compiler test. Run all.bash and if it passes, you can be pretty sure the compiler is generating correct code.
There are other tests, like compilebench, which you can use to check the resource use of the compiler.

On Thursday, September 19, 2019 at 3:28:04 PM UTC-7, Mohit Verma wrote:

keith....@gmail.com

unread,
Sep 19, 2019, 8:12:27 PM9/19/19
to golang-nuts
In addition to the tests you saw, there are a bunch of tests in test/codegen that makes sure specific sequences of instructions are or are not generated.
Tests for specific issues that have been fixed are in test/fixedbugs.
Generally the whole test suite is one giant compiler test. Run all.bash and if it passes, you can be pretty sure the compiler is generating correct code.
There are other tests, like compilebench, which you can use to check the resource use of the compiler.

On Thursday, September 19, 2019 at 3:28:04 PM UTC-7, Mohit Verma wrote:

Isaac Gouy

unread,
Sep 20, 2019, 1:39:39 AM9/20/19
to golang-nuts

Or is there a general testsuite that language developers use to test compiler changes? I see this: https://github.com/Byron/benchmarksgame-cvs-mirror but I am not sure if this is the right place to look at.


Reply all
Reply to author
Forward
0 new messages