mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Disable function signature optimization at -Osize.
We might be more aggressive here in the future.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user