Skip to content

[flang] Add support to fir::cg in alias analysis #127827

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 5 commits into from
Feb 20, 2025

Conversation

SusanTan
Copy link
Contributor

Currently the alias analysis doesn't trace the source whenever there are operations from fir::cg dialect. This PR added support for fir::cg::XEmboxOp, fir::cg::XReboxOp, fir::cg::XDeclareOp for a specific application i'm working on.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Feb 19, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 19, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Susan Tan (ス-ザン タン) (SusanTan)

Changes

Currently the alias analysis doesn't trace the source whenever there are operations from fir::cg dialect. This PR added support for fir::cg::XEmboxOp, fir::cg::XReboxOp, fir::cg::XDeclareOp for a specific application i'm working on.


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

1 Files Affected:

  • (modified) flang/lib/Optimizer/Analysis/AliasAnalysis.cpp (+30-26)
diff --git a/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp b/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
index 70fa18ad65b9b..230f1e269c375 100644
--- a/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+++ b/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
@@ -19,6 +19,7 @@
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Value.h"
 #include "mlir/Interfaces/SideEffectInterfaces.h"
+#include "flang/Optimizer/CodeGen/CGOps.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Debug.h"
@@ -591,7 +592,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v,
             followBoxData = true;
           approximateSource = true;
         })
