* * *

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

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 363
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: 5968
Experiment with the llvm back-end? Ask Jonas to get it working. It is already in trunk, but far from complete.
recommends {$macro on}{$define Silly:=ObjFpc}

marcov

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

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus