[PATCH] D67363: [BreakFalseDeps] ignore function with minsize attribute

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 05:05:16 PDT 2019


spatel added a comment.

In D67363#1663974 <https://reviews.llvm.org/D67363#1663974>, @RKSimon wrote:

> This would make it policy for -Oz builds to not bother to break dependencies but -Os/-O0+ builds would still do.


Correct - that matches my interpretation of the vague clang docs:

  -Os Like -O2 with extra optimizations to reduce code size.
  -Oz Like -Os (and thus -O2), but reduces code size further.

In my experience, -Oz ("minsize") is used to ensure that code fits in some constrained space, so any extras that can be eliminated should be eliminated. Perf is a secondary concern. This is different than -Os ("optsize") where we are trying to balance speed and size.

> Does anything else use BreakFalseDeps?

x86 and ARM are the only targets in trunk that use it from what I can see. Both use it the same way: insert dummy (not required for correctness) instructions to avoid known uarch hazards.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67363/new/

https://reviews.llvm.org/D67363





More information about the llvm-commits mailing list