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

Jim Grosbach grosbach at apple.com
Mon Oct 10 13:56:45 PDT 2011


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.

-Jim

> 
> The standard pseudo-instructions never mirror real instructions, so they
> are definitely in the isPseudo category.
> 
> Modified:
>    llvm/trunk/include/llvm/Target/Target.td
> 
> Modified: llvm/trunk/include/llvm/Target/Target.td
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/Target.td?rev=141567&r1=141566&r2=141567&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Target/Target.td (original)
> +++ llvm/trunk/include/llvm/Target/Target.td Mon Oct 10 13:51:33 2011
> @@ -586,7 +586,7 @@
> // Standard Pseudo Instructions.
> // This list must match TargetOpcodes.h and CodeGenTarget.cpp.
> // Only these instructions are allowed in the TargetOpcode namespace.
> -let isCodeGenOnly = 1, Namespace = "TargetOpcode" in {
> +let isCodeGenOnly = 1, isPseudo = 1, Namespace = "TargetOpcode" in {
> def PHI : Instruction {
>   let OutOperandList = (outs);
>   let InOperandList = (ins variable_ops);
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list