[PATCH] D15344: [WebAssembly] WIP for SP lowering.

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 14:05:00 PST 2015


sunfish accepted this revision.
sunfish added a comment.
This revision is now accepted and ready to land.

Looks good.


================
Comment at: lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp:84
@@ +83,3 @@
+  auto &MRI = MF.getRegInfo();
+  auto InsertPt = MBB.begin();
+  DebugLoc DL;
----------------
Ah. This might be a job for PseudoSourceValue::ExternalSymbolCallEntry then. In fact, it looks like it would work to just use that right now; the only odd part is the "Call" in the name, which may be an artifact of the fact that the only thing using it right now is doing GOT loads for calls. Perhaps we could rename/generalize it though. In any case, this isn't urgent, so perhaps just add a comment mentioning this.

================
Comment at: lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp:151
@@ -74,1 +150,2 @@
+
 }
----------------
Sounds good.

================
Comment at: test/CodeGen/WebAssembly/userstack.ll:8
@@ +7,3 @@
+
+ at __stack_pointer = external global i32
+
----------------
With ExternalSymbol to get __stack_pointer, we no longer need to declare it at the LLVM IR level.

================
Comment at: test/CodeGen/WebAssembly/userstack.ll:13
@@ +12,3 @@
+  ret void
+}
+
----------------
Is this function still needed now that we're using an ExternalSymbol for __stack_pointer?


http://reviews.llvm.org/D15344





More information about the llvm-commits mailing list