[PATCH] D91704: [llvm-mca] Fix processing thumb instruction set

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 06:08:35 PST 2020


evgeny777 created this revision.
evgeny777 added reviewers: dmgreen, andreadb.
Herald added subscribers: gbedwell, hiraditya, kristof.beyls.
Herald added a project: LLVM.
evgeny777 requested review of this revision.

ATM, there are two kind of problems with thumb instructions (both cause assertion in InstrBuilder)

1. Incorrect detection of variadic ops

Some thumb instructions (like tMOVSr) have less number of operands in their MCInstrDesc than `MCInst.getNumOperands()`. This makes llvm-mca beleive those are variadic, while they're not.

2. Detcting more explicit defs than there actually are.

This happens because Thumb target defines CPSR (s_cc_out) as output operand (ARM target defines it as input),


https://reviews.llvm.org/D91704

Files:
  llvm/lib/MCA/InstrBuilder.cpp
  llvm/test/tools/llvm-mca/ARM/cortex-a57-thumb.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91704.306078.patch
Type: text/x-patch
Size: 168271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201118/552e556a/attachment.bin>


More information about the llvm-commits mailing list