[llvm] [BOLT][AArch64] Handle OpNegateRAState to enable optimizing binaries with pac-ret hardening (PR #120064)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 7 11:31:40 PDT 2025


Gergely =?utf-8?q?Bálint?= <balintgergely99 at gmail.com>,Gergely Balint
 <gergely.balint at arm.com>,Gergely Balint <gergely.balint at arm.com>,Gergely
 Balint <gergely.balint at arm.com>,
Gergely =?utf-8?q?Bálint?= <gergely.balint at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/120064 at github.com>


gulfemsavrun wrote:

We've started seeing a build failure affecting our toolchain builders on both Windows and Mac.
```
[4653/5000](63) Building CXX object tools\bolt\lib\Passes\CMakeFiles\LLVMBOLTPasses.dir\MarkRAStates.cpp.obj
FAILED: tools/bolt/lib/Passes/CMakeFiles/LLVMBOLTPasses.dir/MarkRAStates.cpp.obj 
C:\b\s\w\ir\x\w\cipd\bin\clang-cl.exe  /nologo -TP -DCMAKE_INSTALL_FULL_LIBDIR=\"/lib\" -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_GLIBCXX_ASSERTIONS -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:\b\s\w\ir\x\w\llvm_build\tools\bolt\lib\Passes -IC:\b\s\w\ir\x\w\llvm-llvm-project\bolt\lib\Passes -IC:\b\s\w\ir\x\w\rc\tensorflow-venv\store\python_venv-hkmrlc4m3ec6leekpl82qkh2kk\contents\Lib\site-packages\tensorflow\include -IC:\b\s\w\ir\x\w\llvm_build\include -IC:\b\s\w\ir\x\w\llvm-llvm-project\llvm\include -IC:\b\s\w\ir\x\w\llvm-llvm-project\bolt\include -IC:\b\s\w\ir\x\w\llvm_build\tools\bolt\include -imsvcC:\b\s\w\ir\x\w\install-zlib-x86_64-pc-windows-msvc\include -imsvcC:\b\s\w\ir\x\w\install-zstd-x86_64-pc-windows-msvc\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- -Werror=unguarded-availability-new /W4  -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported /Gw /O2 /Ob2  -std:c++17 -MT  /EHs-c- /GR- -UNDEBUG /showIncludes /Fotools\bolt\lib\Passes\CMakeFiles\LLVMBOLTPasses.dir\MarkRAStates.cpp.obj /Fdtools\bolt\lib\Passes\CMakeFiles\LLVMBOLTPasses.dir\LLVMBOLTPasses.pdb -c -- C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\lib\Passes\MarkRAStates.cpp
In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\lib\Passes\MarkRAStates.cpp:22:
In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\include\bolt/Passes/MarkRAStates.h:15:
In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\include\bolt/Passes/BinaryPasses.h:16:
In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\include\bolt/Core/BinaryContext.h:16:
In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\include\bolt/Core/AddressMap.h:17:
In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\include\llvm/MC/MCSymbol.h:16:
In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\include\llvm/ADT/StringMapEntry.h:19:
In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\include\llvm/ADT/StringRef.h:16:
C:\b\s\w\ir\cache\windows_sdk\VC\Tools\MSVC\14.34.31933\include\algorithm(509,13): error: no matching function for call to object of type '(lambda at C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\lib\Passes\MarkRAStates.cpp:136:7)'
  509 |         if (_Pred(*_UFirst)) {
      |             ^~~~~
C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\include\llvm/ADT/STLExtras.h(1964,15): note: in instantiation of function template specialization 'std::count_if<std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const unsigned long long, llvm::bolt::BinaryFunction>>>>, (lambda at C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\lib\Passes\MarkRAStates.cpp:136:7)>' requested here
 1964 |   return std::count_if(adl_begin(Range), adl_end(Range), P);
      |               ^
C:\b\s\w\ir\x\w\llvm-llvm-project\bolt\lib\Passes\MarkRAStates.cpp(136,7): note: candidate function not viable: no known conversion from 'value_type' (aka 'std::pair<const unsigned long long, llvm::bolt::BinaryFunction>') to 'std::pair<const unsigned long, BinaryFunction> &' for 1st argument
  136 |       [&](std::pair<const unsigned long, BinaryFunction> &P) {
      |       ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-host-windows-x64/b8701682236541037409/overview

https://github.com/llvm/llvm-project/pull/120064


More information about the llvm-commits mailing list