Optimize Kernel Invariant on Unwrap and Tuple #261
No reviewers
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#261
Loading…
Reference in New Issue
No description provided.
Delete Branch "optimize_unwrap_kernelinvariant"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fixes #244
for this code:
optmized IR before this PR
optmized IR after this PR
@ -1374,0 +1365,4 @@
let err_msg = ctx.gen_string(generator, "");
let current_fun = ctx.builder.get_insert_block().unwrap().get_parent().unwrap();
let unreachable_block = ctx.ctx.append_basic_block(current_fun, "succ");
let exn_block = ctx.ctx.append_basic_block(current_fun, "fail");
Names should be more specific. See also #131
force-pused to update the names of the basic blocks to be
unwrap_none_unreachable_bb
andunwrap_none_exception_bb
.regarding #131, would it be ok that I look into it after the debug information issue and the field initialization issue?
Isn't
_bb
redundant? I think from the context you can always tell when a name is a basic block, no?Oh yes, I think the
_bb
is redundant as we can easily tell whether a name is a lable to a basic block. I will remove these postfixes now.updated block names to
unwrap_none_unreachable
andunwrap_none_exception
47b5cb204f
to3223724c72
I guess it would make more sense to name the function
get_tuple_element
instead ofget_tuple_index
?3223724c72
toc037724a34
force-pushed to update the name to
get_tuple_element
c037724a34
to722e3df086