This is an archive of the discontinued LLVM Phabricator instance.

ExecutionEngine: support composite types handling.
AcceptedPublic

Authored by Panzerschrek on Jan 23 2023, 10:35 AM.

Details

Summary

Now it's possible to load/store composite values (structs, arrays), access constants of composite types, produce undef values of array types.

Diff Detail

Event Timeline

Panzerschrek created this revision.Jan 23 2023, 10:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2023, 10:35 AM
Herald added a subscriber: nlopes. · View Herald Transcript
Panzerschrek requested review of this revision.Jan 23 2023, 10:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2023, 10:35 AM

https://buildkite.com/llvm-project/diff-checks/builds/148695#0185dfea-0508-46a5-839e-39e609643be2
Unfortunately, the patch build was failed:

INFO
ERROR   <stdin>:62: trailing whitespace.
 
error: lib/ExecutionEngine/ExecutionEngine.cpp: No such file or directory

What exactly went wrong?

Fix files path - include "llvm" prefix (for monorepo).

Fix clang-format errors

Comrades, sorry for disturbing, but i need someone to review this PR.

spatel edited reviewers, added: lhames, sgraenitz, MoritzS, Hahnfeld; removed: spatel.Feb 21 2023, 5:05 AM

I don't know anything about ExecutionEngine - adding potential reviewers based on the most recent git log entries for this directory.

As far as I can tell, this is for the MCJIT infrastructure which is deprecated (?) or at least not actively worked on anymore. You should try ORC, which does actual just-in-time compilation.

You should try ORC, which does actual just-in-time compilation.

I use interpreter for tests of my programming language. Using interpreter for this is totally fine, JIT is an overkill. Using JIT will slow down tests running. Also compilation will be slower, since JIT depends on code generator libraries (which are huge for x86/x86_64 targets).

lhames accepted this revision.Mar 19 2023, 2:36 PM

@Panzerschrek I don't have a problem with this landing, but want to echo Hahnfeld's point: the interpreter is legacy mode at this point. While there are no immediate plan to remove it, it's not being actively maintained either, and it's possible that it will be removed in a future version (though I would expect us to give a deprecation warning well in advance).

Do you have commit access? If not, please just let me know the name and email that you'd like me to use for attribution and I can commit on your behalf.

  • Lang.
This revision is now accepted and ready to land.Mar 19 2023, 2:36 PM

@lhames, after comment of @Hahnfeld i reconsidered usage of ExecutionEngine in my project. I implemented my own version of interpreter and no longer use ExecutionEngine. So, this PR now has no sense. Previously only i needed this functionality, but now nobody needs it.
Let's wait a bit (a couple of month) and if nobody find these changes useful, i will close this PR, otherwise i will merge it.