Recent

Author Topic: LLVM-MCA Will Analyze ur Machine Code, Help Analyze Potential Performance Issues  (Read 3143 times)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Just curiosity.
Does FPC have or need something similar?

-------------------------------------------------------------------------
https://www.phoronix.com/scan.php?page=news_item&px=LLVM-MCA-Machine-Code
https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1014159-llvm-mca-will-analyze-your-machine-code-help-analyze-potential-performance-issues

LLVM-MCA Will Analyze Your Machine Code, Help Analyze Potential Performance Issues
Written by Michael Larabel in LLVM on 20 March 2018 at 09:00 AM EDT.

One of the tools merged to LLVM SVN/Git earlier this month for the LLVM 7.0 cycle is LLVM-MCA. The LLVM-MCA tool is a machine code analyzer that estimates how the given machine code would perform on a specific CPU and attempt to report possible bottlenecks.

The LLVM-MCA analysis tool uses information already used within LLVM about a given CPU family's scheduler model and other information to try to statically measure how the machine code would carry out on a particular CPU, even going as far as estimating the instructions per cycle and possible resource pressure.

The MCA tool looks at throughput and resource consumption of the supplied machine code and tries to diagnose possible performance issues. LLVM-MCA can analyze against an arbitrary CPU using the -march/-mcpu options just as you would use with Clang.

The LLVM Machine Code Analyzer was merged earlier this month and will be part of the LLVM 7.0 release due later in 2018. Since its initial merging, LLVM-MCA has seen routine activity to further enhance its capabilities.

Certainly an interesting tool for any developers wishing to analyze the implications of their machine code on different CPU microarchitectures. It will certainly be interesting to see where LLVM-MCA heads in the weeks/months ahead.
-------------------------------------------------------------------------

Thaddy

  • Hero Member
  • *****
  • Posts: 14157
  • Probably until I exterminate Putin.
Experiment with the llvm back-end? Ask Jonas to get it working. It is already in trunk, but far from complete.
Specialize a type, not a var.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
For specific short piece of code (like optimized assembler) you can use INTEL's IACA. it statically analyses assembler between two markers.

 

TinyPortal © 2005-2018