[llvm-commits] [PATCH] TableGen backend support to express relations between instruction

Jyotsna Verma jverma at codeaurora.org
Fri Oct 5 13:47:30 PDT 2012


> Make one scan over the instructions, using the column fields to determine
> which column the instruction belongs to, if any. Build a map that is keyed
by
> the values of the row fields, and with values that are vectors of Records:
> 
>  Map (RowVal1, RowVal2, .) --> [KeyCol, Val1Col, Val2Col, .]

Hello Jakob,

I need to allow multiple matches for the KeyCol. There are instances when we
want to match two instructions with the same instruction for a given
relationship. For example, if we want non-predicated form of an instruction,
both add_pt (predicate true) and add_pf (predicate false) need to match with
'add'. This can happen only if all the three instructions have same values
for the all RowFields. So, in the first pass, I insert the instructions into
the map based on their RowFields value but don't arrange them based on their
respective column positions. I do collect Key Col records. In the second
pass over the KeyCol Records, I determine the column each instruction
belongs to. 

-Jyotsna





More information about the llvm-commits mailing list