Add a new clang-tblgen flag -gen-clang-opencl-builtin-tests that
generates a .cl file containing calls to every builtin function
defined in the .td input.
Example output:
... float test6092_cos(float arg1) { return cos(arg1); } double test6093_cos(double arg1) { return cos(arg1); } half test6094_cos(half arg1) { return cos(arg1); } float2 test6095_cos(float2 arg1) { return cos(arg1); } double2 test6096_cos(double2 arg1) { return cos(arg1); } ...
On the current (31 March 2020) main branch, this emitter will generate about 62k lines of test code.
The test consists of parsing a 60k line generated input file, which
takes about 90s with a debug build. This doesn't seem excessive
compared to other tests in clang/test/Headers (one of the tests
takes 120s for example).
Should be emit to adhere to coding style?