[PATCH] D118450: [RuntimeDyld] Handle SPARC

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 00:58:01 PST 2022


ro added a comment.

In D118450#3295770 <https://reviews.llvm.org/D118450#3295770>, @lhames wrote:

> 



> Sorry, I've been busy and haven't had a chance to review this yet. I should be able to take a look this week or next.

No worries at all: I just pinged to make sure I won't drop the ball.

> The first thing that I notice is that this is missing a testcase. I don't think we had infrastructure to test this with in LLVM 3, but it should now be testable with an llvm-rtdyld test (see `llvm/test/ExecutionEngine/RuntimeDyld/*/` for examples).

I see: seems like I'll have to dive really deep into this area then.

> Is there a motivating use case for adding this support? Where possible, new development should focus on JITLink rather than RuntimeDyld, but if there are existing MCJIT users on SPARC who need this then I think it makes sense to upstream it.

The original patch starts with this comment:

  gnome-shell cores dump on sparc when mesa is build with llvm without this.
  (to be submitted to upstream).
  
  ------------  lwp# 1 / thread# 1  ---------------
   00000000e7a01a84 fail (e7a017d8, 21, e7a017b0, 1d, f71a7cee, 0) + 108 (ssp.c:169)
   00000000e7a01ad8 __stack_chk_fail (ff000000, ff000000, ff000000, 0, f3e29970, f3e33d44) + 28
   00000000ea6c6328 llvm::RuntimeDyldELF::resolveRelocation(const llvm::SectionEntry&,unsigned long,unsigned long,unsigned,long,unsigned long,unsigned) (3cd2e10, 3cd2ee8, 20, f30a6000, 6, 0) + 1c0
  [...]

I suspect that still holds.

However, my primary motivation was that this patch fixes 5 failures on Solaris/sparcv9:

  -  Clang-Unit :: Interpreter/./ClangReplInterpreterTests/IncrementalProcessing.InstantiateTemplate
  
  -  LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/OrcCAPITestBase.AddObjectBuffer
  -  LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/OrcCAPITestBase.ExecutionTest
  -  LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/OrcCAPITestBase.ResourceTrackerDefinitionLifetime
  -  LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/OrcCAPITestBase.ResourceTrackerTransfer

I try to get Solaris testresults clean so the buildbots (currently on staging) become actually useful to pinpoint regressions and new failures.  Just getting an existing patch upstream seemed like an easy way to get closer to that goal.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118450



More information about the llvm-commits mailing list