This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Prepare BOLT for unit-testing
ClosedPublic

Authored by yota9 on Jan 26 2022, 9:57 AM.

Details

Summary

This patch adds unit testing support for BOLT. In order to do this we will need at least do this changes on the code level:

  • Make createMCPlusBuilder accessible externally
  • Remove positional InputFilename argument to bolt utlity sources

And prepare the cmake and lit for the new tests.

Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei

Diff Detail

Event Timeline

yota9 created this revision.Jan 26 2022, 9:57 AM
yota9 requested review of this revision.Jan 26 2022, 9:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2022, 9:57 AM
yota9 edited the summary of this revision. (Show Details)Jan 26 2022, 10:00 AM
Amir accepted this revision.Jan 26 2022, 10:08 AM

LGTM. Let's wait what Maksim or Rafael would say.

This revision is now accepted and ready to land.Jan 26 2022, 10:08 AM
maksfb accepted this revision.Jan 26 2022, 12:36 PM

Summary: "Remove positional InputFilename..." -> "Move positional InputFilename...".

I'm not a cmake expert, but the rest of the changes LGTM.

bolt/CMakeLists.txt
79
bolt/unittests/CMakeLists.txt
2

nit:

yota9 marked an inline comment as done.Jan 26 2022, 12:43 PM

@maksfb I'm either to be honest (prefer bare make) :) But it seems to be working fine, of course :)

yota9 marked an inline comment as done.Jan 26 2022, 12:43 PM
yota9 added inline comments.
bolt/CMakeLists.txt
79

Thanks, missed that

This revision was landed with ongoing or failed builds.Jan 26 2022, 1:23 PM
This revision was automatically updated to reflect the committed changes.
yota9 marked an inline comment as done.
thakis added a subscriber: thakis.Nov 18 2022, 7:12 AM
thakis added inline comments.
bolt/test/Unit/lit.site.cfg.py.in
13

Is this line needed? Do the bolt unit tests really run python? (All other LLVM projects only set this for the non-unit tests afaict)

Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2022, 7:12 AM
Herald added a subscriber: treapster. · View Herald Transcript
thakis added inline comments.Nov 18 2022, 7:41 AM
bolt/test/Unit/lit.site.cfg.py.in
13