-        .Case<fir::EmboxOp, fir::ReboxOp>([&](auto op) {
+        .Case<fir::EmboxOp, fir::ReboxOp, fir::cg::XEmboxOp, fir::cg::XReboxOp>([&](auto op) {
           if (followBoxData) {
             v = op->getOperand(0);
             defOp = v.getDefiningOp();
@@ -604,6 +605,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v,
           Operation *loadMemrefOp = op.getMemref().getDefiningOp();
           bool isDeclareOp =
               llvm::isa_and_present<fir::DeclareOp>(loadMemrefOp) ||
+              llvm::isa_and_present<fir::cg::XDeclareOp>(loadMemrefOp) ||
               llvm::isa_and_present<hlfir::DeclareOp>(loadMemrefOp);
           if (isDeclareOp &&
               llvm::isa<omp::TargetOp>(loadMemrefOp->getParentOp())) {
@@ -666,7 +668,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v,
           global = llvm::cast<fir::AddrOfOp>(op).getSymbol();
           breakFromLoop = true;
         })
-        .Case<hlfir::DeclareOp, fir::DeclareOp>([&](auto op) {
+        .Case<hlfir::DeclareOp, fir::DeclareOp, fir::cg::XDeclareOp>([&](auto op) {
           bool isPrivateItem = false;
           if (omp::BlockArgOpenMPOpInterface argIface =
                   dyn_cast<omp::BlockArgOpenMPOpInterface>(op->getParentOp())) {
@@ -700,30 +702,32 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v,
               return;
             }
           }
-          auto varIf = llvm::cast<fir::FortranVariableOpInterface>(defOp);
-          // While going through a declare operation collect
-          // the variable attributes from it. Right now, some
-          // of the attributes are duplicated, e.g. a TARGET dummy
-          // argument has the target attribute both on its declare
-          // operation and on the entry block argument.
-          // In case of host associated use, the declare operation
-          // is the only carrier of the variable attributes,
-          // so we have to collect them here.
-          attributes |= getAttrsFromVariable(varIf);
-          isCapturedInInternalProcedure |=
-              varIf.isCapturedInInternalProcedure();
-          if (varIf.isHostAssoc()) {
-            // Do not track past such DeclareOp, because it does not
-            // currently provide any useful information. The host associated
-            // access will end up dereferencing the host association tuple,
-            // so we may as well stop right now.
-            v = defOp->getResult(0);
-            // TODO: if the host associated variable is a dummy argument
-            // of the host, I think, we can treat it as SourceKind::Argument
-            // for the purpose of alias analysis inside the internal procedure.
-            type = SourceKind::HostAssoc;
-            breakFromLoop = true;
-            return;
+          auto varIf = llvm::dyn_cast<fir::FortranVariableOpInterface>(defOp);
+          if(varIf){
+            // While going through a declare operation collect
+            // the variable attributes from it. Right now, some
+            // of the attributes are duplicated, e.g. a TARGET dummy
+            // argument has the target attribute both on its declare
+            // operation and on the entry block argument.
+            // In case of host associated use, the declare operation
+            // is the only carrier of the variable attributes,
+            // so we have to collect them here.
+            attributes |= getAttrsFromVariable(varIf);
+            isCapturedInInternalProcedure |=
+                varIf.isCapturedInInternalProcedure();
+            if (varIf.isHostAssoc()) {
+              // Do not track past such DeclareOp, because it does not
+              // currently provide any useful information. The host associated
+              // access will end up dereferencing the host association tuple,
+              // so we may as well stop right now.
+              v = defOp->getResult(0);
+              // TODO: if the host associated variable is a dummy argument
+              // of the host, I think, we can treat it as SourceKind::Argument
+              // for the purpose of alias analysis inside the internal procedure.
+              type = SourceKind::HostAssoc;
+              breakFromLoop = true;
+              return;
+            }
           }
           if (getLastInstantiationPoint) {
             // Fetch only the innermost instantiation point.

Copy link

github-actions bot commented Feb 19, 2025

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

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

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

The code changes look good to me, thanks!

Out of curiosity, what are you using this for?

@SusanTan
Copy link
Contributor Author

@tblah Hi Tom, it is for a downstream project where we use the FIR aa at a later stage down the FIR pipeline!

Copy link
Contributor

@razvanlupusoru razvanlupusoru left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Contributor

@Renaud-K Renaud-K left a comment

Choose a reason for hiding this comment

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

Thank you for the test and the formatting changes.

@Renaud-K Renaud-K merged commit 5bc5161 into llvm:main Feb 20, 2025
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 20, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-8-cmake-build-only running on rocm-docker-rhel-8 while building flang at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[7517/7649] Linking CXX shared library lib/libFIRSupport.so.21.0git
[7518/7649] Creating library symlink lib/libFIRSupport.so
[7519/7649] Linking CXX shared library lib/libHLFIRDialect.so.21.0git
[7520/7649] Creating library symlink lib/libHLFIRDialect.so
[7521/7649] Linking CXX shared library lib/libFIRBuilder.so.21.0git
[7522/7649] Creating library symlink lib/libFIRBuilder.so
[7523/7649] Linking CXX shared library lib/libclang-cpp.so.21.0git
[7524/7649] Creating library symlink lib/libclang-cpp.so
[7525/7649] Building CXX object tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o
[7526/7649] Linking CXX shared library lib/libFIRAnalysis.so.21.0git
FAILED: lib/libFIRAnalysis.so.21.0git 
: && /usr/bin/c++ -fPIC -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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIRAnalysis.so.21.0git -o lib/libFIRAnalysis.so.21.0git tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/TBAAForest.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib:"  lib/libFIRBuilder.so.21.0git  lib/libFIRSupport.so.21.0git  lib/libHLFIRDialect.so.21.0git  lib/libFIRDialect.so.21.0git  lib/libMLIRMathTransforms.so.21.0git  lib/libMLIROpenMPDialect.so.21.0git  lib/libMLIROpenACCMPCommon.so.21.0git  lib/libMLIRMathDialect.so.21.0git  lib/libMLIRX86VectorDialect.so.21.0git  lib/libMLIRSCFDialect.so.21.0git  lib/libMLIRVectorDialect.so.21.0git  lib/libMLIRMaskableOpInterface.so.21.0git  lib/libMLIRMaskingOpInterface.so.21.0git  lib/libMLIRTransforms.so.21.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.21.0git  lib/libMLIRLLVMDialect.so.21.0git  lib/libLLVMBitWriter.so.21.0git  lib/libLLVMAsmParser.so.21.0git  lib/libLLVMBitReader.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libLLVMBinaryFormat.so.21.0git  lib/libMLIRTransformUtils.so.21.0git  lib/libMLIRSubsetOpInterface.so.21.0git  lib/libMLIRRewrite.so.21.0git  lib/libMLIRRewritePDL.so.21.0git  lib/libMLIRPDLToPDLInterp.so.21.0git  lib/libMLIRPass.so.21.0git  lib/libMLIRPDLInterpDialect.so.21.0git  lib/libMLIRPDLDialect.so.21.0git  lib/libMLIRVectorInterfaces.so.21.0git  lib/libMLIRControlFlowDialect.so.21.0git  lib/libMLIRFuncDialect.so.21.0git  lib/libMLIRTensorDialect.so.21.0git  lib/libMLIRAffineDialect.so.21.0git  lib/libMLIRMemRefDialect.so.21.0git  lib/libMLIRMemorySlotInterfaces.so.21.0git  lib/libMLIRValueBoundsOpInterface.so.21.0git  lib/libMLIRAnalysis.so.21.0git  lib/libMLIRControlFlowInterfaces.so.21.0git  lib/libMLIRSideEffectInterfaces.so.21.0git  lib/libMLIRDataLayoutInterfaces.so.21.0git  lib/libMLIRLoopLikeInterface.so.21.0git  lib/libMLIRFunctionInterfaces.so.21.0git  lib/libMLIRCallInterfaces.so.21.0git  lib/libMLIRPresburger.so.21.0git  lib/libMLIRArithUtils.so.21.0git  lib/libMLIRComplexDialect.so.21.0git  lib/libMLIRParallelCombiningOpInterface.so.21.0git  lib/libMLIRArithDialect.so.21.0git  lib/libMLIRInferTypeOpInterface.so.21.0git  lib/libMLIRCastInterfaces.so.21.0git  lib/libMLIRDialect.so.21.0git  lib/libMLIRInferIntRangeCommon.so.21.0git  lib/libMLIRShapedOpInterfaces.so.21.0git  lib/libMLIRInferIntRangeInterface.so.21.0git  lib/libMLIRUBDialect.so.21.0git  lib/libMLIRDialectUtils.so.21.0git  lib/libMLIRDestinationStyleOpInterface.so.21.0git  lib/libMLIRViewLikeInterface.so.21.0git  lib/libMLIRIR.so.21.0git  lib/libMLIRSupport.so.21.0git  -lpthread  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib && :
tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: In function `fir::cg::XDeclareOp::getODSOperands(unsigned int) [clone .constprop.300]':
AliasAnalysis.cpp:(.text._ZN3fir2cg10XDeclareOp14getODSOperandsEj.constprop.300+0xe): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: In function `mlir::Op<fir::cg::XDeclareOp, mlir::OpTrait::ZeroRegions, mlir::OpTrait::OneResult, mlir::OpTrait::OneTypedResult<mlir::Type>::Impl, mlir::OpTrait::ZeroSuccessors, mlir::OpTrait::AtLeastNOperands<1u>::Impl, mlir::OpTrait::AttrSizedOperandSegments, mlir::OpTrait::OpInvariants, mlir::BytecodeOpInterface::Trait>::classof(mlir::Operation*)':
AliasAnalysis.cpp:(.text._ZN4mlir2OpIN3fir2cg10XDeclareOpEJNS_7OpTrait11ZeroRegionsENS4_9OneResultENS4_14OneTypedResultINS_4TypeEE4ImplENS4_14ZeroSuccessorsENS4_16AtLeastNOperandsILj1EE4ImplENS4_24AttrSizedOperandSegmentsENS4_12OpInvariantsENS_19BytecodeOpInterface5TraitEEE7classofEPNS_9OperationE[_ZN4mlir2OpIN3fir2cg10XDeclareOpEJNS_7OpTrait11ZeroRegionsENS4_9OneResultENS4_14OneTypedResultINS_4TypeEE4ImplENS4_14ZeroSuccessorsENS4_16AtLeastNOperandsILj1EE4ImplENS4_24AttrSizedOperandSegmentsENS4_12OpInvariantsENS_19BytecodeOpInterface5TraitEEE7classofEPNS_9OperationE]+0x14): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: In function `fir::AliasAnalysis::getSource(mlir::Value, bool)':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x5aa): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x653): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x10b5): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: In function `fir::AliasAnalysis::getSource(mlir::Value, bool) [clone .constprop.288]':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb.constprop.288+0x582): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb.constprop.288+0x62b): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 45, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 36, in main
    run_command(["ninja"])
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 58, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
[7517/7649] Linking CXX shared library lib/libFIRSupport.so.21.0git
[7518/7649] Creating library symlink lib/libFIRSupport.so
[7519/7649] Linking CXX shared library lib/libHLFIRDialect.so.21.0git
[7520/7649] Creating library symlink lib/libHLFIRDialect.so
[7521/7649] Linking CXX shared library lib/libFIRBuilder.so.21.0git
[7522/7649] Creating library symlink lib/libFIRBuilder.so
[7523/7649] Linking CXX shared library lib/libclang-cpp.so.21.0git
[7524/7649] Creating library symlink lib/libclang-cpp.so
[7525/7649] Building CXX object tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o
[7526/7649] Linking CXX shared library lib/libFIRAnalysis.so.21.0git
FAILED: lib/libFIRAnalysis.so.21.0git 
: && /usr/bin/c++ -fPIC -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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIRAnalysis.so.21.0git -o lib/libFIRAnalysis.so.21.0git tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/TBAAForest.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib:"  lib/libFIRBuilder.so.21.0git  lib/libFIRSupport.so.21.0git  lib/libHLFIRDialect.so.21.0git  lib/libFIRDialect.so.21.0git  lib/libMLIRMathTransforms.so.21.0git  lib/libMLIROpenMPDialect.so.21.0git  lib/libMLIROpenACCMPCommon.so.21.0git  lib/libMLIRMathDialect.so.21.0git  lib/libMLIRX86VectorDialect.so.21.0git  lib/libMLIRSCFDialect.so.21.0git  lib/libMLIRVectorDialect.so.21.0git  lib/libMLIRMaskableOpInterface.so.21.0git  lib/libMLIRMaskingOpInterface.so.21.0git  lib/libMLIRTransforms.so.21.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.21.0git  lib/libMLIRLLVMDialect.so.21.0git  lib/libLLVMBitWriter.so.21.0git  lib/libLLVMAsmParser.so.21.0git  lib/libLLVMBitReader.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libLLVMBinaryFormat.so.21.0git  lib/libMLIRTransformUtils.so.21.0git  lib/libMLIRSubsetOpInterface.so.21.0git  lib/libMLIRRewrite.so.21.0git  lib/libMLIRRewritePDL.so.21.0git  lib/libMLIRPDLToPDLInterp.so.21.0git  lib/libMLIRPass.so.21.0git  lib/libMLIRPDLInterpDialect.so.21.0git  lib/libMLIRPDLDialect.so.21.0git  lib/libMLIRVectorInterfaces.so.21.0git  lib/libMLIRControlFlowDialect.so.21.0git  lib/libMLIRFuncDialect.so.21.0git  lib/libMLIRTensorDialect.so.21.0git  lib/libMLIRAffineDialect.so.21.0git  lib/libMLIRMemRefDialect.so.21.0git  lib/libMLIRMemorySlotInterfaces.so.21.0git  lib/libMLIRValueBoundsOpInterface.so.21.0git  lib/libMLIRAnalysis.so.21.0git  lib/libMLIRControlFlowInterfaces.so.21.0git  lib/libMLIRSideEffectInterfaces.so.21.0git  lib/libMLIRDataLayoutInterfaces.so.21.0git  lib/libMLIRLoopLikeInterface.so.21.0git  lib/libMLIRFunctionInterfaces.so.21.0git  lib/libMLIRCallInterfaces.so.21.0git  lib/libMLIRPresburger.so.21.0git  lib/libMLIRArithUtils.so.21.0git  lib/libMLIRComplexDialect.so.21.0git  lib/libMLIRParallelCombiningOpInterface.so.21.0git  lib/libMLIRArithDialect.so.21.0git  lib/libMLIRInferTypeOpInterface.so.21.0git  lib/libMLIRCastInterfaces.so.21.0git  lib/libMLIRDialect.so.21.0git  lib/libMLIRInferIntRangeCommon.so.21.0git  lib/libMLIRShapedOpInterfaces.so.21.0git  lib/libMLIRInferIntRangeInterface.so.21.0git  lib/libMLIRUBDialect.so.21.0git  lib/libMLIRDialectUtils.so.21.0git  lib/libMLIRDestinationStyleOpInterface.so.21.0git  lib/libMLIRViewLikeInterface.so.21.0git  lib/libMLIRIR.so.21.0git  lib/libMLIRSupport.so.21.0git  -lpthread  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib && :
tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: In function `fir::cg::XDeclareOp::getODSOperands(unsigned int) [clone .constprop.300]':
AliasAnalysis.cpp:(.text._ZN3fir2cg10XDeclareOp14getODSOperandsEj.constprop.300+0xe): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: In function `mlir::Op<fir::cg::XDeclareOp, mlir::OpTrait::ZeroRegions, mlir::OpTrait::OneResult, mlir::OpTrait::OneTypedResult<mlir::Type>::Impl, mlir::OpTrait::ZeroSuccessors, mlir::OpTrait::AtLeastNOperands<1u>::Impl, mlir::OpTrait::AttrSizedOperandSegments, mlir::OpTrait::OpInvariants, mlir::BytecodeOpInterface::Trait>::classof(mlir::Operation*)':
AliasAnalysis.cpp:(.text._ZN4mlir2OpIN3fir2cg10XDeclareOpEJNS_7OpTrait11ZeroRegionsENS4_9OneResultENS4_14OneTypedResultINS_4TypeEE4ImplENS4_14ZeroSuccessorsENS4_16AtLeastNOperandsILj1EE4ImplENS4_24AttrSizedOperandSegmentsENS4_12OpInvariantsENS_19BytecodeOpInterface5TraitEEE7classofEPNS_9OperationE[_ZN4mlir2OpIN3fir2cg10XDeclareOpEJNS_7OpTrait11ZeroRegionsENS4_9OneResultENS4_14OneTypedResultINS_4TypeEE4ImplENS4_14ZeroSuccessorsENS4_16AtLeastNOperandsILj1EE4ImplENS4_24AttrSizedOperandSegmentsENS4_12OpInvariantsENS_19BytecodeOpInterface5TraitEEE7classofEPNS_9OperationE]+0x14): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: In function `fir::AliasAnalysis::getSource(mlir::Value, bool)':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x5aa): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x653): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x10b5): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: In function `fir::AliasAnalysis::getSource(mlir::Value, bool) [clone .constprop.288]':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb.constprop.288+0x582): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb.constprop.288+0x62b): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 45, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 36, in main
    run_command(["ninja"])
  File "../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 58, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=68.356379

@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 20, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-9-cmake-build-only running on rocm-docker-rhel-9 while building flang at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[7517/7649] Linking CXX shared library lib/libFIRSupport.so.21.0git
[7518/7649] Creating library symlink lib/libFIRSupport.so
[7519/7649] Linking CXX shared library lib/libHLFIRDialect.so.21.0git
[7520/7649] Creating library symlink lib/libHLFIRDialect.so
[7521/7649] Linking CXX shared library lib/libFIRBuilder.so.21.0git
[7522/7649] Creating library symlink lib/libFIRBuilder.so
[7523/7649] Linking CXX shared library lib/libclang-cpp.so.21.0git
[7524/7649] Creating library symlink lib/libclang-cpp.so
[7525/7649] Building CXX object tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o
[7526/7649] Linking CXX shared library lib/libFIRAnalysis.so.21.0git
FAILED: lib/libFIRAnalysis.so.21.0git 
: && /usr/bin/c++ -fPIC -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 -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIRAnalysis.so.21.0git -o lib/libFIRAnalysis.so.21.0git tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/TBAAForest.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib:"  lib/libFIRBuilder.so.21.0git  lib/libFIRSupport.so.21.0git  lib/libHLFIRDialect.so.21.0git  lib/libFIRDialect.so.21.0git  lib/libMLIRMathTransforms.so.21.0git  lib/libMLIROpenMPDialect.so.21.0git  lib/libMLIROpenACCMPCommon.so.21.0git  lib/libMLIRMathDialect.so.21.0git  lib/libMLIRX86VectorDialect.so.21.0git  lib/libMLIRSCFDialect.so.21.0git  lib/libMLIRVectorDialect.so.21.0git  lib/libMLIRMaskableOpInterface.so.21.0git  lib/libMLIRMaskingOpInterface.so.21.0git  lib/libMLIRTransforms.so.21.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.21.0git  lib/libMLIRLLVMDialect.so.21.0git  lib/libLLVMBitWriter.so.21.0git  lib/libLLVMAsmParser.so.21.0git  lib/libLLVMBitReader.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libLLVMBinaryFormat.so.21.0git  lib/libMLIRTransformUtils.so.21.0git  lib/libMLIRSubsetOpInterface.so.21.0git  lib/libMLIRRewrite.so.21.0git  lib/libMLIRRewritePDL.so.21.0git  lib/libMLIRPDLToPDLInterp.so.21.0git  lib/libMLIRPass.so.21.0git  lib/libMLIRPDLInterpDialect.so.21.0git  lib/libMLIRPDLDialect.so.21.0git  lib/libMLIRVectorInterfaces.so.21.0git  lib/libMLIRControlFlowDialect.so.21.0git  lib/libMLIRFuncDialect.so.21.0git  lib/libMLIRTensorDialect.so.21.0git  lib/libMLIRAffineDialect.so.21.0git  lib/libMLIRMemRefDialect.so.21.0git  lib/libMLIRMemorySlotInterfaces.so.21.0git  lib/libMLIRValueBoundsOpInterface.so.21.0git  lib/libMLIRAnalysis.so.21.0git  lib/libMLIRControlFlowInterfaces.so.21.0git  lib/libMLIRSideEffectInterfaces.so.21.0git  lib/libMLIRDataLayoutInterfaces.so.21.0git  lib/libMLIRLoopLikeInterface.so.21.0git  lib/libMLIRFunctionInterfaces.so.21.0git  lib/libMLIRCallInterfaces.so.21.0git  lib/libMLIRPresburger.so.21.0git  lib/libMLIRArithUtils.so.21.0git  lib/libMLIRComplexDialect.so.21.0git  lib/libMLIRParallelCombiningOpInterface.so.21.0git  lib/libMLIRArithDialect.so.21.0git  lib/libMLIRInferTypeOpInterface.so.21.0git  lib/libMLIRCastInterfaces.so.21.0git  lib/libMLIRDialect.so.21.0git  lib/libMLIRInferIntRangeCommon.so.21.0git  lib/libMLIRShapedOpInterfaces.so.21.0git  lib/libMLIRInferIntRangeInterface.so.21.0git  lib/libMLIRUBDialect.so.21.0git  lib/libMLIRDialectUtils.so.21.0git  lib/libMLIRDestinationStyleOpInterface.so.21.0git  lib/libMLIRViewLikeInterface.so.21.0git  lib/libMLIRIR.so.21.0git  lib/libMLIRSupport.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib && :
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::cg::XDeclareOp::getODSOperands(unsigned int) [clone .constprop.0]':
AliasAnalysis.cpp:(.text._ZN3fir2cg10XDeclareOp14getODSOperandsEj.constprop.0+0x7): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `getOriginalDef(mlir::Value, Fortran::common::EnumSet<fir::AliasAnalysis::Attribute, 3ul>&, bool&, bool&)':
AliasAnalysis.cpp:(.text._ZL14getOriginalDefN4mlir5ValueERN7Fortran6common7EnumSetIN3fir13AliasAnalysis9AttributeELm3EEERbS9_+0x272): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `auto fir::AliasAnalysis::getSource(mlir::Value, bool)::{lambda(auto:1)#9}::operator()<fir::cg::XDeclareOp>(fir::cg::XDeclareOp) const':
AliasAnalysis.cpp:(.text._ZZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEbENKUlT_E7_clINS_2cg10XDeclareOpEEEDaS3_+0x352): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::AliasAnalysis::getSource(mlir::Value, bool) [clone .localalias]':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x781): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x78e): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xaf5): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xeeb): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 45, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 36, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 58, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
[7517/7649] Linking CXX shared library lib/libFIRSupport.so.21.0git
[7518/7649] Creating library symlink lib/libFIRSupport.so
[7519/7649] Linking CXX shared library lib/libHLFIRDialect.so.21.0git
[7520/7649] Creating library symlink lib/libHLFIRDialect.so
[7521/7649] Linking CXX shared library lib/libFIRBuilder.so.21.0git
[7522/7649] Creating library symlink lib/libFIRBuilder.so
[7523/7649] Linking CXX shared library lib/libclang-cpp.so.21.0git
[7524/7649] Creating library symlink lib/libclang-cpp.so
[7525/7649] Building CXX object tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o
[7526/7649] Linking CXX shared library lib/libFIRAnalysis.so.21.0git
FAILED: lib/libFIRAnalysis.so.21.0git 
: && /usr/bin/c++ -fPIC -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 -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIRAnalysis.so.21.0git -o lib/libFIRAnalysis.so.21.0git tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/TBAAForest.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib:"  lib/libFIRBuilder.so.21.0git  lib/libFIRSupport.so.21.0git  lib/libHLFIRDialect.so.21.0git  lib/libFIRDialect.so.21.0git  lib/libMLIRMathTransforms.so.21.0git  lib/libMLIROpenMPDialect.so.21.0git  lib/libMLIROpenACCMPCommon.so.21.0git  lib/libMLIRMathDialect.so.21.0git  lib/libMLIRX86VectorDialect.so.21.0git  lib/libMLIRSCFDialect.so.21.0git  lib/libMLIRVectorDialect.so.21.0git  lib/libMLIRMaskableOpInterface.so.21.0git  lib/libMLIRMaskingOpInterface.so.21.0git  lib/libMLIRTransforms.so.21.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.21.0git  lib/libMLIRLLVMDialect.so.21.0git  lib/libLLVMBitWriter.so.21.0git  lib/libLLVMAsmParser.so.21.0git  lib/libLLVMBitReader.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libLLVMBinaryFormat.so.21.0git  lib/libMLIRTransformUtils.so.21.0git  lib/libMLIRSubsetOpInterface.so.21.0git  lib/libMLIRRewrite.so.21.0git  lib/libMLIRRewritePDL.so.21.0git  lib/libMLIRPDLToPDLInterp.so.21.0git  lib/libMLIRPass.so.21.0git  lib/libMLIRPDLInterpDialect.so.21.0git  lib/libMLIRPDLDialect.so.21.0git  lib/libMLIRVectorInterfaces.so.21.0git  lib/libMLIRControlFlowDialect.so.21.0git  lib/libMLIRFuncDialect.so.21.0git  lib/libMLIRTensorDialect.so.21.0git  lib/libMLIRAffineDialect.so.21.0git  lib/libMLIRMemRefDialect.so.21.0git  lib/libMLIRMemorySlotInterfaces.so.21.0git  lib/libMLIRValueBoundsOpInterface.so.21.0git  lib/libMLIRAnalysis.so.21.0git  lib/libMLIRControlFlowInterfaces.so.21.0git  lib/libMLIRSideEffectInterfaces.so.21.0git  lib/libMLIRDataLayoutInterfaces.so.21.0git  lib/libMLIRLoopLikeInterface.so.21.0git  lib/libMLIRFunctionInterfaces.so.21.0git  lib/libMLIRCallInterfaces.so.21.0git  lib/libMLIRPresburger.so.21.0git  lib/libMLIRArithUtils.so.21.0git  lib/libMLIRComplexDialect.so.21.0git  lib/libMLIRParallelCombiningOpInterface.so.21.0git  lib/libMLIRArithDialect.so.21.0git  lib/libMLIRInferTypeOpInterface.so.21.0git  lib/libMLIRCastInterfaces.so.21.0git  lib/libMLIRDialect.so.21.0git  lib/libMLIRInferIntRangeCommon.so.21.0git  lib/libMLIRShapedOpInterfaces.so.21.0git  lib/libMLIRInferIntRangeInterface.so.21.0git  lib/libMLIRUBDialect.so.21.0git  lib/libMLIRDialectUtils.so.21.0git  lib/libMLIRDestinationStyleOpInterface.so.21.0git  lib/libMLIRViewLikeInterface.so.21.0git  lib/libMLIRIR.so.21.0git  lib/libMLIRSupport.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/lib && :
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::cg::XDeclareOp::getODSOperands(unsigned int) [clone .constprop.0]':
AliasAnalysis.cpp:(.text._ZN3fir2cg10XDeclareOp14getODSOperandsEj.constprop.0+0x7): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `getOriginalDef(mlir::Value, Fortran::common::EnumSet<fir::AliasAnalysis::Attribute, 3ul>&, bool&, bool&)':
AliasAnalysis.cpp:(.text._ZL14getOriginalDefN4mlir5ValueERN7Fortran6common7EnumSetIN3fir13AliasAnalysis9AttributeELm3EEERbS9_+0x272): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `auto fir::AliasAnalysis::getSource(mlir::Value, bool)::{lambda(auto:1)#9}::operator()<fir::cg::XDeclareOp>(fir::cg::XDeclareOp) const':
AliasAnalysis.cpp:(.text._ZZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEbENKUlT_E7_clINS_2cg10XDeclareOpEEEDaS3_+0x352): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::AliasAnalysis::getSource(mlir::Value, bool) [clone .localalias]':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x781): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x78e): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xaf5): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xeeb): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 45, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 36, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 58, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=70.625440

@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 20, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-ubuntu-22-cmake-build-only running on rocm-docker-ubu-22 while building flang at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[7517/7649] Creating library symlink lib/libMLIRMlirOptMain.so
[7518/7649] Linking CXX executable bin/mlir-opt
[7519/7649] Linking CXX shared library lib/libHLFIRDialect.so.21.0git
[7520/7649] Creating library symlink lib/libHLFIRDialect.so
[7521/7649] Linking CXX shared library lib/libFIRBuilder.so.21.0git
[7522/7649] Creating library symlink lib/libFIRBuilder.so
[7523/7649] Linking CXX shared library lib/libclang-cpp.so.21.0git
[7524/7649] Creating library symlink lib/libclang-cpp.so
[7525/7649] Building CXX object tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o
[7526/7649] Linking CXX shared library lib/libFIRAnalysis.so.21.0git
FAILED: lib/libFIRAnalysis.so.21.0git 
: && /usr/bin/c++ -fPIC -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 -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIRAnalysis.so.21.0git -o lib/libFIRAnalysis.so.21.0git tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/TBAAForest.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib:"  lib/libFIRBuilder.so.21.0git  lib/libFIRSupport.so.21.0git  lib/libHLFIRDialect.so.21.0git  lib/libFIRDialect.so.21.0git  lib/libMLIRMathTransforms.so.21.0git  lib/libMLIROpenMPDialect.so.21.0git  lib/libMLIROpenACCMPCommon.so.21.0git  lib/libMLIRMathDialect.so.21.0git  lib/libMLIRX86VectorDialect.so.21.0git  lib/libMLIRSCFDialect.so.21.0git  lib/libMLIRVectorDialect.so.21.0git  lib/libMLIRMaskableOpInterface.so.21.0git  lib/libMLIRMaskingOpInterface.so.21.0git  lib/libMLIRTransforms.so.21.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.21.0git  lib/libMLIRLLVMDialect.so.21.0git  lib/libLLVMBitWriter.so.21.0git  lib/libLLVMAsmParser.so.21.0git  lib/libLLVMBitReader.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libLLVMBinaryFormat.so.21.0git  lib/libMLIRTransformUtils.so.21.0git  lib/libMLIRSubsetOpInterface.so.21.0git  lib/libMLIRRewrite.so.21.0git  lib/libMLIRRewritePDL.so.21.0git  lib/libMLIRPDLToPDLInterp.so.21.0git  lib/libMLIRPass.so.21.0git  lib/libMLIRPDLInterpDialect.so.21.0git  lib/libMLIRPDLDialect.so.21.0git  lib/libMLIRVectorInterfaces.so.21.0git  lib/libMLIRControlFlowDialect.so.21.0git  lib/libMLIRFuncDialect.so.21.0git  lib/libMLIRTensorDialect.so.21.0git  lib/libMLIRAffineDialect.so.21.0git  lib/libMLIRMemRefDialect.so.21.0git  lib/libMLIRMemorySlotInterfaces.so.21.0git  lib/libMLIRValueBoundsOpInterface.so.21.0git  lib/libMLIRAnalysis.so.21.0git  lib/libMLIRControlFlowInterfaces.so.21.0git  lib/libMLIRSideEffectInterfaces.so.21.0git  lib/libMLIRDataLayoutInterfaces.so.21.0git  lib/libMLIRLoopLikeInterface.so.21.0git  lib/libMLIRFunctionInterfaces.so.21.0git  lib/libMLIRCallInterfaces.so.21.0git  lib/libMLIRPresburger.so.21.0git  lib/libMLIRArithUtils.so.21.0git  lib/libMLIRComplexDialect.so.21.0git  lib/libMLIRParallelCombiningOpInterface.so.21.0git  lib/libMLIRArithDialect.so.21.0git  lib/libMLIRInferTypeOpInterface.so.21.0git  lib/libMLIRCastInterfaces.so.21.0git  lib/libMLIRDialect.so.21.0git  lib/libMLIRInferIntRangeCommon.so.21.0git  lib/libMLIRShapedOpInterfaces.so.21.0git  lib/libMLIRInferIntRangeInterface.so.21.0git  lib/libMLIRUBDialect.so.21.0git  lib/libMLIRDialectUtils.so.21.0git  lib/libMLIRDestinationStyleOpInterface.so.21.0git  lib/libMLIRViewLikeInterface.so.21.0git  lib/libMLIRIR.so.21.0git  lib/libMLIRSupport.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib && :
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::cg::XDeclareOp::getODSOperands(unsigned int) [clone .constprop.0]':
AliasAnalysis.cpp:(.text._ZN3fir2cg10XDeclareOp14getODSOperandsEj.constprop.0+0x7): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `getOriginalDef(mlir::Value, Fortran::common::EnumSet<fir::AliasAnalysis::Attribute, 3ul>&, bool&, bool&)':
AliasAnalysis.cpp:(.text._ZL14getOriginalDefN4mlir5ValueERN7Fortran6common7EnumSetIN3fir13AliasAnalysis9AttributeELm3EEERbS9_+0x2a2): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `auto fir::AliasAnalysis::getSource(mlir::Value, bool)::{lambda(auto:1)#9}::operator()<fir::cg::XDeclareOp>(fir::cg::XDeclareOp) const':
AliasAnalysis.cpp:(.text._ZZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEbENKUlT_E7_clINS_2cg10XDeclareOpEEEDaS3_+0x35e): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::AliasAnalysis::getSource(mlir::Value, bool) [clone .localalias]':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x779): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x786): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xb15): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xf0b): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 45, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 36, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 58, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
[7517/7649] Creating library symlink lib/libMLIRMlirOptMain.so
[7518/7649] Linking CXX executable bin/mlir-opt
[7519/7649] Linking CXX shared library lib/libHLFIRDialect.so.21.0git
[7520/7649] Creating library symlink lib/libHLFIRDialect.so
[7521/7649] Linking CXX shared library lib/libFIRBuilder.so.21.0git
[7522/7649] Creating library symlink lib/libFIRBuilder.so
[7523/7649] Linking CXX shared library lib/libclang-cpp.so.21.0git
[7524/7649] Creating library symlink lib/libclang-cpp.so
[7525/7649] Building CXX object tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o
[7526/7649] Linking CXX shared library lib/libFIRAnalysis.so.21.0git
FAILED: lib/libFIRAnalysis.so.21.0git 
: && /usr/bin/c++ -fPIC -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 -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG -fno-semantic-interposition  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIRAnalysis.so.21.0git -o lib/libFIRAnalysis.so.21.0git tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/TBAAForest.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib:"  lib/libFIRBuilder.so.21.0git  lib/libFIRSupport.so.21.0git  lib/libHLFIRDialect.so.21.0git  lib/libFIRDialect.so.21.0git  lib/libMLIRMathTransforms.so.21.0git  lib/libMLIROpenMPDialect.so.21.0git  lib/libMLIROpenACCMPCommon.so.21.0git  lib/libMLIRMathDialect.so.21.0git  lib/libMLIRX86VectorDialect.so.21.0git  lib/libMLIRSCFDialect.so.21.0git  lib/libMLIRVectorDialect.so.21.0git  lib/libMLIRMaskableOpInterface.so.21.0git  lib/libMLIRMaskingOpInterface.so.21.0git  lib/libMLIRTransforms.so.21.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.21.0git  lib/libMLIRLLVMDialect.so.21.0git  lib/libLLVMBitWriter.so.21.0git  lib/libLLVMAsmParser.so.21.0git  lib/libLLVMBitReader.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libLLVMBinaryFormat.so.21.0git  lib/libMLIRTransformUtils.so.21.0git  lib/libMLIRSubsetOpInterface.so.21.0git  lib/libMLIRRewrite.so.21.0git  lib/libMLIRRewritePDL.so.21.0git  lib/libMLIRPDLToPDLInterp.so.21.0git  lib/libMLIRPass.so.21.0git  lib/libMLIRPDLInterpDialect.so.21.0git  lib/libMLIRPDLDialect.so.21.0git  lib/libMLIRVectorInterfaces.so.21.0git  lib/libMLIRControlFlowDialect.so.21.0git  lib/libMLIRFuncDialect.so.21.0git  lib/libMLIRTensorDialect.so.21.0git  lib/libMLIRAffineDialect.so.21.0git  lib/libMLIRMemRefDialect.so.21.0git  lib/libMLIRMemorySlotInterfaces.so.21.0git  lib/libMLIRValueBoundsOpInterface.so.21.0git  lib/libMLIRAnalysis.so.21.0git  lib/libMLIRControlFlowInterfaces.so.21.0git  lib/libMLIRSideEffectInterfaces.so.21.0git  lib/libMLIRDataLayoutInterfaces.so.21.0git  lib/libMLIRLoopLikeInterface.so.21.0git  lib/libMLIRFunctionInterfaces.so.21.0git  lib/libMLIRCallInterfaces.so.21.0git  lib/libMLIRPresburger.so.21.0git  lib/libMLIRArithUtils.so.21.0git  lib/libMLIRComplexDialect.so.21.0git  lib/libMLIRParallelCombiningOpInterface.so.21.0git  lib/libMLIRArithDialect.so.21.0git  lib/libMLIRInferTypeOpInterface.so.21.0git  lib/libMLIRCastInterfaces.so.21.0git  lib/libMLIRDialect.so.21.0git  lib/libMLIRInferIntRangeCommon.so.21.0git  lib/libMLIRShapedOpInterfaces.so.21.0git  lib/libMLIRInferIntRangeInterface.so.21.0git  lib/libMLIRUBDialect.so.21.0git  lib/libMLIRDialectUtils.so.21.0git  lib/libMLIRDestinationStyleOpInterface.so.21.0git  lib/libMLIRViewLikeInterface.so.21.0git  lib/libMLIRIR.so.21.0git  lib/libMLIRSupport.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib && :
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::cg::XDeclareOp::getODSOperands(unsigned int) [clone .constprop.0]':
AliasAnalysis.cpp:(.text._ZN3fir2cg10XDeclareOp14getODSOperandsEj.constprop.0+0x7): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `getOriginalDef(mlir::Value, Fortran::common::EnumSet<fir::AliasAnalysis::Attribute, 3ul>&, bool&, bool&)':
AliasAnalysis.cpp:(.text._ZL14getOriginalDefN4mlir5ValueERN7Fortran6common7EnumSetIN3fir13AliasAnalysis9AttributeELm3EEERbS9_+0x2a2): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `auto fir::AliasAnalysis::getSource(mlir::Value, bool)::{lambda(auto:1)#9}::operator()<fir::cg::XDeclareOp>(fir::cg::XDeclareOp) const':
AliasAnalysis.cpp:(.text._ZZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEbENKUlT_E7_clINS_2cg10XDeclareOpEEEDaS3_+0x35e): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::AliasAnalysis::getSource(mlir::Value, bool) [clone .localalias]':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x779): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x786): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xb15): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xf0b): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 45, in step
    yield
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 36, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 58, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=71.896171

@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 20, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-libcxx running on linaro-flang-aarch64-libcxx while building flang at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
291.041 [172/2/7172] Linking CXX shared library lib/libFortranSemantics.so.21.0git
291.047 [171/2/7173] Creating library symlink lib/libFortranSemantics.so
291.203 [165/7/7174] Linking CXX executable tools/flang/unittests/Evaluate/integer.test
291.205 [165/6/7175] Linking CXX executable tools/flang/unittests/Evaluate/logical.test
291.209 [165/5/7176] Linking CXX executable tools/flang/unittests/Evaluate/real.test
291.309 [165/4/7177] Linking CXX executable tools/flang/unittests/Evaluate/intrinsics.test
291.379 [165/3/7178] Linking CXX executable tools/flang/unittests/Evaluate/folding.test
291.452 [165/2/7179] Linking CXX executable tools/flang/unittests/Evaluate/expression.test
297.238 [165/1/7180] Building CXX object tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o
297.412 [164/1/7181] Linking CXX shared library lib/libFIRAnalysis.so.21.0git
FAILED: lib/libFIRAnalysis.so.21.0git 
: && /usr/local/bin/c++ -fPIC -stdlib=libc++ -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 -Werror -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG  -stdlib=libc++ -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFIRAnalysis.so.21.0git -o lib/libFIRAnalysis.so.21.0git tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/TBAAForest.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/lib:"  lib/libFIRBuilder.so.21.0git  lib/libFIRSupport.so.21.0git  lib/libHLFIRDialect.so.21.0git  lib/libFIRDialect.so.21.0git  lib/libMLIRMathTransforms.so.21.0git  lib/libMLIROpenMPDialect.so.21.0git  lib/libMLIROpenACCMPCommon.so.21.0git  lib/libMLIRMathDialect.so.21.0git  lib/libMLIRX86VectorDialect.so.21.0git  lib/libMLIRSCFDialect.so.21.0git  lib/libMLIRVectorDialect.so.21.0git  lib/libMLIRMaskableOpInterface.so.21.0git  lib/libMLIRMaskingOpInterface.so.21.0git  lib/libMLIRTransforms.so.21.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.21.0git  lib/libMLIRLLVMDialect.so.21.0git  lib/libLLVMBitWriter.so.21.0git  lib/libLLVMAsmParser.so.21.0git  lib/libLLVMBitReader.so.21.0git  lib/libLLVMCore.so.21.0git  lib/libLLVMBinaryFormat.so.21.0git  lib/libMLIRTransformUtils.so.21.0git  lib/libMLIRSubsetOpInterface.so.21.0git  lib/libMLIRRewrite.so.21.0git  lib/libMLIRRewritePDL.so.21.0git  lib/libMLIRPDLToPDLInterp.so.21.0git  lib/libMLIRPass.so.21.0git  lib/libMLIRPDLInterpDialect.so.21.0git  lib/libMLIRPDLDialect.so.21.0git  lib/libMLIRVectorInterfaces.so.21.0git  lib/libMLIRControlFlowDialect.so.21.0git  lib/libMLIRFuncDialect.so.21.0git  lib/libMLIRTensorDialect.so.21.0git  lib/libMLIRAffineDialect.so.21.0git  lib/libMLIRMemRefDialect.so.21.0git  lib/libMLIRMemorySlotInterfaces.so.21.0git  lib/libMLIRValueBoundsOpInterface.so.21.0git  lib/libMLIRAnalysis.so.21.0git  lib/libMLIRControlFlowInterfaces.so.21.0git  lib/libMLIRSideEffectInterfaces.so.21.0git  lib/libMLIRDataLayoutInterfaces.so.21.0git  lib/libMLIRLoopLikeInterface.so.21.0git  lib/libMLIRFunctionInterfaces.so.21.0git  lib/libMLIRCallInterfaces.so.21.0git  lib/libMLIRPresburger.so.21.0git  lib/libMLIRArithUtils.so.21.0git  lib/libMLIRComplexDialect.so.21.0git  lib/libMLIRParallelCombiningOpInterface.so.21.0git  lib/libMLIRArithDialect.so.21.0git  lib/libMLIRInferTypeOpInterface.so.21.0git  lib/libMLIRCastInterfaces.so.21.0git  lib/libMLIRDialect.so.21.0git  lib/libMLIRInferIntRangeCommon.so.21.0git  lib/libMLIRShapedOpInterfaces.so.21.0git  lib/libMLIRInferIntRangeInterface.so.21.0git  lib/libMLIRUBDialect.so.21.0git  lib/libMLIRDialectUtils.so.21.0git  lib/libMLIRDestinationStyleOpInterface.so.21.0git  lib/libMLIRViewLikeInterface.so.21.0git  lib/libMLIRIR.so.21.0git  lib/libMLIRSupport.so.21.0git  lib/libLLVMSupport.so.21.0git  -Wl,-rpath-link,/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/lib && :
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `fir::AliasAnalysis::getSource(mlir::Value, bool)':
AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x468): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x46c): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xd14): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0xdd8): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x10a0): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x12ec): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x1538): undefined reference to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o:AliasAnalysis.cpp:(.text._ZN3fir13AliasAnalysis9getSourceEN4mlir5ValueEb+0x1784): more undefined references to `fir::cg::XDeclareOp::getODSOperandIndexAndLength(unsigned int)' follow
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `llvm::DefaultDoCastIfPossible<fir::cg::XEmboxOp, mlir::Operation*, llvm::CastInfo<fir::cg::XEmboxOp, mlir::Operation*, void> >::doCastIfPossible(mlir::Operation*)':
AliasAnalysis.cpp:(.text._ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg8XEmboxOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_[_ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg8XEmboxOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_]+0x24): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg8XEmboxOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_[_ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg8XEmboxOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_]+0x28): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XEmboxOp, void>::id'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `llvm::DefaultDoCastIfPossible<fir::cg::XReboxOp, mlir::Operation*, llvm::CastInfo<fir::cg::XReboxOp, mlir::Operation*, void> >::doCastIfPossible(mlir::Operation*)':
AliasAnalysis.cpp:(.text._ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg8XReboxOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_[_ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg8XReboxOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_]+0x24): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg8XReboxOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_[_ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg8XReboxOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_]+0x28): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XReboxOp, void>::id'
/usr/bin/ld: tools/flang/lib/Optimizer/Analysis/CMakeFiles/FIRAnalysis.dir/AliasAnalysis.cpp.o: in function `llvm::DefaultDoCastIfPossible<fir::cg::XDeclareOp, mlir::Operation*, llvm::CastInfo<fir::cg::XDeclareOp, mlir::Operation*, void> >::doCastIfPossible(mlir::Operation*)':
AliasAnalysis.cpp:(.text._ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg10XDeclareOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_[_ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg10XDeclareOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_]+0x24): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
/usr/bin/ld: AliasAnalysis.cpp:(.text._ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg10XDeclareOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_[_ZN4llvm23DefaultDoCastIfPossibleIN3fir2cg10XDeclareOpEPN4mlir9OperationENS_8CastInfoIS3_S6_vEEE16doCastIfPossibleES6_]+0x28): undefined reference to `mlir::detail::TypeIDResolver<fir::cg::XDeclareOp, void>::id'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

@SusanTan SusanTan deleted the susant/firaa branch February 20, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants