Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPC doesn't support non-lazy JIT compilation #5188

Closed
edwintorok opened this issue Aug 28, 2009 · 6 comments
Closed

PPC doesn't support non-lazy JIT compilation #5188

edwintorok opened this issue Aug 28, 2009 · 6 comments
Labels
backend:PowerPC bugzilla Issues migrated from bugzilla obsolete

Comments

@edwintorok
Copy link
Contributor

Bugzilla Link 4816
Version unspecified
OS Linux
Attachments x.bc

Extended Description

Disabling lazy compilation fails on PPC:

Release/bin/lli -disable-lazy-compilation ~/x.bc
Assertion failed: (0 && "This target doesn't implement emitFunctionStubAtAddr!"), function emitFunctionStubAtAddr, file /Users/acab/clamav-devel/libclamav/llvm/llvm/include/llvm/Target/TargetJITInfo.h, line 65.
0 lli 0x0065d50c llvm::sys::RWMutexImpl::writer_release() + 476
1 lli 0x0065dddc llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 1244
2 libSystem.B.dylib 0x92f639fc _sigtramp + 68
Stack dump:
0. Program arguments: Release/bin/lli -disable-lazy-compilation /Users/acab/x.bc
Abort trap

It seems that X86 is the only target that implements that method.

In this case it is simply a matter of ordering the functions bottom-up according to the callgraph, and then non-lazy compilation should succeeed on the Mac too in this case, BUT it would fail for mutually recursive functions.

Is there a workaround that doesn't need emitFunctinStubAtAddr, or should I just always use lazy compilation on Mac/PPC? (rather anything non-X86?)

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 1, 2009

I'm pretty sure you're correct that the eager JIT only exists on x86. It doesn't look that hard to implement emitFunctionStubAtAddr given emitFunctionStub (with some thought, maybe we can unify them), but I don't have a PPC or ARM to test on, so I'm a bit reluctant to try it myself. Would you be interested in taking a shot at the implementation? If not, I may be able to find a machine to test on or use the buildbots as guinea pigs.

@edwintorok
Copy link
Contributor Author

I'm pretty sure you're correct that the eager JIT only exists on x86. It
doesn't look that hard to implement emitFunctionStubAtAddr given
emitFunctionStub (with some thought, maybe we can unify them), but I don't have
a PPC or ARM to test on, so I'm a bit reluctant to try it myself. Would you be
interested in taking a shot at the implementation?

For PPC and ARM there are some Linux machines on the compile farm.
They are about 7-13 times slower than my x86-64 box though, so it may take some time to compile LLVM initially.

If not, I may be able to
find a machine to test on or use the buildbots as guinea pigs.

I may have some time for this late next week.

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 7, 2009

I may wind up fixing this as part of the redesign for llvm/llvm-bugzilla-archive#5201 , so don't waste time working on it yet.

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 10, 2009

Possible fix
Nick's running the tests on PPC and ARM, but other people are welcome to do the same. You can review the patch at http://codereview.appspot.com/153044.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@llvmbot
Copy link
Collaborator

llvmbot commented Aug 8, 2023

@llvm/issue-subscribers-backend-powerpc

@nemanjai
Copy link
Member

nemanjai commented Aug 8, 2023

Hmm, this issue is from 14 years ago. I imagine it is no longer valid especially since it references an assert in a file that no longer exists.

@nemanjai nemanjai closed this as completed Aug 8, 2023
@EugeneZelenko EugeneZelenko closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:PowerPC bugzilla Issues migrated from bugzilla obsolete
Projects
None yet
Development

No branches or pull requests

5 participants