Skip to content

Conversation

pchintalapudi
Copy link
Member

@pchintalapudi pchintalapudi commented Jan 11, 2022

Another PR in the line of removing the codegen globals.

Depends on #43802

@pchintalapudi pchintalapudi added compiler:codegen Generation of LLVM IR and native code excision Removal of code from Base or the repository labels Jan 11, 2022
@vtjnash
Copy link
Member

vtjnash commented Jan 12, 2022

Doesn't this need to get shared among all jl_codegen_params_t, so that that these only get created once for each Module?

@pchintalapudi
Copy link
Member Author

What happens if we create the debug information builders multiple times? Is it just a performance loss, or will LLVM silently break debuginfo?

@vtjnash
Copy link
Member

vtjnash commented Jan 13, 2022

It shouldn't horribly fail, since the types don't have to agree, but will probably make unique types that are supposed to be the same.

@pchintalapudi pchintalapudi marked this pull request as draft February 19, 2022 23:40
#endif
std::unique_ptr<TargetMachine> TM(
jl_TargetMachine->getTarget().createTargetMachine(
jl_ExecutionEngine->getTargetMachine().getTarget().createTargetMachine(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems a little bit odd. Should we use a TargetMachineBuilder?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should, especially since we can choose to not expose the actual TargetMachine itself from the JIT engine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update on this: my attempt at using a TargetMachineBuilder failed during building on macos, so I'm thinking it's better to revisit rewriting this particular sequence of instructions at a later date.

@pchintalapudi pchintalapudi marked this pull request as ready for review March 3, 2022 18:25
@vchuravy vchuravy merged commit 5db280d into JuliaLang:master Mar 4, 2022
@pchintalapudi pchintalapudi deleted the pc/debuginfo branch March 6, 2022 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:codegen Generation of LLVM IR and native code excision Removal of code from Base or the repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants