Stream: t-compiler/help

Topic: Liveness pass for asm!


Amanieu (Feb 12 2020 at 22:20, on Zulip):

I've been bashing my head for the last hour trying to understand how to fit the new asm! into the HIR liveness pass (librustc_passes/liveness.rs).

Amanieu (Feb 12 2020 at 22:21, on Zulip):

Basically asm! has 4 types of parameters: in(expr), out(place), inout(place), split_inout(expr => place)

Amanieu (Feb 12 2020 at 22:23, on Zulip):

The evaluation order is left to right, first for reads and place evaluation before the asm executes, the left to right again for writing the outputs to their destination place.

Amanieu (Feb 12 2020 at 22:24, on Zulip):

How does this map into the write_place and propagate_through_expr API of the liveness pass?

Amanieu (Feb 12 2020 at 22:24, on Zulip):

cc @nikomatsakis

Amanieu (Feb 12 2020 at 22:32, on Zulip):

Here's my current attempt, but I'm not sure how correct it is: https://gist.github.com/Amanieu/ebd5b82cd0b4e492b1d8ab8dc0649c37

Amanieu (Feb 12 2020 at 22:34, on Zulip):

Also I'm not exactly sure if I should be using ACC_USE here.

Amanieu (Feb 13 2020 at 18:25, on Zulip):

ping?

Last update: Jul 02 2020 at 19:55UTC