-
Subzero: Change the way bitcast stack slot lowering is handled. · 800dab29Jim Stichnoth authored
When doing a bitcast between int and FP types, the way lowering works is that a spill temporary is created, with regalloc weight of zero to inhibit register allocation, and this spill temporary is used for the cvt instruction. If the other variable does not get register-allocated, then addProlog() forces the spill temporary to share the same stack slot as the other variable. Currently, the lowering code passes this information to addProlog() by using the setPreferredRegister() mechanism. This is changed by creating a target-specific subclass of Variable, so that only the spill temporaries need to carry this extra information. Ultimately, many of the existing Variable fields will be refactored into a separate structure, and only generated/used as needed by various optimization passes. The spill temporary linkage is the one thing that is still needed with Om1 when no optimizations are enabled, motivating this change. A couple other minor cleanups are also done here. The key test is that the cast cross tests continue to work, specifically the bitcast tests. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/586943003
800dab29
×