[PATCH] D121420: [lld][WebAssembly] Take advantage of extended const expression when available

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 16:01:29 PDT 2022


dschuff added a comment.

Ah, right I forgot we already combined the default segments. That's probably fine as a default behavior.



================
Comment at: lld/test/wasm/pie.ll:96
+; Run the same test with extended-const support.  When this is available
+; we don't need __wasm_apply_global_relocs and instead reley on the add
+; instruction in the InitExpr.  We also, therefore, do not need these globals
----------------



================
Comment at: lld/test/wasm/pie.ll:147
+; DISASSEM-EXTENDED-CONST-NEXT:   call 3
+; DISASSEM-EXTENDED-CONST-NEXT:   end
+
----------------
I don't see a RUN line for DISASSEM-EXTENDED-CONST?


================
Comment at: lld/test/wasm/tls-non-shared-memory.s:144
+# Unless we have extended-const, in which case the merging is not needed
+# There the firts segment is placed directly at `__memory_base` and the second
+# one is offset from `__memory_base` using `i32.add` and a constant.
----------------



================
Comment at: lld/wasm/SyntheticSections.h:277
 
   // Add an internal GOT entry global that corresponds to the given symbol.
   // Normally GOT entries are imported and assigned by the external dynamic
----------------
Does this comment need updating?


================
Comment at: lld/wasm/Writer.cpp:930
   // combines all data segments into a single .data segment.
-  // This restructions can be relaxed once we have extended constant
-  // expressions available:
-  // https://github.com/WebAssembly/extended-const
+  // This restructions does now apply when the extended const extension is
+  // available: https://github.com/WebAssembly/extended-const
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121420/new/

https://reviews.llvm.org/D121420



More information about the llvm-commits mailing list