Page MenuHomePhabricator

[CSInfo][GlobalISel] CallSiteInfo support when using GlobalISel
Needs ReviewPublic

Authored by matejam on Sep 18 2020, 6:48 AM.

Details

Reviewers
djtodoro
arsenm
Summary

Save information about the call sites like block number and offset within that block of the call site instruction and pairs of argument serial numbers and registers that are being used when using GlobalISel as an instruction selector.
We save this information in order to keep track of call instructions and registers that are being used to transfer call arguments.

Diff Detail

Unit TestsFailed

TimeTest
100 mslinux > LLVM.CodeGen/X86::call-site-info-output2.ll
Script: -- : 'RUN: at line 3'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llc -emit-call-site-info -global-isel /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/X86/call-site-info-output2.ll -stop-before=finalize-isel -o /mnt/disks/ssd0/agent/llvm-project/build/test/CodeGen/X86/Output/call-site-info-output2.ll.tmp.mir
220 mswindows > LLVM.CodeGen/X86::call-site-info-output2.ll
Script: -- : 'RUN: at line 3'; c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\llc.exe -emit-call-site-info -global-isel C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\CodeGen\X86\call-site-info-output2.ll -stop-before=finalize-isel -o C:\ws\w16c2-1\llvm-project\premerge-checks\build\test\CodeGen\X86\Output\call-site-info-output2.ll.tmp.mir

Event Timeline

matejam created this revision.Sep 18 2020, 6:48 AM
matejam requested review of this revision.Sep 18 2020, 6:48 AM
djtodoro added inline comments.Sep 18 2020, 6:54 AM
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
2207

Early continue here?

matejam added inline comments.Sep 18 2020, 7:10 AM
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
2207

That's a good idea. Thanks.

arsenm added inline comments.Sep 18 2020, 10:29 AM
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
2203

This is making a *lot* of assumptions about what lowerCall did. You can't assume there will only be a single copy exactly corresponding to a single IR argument, that appear in order

arsenm added inline comments.Sep 18 2020, 10:30 AM
llvm/test/CodeGen/X86/call-site-info-output2.ll
34–37

Should remove these

55

Need some tests with complex arguments that will need decomposing