Skip to content

[AMDGPU][MC] Allow UC_VERSION_* constant reuse #96461

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 6 commits into from
Jul 7, 2024

Conversation

perlfu
Copy link
Contributor

@perlfu perlfu commented Jun 24, 2024

If more than one disassembler is created for a context then allow reuse of existing constants.
Update assertion to validate constant contents.

@llvmbot
Copy link
Member

llvmbot commented Jun 24, 2024

@llvm/pr-subscribers-mc

@llvm/pr-subscribers-backend-amdgpu

Author: Carl Ritson (perlfu)

Changes

If more than one disassembler is created for a context then allow reuse of existing constants.
Update assertion to validate constant contents.


Full diff: https://github.com/llvm/llvm-project/pull/96461.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp (+6-2)
diff --git a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
index 76a559c9443bd..d61e8ebb866df 100644
--- a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+++ b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
@@ -2366,8 +2366,12 @@ const MCExpr *AMDGPUDisassembler::createConstantSymbolExpr(StringRef Id,
                                                            int64_t Val) {
   MCContext &Ctx = getContext();
   MCSymbol *Sym = Ctx.getOrCreateSymbol(Id);
-  assert(!Sym->isVariable());
-  Sym->setVariableValue(MCConstantExpr::create(Val, Ctx));
+  int64_t Res = ~Val;
+  assert(!Sym->isVariable() ||
+         (Sym->getVariableValue()->evaluateAsAbsolute(Res) && Res == Val));
+  (void)Res;
+  if (!Sym->isVariable())
+    Sym->setVariableValue(MCConstantExpr::create(Val, Ctx));
   return MCSymbolRefExpr::create(Sym, Ctx);
 }
 

Copy link
Collaborator

@kosarev kosarev left a comment

Choose a reason for hiding this comment

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

LGTM. This resolves amdgpu-dis test failures.

Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

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

can you add a test for the user redefined case

@perlfu
Copy link
Contributor Author

perlfu commented Jun 25, 2024

can you add a test for the user redefined case

This might be difficult.
The main issue we are seeing right now is a tool that ends up initializing multiple disassembler instance on the same context.
We can probably replicate this in a unit test if necessary.

@arsenm
Copy link
Contributor

arsenm commented Jun 25, 2024

can you add a test for the user redefined case

This might be difficult. The main issue we are seeing right now is a tool that ends up initializing multiple disassembler instance on the same context. We can probably replicate this in a unit test if necessary.

Wouldn't this be just .set UC_VERSION_something something in an assembler file?

@llvmbot llvmbot added the mc Machine (object) code label Jul 2, 2024
@perlfu
Copy link
Contributor Author

perlfu commented Jul 2, 2024

This might be difficult. The main issue we are seeing right now is a tool that ends up initializing multiple disassembler instance on the same context. We can probably replicate this in a unit test if necessary.

Wouldn't this be just .set UC_VERSION_something something in an assembler file?

Using the .set directive in an assembly file only tests the assembly override of the symbol.
The issue that need solving is multiple disassemblers in the same MCContext.

I've added an assembly override test and unit tests that cover the use of multiple diassemblers in the same context as well as UC_VERSION overrides.
This involved fixing up the code to use an UC_VERSION overrides.

perlfu added 3 commits July 2, 2024 15:54
If more than one disassembler is created for a context then
allow reuse of existing constants.
Update assertion to validate constant contents.
- Change assertion to comment
@kosarev kosarev self-requested a review July 2, 2024 10:01
Copy link
Collaborator

@kosarev kosarev left a comment

Choose a reason for hiding this comment

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

We have some code downstream suffering from failures on the assertion in the disassembler. I wonder if we can provide a fix for that using the unit test from this patch and all the changes related to attempts to deal with changed symbol values removed (including in the unit test).

