Skip to content

Conversation

@robertzhidealx
Copy link

@robertzhidealx robertzhidealx commented Nov 21, 2023

Below are the key changes:

  • Use LLVM's new pass manager, a major improvement from the legacy one.
  • Fix a shortcoming of the inference algorithm to actually collect all uses of a fresh/consistent variable.
  • Optimize the inference cleanup algorithm to remove all instructions associated with the arguments of fresh/consistent annotations.
  • Thoroughly log debug messages throughout the components of the pass for a clearer view of the process.
  • Rename files, structs, functions, variables, etc. to be more descriptive and consistent.
  • General code style refactoring (e.g., use auto and structured bindings (destructuring) where possible).
  • Add simple C tests to benchmarks/ctests.
  • Update README to reflect the changed setup.

…tor code

Below are the key changes:
- Use LLVM's new pass manager, a major improvement from the legacy one.
- Fix a shortcoming of the inference algorithm to actually collect all
uses of a fresh/consistent variable.
- Optimize the inference cleanup algorithm to remove all instructions
associated with the arguments of fresh/consistent annotations.
- Thoroughly log debug messages throughout the components of the pass
for a clearer view of the process.
- Rename files, structs, functions, variables, etc. to be more
descriptive and consistent.
- General code style refactoring (e.g., use `auto` and structured
bindings (destructuring) where possible).
- Added simple C tests to `benchmarks/ctests`.
@robertzhidealx robertzhidealx changed the title [InferAtomsPass] Revamp pass to support the latest LLVM and fix/refac… Revamp atomic region inference pass to support the latest LLVM and fix/refac… Nov 21, 2023
@robertzhidealx robertzhidealx changed the title Revamp atomic region inference pass to support the latest LLVM and fix/refac… Revamp atomic region inference pass to support the latest LLVM and fix/refactor code Nov 21, 2023
@robertzhidealx robertzhidealx changed the title Revamp atomic region inference pass to support the latest LLVM and fix/refactor code [Don't Merge] Revamp atomic region inference pass to support the latest LLVM and fix/refactor code Nov 21, 2023
@robertzhidealx
Copy link
Author

robertzhidealx commented Nov 21, 2023

My original intention was to merge into a separate branch (revamp) of this repo, but since I don't have admin access I can't create one to be the target. So for now, this PR targets master and should NOT be merged yet. My rationale is that since I haven't yet done an end-to-end compilation with the JIT checkpointing/atomic region runtime, the content of this PR is not yet ready to overwrite the content of master. This is a WIP, and I will push changes here as I go.

@msurbatovich May I ask if I could be given some access rights? Otherwise, could you please help create a revamp branch here so I can redirect this PR to it? Thank you so much!

@robertzhidealx robertzhidealx changed the title [Don't Merge] Revamp atomic region inference pass to support the latest LLVM and fix/refactor code [WIP] Revamp atomic region inference pass to support the latest LLVM and fix/refactor code Nov 21, 2023
#endif
v.emplace(inst);

//* Actually collect all uses (e.g., log(x))
Copy link
Author

Choose a reason for hiding this comment

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

Bullet 2.

I->replaceAllUsesWith(UndefValue::get(I->getType()));
I = I->eraseFromParent();

//* Remove args and their uses as well
Copy link
Author

Choose a reason for hiding this comment

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

Bullet 3.

Useful extensible shortcuts to running tests.
Step 1 of optimizing atomic regions for (smaller) size.
@robertzhidealx robertzhidealx changed the title [WIP] Revamp atomic region inference pass to support the latest LLVM and fix/refactor code Revamp atomic region inference pass to support the latest LLVM and fix/refactor code Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant