[PATCH] D11568: fix memcpy/memset/memmove lowering when optimizing for size
Michael Kuperstein
michael.m.kuperstein at intel.com
Tue Jul 28 11:27:03 PDT 2015
mkuper added a comment.
Thanks for taking care of this, Sanjay.
It would be really nice to be consistent.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4156
@@ +4155,3 @@
+ const Function *F = MF.getFunction();
+ bool hasMinSize = F->hasFnAttribute(Attribute::MinSize);
+ bool hasOptSize = F->hasFnAttribute(Attribute::OptimizeForSize);
----------------
Should start with a capital, I think.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4157
@@ +4156,3 @@
+ bool hasMinSize = F->hasFnAttribute(Attribute::MinSize);
+ bool hasOptSize = F->hasFnAttribute(Attribute::OptimizeForSize);
+
----------------
Same.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4159
@@ +4158,3 @@
+
+ // On Darwin, -Os means optimize for size without hurting performance, so
+ // only really optimize for size when -Oz (MinSize) is used.
----------------
Is this Darwin/non-Darwin distinction documented anywhere?
And do we respect it anywhere else, aside from the memfunc issue?
http://reviews.llvm.org/D11568
More information about the llvm-commits
mailing list