Page MenuHomePhabricator

[Propeller] Do not generate the BB address map for empty functions.
ClosedPublic

Authored by rahmanl on Mar 25 2021, 6:46 PM.

Details

Summary

Empty functions (functions with no real code) are irrelevant for propeller optimizations and their addresses sometimes conflict with other functions which obfuscates the analysis.
This simple change skips the BB address map emission for such functions.

Diff Detail

Event Timeline

rahmanl created this revision.Mar 25 2021, 6:46 PM
rahmanl requested review of this revision.Mar 25 2021, 6:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2021, 6:46 PM
tmsriram added inline comments.Mar 25 2021, 7:22 PM
llvm/test/CodeGen/X86/basic-block-sections-labels-empty-function.ll
12

Curious, How does this pass? There is a ".section .llvm_bb_addr_map" for func() later.

rahmanl marked an inline comment as done.Mar 25 2021, 7:38 PM
rahmanl added inline comments.
llvm/test/CodeGen/X86/basic-block-sections-labels-empty-function.ll
12

Right. I learned it too. FileCheck documentation says 'The “CHECK-NOT:” directive is used to verify that a string doesn’t occur between two matches' So this CHECK-NOT is evaluated against the next CHECK.

rahmanl marked an inline comment as done.Mar 25 2021, 7:40 PM
rahmanl added inline comments.
llvm/test/CodeGen/X86/basic-block-sections-labels-empty-function.ll
12
tmsriram accepted this revision.Mar 25 2021, 8:06 PM
This revision is now accepted and ready to land.Mar 25 2021, 8:06 PM
This revision was landed with ongoing or failed builds.Mar 29 2021, 8:15 PM
This revision was automatically updated to reflect the committed changes.