We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37fae30 commit be6239aCopy full SHA for be6239a
lib/SILOptimizer/IPO/GlobalOpt.cpp
@@ -1147,14 +1147,7 @@ bool SILGlobalOpt::run() {
1147
// Optimize based on what we just collected.
1148
for (auto &InitCalls : GlobalInitCallMap) {
1149
// Don't optimize functions that are marked with the opt.never attribute.
1150
- bool shouldOptimize = true;
1151
- for (auto *apply : InitCalls.second) {
1152
- if (!apply->getFunction()->shouldOptimize()) {
1153
- shouldOptimize = false;
1154
- break;
1155
- }
1156
1157
- if (!shouldOptimize)
+ if (!InitCalls.first->shouldOptimize())
1158
continue;
1159
1160
// Optimize the addressors if possible.
0 commit comments