[llvm] [WebAssembly] Add path to PIC mode for wasm tables (PR #67545)

Paulo Matos via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 03:07:58 PDT 2023


================
@@ -1724,8 +1724,14 @@ SDValue WebAssemblyTargetLowering::LowerGlobalAddress(SDValue Op,
     fail(DL, DAG, "Invalid address space for WebAssembly target");
 
   unsigned OperandFlags = 0;
-  if (isPositionIndependent()) {
-    const GlobalValue *GV = GA->getGlobal();
+  const GlobalValue *GV = GA->getGlobal();
+  // is PIC but not a WebAssembly table.
+  // Since WebAssembly tables cannot yet be shared accross modules, we don't need special
+  // treatment for tables in PIC mode.
----------------
pmatos wrote:

I will wait for a further thumbs up from you if you're happy with introducing this sed pattern into the tests.

https://github.com/llvm/llvm-project/pull/67545


More information about the llvm-commits mailing list