[llvm] b28e5b7 - [VE] Disable relative lookup table converter pass for VE

Kazushi Marukawa via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 03:25:40 PDT 2021


Author: Kazushi (Jam) Marukawa
Date: 2021-07-19T19:25:33+09:00
New Revision: b28e5b791064dac5e222817c06aeec032b4af878

URL: https://github.com/llvm/llvm-project/commit/b28e5b791064dac5e222817c06aeec032b4af878
DIFF: https://github.com/llvm/llvm-project/commit/b28e5b791064dac5e222817c06aeec032b4af878.diff

LOG: [VE] Disable relative lookup table converter pass for VE

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.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D106224

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/VE/VETargetTransformInfo.h b/llvm/lib/Target/VE/VETargetTransformInfo.h
index 6e6f4d2490754..0242fa1b01179 100644
--- a/llvm/lib/Target/VE/VETargetTransformInfo.h
+++ b/llvm/lib/Target/VE/VETargetTransformInfo.h
@@ -76,6 +76,16 @@ class VETTIImpl : public BasicTTIImplBase<VETTIImpl> {
     // 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


        


More information about the llvm-commits mailing list