[PATCH] D30759: With PIE on x86_64, keep hot local arrays on the stack

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 15:10:28 PST 2017


efriedma added a comment.

In theory, the C/C++ standards require behavior equivalent to -fno-merge-all-constants.  In practice, code doesn't actually depend on that, so we made the decision many years ago to turn on -fmerge-all-constants by default.

Anyway, you don't really want the behavior of the optimizer to depend on whether the constant array is marked "static"; it probably doesn't reflect the user's intent in any useful way.

----

I'm sort of surprised you didn't mention register pressure at all in your explanation.


https://reviews.llvm.org/D30759





More information about the llvm-commits mailing list