Skip to content

[NFC] Rename Intrinsic::getDeclaration to getOrInsertDeclaration#111752

Merged
jurahul merged 1 commit into
llvm:mainfrom
jurahul:rename_intrinsic_get_declaration
Oct 11, 2024
Merged

[NFC] Rename Intrinsic::getDeclaration to getOrInsertDeclaration#111752
jurahul merged 1 commit into
llvm:mainfrom
jurahul:rename_intrinsic_get_declaration

Conversation

@jurahul

@jurahul jurahul commented Oct 9, 2024

Copy link
Copy Markdown
Contributor

Rename the function to reflect its correct behavior and to be consistent with Module::getOrInsertFunction. This is also in preparation of adding a new Intrinsic::getDeclaration that will have behavior similar to Module::getFunction (i.e, just lookup, no creation).

Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is also in preparation of
adding a new `Intrinsic::getDeclaration` that will have behavior similar
to `Module::getFunction` (i.e, just lookup, no creation).
@llvm-ci

llvm-ci commented Oct 11, 2024

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder clang-x86_64-debian-fast running on gribozavr4 while building clang,llvm,mlir,polly at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
/// \param KeyT The original key type, which requires the implementation of
     ^~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/ProfileData/HashKeyMap.h:46:6: warning: '\param' command used in a comment that is not attached to a function declaration [-Wdocumentation]
/// \param ValueT The original mapped type, which has the same requirement as
     ^~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/ProfileData/HashKeyMap.h:48:6: warning: '\param' command used in a comment that is not attached to a function declaration [-Wdocumentation]
/// \param MapTArgs Additional template parameters passed to the underlying
     ^~~~~
4 warnings generated.
37.230 [4257/96/1658] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o
FAILED: tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/clang-x86_64-debian-fast/llvm.obj/tools/clang/lib/CodeGen -I/b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen -I/b/1/clang-x86_64-debian-fast/llvm.src/clang/include -I/b/1/clang-x86_64-debian-fast/llvm.obj/tools/clang/include -I/b/1/clang-x86_64-debian-fast/llvm.obj/include -I/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include -std=c++11 -Wdocumentation -Wno-documentation-deprecated-sync -fPIC -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 -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o -MF tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o.d -o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o -c /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGBuiltin.cpp
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGBuiltin.cpp:13:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/ABIInfo.h:12:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/Attr.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/Decl.h:17:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/APValue.h:372:14: warning: parameter 'UninitArray' not found in the function declaration [-Wdocumentation]
  /// \param UninitArray Marker. Pass an empty UninitArray.
             ^~~~~~~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/APValue.h:380:14: warning: parameter 'UninitStruct' not found in the function declaration [-Wdocumentation]
  /// \param UninitStruct Marker. Pass an empty UninitStruct.
             ^~~~~~~~~~~~
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGBuiltin.cpp:14:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGCUDARuntime.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/GlobalDecl.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/DeclCXX.h:22:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/Expr.h:5228:21: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]
  /// literal or an @encode?
                    ^~~~~~~
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGBuiltin.cpp:14:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGCUDARuntime.h:18:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/GlobalDecl.h:20:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/DeclOpenMP.h:21:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/OpenMPClause.h:6508:20: warning: empty paragraph passed to '\param' command [-Wdocumentation]
  /// \param PreInit
      ~~~~~~~~~~~~~^
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/AST/OpenMPClause.h:6602:20: warning: empty paragraph passed to '\param' command [-Wdocumentation]
  /// \param PreInit
      ~~~~~~~~~~~~~^
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGBuiltin.cpp:15:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGCXXABI.h:17:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CodeGenFunction.h:16:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGBuilder.h:13:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CGValue.h:19:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/CodeGen/CodeGenTBAA.h:20:
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/IR/MDBuilder.h:64:14: warning: parameter 'Do' not found in the function declaration [-Wdocumentation]
  /// @param Do these weights come from __builtin_expect*
             ^~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/IR/MDBuilder.h:64:14: note: did you mean 'IsExpected'?

@llvm-ci

