This is an archive of the discontinued LLVM Phabricator instance.

[BPF] Propagate NoMerge attribute when lowering function calls
ClosedPublic

Authored by eddyz87 on Jun 14 2023, 6:10 PM.

Details

Summary

NoMerge attribute on machine instructions prevents certain
transformations from merging these instructions.
One of such transformations is 'llvm/lib/CodeGen/BranchFolding.cpp'.

This attribute should be copied from IR call instructions to machine
level instructions. See X86TargetLowering::LowerCall as another
example.

Diff Detail

Event Timeline

eddyz87 created this revision.Jun 14 2023, 6:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2023, 6:10 PM
eddyz87 published this revision for review.Jun 15 2023, 6:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 6:55 AM

Hi Yonghong,

While this change is necessary to make use of D152986 it is a worthy change in it's own, e.g. the test case does not depend on D152986.
Could you please take a look?

yonghong-song accepted this revision.Jun 18 2023, 3:31 PM

Sounds good to me. This way, functions and stmts with nomerge attribute should work for bpf backend.

This revision is now accepted and ready to land.Jun 18 2023, 3:31 PM