Evan Cheng d498c8f2c8 Teach 2addr pass to be do more commuting. If both uses of a two-address instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue.
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1                                                                                                                                     
%reg1029<def> = MOV8rr %reg1028                                                                                                                                                      
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>                                                                                                                            
insert => %reg1030<def> = MOV8rr %reg1028                                                                                                                                            
%reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead>                                                                                                         

In this case, it might not be possible to coalesce the second MOV8rr                                                                                                                 
instruction if the first one is coalesced. So it would be profitable to                                                                                                              
commute it:                                                                                                                                                                          
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1                                                                                                                                     
%reg1029<def> = MOV8rr %reg1028                                                                                                                                                      
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>                                                                                                                            
insert => %reg1030<def> = MOV8rr %reg1029                                                                                                                                            
%reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62954 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-25 03:53:59 +00:00
..
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-03-25 04:26:08 +00:00
2008-03-25 04:26:08 +00:00
2008-05-07 22:59:08 +00:00
2008-03-25 04:26:08 +00:00
2008-03-25 04:26:08 +00:00
2008-03-25 04:26:08 +00:00
2008-03-25 04:26:08 +00:00
2008-03-25 04:26:08 +00:00
2008-06-27 03:14:20 +00:00
2008-03-13 08:05:02 +00:00
2008-04-28 23:31:41 +00:00
2008-12-19 10:55:56 +00:00
2008-10-01 15:07:14 +00:00
2008-08-29 22:59:13 +00:00
2008-02-14 01:32:53 +00:00
2008-05-22 04:45:22 +00:00
2008-02-21 07:42:26 +00:00
2008-03-02 18:05:14 +00:00
2008-03-04 08:01:56 +00:00
2008-04-19 22:29:10 +00:00
2008-06-12 21:23:38 +00:00
2008-09-05 20:04:37 +00:00
2008-11-27 00:37:06 +00:00
2008-02-12 19:11:29 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-19 22:29:10 +00:00
2008-04-03 21:25:03 +00:00
2008-10-24 21:20:25 +00:00
2008-02-21 07:42:26 +00:00
2008-02-21 07:42:26 +00:00
2009-01-21 21:28:03 +00:00
2008-04-25 20:13:47 +00:00
2008-04-25 20:13:47 +00:00
2008-02-23 02:57:25 +00:00
2008-01-24 06:35:44 +00:00
2008-03-09 06:57:21 +00:00
2009-01-24 17:32:54 +00:00
2009-01-20 19:29:54 +00:00
2009-01-15 20:18:42 +00:00
2008-02-21 07:42:26 +00:00
2008-04-19 22:29:10 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-03-25 04:26:08 +00:00
2008-01-17 19:59:44 +00:00
2008-02-12 19:11:29 +00:00
2009-01-07 01:48:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-29 07:09:24 +00:00
2008-04-25 21:47:35 +00:00
2008-07-25 19:08:59 +00:00
2008-05-24 00:10:02 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-07 22:59:08 +00:00
2008-05-09 19:56:32 +00:00
2008-05-22 18:56:56 +00:00
2008-05-07 22:59:08 +00:00
2008-05-10 02:22:25 +00:00
2008-07-17 19:48:04 +00:00
2008-08-21 23:04:49 +00:00
2008-05-07 22:59:08 +00:00
2008-02-21 07:42:26 +00:00
2008-09-27 01:56:22 +00:00
2008-03-19 00:52:20 +00:00
2008-09-27 01:56:22 +00:00
2008-09-27 01:56:22 +00:00