[PATCH] D106224: [VE] Disable relative lookup table converter pass for VE

Kazushi Marukawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 17 12:41:22 PDT 2021


kaz7 created this revision.
kaz7 added reviewers: simoll, k-ishizaka.
kaz7 added projects: LLVM, VE.
Herald added a subscriber: hiraditya.
kaz7 requested review of this revision.
Herald added a subscriber: llvm-commits.

VE's linker, /opt/nec/ve/bin/nld, doesn't implement relative lookup table.
The relative lookup table is introduced by https://reviews.llvm.org/D94355,
but we need to disable it at the moment.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106224

Files:
  llvm/lib/Target/VE/VETargetTransformInfo.h


Index: llvm/lib/Target/VE/VETargetTransformInfo.h
===================================================================
--- llvm/lib/Target/VE/VETargetTransformInfo.h
+++ llvm/lib/Target/VE/VETargetTransformInfo.h
@@ -76,6 +76,16 @@
     // TODO report vregs once vector isel is stable.
     return 0;
   }
+
+  bool shouldBuildRelLookupTables() const {
+    // NEC nld doesn't support relative lookup tables.  It shows following
+    // errors.  So, we disable it at the moment.
+    //   /opt/nec/ve/bin/nld: src/CMakeFiles/cxxabi_shared.dir/cxa_demangle.cpp
+    //   .o(.rodata+0x17b4): reloc against `.L.str.376': error 2
+    //   /opt/nec/ve/bin/nld: final link failed: Nonrepresentable section on
+    //   output
+    return false;
+  }
 };
 
 } // namespace llvm


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106224.359578.patch
Type: text/x-patch
Size: 771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210717/efe8f972/attachment.bin>


More information about the llvm-commits mailing list