Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM codegen-equivalence tests #7461

Closed
graydon opened this issue Jun 28, 2013 · 1 comment
Closed

LLVM codegen-equivalence tests #7461

graydon opened this issue Jun 28, 2013 · 1 comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc I-slow Issue: Problems and improvements with respect to performance of generated code.
Milestone

Comments

@graydon
Copy link
Contributor

graydon commented Jun 28, 2013

This is a performance test idea. It involves registering pairs of functions -- rust and rust, rust and C++, rust and LLVM -- and comparing the ratio of their outputs in terms of number of LLVM instructions and number of machine instructions.

I think this is a nice category of test because:

  • it's mostly objective (subject to clang drift) and timing-insensitive so can be turned into a performance ratchet (see make check should use a performance ratchet #7459)
  • it's easy to think of new testcases that "should be equivalent"
  • it's easy to turn existing performance problems into such testcases

Some examples:

  • Manually inlined things vs. types of inlining we expect LLVM to do
  • Same for constant propagation
  • Same for type specialization
  • Comparing how we do these things vs. how C++/clang does them
  • Unsafe code vs. safe code for same operations
  • Match constructs vs. nested ifs
  • Iteration constructs vs. manual counter loops
  • Destructuring vs. field access
@ghost ghost assigned graydon Jun 28, 2013
bors added a commit that referenced this issue Jul 11, 2013
This is some initial sketch-work for #7461 though it will depend on #7459 to be useful for anything. For the time being, just infrastructure.
@graydon
Copy link
Contributor Author

graydon commented Aug 2, 2013

This is now active, #7623 added a framework and I've been adding new tests.

@graydon graydon closed this as completed Aug 2, 2013
@graydon graydon removed their assignment Jun 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

1 participant