forked from golang/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/callgraph/vta: add return parameter nodes for functions
The change improves the performance of VTA. If a function returns F values, has R return instructions, and is called at C places (as given by the initial call graph), previously we could generate R x F x C edges in the type propagation graph. With the approach of introducing artificial return parameters, we create F x (R + C) edges instead. Measured on a large project, this introduces ~5% time savings on average. When the initial call graph is CHA, the type propagation graph is ~31% smaller. When the resulting call graph is then used as the initial call graph, then the graph is ~21% smaller. This will also enable use of one-direction callgraphs. Change-Id: I5de1774f11ce3bf23ac3c768df9e2c9f37777817 Reviewed-on: https://go-review.googlesource.com/c/tools/+/609318 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Reviewed-by: Tim King <[email protected]>
- Loading branch information
1 parent
063360f
commit 264b4b5
Showing
7 changed files
with
61 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 |
---|---|---|
|
@@ -16,3 +16,5 @@ type X struct { | |
func main() { | ||
print(gl) | ||
} | ||
|
||
func foo() (r int) { return gl } |
This file contains 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