5 Commits

Author SHA1 Message Date
Aiden Grossman
aad3641e80 [FunctionPropertiesAnalysis] Add CFG and call properties
This patch adds in a couple more properties related to call instructions
and the CFG within the function that should expose a little bit more
about the characteristics of the function.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D158681
2023-08-25 15:02:09 -07:00
Aiden Grossman
b8f191e054 [FunctionPropertiesAnalysis] Add operand type counts
This patch adds operand type counts to the detailed function properties
analysis. This is intended to enable more interesting and detailed
comparisons across different languages on specific metrics (like usage
of inline assembly or global values).

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D158018
2023-08-18 13:27:19 -07:00
Aiden Grossman
fe6bb84c7e [FunctionPropertiesAnalysis] Add detailed analysis
This patch adds more detailed function properties gated behind a command
line flag for use primarily in experimentation and gathering statistics
on the functions in a module or project. The runtime cost should be
minimal as the computation is only done when the flag is set. There will
be a slight memory overhead when the ML inliner is enabled, but it
should be fairly small at a handful of bytes per function.

This is an adapted form of https://reviews.llvm.org/D109661.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D157358
2023-08-08 18:03:16 -07:00
Tarindu Jayatilaka
06283661b3 Add new function properties to FunctionPropertiesAnalysis
Added  LoadInstCount, StoreInstCount, MaxLoopDepth, LoopCount

Reviewed By: jdoerfert, mtrofin

Differential Revision: https://reviews.llvm.org/D82283
2020-07-23 12:46:47 -07:00
Tarindu Jayatilaka
ee6f0e109c Add a Printer to the FunctionPropertiesAnalysis
A printer pass and a lit test case was added.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D82523
2020-07-23 11:57:11 -07:00