Uh oh!
There was an error while loading. Please reload this page.
Prepare ConstVal for constant propagators and reduce eval_const_expr in MIR - #33274
Prepare ConstVal for constant propagators and reduce eval_const_expr in MIR#33274oli-obk wants to merge 9 commits into
eval_const_expr in MIR#33274Conversation
eddyb
commented
Apr 29, 2016
@oli-obk I disagree with putting MIR constant aggregates in |
oli-obk
commented
Apr 29, 2016
I'm not sure I understand. We can refactor |
eddyb
commented
Apr 29, 2016
@oli-obk Yes, but you can't copy the |
When I suggested that on #rust-internals, I was told that we should end up merging aggregates that consist solely of constants into a constant aggregate.
Ah, we're talking about different structures. The fact that constprop exists should not change the MIR. The MIR should represent the code as is. All constant propagation can do is manipulate that code. The constant propagation pass can have internal datastructures that store additional info about certain temp/var decls. This way the const prop pass can propagate more than constants (it can do move-skips like |
oli-obk
commented
Apr 29, 2016
bors
commented
May 2, 2016
☔ The latest upstream changes (presumably #33303) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
commented
May 11, 2016
☔ The latest upstream changes (presumably #33425) made this pull request unmergeable. Please resolve the merge conflicts. |
this didn't work very well anyway, because const_eval can't eval all kinds of constants.
oli-obk
commented
May 11, 2016
@eddyb any update on the design decision? +rebased |
eddyb
commented
May 11, 2016
@rust-lang/compiler, do we want to discuss this PR today? |
nikomatsakis
commented
May 12, 2016
let's discuss tomorrow, along with a bit more about constants in general |
oli-obk
commented
May 19, 2016
Did the discussion yield any results wrt aggregate constants? |
nikomatsakis
commented
May 23, 2016
We never did talk about it :( |
bors
commented
Jun 5, 2016
☔ The latest upstream changes (presumably #33905) made this pull request unmergeable. Please resolve the merge conflicts. |
oli-obk
commented
Jul 5, 2016
since my original notion was to not have aggregates in MIR, and @eddyb feels that way, too, I'll close this. |
rebased eager const eval over @eddyb 's MIR-constants PR #33130
fixes#29928
fixes#33252
eval_const_expron literals and negated literalseval_const_exprcan't eval all kinds of constantseval_const_expr_partialConstValcontains owned versions of struct fields, tuple fields, array elements and the repeat valueRvalue::Aggregateinto a constantr? @eddyb