Skip to content

Conversation

@spotandjake
Copy link
Member

@spotandjake spotandjake commented Nov 5, 2025

This implements a ton of optimization flags that were not previously implemented.

  • traps_never_happen
  • closed_world
  • zero_filled_memory
  • fast_math
  • generate_stack_ir
  • optimize_stack_ir
  • allow_inlining_functions_with_loops
  • clear_pass_arguments
  • has_pass_to_skip
  • Add_pass_to_skip
  • clear_passes_to_skip

Note: I don't seem to properly be able to test clear_pass_arguments as we segfault when a pass pass argument is null. I think this is because we try to cast NULL to a string.

I'm not sure if this closes #191 or not.

@spotandjake spotandjake requested a review from ospencer November 5, 2025 16:23
@spotandjake spotandjake self-assigned this Nov 5, 2025
@spotandjake spotandjake added the enhancement New feature or request label Nov 5, 2025
@spotandjake spotandjake changed the title feat: Implement optimization flags feat: Implement optimization settings api Nov 5, 2025
@spotandjake spotandjake force-pushed the spotandjake-optimization-flags branch 5 times, most recently from 74214ae to 203c1c8 Compare November 12, 2025 14:48
@spotandjake
Copy link
Member Author

@ospencer this should be good to merge once tests pass

* `clear_pass_arguments`
* `has_pass_to_skip`
* `Add_pass_to_skip`
* `clear_passes_to_skip`
@spotandjake spotandjake force-pushed the spotandjake-optimization-flags branch from 203c1c8 to d590fae Compare November 12, 2025 16:44
@ospencer ospencer enabled auto-merge (squash) November 12, 2025 18:02
@ospencer ospencer merged commit 1f25caf into grain-lang:main Nov 12, 2025
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to set pass options

2 participants