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

llvm: Cleanup codegen of mechanisms that modify function return value #2421

Merged
merged 10 commits into from
May 31, 2022

Conversation

jvesely
Copy link
Collaborator

@jvesely jvesely commented May 30, 2022

LCControlMechanism and DDM both modify function return values before using them as mechanism values.
Overloading _gen_llvm_mechanism_functions instead of _gen_llvm_invoke_function gives direct
access to modulated mechanism parameters without accessing the LLVM function arguments.

Use helper functions instead of explicitly checking types when possible.
Drop no longer needed shape workarounds.

jvesely added 7 commits May 24, 2022 11:28
…rams

Scalar params can be single element arrays if modulated,
'load_extract_scalar_array_one' helpers handles that case.

Signed-off-by: Jan Vesely <[email protected]>
…ctions instead of _gen_llvm_invoke_function

The former has direct access to (modulated) parameters.
Use those instead of hack direct access to llvm function's arguments.

Signed-off-by: Jan Vesely <[email protected]>
… result.

Reuse the already set PROBABILITY_LOWER_THRESHOLD result instead of
reading the hardcoded index of function return value.

Signed-off-by: Jan Vesely <[email protected]>
…ism_functions

_gen_llvm_mechanism_functions has direct access to (modulated) mechanism
parameters and state so we can drop the hack of accessing function args
0/1 directly.

Signed-off-by: Jan Vesely <[email protected]>
@jvesely jvesely added the compiler Runtime Compiler label May 30, 2022
@github-actions
Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

No differences!

...

See CI logs for the full diff.

@github-actions
Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

No differences!

...

See CI logs for the full diff.

@jvesely jvesely merged commit a90236a into PrincetonUniversity:devel May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Runtime Compiler
Projects
Development

Successfully merging this pull request may close these issues.

1 participant