[LLVMdev] Question about per-operand machine model

JinGu Kang jingu at codeplay.com
Wed Feb 19 04:57:55 PST 2014


Hi Andy,

I am sorry to misunderstand 'ReadAdvance' code. In order to support
resource per operand, I feel we need more table and function. If
possbile, I would like to listen to your opinion whether this feature is
useful or not. As I mentioned on previous e-mail, it will be useful to
access the latency and the resource per operand while checking resource
conflict per cycle.

Thanks,
JinGu Kang

On 18/02/14 23:09, jingu wrote:
>> Resources and latency are not tied. An instruction is mapped to a
>> scheduling class. A scheduling class is mapped to a set of resources
>> and a per-operand list of latencies.
>
> Thanks for your kind explanation.
>
> Our heuristic algorithm have needed the latency and the resource per
> operand to check resource conflicts per cycle. In order to support
> this with LLVM, I expected a per-operand list of resources like
> latencies with a scheduling class.
>
> Can I ask you something to modify on tablegen? I think that the
> 'WriteResourceID' field of 'MCWriteLatencyEntry' is for identifying
> the WriteResources of each defintion as commented on code. As you
> know, tablegen sets the 'WriteResourceID' field of
> 'MCWriteLatencyEntry' with 'WriteID' when the 'Write' of defition is
> referenced by a 'ReadAdvance'. If we always set this field with
> 'WriteID', it causes problem? I can see that 'ReadAdvance' only uses
> the 'WriteResourceID' field of 'MCWriteLatencyEntry' in
> 'computeOperandLatency' function. I think the pair of latency and
> write resource for defintion will be useful to check conflicts of
> resources. As reference, I have attached simple patch.
>
> Thanks,
> JinGu Kang
>




More information about the llvm-dev mailing list