[PATCH] D46018: [GlobalISel][IRTranslator] Split aggregates during IR translation

Roman Tereshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 09:14:59 PDT 2018


rtereshin added a comment.

In https://reviews.llvm.org/D46018#1098046, @aemerson wrote:

> I've made the changes to not generate copies for the insertvalue/extractvalue


That's great! Thanks!

> but how did you measure the memory consumption of the individual passes?

`-time-passes` option of `llc` has a neat modifier: `-track-memory`. `llc -time-passes -track-memory` will report the diff in memory footprint for each pass as a difference before and after (so it could be negative if a pass frees a lot of memory). My guess that it also means that it doesn't report the peak memory consumption if the peak happens mid-pass. Which is rather unfortunate. But I'm not sure about that one.

Another way to look at things on a grand scale - no individual passes data - is to do `llc -time-passes -time-compilations=1000` (or so) so `llc` loops for a long time and just watch the memory data in `top`. `top` seems to be greatly unable to catch spikes in memory consumption as well, unfortunately, it's probably a sampling tool so it misses brief increases in memory footprint. Or it least it feels that way. Or I'm using it wrong. Please share any ideas about all of this.

> With the change it now produces 4k lines of assembly on your test case, vs 3.5k assembly. The MIR is much larger but that's because of the extra GEPs and G_CONSTANTs. Compile time is now comparable to without this change.

Awesome, could you please update the diff here at Phabricator?

Thanks!
Roman


Repository:
  rL LLVM

https://reviews.llvm.org/D46018





More information about the llvm-commits mailing list