Disable function signature optimization at -Osize.

We might be more aggressive here in the future.
This commit is contained in:
Arnold Schwaighofer
2017-08-16 14:43:09 -07:00
parent 64f2d64b54
commit 0abf3faa6b

View File

@@ -1140,6 +1140,11 @@ public:
void run() override {
auto *F = getFunction();
// Don't run function signature optimizations at -Os.
if (F->getModule().getOptions().Optimization ==
SILOptions::SILOptMode::OptimizeForSize)
return;
// Don't optimize callees that should not be optimized.
if (!F->shouldOptimize())
return;