This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add CMake flags to properly enable Jit event listeners.
ClosedPublic

Authored by nicolasvasilache on Jan 3 2022, 11:41 AM.

Details

Summary

By default, the listeners do nothing unless linked in.
This revision allows the "Perf" and "Intel" Jit event listeners to be used.

The "OProfile" event listener is not enabled at this time,
the associated library structure is not well-isolated.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jan 3 2022, 11:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2022, 11:41 AM
mehdi_amini added inline comments.Jan 3 2022, 12:31 PM
mlir/lib/ExecutionEngine/CMakeLists.txt
24

Are these Cmake libraries defined by LLVM itself? (The names don’t include LLVM which isn’t usual)

mlir/lib/ExecutionEngine/ExecutionEngine.cpp
203

Can you commit formatting change ahead and keep this diff minimal?
(Unless there is more than formatting here?)

Address comments.

mlir/lib/ExecutionEngine/CMakeLists.txt
24

Yes and it seems to be a pattern, e.g. LLVMScalarOpts -> libLLVMScalarOpts, LLVMMC -> libLLVMMC, etc.

nicolasvasilache marked 2 inline comments as done.Jan 3 2022, 2:18 PM
mehdi_amini accepted this revision.Jan 3 2022, 8:57 PM
mehdi_amini added inline comments.
mlir/lib/ExecutionEngine/CMakeLists.txt
24

Right my comment is that these break the pattern: IntelJITEvents instead of LLVMIntelJITEvents.

This revision is now accepted and ready to land.Jan 3 2022, 8:57 PM
mlir/lib/ExecutionEngine/CMakeLists.txt
24

sorry, I wasn't explicit enough.

This is the pattern: MC -> LLVMMC -> libLLVMMC

The LINK_COMPONENTS section seems to implicitly add the LLVM in front of MC.

mehdi_amini added inline comments.Jan 4 2022, 12:50 PM
mlir/lib/ExecutionEngine/CMakeLists.txt
24

Oh I see, it is a "components" and not a CMake library, thanks :)