-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[ORC] Unify symbol mapping and allow custom mapping functions #79616
base: main
Are you sure you want to change the base?
Conversation
This commit makes three changes: 1. Unify symbol mapping into IRLayer and discard the old IRSymbolMapper class 2. Allow for clients to provide their own symbol mapper function to provide custom mappings 3. Skip adding linkonce_odr symbols to the symbol map on the default mapper (fixes llvm#64907)
Populate a small FAQ section with its first question related to missing symbols from IR to prepare for the new changes to symbol mapping
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
You can test this locally with the following command:git-clang-format --diff 0f339e6567bffb290e409ef5de272fb75ce70234 5a2bbeb4c8b25d13da9aac729f40a4a5d4b491ec -- llvm/include/llvm/ExecutionEngine/Orc/Layer.h llvm/include/llvm/ExecutionEngine/Orc/Mangling.h llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp llvm/lib/ExecutionEngine/Orc/Layer.cpp llvm/lib/ExecutionEngine/Orc/Mangling.cpp View the diff from clang-format here.diff --git a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
index 007e19a8f87..73e927fd141 100644
--- a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/ADT/Hashing.h"
#include "llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h"
+#include "llvm/ADT/Hashing.h"
#include "llvm/ExecutionEngine/Orc/ExecutionUtils.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
|
1. Move symbol mapping logic from IRLayer to IRSymbolMapper 2. Use the same logic between all know structures that require mapping
This PR provides four changes:
class
provide custom mappings
mapper (fixes [ORC] Missing definition for inlining function after optimizations in IRTRansformLayer #64907)