-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Optimize PLT and jl_load_and_lookup calls #50745
Changes from 2 commits
57361b7
7bffed3
2771eca
6e067b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1796,8 +1796,11 @@ static inline GlobalVariable *prepare_global_in(Module *M, GlobalVariable *G) | |
if (!local) { | ||
// Copy the GlobalVariable, but without the initializer, so it becomes a declaration | ||
GlobalVariable *proto = new GlobalVariable(*M, G->getValueType(), | ||
G->isConstant(), GlobalVariable::ExternalLinkage, | ||
G->isConstant(), G->getLinkage(), | ||
nullptr, G->getName(), nullptr, G->getThreadLocalMode()); | ||
if (proto->hasLocalLinkage()) { | ||
proto->setInitializer(G->getInitializer()); | ||
} | ||
proto->copyAttributesFrom(G); | ||
// DLLImport only needs to be set for the shadow module | ||
// it just gets annoying in the JIT | ||
|
@@ -2363,6 +2366,8 @@ std::unique_ptr<Module> jl_create_llvm_module(StringRef name, LLVMContext &conte | |
if (!m->getModuleFlag("Debug Info Version")) | ||
m->addModuleFlag(llvm::Module::Warning, "Debug Info Version", | ||
llvm::DEBUG_METADATA_VERSION); | ||
if (imaging_mode) | ||
m->addModuleFlag(llvm::Module::Error, "julia.imaging_mode", 1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this a property of the code itself (rather than a choice of the use site of the code)? That seems weird There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At the moment we make different choices in imaging mode vs non-imaging mode, so I wanted to carry that over (particularly in |
||
m->setDataLayout(DL); | ||
m->setTargetTriple(triple.str()); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit: delete code, do not comment it out