llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
307 stars 84 forks source link

Reinstate #668 and #678 #691

Closed bcardosolopes closed 1 week ago

bcardosolopes commented 2 weeks ago

668 broke the build and had to be reverted (tks @dkolsen-pgi for catching it)

/usr/bin/ld: lib/libMLIRCIRTransforms.a(LoweringPrepare.cpp.o): in function `(anonymous namespace)::LoweringPreparePass::lowerVAArgOp(mlir::cir::VAArgOp)':
/local/home/dolsen/clangir/clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp:340: undefined reference to `cir::CIRDataLayout::CIRDataLayout(mlir::ModuleOp)'
/usr/bin/ld: lib/libTargetLowering.a(LowerTypes.cpp.o): in function `cir::CIRDataLayout::CIRDataLayout(llvm::StringRef, mlir::ModuleOp)':
/local/home/dolsen/clangir/clang/include/clang/CIR/Dialect/IR/CIRDataLayout.h:31: undefined reference to `cir::CIRDataLayout::reset(llvm::StringRef)'`'

Steps to reproduce:

$ cmake -GNinja -DCMAKE_INSTALL_PREFIX=/<some-path>/clangir-install "-DLLVM_ENABLE_PROJECTS=clang;mlir" -DCLANG_ENABLE_CIR=ON -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Debug ../clangir/llvm
$ ninja install

Creating the issue to track re-landing the work once this is fixed.

bcardosolopes commented 2 weeks ago

Reverted in 47df94c4c53d635b0c5ea9d132afaa533a5d3c7e e91ada4cebb3dce5c9ddb3dad6d4dce3db9f9a41

dkolsen-pgi commented 2 weeks ago

When the changes that were reverted are redone, I believe (but am not certain) that some of the new code will need to go into a different file.