TableGen: SubTarget SchedWriteRes

Hi everyone,

I was trying to create a model for a subtarget of the ARM processors. Though, I’ve been experiencing some issues. In particular, it seems like TableGen does not consider SchedWriteRes defined in the subtarget but only the ones defined in the ARM target.

For example, I defined a subtarget SchedWriteRes mapped onto its right functional units for ANDri instructions but the instruction does not follow what is defined for that SchedWriteRes, but the one defined for the WriteALUri in the ARM target.

It may be possible that TableGen does not consider SchedWriteRes defined in sub targets?

Regards.

There isn’t enough information in your post to be sure, but did you try InstRW subtarget overrides in your sched description?

def : InstRW<[MyWrALU], (instregex “ANDri$”)>;

Ok, finally is working. It was simply due to the fact that when running assembly code, it was interpreted in ARM coding instead of Thumb2’s. My InstRWs were overriding the latter so no changes could be noticed.
Thanks for your help anyway.

Regards.