Skip to content

[SandboxIR] Add debug checker to compare IR before/after a revert #115968

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

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

slackito
Copy link
Collaborator

This will help us catch mistakes in change tracking. It's only enabled when EXPENSIVE_CHECKS are enabled.

This will help us catch mistakes in change tracking. It's only enabled
when EXPENSIVE_CHECKS are enabled.
void expectNoDiff();

/// Empties saved state.
void reset();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: perhaps clear() would be a better name?

Also this doesn't seem to be used. My guess is that it should be called before we save(), but isn't it better to make this private and call it from within the body of save() ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No need to call it from save, as it will replace the old snapshot with the new one. I've just removed it.

// True if save() was previously called. This helps us distinguish between
// "expectNoDiff was called without calling save" and "save was called but
// the saved snapshot is empty".
bool HasSavedState = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this variable? Can't we use OrigContextSnapshot.empty() ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The reason, as the comment above says, is that I think the snapshot could be empty. What if we do something like:

sandboxir::Context Ctx;
Ctx.save();  // try to save without creating any modules or functions
Ctx.revert();

Sure, doing that is not useful, but it doesn't strike me as incorrect usage of the API either.

Copy link
Contributor

Choose a reason for hiding this comment

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

But if we have nothing to check, shouldn't expectNoDiff() pass anyway?

If you are trying to check that we ran save() before running revert() then I think this check shouldn't be the job of the IRSnapshotChecker.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was trying to check we ran save() before expectNoDiff (that is, an invariant at the IRSnapshotChecker level, not at the Context level). But removing it also works, so I just did that.

if (OrigMS.Hash != CurrMS.Hash) {
DifferenceFound = true;
dbgs() << "Found IR difference in module " << M->getName() << ".\n";
dbgs() << "Original:\n" << OrigMS.TextualIR << "\n";
Copy link
Contributor

Choose a reason for hiding this comment

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

This is good for now, but my concern is that these module dumps may become really huge when compiling large applications, so getting these textual dumps will become problematic. Could we perhaps do a per-function check, or per-BB check instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Switched to per-function snapshots. I looked into using BBs instead but StructuralHash only takes Module or Function.

Checker.save();
Add1->setOperand(1, Add0);
EXPECT_DEATH(Checker.expectNoDiff(), "Found IR difference");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps we should also exercise running save() again (or reset() + save()) after some changes are made?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a test case that runs save() twice and checks the second time replaces the first one.

Copy link

github-actions bot commented Nov 16, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@vporpo vporpo left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@slackito slackito merged commit 9161e6a into llvm:main Nov 18, 2024
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 18, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-win-fast running on as-builder-3 while building llvm at step 7 "test-build-unified-tree-check-llvm-unit".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/builds/11282

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm-unit) failure: test (failure)
...
[696/722] Linking CXX executable unittests\Transforms\IPO\IPOTests.exe
[697/722] Linking CXX executable unittests\Passes\PassBuilderBindings\PassesBindingsTests.exe
[698/722] Linking CXX executable unittests\IR\IRTests.exe
[699/722] Linking CXX executable unittests\Target\TargetMachineCTests.exe
[700/722] Linking CXX executable unittests\tools\llvm-exegesis\LLVMExegesisTests.exe
[701/722] Linking CXX executable unittests\Target\ARM\ARMTests.exe
[702/722] Linking CXX executable unittests\Transforms\Coroutines\CoroTests.exe
[703/722] Linking CXX executable unittests\Transforms\Instrumentation\InstrumentationTests.exe
[704/722] Linking CXX executable unittests\Transforms\Utils\UtilsTests.exe
[705/722] Building CXX object unittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\TrackerTest.cpp.obj
FAILED: unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.obj 
C:\ninja\ccache.exe C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\unittests\SandboxIR -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\third-party\unittest\googletest\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\third-party\unittest\googlemock\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -MD  /EHs-c- /GR- -std:c++17 /showIncludes /Founittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\TrackerTest.cpp.obj /Fdunittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\ /FS -c C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1859): error C2079: 'Checker' uses undefined class 'llvm::sandboxir::IRSnapshotChecker'
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1859): error C2440: 'initializing': cannot convert from 'llvm::sandboxir::Context' to 'int'
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1859): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1880): error C2079: 'Checker' uses undefined class 'llvm::sandboxir::IRSnapshotChecker'
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1880): error C2440: 'initializing': cannot convert from 'llvm::sandboxir::Context' to 'int'
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1880): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1902): error C2079: 'Checker' uses undefined class 'llvm::sandboxir::IRSnapshotChecker'
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1902): error C2440: 'initializing': cannot convert from 'llvm::sandboxir::Context' to 'int'
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\SandboxIR\TrackerTest.cpp(1902): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
[706/722] Linking CXX executable unittests\Transforms\Scalar\ScalarTests.exe
[707/722] Building CXX object unittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\IntrinsicInstTest.cpp.obj
[708/722] Building CXX object unittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\OperatorTest.cpp.obj
[709/722] Building CXX object unittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\PassTest.cpp.obj
[710/722] Building CXX object unittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\RegionTest.cpp.obj
[711/722] Building CXX object unittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\TypesTest.cpp.obj
[712/722] Building CXX object unittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\UtilsTest.cpp.obj
[713/722] Building CXX object unittests\Transforms\Vectorize\SandboxVectorizer\CMakeFiles\SandboxVectorizerTests.dir\IntervalTest.cpp.obj
[714/722] Building CXX object unittests\Transforms\Vectorize\SandboxVectorizer\CMakeFiles\SandboxVectorizerTests.dir\LegalityTest.cpp.obj
[715/722] Building CXX object unittests\Transforms\Vectorize\SandboxVectorizer\CMakeFiles\SandboxVectorizerTests.dir\VecUtilsTest.cpp.obj
[716/722] Building CXX object unittests\Transforms\Vectorize\SandboxVectorizer\CMakeFiles\SandboxVectorizerTests.dir\SchedulerTest.cpp.obj
[717/722] Building CXX object unittests\Transforms\Vectorize\SandboxVectorizer\CMakeFiles\SandboxVectorizerTests.dir\DependencyGraphTest.cpp.obj
[718/722] Building CXX object unittests\Transforms\Vectorize\SandboxVectorizer\CMakeFiles\SandboxVectorizerTests.dir\SeedCollectorTest.cpp.obj
[719/722] Building CXX object unittests\SandboxIR\CMakeFiles\SandboxIRTests.dir\SandboxIRTest.cpp.obj
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 18, 2024