const MCExpr *E = nullptr;
for (auto *VersionSym : UCVersionSymbols) {
int64_t Val;
if (!VersionSym->evaluateAsAbsolute(Val))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doing evaluateAsAbsolute() here doesn't prevent the symbols from being redefined later, so looks an unnecessary complication.

A proper solution would involve supporting constant symbols. Until then it seems whatever we do, it won't help us where any of the symbols get redefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The point of the evaluation is to obtain the current value of the symbol for matching versions to it.
If the symbol is later redefined then the newer version should match.

// Existing symbol may potentially have a different value to the one
// requested, which allows for user redefinition of symbols.
if (!Sym->isVariable()) {
Sym->setRedefinable(true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this call necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allow redefinition at assembly stage.

@@ -0,0 +1,41 @@
// RUN: llvm-mc -triple=amdgcn -show-encoding -mcpu=gfx1010 %s | FileCheck --check-prefix=GFX10 %s

// Test that UC_VERSION* symbols can be redefined.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This sounds like we want them be redefinable for some reason whereas it's actually quite the opposite.

As it is, this seem to simply test that symbols can be redefined, for which we probably already have some generic tests in MC/AsmParser?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just state this is nonsense and we just don't want to assert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test would pass with or without the code change.
If we think it is useful to check then I can add it back.

@kosarev kosarev self-requested a review July 2, 2024 10:59
@perlfu perlfu force-pushed the amdgpu-dis-constant-reinit branch from c5cea11 to cbbc9b5 Compare July 3, 2024 00:29
@perlfu
Copy link
Contributor Author

perlfu commented Jul 3, 2024

@kosarev - I am getting mixed messages here about what the desired solution is.

If this is going to be updated, maybe we don't really want the assert at all, because generally there's no guarantee the user won't redefine the symbol and it wouldn't be nice to crash when they do.

If we are not going to crash then, I believe we should give redefinition some defined/stable behaviour.

This sounds like we want them be redefinable for some reason whereas it's actually quite the opposite.

In which case this needs to use a different mechanism.


I cannot reasonably put any more time in on this, so here is my final offer:

  • Revert the change back to the initial version, where assertion occurs if UC_VERSION symbols do not have expected value, but incorporating reviewer feedback.
  • Remove custom-uc-version.s.
  • Remove unit test for custom symbol redefinition, but leave multiple disassembler in same context unit test covering initial fixed bug.

@arsenm
Copy link
Contributor

arsenm commented Jul 3, 2024

Ideally we would just raise an error if it's redefined, not assert

@perlfu
Copy link
Contributor Author

perlfu commented Jul 3, 2024

Ideally we would just raise an error if it's redefined, not assert

I'm not against changing this to a report_fatal_error call, but it is a leaky check anyway.
It only covers the case that a symbol is initialized before a disassembler.
In most cases I would expect a disassembler to be initialized before symbols are parsed and redefinition happens.

Copy link
Collaborator

@kosarev kosarev left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! An error message or just removing the assert(!Sym->isVariable() || ... bit would be great.

If we are not going to crash then, I believe we should give redefinition some defined/stable behaviour.

Yes, so just letting it use the new (possibly incorrect) value without crashing should be fine for now as we don't have any better options. But us not being able to prevent redefinition doesn't mean we want the user to believe that there is any particular asm/disasm behaviour to be expected if they try to.

In which case this needs to use a different mechanism.

Yes. As soon as we have one.

- Restore redefinition unit tests to prove absence of crash.
@perlfu
Copy link
Contributor Author

perlfu commented Jul 4, 2024

LGTM, thanks! An error message or just removing the assert(!Sym->isVariable() || ... bit would be great.

I have made this output a warning to the MCContext.
This seems like the right thing to do as the behaviour of these messages is configurable through standard mechanisms (can be elevated to error, or suppressed entirely).

I have put back the redefinition unit test as proof that there is no crash.
It also checks that the warning message is output as expected.

Copy link

github-actions bot commented Jul 4, 2024

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

@kosarev
Copy link
Collaborator

kosarev commented Jul 4, 2024

Still LGTM.

@perlfu perlfu merged commit e83e53b into llvm:main Jul 7, 2024
7 checks passed
@perlfu perlfu deleted the amdgpu-dis-constant-reinit branch July 7, 2024 08:39
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 7, 2024

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building llvm at step 6 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference:

Step 6 (build-unified-tree) failure: build (failure)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 7, 2024

LLVM Buildbot has detected a new failure on builder clang-armv7-global-isel running on linaro-clang-armv7-global-isel while building llvm at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference:

Step 7 (ninja check 1) failure: stage 1 checked (failure)
...
[893/1154] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/CoverageMappingTest.cpp.o
[894/1154] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/ItaniumManglingCanonicalizerTest.cpp.o
[895/1154] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/PGOCtxProfReaderWriterTest.cpp.o
[896/1154] Linking CXX executable unittests/Remarks/RemarksTests
[897/1154] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/SymbolRemappingReaderTest.cpp.o
[898/1154] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/MemProfTest.cpp.o
[899/1154] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/SampleProfTest.cpp.o
[900/1154] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/SandboxIRTest.cpp.o
[901/1154] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/AddressRangeTest.cpp.o
[902/1154] Building CXX object unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o
FAILED: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/include -I/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -MF unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o.d -o unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -c /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp
../llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:110:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  110 |   Status = DisAsm1->getInstruction(Inst1, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
../llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
../llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:125:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  125 |   Status = DisAsm2->getInstruction(Inst2, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
../llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
../llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:193:38: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  193 |         DisAsm->getInstruction(Inst, InstSize, Bytes, 0, Annotations);
      |                                      ^~~~~~~~
../llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
3 errors generated.
[903/1154] Linking CXX executable unittests/ObjectYAML/ObjectYAMLTests
[904/1154] Linking CXX executable unittests/ProfileData/ProfileDataTests
[905/1154] Linking CXX executable unittests/Passes/PassBuilderBindings/PassesBindingsTests
[906/1154] Linking CXX executable unittests/Passes/Plugins/PluginsTests
[907/1154] Linking CXX executable unittests/MIR/MIRTests
[908/1154] Linking CXX executable unittests/MI/MITests
[909/1154] Linking CXX executable tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
[910/1154] Linking CXX executable tools/clang/unittests/Frontend/FrontendTests
[911/1154] Linking CXX executable tools/clang/unittests/Tooling/ToolingTests
[912/1154] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
ninja: build stopped: subcommand failed.

nico added a commit that referenced this pull request Jul 7, 2024
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 7, 2024

LLVM Buildbot has detected a new failure on builder clang-armv7-vfpv3-2stage running on linaro-clang-armv7-vfpv3-2stage while building llvm at step 10 "ninja check 2".

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

Here is the relevant piece of the build log for the reference:

Step 10 (ninja check 2) failure: stage 2 checked (failure)
...
[845/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/MetadataTest.cpp.o
[846/1154] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/StringTableBuilderTest.cpp.o
[847/1154] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/TargetRegistry.cpp.o
[848/1154] Linking CXX executable unittests/Linker/LinkerTests
[849/1154] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/MCDisassemblerTest.cpp.o
[850/1154] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/MCInstPrinter.cpp.o
[851/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VFABIDemanglerTest.cpp.o
[852/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VPIntrinsicTest.cpp.o
[853/1154] Building CXX object unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/DwarfRegMappings.cpp.o
[854/1154] Building CXX object unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o
FAILED: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o 
/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/stage1.install/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/stage2/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/stage2/include -I/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/stage2/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/third-party/unittest/googlemock/include -mcpu=cortex-a15 -mfpu=vfpv3 -marm -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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -MF unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o.d -o unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -c /home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp
/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:110:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  110 |   Status = DisAsm1->getInstruction(Inst1, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:125:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  125 |   Status = DisAsm2->getInstruction(Inst2, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:193:38: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  193 |         DisAsm->getInstruction(Inst, InstSize, Bytes, 0, Annotations);
      |                                      ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv7-vfpv3-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
3 errors generated.
[855/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/COFFObjectFileTest.cpp.o
[856/1154] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/DwarfLineTableHeaders.cpp.o
[857/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/ArchiveTest.cpp.o
[858/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/SymbolSizeTest.cpp.o
[859/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/ValueMapTest.cpp.o
[860/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/ObjectFileTest.cpp.o
[861/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/OffloadingTest.cpp.o
[862/1154] Building CXX object unittests/MC/SystemZ/CMakeFiles/SystemZAsmLexerTests.dir/SystemZAsmLexerTest.cpp.o
[863/1154] Building CXX object unittests/ObjectYAML/CMakeFiles/ObjectYAMLTests.dir/DWARFYAMLTest.cpp.o
[864/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/MinidumpTest.cpp.o
[865/1154] Building CXX object unittests/MI/CMakeFiles/MITests.dir/LiveIntervalTest.cpp.o
[866/1154] Building CXX object unittests/ObjectYAML/CMakeFiles/ObjectYAMLTests.dir/DXContainerYAMLTest.cpp.o
[867/1154] Building CXX object unittests/Frontend/CMakeFiles/LLVMFrontendTests.dir/OpenMPDecompositionTest.cpp.o
[868/1154] Building CXX object unittests/MIR/CMakeFiles/MIRTests.dir/MachineMetadata.cpp.o
[869/1154] Building CXX object unittests/ObjectYAML/CMakeFiles/ObjectYAMLTests.dir/ELFYAMLTest.cpp.o
[870/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PassBuilderCallbacksTest.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 7, 2024

LLVM Buildbot has detected a new failure on builder clang-armv7-2stage running on linaro-clang-armv7-2stage while building llvm at step 10 "ninja check 2".

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

Here is the relevant piece of the build log for the reference:

Step 10 (ninja check 2) failure: stage 2 checked (failure)
...
[848/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VectorBuilderTest.cpp.o
[849/1154] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/MCDisassemblerTest.cpp.o
[850/1154] Linking CXX executable unittests/Linker/LinkerTests
[851/1154] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/MCInstPrinter.cpp.o
[852/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/ValueMapTest.cpp.o
[853/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VFABIDemanglerTest.cpp.o
[854/1154] Building CXX object unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/DwarfRegMappings.cpp.o
[855/1154] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/DwarfLineTableHeaders.cpp.o
[856/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/COFFObjectFileTest.cpp.o
[857/1154] Building CXX object unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o
FAILED: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o 
/home/tcwg-buildbot/worker/clang-armv7-2stage/stage1.install/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-armv7-2stage/stage2/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-2stage/stage2/include -I/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-2stage/stage2/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/third-party/unittest/googlemock/include -mcpu=cortex-a15 -marm -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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -MF unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o.d -o unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -c /home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp
/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:110:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  110 |   Status = DisAsm1->getInstruction(Inst1, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:125:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  125 |   Status = DisAsm2->getInstruction(Inst2, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:193:38: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  193 |         DisAsm->getInstruction(Inst, InstSize, Bytes, 0, Annotations);
      |                                      ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
3 errors generated.
[858/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VPIntrinsicTest.cpp.o
[859/1154] Building CXX object unittests/MC/SystemZ/CMakeFiles/SystemZAsmLexerTests.dir/SystemZAsmLexerTest.cpp.o
[860/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/ArchiveTest.cpp.o
[861/1154] Linking CXX executable unittests/MC/MCTests
[862/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/ObjectFileTest.cpp.o
[863/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/OffloadingTest.cpp.o
[864/1154] Building CXX object unittests/ObjCopy/CMakeFiles/ObjCopyTests.dir/ObjCopyTest.cpp.o
[865/1154] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/MinidumpTest.cpp.o
[866/1154] Building CXX object unittests/ObjectYAML/CMakeFiles/ObjectYAMLTests.dir/DWARFYAMLTest.cpp.o
[867/1154] Building CXX object unittests/ObjectYAML/CMakeFiles/ObjectYAMLTests.dir/MinidumpYAMLTest.cpp.o
[868/1154] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PassBuilderCallbacksTest.cpp.o
[869/1154] Building CXX object unittests/ObjectYAML/CMakeFiles/ObjectYAMLTests.dir/DXContainerYAMLTest.cpp.o
[870/1154] Building CXX object unittests/MI/CMakeFiles/MITests.dir/LiveIntervalTest.cpp.o
[871/1154] Building CXX object unittests/MIR/CMakeFiles/MIRTests.dir/MachineMetadata.cpp.o
[872/1154] Building CXX object unittests/Frontend/CMakeFiles/LLVMFrontendTests.dir/OpenMPDecompositionTest.cpp.o
[873/1154] Building CXX object unittests/ObjectYAML/CMakeFiles/ObjectYAMLTests.dir/ELFYAMLTest.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 7, 2024

LLVM Buildbot has detected a new failure on builder clang-armv8-lld-2stage running on linaro-clang-armv8-lld-2stage while building llvm at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference:

Step 7 (ninja check 1) failure: stage 1 checked (failure)
...
[986/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/BasicBlockUtilsTest.cpp.o
[987/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/CloningTest.cpp.o
[988/1059] Linking CXX executable unittests/Target/TargetMachineCTests
[989/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/CodeExtractorTest.cpp.o
[990/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/ASanStackFrameLayoutTest.cpp.o
[991/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/CodeLayoutTest.cpp.o
[992/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/DebugifyTest.cpp.o
[993/1059] Linking CXX executable unittests/TextAPI/TextAPITests
[994/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/CodeMoverUtilsTest.cpp.o
[995/1059] Building CXX object unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o
FAILED: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_PTHREAD=0 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/stage1/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/stage1/include -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/stage1/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/third-party/unittest/googlemock/include -mcpu=cortex-a57 -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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -MF unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o.d -o unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -c /home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp
../llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:110:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  110 |   Status = DisAsm1->getInstruction(Inst1, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
../llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
../llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:125:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  125 |   Status = DisAsm2->getInstruction(Inst2, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
../llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
../llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:193:38: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  193 |         DisAsm->getInstruction(Inst, InstSize, Bytes, 0, Annotations);
      |                                      ^~~~~~~~
../llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
3 errors generated.
[996/1059] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
[997/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/FunctionComparatorTest.cpp.o
[998/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/LoopRotationUtilsTest.cpp.o
[999/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/ModuleUtilsTest.cpp.o
[1000/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/LocalTest.cpp.o
[1001/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/IntegerDivisionTest.cpp.o
[1002/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/MemTransferLowering.cpp.o
[1003/1059] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/LoopUtilsTest.cpp.o
[1004/1059] Linking CXX executable unittests/Target/X86/X86Tests
[1005/1059] Linking CXX executable unittests/Transforms/Coroutines/CoroTests
[1006/1059] Linking CXX executable unittests/Transforms/Instrumentation/InstrumentationTests
[1007/1059] Linking CXX executable unittests/Transforms/IPO/IPOTests
[1008/1059] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
ninja: build stopped: subcommand failed.
Step 13 (ninja check 2) failure: stage 2 checked (failure)
...
[736/1059] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PatternMatch.cpp.o
[737/1059] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/StringTableBuilderTest.cpp.o
[738/1059] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/MCDisassemblerTest.cpp.o
[739/1059] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/ValueMapTest.cpp.o
[740/1059] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/MCInstPrinter.cpp.o
[741/1059] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/MetadataTest.cpp.o
[742/1059] Building CXX object unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/DwarfRegMappings.cpp.o
[743/1059] Building CXX object unittests/Frontend/CMakeFiles/LLVMFrontendTests.dir/OpenMPIRBuilderTest.cpp.o
[744/1059] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VFABIDemanglerTest.cpp.o
[745/1059] Building CXX object unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o
FAILED: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o 
/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/stage1.install/bin/clang++ -DGTEST_HAS_PTHREAD=0 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/stage2/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/unittests/MC/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/stage2/include -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/stage2/lib/Target/AMDGPU -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/third-party/unittest/googlemock/include -mcpu=cortex-a57 -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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -MF unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o.d -o unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/Disassembler.cpp.o -c /home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp
/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:110:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  110 |   Status = DisAsm1->getInstruction(Inst1, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:125:43: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  125 |   Status = DisAsm2->getInstruction(Inst2, InstSize, Bytes, 0, Annotations);
      |                                           ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/unittests/MC/AMDGPU/Disassembler.cpp:193:38: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')
  193 |         DisAsm->getInstruction(Inst, InstSize, Bytes, 0, Annotations);
      |                                      ^~~~~~~~
/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:134:64: note: passing argument to parameter 'Size' here
  134 |   virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
      |                                                                ^
3 errors generated.
[746/1059] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/COFFObjectFileTest.cpp.o
[747/1059] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VPIntrinsicTest.cpp.o
[748/1059] Building CXX object unittests/MC/X86/CMakeFiles/X86MCTests.dir/X86MCDisassemblerTest.cpp.o
[749/1059] Building CXX object unittests/MC/SystemZ/CMakeFiles/SystemZAsmLexerTests.dir/SystemZAsmLexerTest.cpp.o
[750/1059] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/ArchiveTest.cpp.o
[751/1059] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/DXContainerTest.cpp.o
[752/1059] Building CXX object unittests/MC/CMakeFiles/MCTests.dir/DwarfLineTableHeaders.cpp.o
[753/1059] Building CXX object unittests/ObjCopy/CMakeFiles/ObjCopyTests.dir/ObjCopyTest.cpp.o
[754/1059] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/ELFTypesTest.cpp.o
[755/1059] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/GOFFObjectFileTest.cpp.o
[756/1059] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/ELFTest.cpp.o
[757/1059] Building CXX object unittests/MI/CMakeFiles/MITests.dir/LiveIntervalTest.cpp.o
[758/1059] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PassBuilderCallbacksTest.cpp.o
[759/1059] Building CXX object unittests/MIR/CMakeFiles/MIRTests.dir/MachineMetadata.cpp.o
[760/1059] Building CXX object unittests/Frontend/CMakeFiles/LLVMFrontendTests.dir/OpenMPDecompositionTest.cpp.o
[761/1059] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/ELFObjectFileTest.cpp.o
ninja: build stopped: subcommand failed.

@perlfu
Copy link
Contributor Author

perlfu commented Jul 7, 2024

@nico thank you for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AMDGPU mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants