File tree Expand file tree Collapse file tree
llvm/lib/Target/WebAssembly Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,3 +70,4 @@ pythonenv*
7070/clang /utils /analyzer /projects /* /RefScanBuildResults
7171# automodapi puts generated documentation files here.
7272/lldb /docs /python_api /
73+ build /
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ class WebAssemblySpillPointers final : public MachineFunctionPass {
4646 void getAnalysisUsage (AnalysisUsage &AU) const override {
4747 AU.setPreservesCFG ();
4848 AU.addRequired <LiveIntervals>();
49- AU.addPreserved <LiveIntervals>();
5049 MachineFunctionPass::getAnalysisUsage (AU);
5150 }
5251
Original file line number Diff line number Diff line change @@ -525,6 +525,11 @@ void WebAssemblyPassConfig::addPostRegAlloc() {
525525 // control flow.
526526 disablePass (&MachineBlockPlacementID);
527527
528+ // Spill pointer-typed values to shadow stack for GC.
529+ // This must run before PEI so that frame indices are properly resolved.
530+ if (getOptLevel () != CodeGenOpt::None)
531+ addPass (createWebAssemblySpillPointers ());
532+
528533 TargetPassConfig::addPostRegAlloc ();
529534}
530535
@@ -568,11 +573,6 @@ void WebAssemblyPassConfig::addPreEmitPass() {
568573 addPass (createWebAssemblyRegColoring ());
569574 }
570575
571- // Spill pointer-typed values to shadow stack for GC.
572- // This must run after register allocation but before explicit locals.
573- if (getOptLevel () != CodeGenOpt::None)
574- addPass (createWebAssemblySpillPointers ());
575-
576576 // Sort the blocks of the CFG into topological order, a prerequisite for
577577 // BLOCK and LOOP markers.
578578 addPass (createWebAssemblyCFGSort ());
You can’t perform that action at this time.
0 commit comments