[llvm-dev] Verifying Backend Schedule (Over)Coverage

Joel Jones via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 21 14:08:56 PDT 2017


I ran into an interesting problem when helping to land a scheduler .td file
that my colleague had written. The problem that came up was that a 
multiply/add pair was not combined into an madd, but just for our CPU. Upon
digging into it, the problem turned out to be that '(instregex "^SUB" ...'
was matching "SUBREG_TO_REG" and incorrectly increasing the schedule length.
I removed the overly aggressive match, but I noticed that there were lots
of instructions that matched multiple regex patterns in InstegexOp::apply in
utils/TableGen/CodeGenSchedule. I modified the apply method to output 
<idx, pat> pairs and <idx, name> pairs and then joined them togather
using a script. However, I couldn't easily determine from within that method
what specific subtarget the patterns came from. Is there a better place to do
this check? It seems that CodeGenSchedModels::checkCompleteness would be the
logical place.

Joel Jones



More information about the llvm-dev mailing list