Skip to content

Commit 43facce

Browse files
wasm: disable keypath projection for now until stable keypath cc
1 parent 90832e5 commit 43facce

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,13 @@ bool SILCombiner::tryOptimizeKeypathKVCString(ApplyInst *AI,
505505
}
506506

507507
bool SILCombiner::tryOptimizeKeypath(ApplyInst *AI) {
508+
// FIXME(katei): Disable for WebAssembly for now because
509+
// KeyPath cc is unstable and KeyPathProjector hask violates
510+
// some assert assumptions
511+
SILModule &M = AI->getModule();
512+
if (M.getASTContext().LangOpts.Target.isOSBinFormatWasm())
513+
return false;
514+
508515
if (SILFunction *callee = AI->getReferencedFunctionOrNull()) {
509516
return tryOptimizeKeypathApplication(AI, callee);
510517
}
@@ -550,6 +557,13 @@ bool SILCombiner::tryOptimizeKeypath(ApplyInst *AI) {
550557
/// %addr = struct_element_addr/ref_element_addr %root_object
551558
/// // use %inout_addr
552559
bool SILCombiner::tryOptimizeInoutKeypath(BeginApplyInst *AI) {
560+
// FIXME(katei): Disable for WebAssembly for now because
561+
// KeyPath cc is unstable and KeyPathProjector hask violates
562+
// some assert assumptions
563+
SILModule &M = AI->getModule();
564+
if (M.getASTContext().LangOpts.Target.isOSBinFormatWasm())
565+
return false;
566+
553567
// Disable in OSSA because KeyPathProjector is not fully ported
554568
if (AI->getFunction()->hasOwnership())
555569
return false;

0 commit comments

Comments
 (0)