OSDN Git Service

[llvm-mca] Refactor some of the logic in InstrBuilder, and add a verifyOperands method.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 23 Nov 2018 20:26:57 +0000 (20:26 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 23 Nov 2018 20:26:57 +0000 (20:26 +0000)
commit464205dfc939502a9d74e9069d95457eb7aedfdd
treea774cd2e0e1125ea0a7221acebaf11e57613e17d
parent703a4c27a12186b067a444b9fa702bac22c0fd1b
[llvm-mca] Refactor some of the logic in InstrBuilder, and add a verifyOperands method.

With this change, InstrBuilder emits an error if the MCInst sequence contains an
instruction with a variadic opcode, and a non-zero number of variadic operands.

Currently we don't know how to correctly analyze variadic opcodes. The problem
with variadic operands is that there is no information for them in the opcode
descriptor (i.e. MCInstrDesc). That means, we don't know which variadic operands
are defs, and which are uses.

In future, we could try to conservatively assume that any extra register
operands is both a register use and a register definition.

This patch fixes a subtle bug in the evaluation of read/write operands for ARM
VLD1 with implicit index update. Added test vld1-index-update.s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347503 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-mca/ARM/vld1-index-update.s [new file with mode: 0644]
tools/llvm-mca/include/InstrBuilder.h
tools/llvm-mca/lib/InstrBuilder.cpp