llvm-ci commented Oct 11, 2024

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building clang,llvm,mlir,polly at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
336.099 [2470/96/4429] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/PointerIterationChecker.cpp.o
336.115 [2469/96/4430] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/RetainCountChecker/RetainCountDiagnostics.cpp.o
336.123 [2468/96/4431] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/ReturnUndefChecker.cpp.o
336.146 [2467/96/4432] Linking CXX static library lib/libLLVMCoverage.a
336.163 [2466/96/4433] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/SetgidSetuidOrderChecker.cpp.o
336.183 [2465/96/4434] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/SmartPtrChecker.cpp.o
336.185 [2464/96/4435] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/WebKit/ASTUtils.cpp.o
336.203 [2463/96/4436] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/StdLibraryFunctionsChecker.cpp.o
336.235 [2462/96/4437] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/WebKit/PtrTypesSemantics.cpp.o
336.247 [2461/96/4438] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o
FAILED: tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-x86_64-debian-dylib/build/tools/clang/lib/CodeGen -I/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/lib/CodeGen -I/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/include -I/b/1/llvm-x86_64-debian-dylib/build/tools/clang/include -I/b/1/llvm-x86_64-debian-dylib/build/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include -fPIC -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 -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o -MF tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o.d -o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:18885:41: error: no member named 'getDeclaration' in namespace 'llvm::Intrinsic'
      return EmitRuntimeCall(Intrinsic::getDeclaration(
                             ~~~~~~~~~~~^
1 error generated.
336.248 [2461/95/4439] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/SimpleStreamChecker.cpp.o
336.248 [2461/94/4440] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/ModelConsumer.cpp.o
336.266 [2461/93/4441] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/StackAddrEscapeChecker.cpp.o
336.283 [2461/92/4442] Linking CXX static library lib/libLLVMAnalysis.a
336.308 [2461/91/4443] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/STLAlgorithmModeling.cpp.o
336.318 [2461/90/4444] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/CreateCheckerManager.cpp.o
336.338 [2461/89/4445] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/AVR.cpp.o
336.377 [2461/88/4446] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/StdVariantChecker.cpp.o
336.389 [2461/87/4447] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/StringChecker.cpp.o
336.392 [2461/86/4448] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGNonTrivialStruct.cpp.o
336.402 [2461/85/4449] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/RunLoopAutoreleaseLeakChecker.cpp.o
336.421 [2461/84/4450] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/TrustNonnullChecker.cpp.o
336.470 [2461/83/4451] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/CSKY.cpp.o
336.679 [2461/82/4452] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/TaintTesterChecker.cpp.o
336.703 [2461/81/4453] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/ValistChecker.cpp.o
336.722 [2461/80/4454] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/TraversalChecker.cpp.o
336.723 [2461/79/4455] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/TrustReturnsNonnullChecker.cpp.o
336.733 [2461/78/4456] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/Taint.cpp.o
336.740 [2461/77/4457] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/VLASizeChecker.cpp.o
336.777 [2461/76/4458] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefinedArraySubscriptChecker.cpp.o
336.781 [2461/75/4459] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefinedAssignmentChecker.cpp.o
336.797 [2461/74/4460] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UninitializedObject/UninitializedPointee.cpp.o
336.798 [2461/73/4461] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefResultChecker.cpp.o
336.799 [2461/72/4462] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/TestAfterDivZeroChecker.cpp.o
336.818 [2461/71/4463] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefBranchChecker.cpp.o
336.819 [2461/70/4464] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/StreamChecker.cpp.o
336.888 [2461/69/4465] Building CXX object tools/clang/lib/StaticAnalyzer/Frontend/CMakeFiles/obj.clangStaticAnalyzerFrontend.dir/FrontendActions.cpp.o
336.926 [2461/68/4466] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefCapturedBlockVarChecker.cpp.o
336.965 [2461/67/4467] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/VforkChecker.cpp.o
336.973 [2461/66/4468] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UnixAPIChecker.cpp.o
336.981 [2461/65/4469] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefinedNewArraySizeChecker.cpp.o
337.023 [2461/64/4470] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UnreachableCodeChecker.cpp.o
337.152 [2461/63/4471] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UninitializedObject/UninitializedObjectChecker.cpp.o

@llvm-ci

llvm-ci commented Oct 11, 2024

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder bolt-x86_64-ubuntu-nfc running on bolt-worker while building clang,llvm,mlir,polly at step 8 "test-build-bolt-check-bolt".

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

Here is the relevant piece of the build log for the reference
Step 8 (test-build-bolt-check-bolt) failure: test (failure)
...
43.669 [103/18/60] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ABIInfoImpl.cpp.o
43.841 [102/18/61] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCUDARuntime.cpp.o
44.485 [101/18/62] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGAtomic.cpp.o
44.962 [100/18/63] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCXX.cpp.o
45.248 [99/18/64] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCXXABI.cpp.o
47.250 [98/18/65] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCUDANV.cpp.o
47.812 [97/18/66] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBlocks.cpp.o
49.174 [96/18/67] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCleanup.cpp.o
51.680 [95/18/68] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCoroutine.cpp.o
51.992 [94/18/69] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o
FAILED: tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o 
ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/tools/clang/lib/CodeGen -I/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/llvm-project/clang/lib/CodeGen -I/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/llvm-project/clang/include -I/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/tools/clang/include -I/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/build/include -I/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o -MF tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o.d -o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o -c /home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp: In member function ‘llvm::Value* clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(unsigned int, const clang::CallExpr*, clang::CodeGen::ReturnValueSlot)’:
/home/worker/bolt-worker2/bolt-x86_64-ubuntu-nfc/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:18885:41: error: ‘getDeclaration’ is not a member of ‘llvm::Intrinsic’; did you mean ‘getOrInsertDeclaration’?
18885 |       return EmitRuntimeCall(Intrinsic::getDeclaration(
      |                                         ^~~~~~~~~~~~~~
      |                                         getOrInsertDeclaration
52.361 [94/17/70] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/BackendUtil.cpp.o
52.775 [94/16/71] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGClass.cpp.o
57.098 [94/15/72] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDeclCXX.cpp.o
57.758 [94/14/73] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCall.cpp.o
58.745 [94/13/74] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprComplex.cpp.o
60.278 [94/12/75] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprCXX.cpp.o
60.338 [94/11/76] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGException.cpp.o
60.394 [94/10/77] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDecl.cpp.o
60.398 [94/9/78] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGHLSLRuntime.cpp.o
60.568 [94/8/79] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprAgg.cpp.o
61.509 [94/7/80] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGGPUBuiltin.cpp.o
62.301 [94/6/81] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprConstant.cpp.o
64.139 [94/5/82] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTContext.cpp.o
64.780 [94/4/83] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprScalar.cpp.o
64.826 [94/3/84] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExpr.cpp.o
65.313 [94/2/85] Building CXX object lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o
69.966 [94/1/86] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDebugInfo.cpp.o
ninja: build stopped: subcommand failed.

@DanielCChen

Copy link
Copy Markdown
Contributor

@jurahul
It seems this PR is missing a test file libcxxabi/test/test_demangle.pass.cpp.
It has a line of

{"_ZN4llvm9Intrinsic14getDeclarationEPNS_6ModuleENS0_2IDEPPKNS_4TypeEj", "llvm::Intrinsic::getDeclaration(llvm::Module*, llvm::Intrinsic::ID, llvm::Type const**, unsigned int)"},

@jurahul

jurahul commented Oct 11, 2024 via email

Copy link
Copy Markdown
Contributor Author

@DanielCChen

Copy link
Copy Markdown
Contributor

I see. I don't have strong preference although it would be nice to use some function that exists.

@nikic

nikic commented Oct 11, 2024

Copy link
Copy Markdown
Contributor

test_demangle should definitely not be updated when renaming functions.

@jurahul

jurahul commented Oct 11, 2024 via email

Copy link
Copy Markdown
Contributor Author

@DanielCChen

Copy link
Copy Markdown
Contributor

test_demangle should definitely not be updated when renaming functions.

Could you please explain a bit more since this is new to me? Thanks in advance!

@nikic

nikic commented Oct 11, 2024

Copy link
Copy Markdown
Contributor

test_demangle should definitely not be updated when renaming functions.

Could you please explain a bit more since this is new to me? Thanks in advance!

The use of LLVM symbols in this file is incidental -- it's just a data set of mangled C++ symbol names. The file should only change if the mangling implementation changes.

@DanielCChen

Copy link
Copy Markdown
Contributor

test_demangle should definitely not be updated when renaming functions.

Could you please explain a bit more since this is new to me? Thanks in advance!

The use of LLVM symbols in this file is incidental -- it's just a data set of mangled C++ symbol names. The file should only change if the mangling implementation changes.

OK. I see. Yeah, makes senses now as it reduces maintenance cost. Thanks for the explanation.

@aeubanks

Copy link
Copy Markdown
Contributor

for such a wide-reaching change, it would have been nice to add the new function in one commit, update users in other commits, then remove the old function in one last commit. makes it easier to revert the removal of the old function, and makes it easier for out of tree users to to migrate

@jurahul

jurahul commented Oct 11, 2024 via email

Copy link
Copy Markdown
Contributor Author

@nikic

nikic commented Oct 11, 2024

Copy link
Copy Markdown
Contributor

TBH I am wondering if we should revert this rename. I don't think it's a good idea to reuse getDeclaration with substantially different semantics, and if we're not reusing it, then there's not much point to rename...

Instead of having getOrInsertDeclaration + getDeclaration with a meaning inversion, we can have getDeclaration and getDeclarationIfExists without the inversion.

@jurahul

jurahul commented Oct 11, 2024 via email

Copy link
Copy Markdown
Contributor Author

@jurahul

jurahul commented Oct 11, 2024 via email

Copy link
Copy Markdown
Contributor Author

@dtcxzyw

dtcxzyw commented Oct 13, 2024

Copy link
Copy Markdown
Member

TBH I am wondering if we should revert this rename. I don't think it's a good idea to reuse getDeclaration with substantially different semantics, and if we're not reusing it, then there's not much point to rename...

Instead of having getOrInsertDeclaration + getDeclaration with a meaning inversion, we can have getDeclaration and getDeclarationIfExists without the inversion.

I'd like to revert this change, or just add Intrinsic::getDeclaration back and mark it as deprecated. I have encountered a build error on Alive2.

@jurahul

jurahul commented Oct 13, 2024 via email

Copy link
Copy Markdown
Contributor Author

@nikic

nikic commented Oct 13, 2024

Copy link
Copy Markdown
Contributor

To reuse the name with different semantics, I'd put removal and reuse in different releases, so it takes about half a year. (Deprecation itself can be very short-lived.)

@jurahul

jurahul commented Oct 13, 2024 via email

Copy link
Copy Markdown
Contributor Author

@DanielCChen

DanielCChen commented Oct 13, 2024

Copy link
Copy Markdown
Contributor

We have downstream code that used getDeclaration and now we have changed to getOrInsertDeclaration for all places.
My understanding from reading the thread is that getOrInsertDelcaration will stay and a new findDeclaration will be added temporarily, and it will eventually be changed to the "new" getDeclaration withe the new semantic. Do I miss anything there?

@jurahul

jurahul commented Oct 14, 2024

Copy link
Copy Markdown
Contributor Author

We have downstream code that used getDeclaration and now we have changed to getOrInsertDeclaration for all places. My understanding from reading the thread is that getOrInsertDelcaration will stay and a new findDeclaration will be added temporarily, and it will eventually be changed to the "new" getDeclaration withe the new semantic. Do I miss anything there?

Yes, that is the proposed plan, but not yet signed off on by folks. The temporary step is so that other out-of-tree code that uses getDeclaration had ample time window to fail building and moving to getOrInsertDeclaration before the new getDeclaration with new semantics is added.

DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
…lvm#111752)

Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is also in preparation of
adding a new `Intrinsic::getDeclaration` that will have behavior similar
to `Module::getFunction` (i.e, just lookup, no creation).
Ninja3047 added a commit to lifting-bits/remill that referenced this pull request Dec 16, 2025
`llvm::Instrinsic::getDeclaration` will be removed soon, deprecation started in llvm 21

llvm/llvm-project#111752
llvm/llvm-project#112242
kyle-elliott-tob pushed a commit to lifting-bits/remill that referenced this pull request Dec 16, 2025
`llvm::Instrinsic::getDeclaration` will be removed soon, deprecation started in llvm 21

llvm/llvm-project#111752
llvm/llvm-project#112242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

9 participants