From bfadb4bf808f23af05a39e38208985ab009d117b Mon Sep 17 00:00:00 2001 From: Pat Gavlin Date: Tue, 20 Sep 2016 16:44:53 -0700 Subject: Implement `st.lclFld` decomposition and fix #6778. The problem that was blocking both of these issues was an issue in liveness when analyzing `st.lclFld` nodes that store to an unpromoted long-typed local variable or any long-typed field. The latter case--a `st.lclFld` node that targets a long-typed field--is easy to handle. Such stores are decomposed from: ``` /--* t0 int +--* t1 int t2 = * gt_long long /--* t2 * st.lclFld long V00 ``` To: ``` /--* t0 * st.lclFld int V00 [+0] /--* t1 * st.lclFld int V00 [+4] ``` The two `st.lclFld` nodes that this transformation generates are marked with `GTF_VAR_USEASG` to indicate that they are partial (rather than complete) defs. This is necessary in order to correctly calculate liveness. Before this change, stores to unpromoted long-typed local variables were also decomposed in the above fashion. These local vars can arise in a number of situations: - vars that are used to store multi-reg args or return values - vars that represent long-typed fields of promoted struct-typed vars - long-typed vars that are marked as unenregisterable before decomp Unfortunately, the decomposition given above differs in its liveness semantics when compared to the original IR: in the original IR, the `st.lclVar` is considered a plain def of its destination, while in the decomposed IR, each `st.lclFld` is considered both a partial def and a use of its destination. This difference--namely, that in the first case the destination is not used at the def and in the second case it is--causes problems for any analysis that needs to take into account whether or not a variable is used at a def (e.g. dead store removal, live-in sets, etc.). In order to retain the original semantics without complicating the IR, stores to unpromoted, long-typed local variables are not decomposed. These stores are instead handled during code generation. --- tests/issues.targets | 6 ------ 1 file changed, 6 deletions(-) (limited to 'tests/issues.targets') diff --git a/tests/issues.targets b/tests/issues.targets index 41be913202..45cb5a98b4 100644 --- a/tests/issues.targets +++ b/tests/issues.targets @@ -239,12 +239,6 @@ - - 6778 - - - 6778 - 6553 -- cgit v1.2.3