[llvm-commits] [llvm] r122663 - in /llvm/trunk/lib/Target/ARM: ARMAsmPrinter.cpp ARMAsmPrinter.h ARMISelDAGToDAG.cpp ARMInstrInfo.td

Chris Lattner clattner at apple.com
Wed Jan 19 16:45:35 PST 2011


On Jan 19, 2011, at 3:41 PM, Jim Grosbach wrote:

> 
> On Jan 19, 2011, at 3:28 PM, Anton Korobeynikov wrote:
> 
>> Hi Jim,
>> 
>>> Can you elaborate why these need to be pseudos? It would seem that they should just be real instructions with different subtarget feature requirements to tell the compiler whether to use the v5 or the v6 version.
>> The only difference is operand restrictions, thus modelling as real
>> instruction will yield disassembler decoding conflict.
> 
> The disassembler should be able to handle encoding conflicts when the instructions have mutually exclusive subtarget feature requirements. If it can't, that's a problem that should probably be fixed.
> 
> Alternatively, it should be possible to express (I doubt it is currently) that a constraint only applies when a Requires[] evaluates true. That seems like the truely correct answer.

I agree that it would be great, but I think that Anton's approach is the cleanest we have right now.  This is similar to how we have multiple "call" instructions to handle the various ABIs.  It is a modeling issue (and a gross one) but ultimately we need the ability to ask a MachineOpcode what its constraints are, and the current hooks don't have a way to query the requires clauses.

-Chris



More information about the llvm-commits mailing list