[X86] Add phony registers for high halves of regs with low halves
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 20 Mar 2018 18:46:55 +0000 (18:46 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 20 Mar 2018 18:46:55 +0000 (18:46 +0000)
commiteb0c510ecde667cd911682cc1e855f73f341d134
treec0c18f6a1f6298abf5e99a494d10088e49fada75
parentce998adf0a8f678b8121e3ce5bb6e46cd3a36d36
[X86] Add phony registers for high halves of regs with low halves

Registers E[A-D]X, E[SD]I, E[BS]P, and EIP have 16-bit subregisters
that cover the low halves of these registers. This change adds artificial
subregisters for the high halves in order to differentiate (in terms of
register units) between the 32- and the low 16-bit registers.

This patch contains parts that aim to preserve the calculated register
pressure. This is in order to preserve the current codegen (minimize the
impact of this patch). The approach of having artificial subregisters
could be used to fix PR23423, but the pressure calculation would need
to be changed.

Differential Revision: https://reviews.llvm.org/D43353

llvm-svn: 328016
llvm/include/llvm/Target/Target.td
llvm/lib/Target/X86/X86RegisterInfo.td
llvm/test/CodeGen/X86/dynamic-regmask.ll
llvm/test/CodeGen/X86/ipra-inline-asm.ll
llvm/test/CodeGen/X86/ipra-reg-alias.ll
llvm/test/CodeGen/X86/ipra-reg-usage.ll
llvm/test/CodeGen/X86/tail-call-conditional.mir
llvm/utils/TableGen/CodeGenRegisters.cpp
llvm/utils/TableGen/CodeGenRegisters.h
llvm/utils/TableGen/RegisterInfoEmitter.cpp