[PATCH] D49103: Lower llvm.objectsize earlier in our optimization pipeline

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 19:02:10 PDT 2018


george.burgess.iv added a comment.

And numbers for building ${large_project}, as promised:

I built each compiler/ran the numbers twice with the patch and twice without, and all of the numbers were stable across reruns.

Across ~29,000 TUs that had at least one attempt by LLVM to lower an `@llvm.objectsize` intrinsic:

- With this patch, we lowered 585,692 successfully, and we failed to lower 649,086, for a total of 1,234,778 "forceful" lowerings (e.g. either we return success, or we returned a "we're giving up; here's a conservative answer" value). This is a 52.6% failure rate.
- Without this patch, we lowered 589,559 successfully, and we failed to lower 640,908, for a total of 1,230,507 "forceful" lowerings. This is a 52.1% failure rate.

It's interesting to note that the "with the patch" numbers included 30 more TUs than the "without the patch" numbers. Like said, a TU only "counts" here if it had one or more `objectsize` calls that LLVM had to lower, so it would seem that some number of our failed lowerings with the patch are part of functions or blocks of code that just get DCE'd later on.

(For users of C/C++/ObjC specifically, I'd like to emphasize that these numbers don't include any calls to `__builtin_object_size` that clang could lower without the help of LLVM.)


https://reviews.llvm.org/D49103





More information about the llvm-commits mailing list