This is an archive of the discontinued LLVM Phabricator instance.

[FunctionPropertiesAnalysis] Add CFG and call properties
ClosedPublic

Authored by aidengrossman on Aug 23 2023, 4:05 PM.

Details

Summary

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.

Diff Detail

Event Timeline

aidengrossman created this revision.Aug 23 2023, 4:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 4:05 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
aidengrossman requested review of this revision.Aug 23 2023, 4:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 4:05 PM
jdoerfert added inline comments.Aug 23 2023, 4:40 PM
llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
118

This counts each critical edge #predecessors times, doesn't it?

149–152
aidengrossman marked an inline comment as done.

Address reviewer feedback

  • Fix issue with critical edge counting
llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
118

Yes. I forgot to add the conditional that the number of successors of the block must be greater than zero. Fixed in the latest patch (with a test case added).

aidengrossman marked an inline comment as done.

Address reviewer feedback

arsenm added a subscriber: arsenm.Aug 24 2023, 8:14 AM
arsenm added inline comments.
llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
147

What about vector of int / vector of fp / vector of pointer

Address reviewer feedback

  • Add handling for vector return types
aidengrossman marked an inline comment as done.Aug 25 2023, 1:58 PM
aidengrossman added inline comments.
llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
147

Thanks for the suggestion! Added. Could provide some interesting information.

jdoerfert accepted this revision.Aug 25 2023, 2:33 PM
jdoerfert added inline comments.
llvm/test/Analysis/FunctionPropertiesAnalysis/matmul.ll
226

add the missing check lines.

This revision is now accepted and ready to land.Aug 25 2023, 2:33 PM
This revision was landed with ongoing or failed builds.Aug 25 2023, 3:03 PM
This revision was automatically updated to reflect the committed changes.
aidengrossman marked an inline comment as done.