ia32: Simply return the class_req in ia32_make_register_req(), when possible.
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 27 Nov 2012 15:14:55 +0000 (16:14 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Tue, 27 Nov 2012 15:30:16 +0000 (16:30 +0100)
ir/be/ia32/ia32_common_transform.c

index 4ed18fe..5b8247d 100644 (file)
@@ -808,14 +808,12 @@ static arch_register_req_t const *ia32_make_register_req(constraint_t const *con
                req->type    = arch_register_req_type_limited;
                *limited_ptr = constraint->allowed_registers;
                req->limited = limited_ptr;
+               req->cls     = constraint->cls;
+               req->width   = 1;
+               return req;
        } else {
-               req       = OALLOCZ(obst, arch_register_req_t);
-               req->type = arch_register_req_type_normal;
+               return constraint->cls->class_req;
        }
-       req->cls   = constraint->cls;
-       req->width = 1;
-
-       return req;
 }
 
 const arch_register_req_t *ia32_parse_clobber(const char *clobber)