Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented Aug 16, 2022

This is to avoid unnecessary checks being performed as well as speeding up things. See https://trac.cppcheck.net/ticket/10648 and https://trac.cppcheck.net/ticket/10727.

@firewave firewave changed the title added UNUSEDFUNCTION_ONLY hack to only perform the unusedFunction check added UNUSEDFUNCTION_ONLY hack to only perform the unusedFunction check Aug 16, 2022
@firewave firewave marked this pull request as ready for review August 16, 2022 08:50
@firewave firewave changed the title added UNUSEDFUNCTION_ONLY hack to only perform the unusedFunction check added environment variable UNUSEDFUNCTION_ONLY to make sure only the unusedFunction check is being executed Aug 17, 2022
@danmar
Copy link
Owner

danmar commented Aug 20, 2022

This seems to be a quick and small hack of the interface. I don't want small hacks in the interface. A bigger picture is wanted. There should be a consistent way to enable/disable all checks.

@danmar danmar closed this Aug 20, 2022
@firewave
Copy link
Collaborator Author

This seems to be a quick and small hack of the interface. I don't want small hacks in the interface. A bigger picture is wanted. There should be a consistent way to enable/disable all checks.

This is just temporary and I have an approach to fix this more appropriately. The ground work and approach is easily implemented. But to get it completely fixed will involve a lot of work and will take quite a while.

It's also not an "interface" and is not documented at all.

@danmar danmar reopened this Aug 20, 2022
@danmar
Copy link
Owner

danmar commented Aug 20, 2022

This is just temporary and I have an approach to fix this more appropriately.

ok.

@firewave
Copy link
Collaborator Author

This is to also speed up the callgrind test proposed in #2944.

I will elaborate on steps to get rid of this hack soon.

@firewave
Copy link
Collaborator Author

This is to also speed up the callgrind test proposed in #2944.

This reduces Ir from 86,847,240,267 to 82,239,299,916 in the proposed step.

@firewave firewave marked this pull request as draft September 27, 2022 10:47
@firewave
Copy link
Collaborator Author

Not calling the unnecessary Check::getFileInfo() additional reduces it from 80,867,576,736 to 80,458,208,346 (these number are different from the one above since other optimizations applied - the diff is still the same)

@firewave firewave marked this pull request as ready for review September 27, 2022 11:38
@danmar danmar merged commit 9f7a725 into danmar:main Oct 6, 2022
@firewave firewave deleted the unused-selfcheck branch October 6, 2022 19:08
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.

2 participants