Skip to content

Commit e1d0e64

Browse files
committed
Disable function specialization (#599)
It breaks mono's AOT compiled code, because the specialized functions are outside of generated EH frame code range. We can re-enable it, once we fix EH frame generation for mono.
1 parent 295aa71 commit e1d0e64

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,11 +1131,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
11311131
// and prior to optimizing globals.
11321132
// FIXME: This position in the pipeline hasn't been carefully considered in
11331133
// years, it should be re-analyzed.
1134-
MPM.addPass(IPSCCPPass(
1135-
IPSCCPOptions(/*AllowFuncSpec=*/
1136-
Level != OptimizationLevel::Os &&
1137-
Level != OptimizationLevel::Oz &&
1138-
!isLTOPreLink(Phase))));
1134+
// mono: FIXME: disabled for now, we need to fix mono EH frame generation first
1135+
// MPM.addPass(IPSCCPPass(
1136+
// IPSCCPOptions(/*AllowFuncSpec=*/
1137+
// Level != OptimizationLevel::Os &&
1138+
// Level != OptimizationLevel::Oz &&
1139+
// !isLTOPreLink(Phase))));
11391140

11401141
// Attach metadata to indirect call sites indicating the set of functions
11411142
// they may target at run-time. This should follow IPSCCP.
@@ -1805,9 +1806,11 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
18051806
// Propagate constants at call sites into the functions they call. This
18061807
// opens opportunities for globalopt (and inlining) by substituting function
18071808
// pointers passed as arguments to direct uses of functions.
1808-
MPM.addPass(IPSCCPPass(IPSCCPOptions(/*AllowFuncSpec=*/
1809-
Level != OptimizationLevel::Os &&
1810-
Level != OptimizationLevel::Oz)));
1809+
1810+
// mono: FIXME: disabled for now, we need to fix mono EH frame generation first
1811+
// MPM.addPass(IPSCCPPass(IPSCCPOptions(/*AllowFuncSpec=*/
1812+
// Level != OptimizationLevel::Os &&
1813+
// Level != OptimizationLevel::Oz)));
18111814

18121815
// Attach metadata to indirect call sites indicating the set of functions
18131816
// they may target at run-time. This should follow IPSCCP.

0 commit comments

Comments
 (0)