LLVM Buildbot has detected a new failure on builder fuchsia-x86_64-linux running on fuchsia-debian-64-us-central1-a-1 while building llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/8371

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1096/1347] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/FSUniqueIDTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1097/1347] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/IntrinsicInstTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1098/1347] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ExtensibleRTTITest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1099/1347] Building CXX object unittests/Option/CMakeFiles/OptionTests.dir/OptionParsingTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1100/1347] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o
FAILED: unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-uxuubj3_/unittests/SandboxIR -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-uxuubj3_/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/third-party/unittest/googletest/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffat-lto-objects -no-canonical-prefixes -O3 -DNDEBUG -std=c++17 -fvisibility=default  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Wno-suggest-override -MD -MT unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o -MF unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o.d -o unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1859:31: error: expected ';' after expression
 1859 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                               ^
      |                               ;
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1859:14: error: no member named 'IRSnapshotChecker' in namespace 'llvm::sandboxir'
 1859 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |   ~~~~~~~~~~~^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1859:32: error: use of undeclared identifier 'Checker'
 1859 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                                ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1860:3: error: use of undeclared identifier 'Checker'
 1860 |   Checker.save();
      |   ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1861:3: error: use of undeclared identifier 'Checker'
 1861 |   Checker.expectNoDiff();
      |   ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1880:31: error: expected ';' after expression
 1880 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                               ^
      |                               ;
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1880:14: error: no member named 'IRSnapshotChecker' in namespace 'llvm::sandboxir'
 1880 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |   ~~~~~~~~~~~^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1880:32: error: use of undeclared identifier 'Checker'
 1880 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                                ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1881:3: error: use of undeclared identifier 'Checker'
 1881 |   Checker.save();
      |   ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1883:16: error: use of undeclared identifier 'Checker'
 1883 |   EXPECT_DEATH(Checker.expectNoDiff(), "Found IR difference");
      |                ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1902:31: error: expected ';' after expression
 1902 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                               ^
      |                               ;
Step 7 (check) failure: check (failure)
...
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1096/1347] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/FSUniqueIDTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1097/1347] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/IntrinsicInstTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1098/1347] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ExtensibleRTTITest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1099/1347] Building CXX object unittests/Option/CMakeFiles/OptionTests.dir/OptionParsingTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1100/1347] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o
FAILED: unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-uxuubj3_/unittests/SandboxIR -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-uxuubj3_/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/third-party/unittest/googletest/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffat-lto-objects -no-canonical-prefixes -O3 -DNDEBUG -std=c++17 -fvisibility=default  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Wno-suggest-override -MD -MT unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o -MF unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o.d -o unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TrackerTest.cpp.o -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1859:31: error: expected ';' after expression
 1859 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                               ^
      |                               ;
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1859:14: error: no member named 'IRSnapshotChecker' in namespace 'llvm::sandboxir'
 1859 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |   ~~~~~~~~~~~^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1859:32: error: use of undeclared identifier 'Checker'
 1859 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                                ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1860:3: error: use of undeclared identifier 'Checker'
 1860 |   Checker.save();
      |   ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1861:3: error: use of undeclared identifier 'Checker'
 1861 |   Checker.expectNoDiff();
      |   ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1880:31: error: expected ';' after expression
 1880 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                               ^
      |                               ;
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1880:14: error: no member named 'IRSnapshotChecker' in namespace 'llvm::sandboxir'
 1880 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |   ~~~~~~~~~~~^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1880:32: error: use of undeclared identifier 'Checker'
 1880 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                                ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1881:3: error: use of undeclared identifier 'Checker'
 1881 |   Checker.save();
      |   ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1883:16: error: use of undeclared identifier 'Checker'
 1883 |   EXPECT_DEATH(Checker.expectNoDiff(), "Found IR difference");
      |                ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/unittests/SandboxIR/TrackerTest.cpp:1902:31: error: expected ';' after expression
 1902 |   sandboxir::IRSnapshotChecker Checker(Ctx);
      |                               ^
      |                               ;

slackito added a commit that referenced this pull request Nov 18, 2024
…evert (#115968)" (#116671)

This PR re-lands #115968 with a
fix for a buildbot failure.

The `IRSnapshotChecker` class is only defined in debug mode, so its unit
tests must also be inside `#ifndef NDEBUG`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants