[PATCH] D51664: [IR] Lazily number instructions for local dominance queries

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 17:43:54 PDT 2018


dexonsmith added a reviewer: ahatanak.
dexonsmith added subscribers: ahatanak, bogner.
dexonsmith added a comment.

This is awesome to see!

@ahatanak, you had a prototype of something similar a couple of years ago.  Can you take a look?

> The downside is that Instruction grows from 56 bytes to 64 bytes,

What's the growth for 32-bit pointers?

> and I

don't have a good way to measure what that costs in practice. As the one
who removed the vtable from Value, I will say that this is how I would
like to spend the 8 bytes that I saved a year ago in r303362.

The two memory-sensitive cases I'm aware of are embedded compilers and LTO (with debug info).

It would be good to get someone to comment on the former.  Also, what's the difference for 32-bit platforms?

On the latter: we still support users of `-flto=full`, so it would be interesting to know how big a regression in peak memory this would be.  In the past, I've gotten numbers by running a build with `-flto`, using `-save-temps` when invoking the ld64, and then running `llc` on the optimized (but not CodeGen'ed) bitcode file (since the peak is in CodeGen).  If you're really curious, that still seems like a decent way to look at the impact.  But I doubt this will even register a difference; `Instruction`s are usually malloc-allocated, and malloc is typically aligned


https://reviews.llvm.org/D51664





More information about the llvm-commits mailing list