This is an archive of the discontinued LLVM Phabricator instance.

[RFC][OpenCL][PoC] Testing TableGen with diffing
Needs ReviewPublic

Authored by azabaznov on Mar 30 2021, 3:59 AM.

Details

Reviewers
svenvh
Anastasia
Summary

This adds an option string to clang-check to ignore certain AST node types
in order to achive suitable printing policy for comparison with output
generated from TableGen. Header-like TableGen generation is based on https://reviews.llvm.org/D97869.

Diff Detail

Event Timeline

azabaznov created this revision.Mar 30 2021, 3:59 AM
azabaznov requested review of this revision.Mar 30 2021, 3:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2021, 3:59 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
azabaznov edited the summary of this revision. (Show Details)Mar 30 2021, 5:14 AM

This approach is really great because the testing is so quick! While it is not providing the coverage for invocation through clang, it can still be very valuable in various forms to enhance the testing and improve the coverage at very little cost. Thanks for working on this!

Thanks for feedback!

Locally I get really nice result (I am using Ubuntu 20.04):

$ llvm-lit  SemaOpenCL/compare-header-and-tablegen.cl

-- Testing: 1 tests, 1 workers --
FAIL: Clang :: SemaOpenCL/compare-header-and-tablegen.cl (1 of 1)
********************
Failed Tests (1):
  Clang :: SemaOpenCL/compare-header-and-tablegen.cl

Testing Time: 0.20s

I see no reason why it may take longer on other platforms.