[PATCH] D30521: Introduce llc/ExecuteTestCommands pass

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 11:27:35 PST 2017


chandlerc added a comment.

Currently, I really don't understand why this is the right approach...

> We sometimes want to test a specific codegen API rather than a whole pass.
> 
> This adds a special pass to llc that features a minimalistic scripting language to
>  call some predefined API functions so we can test the API with the usual lit+FileCheck tools.

If you're actually trying to test a specific API, why aren't unittests the correct approach?

If the problem is that the unittests are hard to write, why not write libraries to make authoring the unittest easier?

Essentially, I totally understand prefering FileCheck and friends when testing something that is reasonably cohesive as a *pass*. But I feel like the point at which a scripting language or other things are being used to handle the fact that we're actually testing a specific API, I would *much rather* just write a unittest against that API directly.


Repository:
  rL LLVM

https://reviews.llvm.org/D30521





More information about the llvm-commits mailing list