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

Constant folding and propagation in word_simp #176

Merged
merged 23 commits into from Nov 26, 2016
Merged

Constant folding and propagation in word_simp #176

merged 23 commits into from Nov 26, 2016

Conversation

myreen
Copy link
Contributor

@myreen myreen commented Nov 20, 2016

This is @AndreasLoow's optimisation for wordLang. This optimisation pushes constants forward and performs simple constant folding. The optimisation is able to push constants past Call, if the call does not have an exception handler.

@AndreasLoow
Copy link
Member

We can probably close #129 when this is merged.

@xrchz
Copy link
Member

xrchz commented Nov 21, 2016

Trying to build this failed in the bootstrap translation:

 Translating word_simp_apply_if_opt
 Saved theorem _____ "word_simp_apply_if_opt_v_thm"
 Translating word_simp_simp_if
 Translating word_simp_const_fp_move_cs
 error in quse /home/ramana/cakeml5/compiler/bootstrap/translation/to_word64ProgScript.sml : UnsupportedType ?
 error in load to_word64ProgScript : UnsupportedType ?
 Failed translation: const_fp_inst_cs
 Failed translation: const_fp_loop
 Failed translation: const_fp
 Failed translation: compile_exp

If I find time I'll look into it, but anyone else can feel free to fix too.

@xrchz
Copy link
Member

xrchz commented Nov 21, 2016

@tanyongkiam I think this might require some of your expertise

@tanyongkiam
Copy link
Contributor

It looks like an uninstantiated (word) type variable. I've left it building in the background.

@xrchz xrchz merged commit fa69090 into master Nov 26, 2016
@xrchz xrchz deleted the const_fp branch November 26, 2016 22:53
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.

None yet

5 participants