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

Add a build option to enable source level coverage analysis #503

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

zhaomaosu
Copy link
Contributor

No description provided.

@@ -161,6 +161,7 @@ std::string EffectiveOptionsFilter::processOptions(const OpenCLArgList &args,
// The below assert is usable for manual debugging only
// default:
// assert(false && "some unknown argument");
case OPT_COMPILE_coverage:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is line-tables-only enough for coverage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, line-tables-only is enough. Code coverage doesn't need other information like type.

@wenju-he wenju-he requested review from cdai2 and haonanya November 9, 2023 08:49
@haonanya
Copy link

haonanya commented Nov 9, 2023

Build failure should be fixed by spirv KhronosGroup/SPIRV-LLVM-Translator#2209.

@@ -14,6 +14,7 @@ include "llvm/Option/OptParser.td"
def g_Flag : Flag<["-"], "g">, HelpText<"Generate source level debug information">;
def gline_tables_only_Flag : Flag<["-"], "gline-tables-only">;
def profiling : Flag<["-"], "profiling">, HelpText<"Allow profiling">;
def coverage: Flag<["-"], "coverage">, HelpText<"Enable source level coverage analysis">;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def coverage: Flag<["-"], "coverage">, HelpText<"Enable source level coverage analysis">;
def coverage: Flag<["-"], "code_coverage">, HelpText<"Enable source level coverage analysis">;

is code_coverage better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang/gcc both use '-coverage'.

Copy link
Contributor

@wenju-he wenju-he left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenju-he wenju-he closed this Nov 10, 2023
@wenju-he wenju-he reopened this Nov 10, 2023
@wenju-he wenju-he merged commit ad248f4 into intel:main Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants