[PATCH] D90776: [FastISel] Sink more materializations to first use
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 09:53:39 PST 2020
probinson added a comment.
I prototyped a patch that would
- call flushLocalValueMap() at the top of selectInstruction()
- turn off the instruction-sinking stuff
- not erase the DbgLoc applied to local value instructions
I also added statistics for the number of local values added to the map, and the number of lookups that got a hit (assumed to mean a reuse).
| stat | no patch | with patch | delta |
| local values recorded | 4686197 | 4711277 | +25080 (+0.5%) |
| local values reused | 1524558 | 1283825 | -240733 (-16%) |
| reuse rate | 32.5% | 27.3% | -5.2% |
| .text size | 127,537,392 | 127,507,888 | -29505 (-0.02%) |
| Line-0 bytes | 9.071,744 | 8,935,299 | -136445 (-1.5%) |
|
This tells me that comparatively few values were reuses across instruction boundaries (~5%). Despite those reuses going away, overall .text size still went down, which we could assume is due to fewer spills/reloads; I don't have stats there, we'd have to see what regalloc is willing to report.
There's also a pleasant decrease in the number of bytes with line-0 attributions. I noticed in small examples that reloads at the top of a block still get line 0, which seems not unfair.
I don't have build-time stats yet, but as the patch removes the old sinking code, I'd anticipate that build times would go down.
Once I have that data, I'll clean up the prototype patch and post that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90776/new/
https://reviews.llvm.org/D90776
More information about the llvm-commits
mailing list