[llvm-commits] [llvm] r167347 - in /llvm/trunk: include/llvm/Target/TargetTransformImpl.h lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h test/Analysis/CostModel/X86/arith.ll test/Analysis/CostModel/X86/vectorized-loop.ll

Nadav Rotem nrotem at apple.com
Sun Nov 4 01:29:03 PDT 2012


> 
> Hi Nadav,
> 
> Is there some way to have tblgen generate this information from the .td files?
> 
> -Chris
> 

Hi Chris, 

Yes.  

The TargetLowering interface provides most of the information that we need, and we only want to save information about custom lowered instructions.  Any table that we are going to have is going to be sparse.  Table entries need to contain: the instruction kind, the type (two types in case of a cast), and a feature set (such as HasAVX). 

I can see us going in two directions:

1.  We can use table-gen to auto-generate code that checks for the different lowering rules. Similar to ISel.

2. We can construct a map using hard-coded lists. I am thinking about something similar to the way that the memory operand folding is done on x86. 

I think that I prefer to go with #2, but I want to spend more time on the VectorTargetInfo interfaces before we decide. 

Thanks,
Nadav




More information about the llvm-commits mailing list