[llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.cpp ARMInstrInfo.h ARMTargetMachine.cpp ARMTargetMachine.h
Chris Lattner
clattner at apple.com
Wed May 16 10:09:54 PDT 2007
On May 16, 2007, at 1:18 AM, Evan Cheng wrote:
>> But even then I am not sure if that eliminate the need to have a
>> virtual function isPredicatable. Conditional branches probably would
>> require special handling. Also, while it isn't possible now, it's
>> conceivable some instruction predicate field may not be 'always'
>> coming into the if-conversion pass. In that case, it would require a
>> target hook to examine the field anyway.
>>
>
> cmov is another class of M_PREDICATED ops that need to be dealt with
> differently. We'll need a hook to check if something is already
> predicated with non-always predicate.
Yes, I think this should be the distinction between M_PREDICATED (the
instr already has a predicate field, but may be set to 'always') vs
M_PREDICABLE (the instr may or may not have a predicate field, but
PredicateInstruction can change it into one that does).
Another thing that occurred to me is that predicates have
implications for livevar analysis (specifically, the scavenger).
Consider this code:
R3 = add [lt] ...
R3 = sub [ge] ...
Note that the add is not dead. :)
> Come to think of it, perhaps we should not have selects if the target
> uses if-conversion.
That would be very nice. Alternatively, we could have the isel
"know" about predicated moves and generate them?
The isel does not know anything about moves at this point.
-Chris
More information about the llvm-commits
mailing list