Checking presence of memoperands on all load/store MIs in output.
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 2 04:02:08 PDT 2017
Hi,
I have a little experimental patch that might help target maintainers to
find out which loads / stores have missing memory operands. (An
instruction must have a memory operand, otherwise the scheduler has to
assume that the instruction can alias anything. This operand must be
propagated manually during pseudo expansion etc).
I am not sure if there is interest in this, or even if there already is
such a feature somewhere.
Personally, I would like to be able to just get warnings and then sort
the debug output for the relevant opcodes. That way I can just fix the
cases where this has been forgotten.
Putting this in the verifier makes it possible to check all opcodes,
including pseudos, in the different passes. Currently, I ran it like:
llc ... -verify-machineinstrs -verify-memop-presence
-debug-only=machineverify >& [debug out]
grep "Fix missing load memory op" [debug out] | grep "=" | sed
's/.*= //' | awk '{print $1}'| sort | uniq
grep "Fix missing load memory op" [debug out] | grep "=" -v | awk
'{print $6}'| sort | uniq
grep "Fix missing store memory op" [debug out] | grep "=" | sed
's/.*= //' | awk '{print $1}'| sort | uniq
grep "Fix missing store memory op" [debug out] | grep "=" -v | awk
'{print $6}'| sort | uniq
Would it be better to just output "Fix missing memory op [opcode]" to
just do one grep? Perhaps the -verify-memop-presence is not needed?
/Jonas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CheckMemOpPresence.patch
Type: text/x-patch
Size: 1953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170602/8ed699f0/attachment.bin>
More information about the llvm-commits
mailing list