pogo59 wrote:

> We already have a way to set alignment: it's the "align" attribute.

Is clang aware of the target's default function alignment? I'd thought not, in 
which case deferring to LLVM (as this new attribute does) is correct. Happy to 
be corrected on this point.

> there isn't any obvious reason to special-case "cold" functions.

I'd thought that was clear. Cold implies opt-for-size, which implies align(1). 
We want cold not to imply align(1), directly or indirectly; but, if 
opt-for-size was requested explicitly, that should still imply align(1). The 
implied align(1) does interfere with a useful feature for PS4/PS5, and has for 
some time. If the tweak to the definition of "cold" should be specific to our 
targets, we can certainly do that.

https://github.com/llvm/llvm-project/pull/72387
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to