[PATCH] D104060: Machine IR Profile

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 13 15:00:30 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/lib/CodeGen/MIPSectionEmitter.cpp:60
+    MBB.setLabelMustBeEmitted();
+  CurrentFunctionEndSymbol = AP.createTempSymbol("mip_func_end");
+}
----------------
I want to try out the patch but I have noticed some layering violation.

If you do a `-DBUILD_SHARED_LIBS=on` build, you'll get errors like

```
ld.lld: error: undefined symbol: llvm::AsmPrinter::createTempSymbol(llvm::Twine const&) const
>>> referenced by MIPSectionEmitter.cpp:60 (/home/maskray/llvm/llvm/lib/CodeGen/MIPSectionEmitter.cpp:60)
>>>               lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MIPSectionEmitter.cpp.o:(llvm::MIPSectionEmitter::runOnMachineFunctionStart(llvm::MachineFunction&))
>>> referenced by MIPSectionEmitter.cpp:128 (/home/maskray/llvm/llvm/lib/CodeGen/MIPSectionEmitter.cpp:128)
>>>               lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MIPSectionEmitter.cpp.o:(llvm::MIPSectionEmitter::emitMIPHeader(llvm::MachineProfile::MIPFileType))
>>> referenced by MIPSectionEmitter.cpp:237 (/home/maskray/llvm/llvm/lib/CodeGen/MIPSectionEmitter.cpp:237)
>>>               lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MIPSectionEmitter.cpp.o:(llvm::MIPSectionEmitter::emitMIPFunctionInfo(llvm::MIPSectionEmitter::MFInfo&))
```

because of `-Wl,-z,defs`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104060/new/

https://reviews.llvm.org/D104060



More information about the llvm-commits mailing list