diff options
author | Maximilian Stemmer-Grabow <mail@mxsg.de> | 2021-05-27 15:32:44 +0200 |
---|---|---|
committer | Andreas Fried <andreas.fried@kit.edu> | 2021-12-02 12:57:28 +0100 |
commit | e8bd8377d3f822bd455c0dda52dffa366577a4c3 (patch) | |
tree | 327d4c5b72974fdae9fe20941e64a90edb952e3f | |
parent | e34de48121f30fce7d5a6d0294eb0d01e3c96d4c (diff) |
Reorder construction of copy optimization affinity graph
-rw-r--r-- | ir/be/becopyopt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ir/be/becopyopt.c b/ir/be/becopyopt.c index 6b82a22..bf3adeb 100644 --- a/ir/be/becopyopt.c +++ b/ir/be/becopyopt.c @@ -628,14 +628,15 @@ static void add_compression_req_edges(ir_node *irn, copy_opt_t *copyopt_env) static void build_graph_walker(ir_node *irn, void *env) { - if (get_irn_mode(irn) == mode_T) - return; - copy_opt_t *co = (copy_opt_t*)env; + copy_opt_t *co = (copy_opt_t*)env; // Check whether we need to add edges to account for a requirement that specifies // a source/destination 2-address requirement add_compression_req_edges(irn, co); + if (get_irn_mode(irn) == mode_T) + return; + const arch_register_req_t *req = arch_get_irn_register_req(irn); if (req->cls != co->cls || req->ignore) return; |