[llvm-commits] [llvm] r141567 - /llvm/trunk/include/llvm/Target/Target.td

Jim Grosbach grosbach at apple.com
Mon Oct 10 14:10:27 PDT 2011


On Oct 10, 2011, at 2:04 PM, Jakob Stoklund Olesen wrote:

> 
> On Oct 10, 2011, at 1:56 PM, Jim Grosbach wrote:
> 
>> 
>> On Oct 10, 2011, at 11:51 AM, Jakob Stoklund Olesen wrote:
>> 
>>> Author: stoklund
>>> Date: Mon Oct 10 13:51:33 2011
>>> New Revision: 141567
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=141567&view=rev
>>> Log:
>>> Mark the standard pseudos as isPseudo = 1.
>>> 
>>> The difference between isPseudo and isCodeGenOnly is a bit murky, but
>>> isCodeGenOnly should eventually go away.  It is used for instructions
>>> that are clones of real instructions with slightly different properties.
>> 
>> Generally, isPseudo denotes pseudo-instructions from the perspective of code-gen. isCodeGenOnly denotes pseudos from the perspective of the assembler instruction matcher.
>> 
>> Specifically:
>> isPseudo: Does not have encoding information and should be expanded, at the latest, during lowering to MCInst.
>> isCodeGenOnly: Does have encoding information and can go through to the CodeEmitter unchanged, but duplicates a canonical instruction definition's encoding and should be ignored when constructing the assembler match tables.
>> 
>> And yes, isCodeGenOnly should eventually go away. It's necessary for now until we convert the duplicate definitions into pseudos for code-gen.
> 
> It seems trivial to convert all isCodeGenOnly opcodes to their canonical opcode when lowering to MC.

Unfortunately, the operands are often represented differently. Nothing that can't be done with a bit of grunt work, but it's not a one-to-one mapping where we can just swap the opcode.

I'd thought we had gotten rid of all, or at least almost all, of them on ARM, but a quick check shows there's still more left. Blech.

We definitely shouldn't be adding any new isCodeGenOnly patterns for any targets.

> We are keeping them around only for the non-MC JIT, right?

And the instruction printer. They often have different asm strings (due to the different operand lists).

-Jim



More information about the llvm-commits mailing list