-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[llvm] Add CalleeTypeIds field to CallSiteInfo #87574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Prabhuk
merged 82 commits into
main
from
users/Prabhuk/sprcallsiteinfocallgraphsection-extend-callsiteinfo-with-typeid
Jul 23, 2025
Merged
Changes from 18 commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
00ac51b
[𝘀𝗽𝗿] changes to main this commit is based on
necipfazil 0ca57bd
[𝘀𝗽𝗿] initial version
necipfazil 21a4d2a
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk b9e7dc5
Rebased on top of main
necipfazil 86ba0b1
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 683d7c3
dyn_cast to isa
necipfazil cd0cabe
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 661af56
Addressed review comments except for the verifier check. Rebased on u…
necipfazil 639a497
[𝘀𝗽𝗿] changes introduced through rebase
necipfazil ae8f56a
Rebase patchset
necipfazil 120cb54
[𝘀𝗽𝗿] changes introduced through rebase
necipfazil d573bf0
Update inline comment as suggested.
necipfazil 2cb9de4
[𝘀𝗽𝗿] changes introduced through rebase
necipfazil 26a149b
Rebase on top of upstream main.
necipfazil cf96ec2
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 807cb0a
Break clang and llvm parts into separate commits.
necipfazil 5455d3b
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 3ab92c5
Address review comments. Break llvm and clang patches.
necipfazil 1d7ee61
Simplify MIR test.
necipfazil d235c0f
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 1cf40e1
Rebase on top of main.
necipfazil 9db0468
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 39017d7
Rename OB_type to OB_callee_type.
necipfazil f6ea853
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk da97117
Squash callgraph option change with MIR changes.
Prabhuk cacf7fd
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 6883cbd
Rebase on top of main
Prabhuk 86e2c9d
Add requested tests part 1.
Prabhuk 941dde5
Update comments in tests.
Prabhuk 431fafc
Clean up test files.
Prabhuk b943425
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk dc1b364
Address code refactoring and test cleanup comments.
Prabhuk 7f8e4d9
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 53b24d9
Use list of CalleeTypeIds.
Prabhuk 533454f
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk a7409ab
Handle instcombine usecase for callee_type metadata.
Prabhuk 8c7b1ab
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 8e67a0e
Rebase on parent change.
Prabhuk c1f37fc
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk e33f18b
Address review comments.
Prabhuk d4b6ae0
Address review comments.
Prabhuk 9f94841
Fix the test file formatting for calleeTypeIds.
Prabhuk fb93261
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 64fcf91
Destructuring.
Prabhuk 84e71ce
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk a703c75
Rebase on parent.
Prabhuk b42dc1b
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 1a104c9
Rebase on parent.
Prabhuk 79791a2
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk b224d07
Rebase on parent.
Prabhuk 9bb885a
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 181fabf
Rebase on parent change.
Prabhuk 39c3c62
Remove dso_local and noundef from tests.
Prabhuk 0848196
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 5f9c6ce
Rebase change stack on top of parent.
Prabhuk fb9fdab
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 028a635
Rebase on main.
Prabhuk d95d4f9
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 613b498
Rebase on parent.
Prabhuk 99e871f
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk f3a7ef8
Rebase.
Prabhuk 27e073c
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk cb887ee
Rebase on main
Prabhuk 436d91b
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 222580c
Rebase on top of main.
Prabhuk cdbf3a2
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 6d4910a
Rebase on top of main.
Prabhuk 6a6768e
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 154cede
Rebase on parent
Prabhuk cf8aeae
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk b2d6cbc
Rebase on top of main.
Prabhuk 58b5d3d
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 9456466
Rebase on parent.
Prabhuk 37d8b40
[𝘀𝗽𝗿] changes introduced through rebase
Prabhuk 2d1d17f
Rebase on parent.
Prabhuk 18b26b5
[𝘀𝗽𝗿] changes introduced through rebase
kkwli 6928996
Address review comments.
Prabhuk 09ba547
[𝘀𝗽𝗿] changes introduced through rebase
topperc 3a41234
Rebase on top of main.
Prabhuk f5b15c6
[𝘀𝗽𝗿] changes introduced through rebase
RKSimon 72b0dd0
Rebase.
Prabhuk 79920a8
Reduce tests. Rename function names in tests.
Prabhuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Test MIR printer and parser for type id field in callSites. It is used | ||
| # for propogating call site type identifiers to emit in the call graph section. | ||
|
|
||
| # RUN: llc --call-graph-section %s -run-pass=none -o - | FileCheck %s | ||
| # CHECK: name: main | ||
| # CHECK: callSites: | ||
| # CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs: [], typeId: | ||
| # CHECK-NEXT: 123456789 } | ||
|
|
||
| --- | | ||
| ; ModuleID = 'test.ll' | ||
| source_filename = "test.ll" | ||
| target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | ||
| target triple = "x86_64-unknown-linux-gnu" | ||
Prabhuk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| define dso_local void @foo(i8 signext %a) { | ||
| entry: | ||
| ret void | ||
| } | ||
|
|
||
| define dso_local i32 @main() { | ||
| entry: | ||
| %retval = alloca i32, align 4 | ||
| %fp = alloca void (i8)*, align 8 | ||
| store i32 0, i32* %retval, align 4 | ||
| store void (i8)* @foo, void (i8)** %fp, align 8 | ||
Prabhuk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| %0 = load void (i8)*, void (i8)** %fp, align 8 | ||
| call void %0(i8 signext 97) | ||
| ret i32 0 | ||
Prabhuk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| ... | ||
| --- | ||
| name: foo | ||
| tracksRegLiveness: true | ||
| body: | | ||
| bb.0.entry: | ||
| RET 0 | ||
| ... | ||
| --- | ||
| name: main | ||
| tracksRegLiveness: true | ||
| stack: | ||
| - { id: 0, name: retval, type: default, offset: 0, size: 4, alignment: 4, | ||
| stack-id: default, callee-saved-register: '', callee-saved-restored: true, | ||
| debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } | ||
| - { id: 1, name: fp, type: default, offset: 0, size: 8, alignment: 8, | ||
| stack-id: default, callee-saved-register: '', callee-saved-restored: true, | ||
| debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } | ||
| callSites: | ||
| - { bb: 0, offset: 6, fwdArgRegs: [], typeId: | ||
| 123456789 } | ||
| body: | | ||
| bb.0.entry: | ||
| MOV32mi %stack.0.retval, 1, $noreg, 0, $noreg, 0 :: (store (s32) into %ir.retval) | ||
| MOV64mi32 %stack.1.fp, 1, $noreg, 0, $noreg, @foo :: (store (s64) into %ir.fp) | ||
| %0:gr64 = MOV32ri64 @foo | ||
| ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp | ||
| %1:gr32 = MOV32ri 97 | ||
| $edi = COPY %1 | ||
| CALL64r killed %0, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit-def $rsp, implicit-def $ssp | ||
| ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp | ||
| %2:gr32 = MOV32r0 implicit-def dead $eflags | ||
| $eax = COPY %2 | ||
| RET 0, $eax | ||
| ... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.