1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/utils
Andrea Di Biagio f425ba9f0f [MC][Tablegen] Allow the definition of processor register files in the scheduling model for llvm-mca
This patch allows the description of register files in processor scheduling
models. This addresses PR36662.

A new tablegen class named 'RegisterFile' has been added to TargetSchedule.td.
Targets can optionally describe register files for their processors using that
class. In particular, class RegisterFile allows to specify:
 - The total number of physical registers.
 - Which target registers are accessible through the register file.
 - The cost of allocating a register at register renaming stage.

Example (from this patch - see file X86/X86ScheduleBtVer2.td)

  def FpuPRF : RegisterFile<72, [VR64, VR128, VR256], [1, 1, 2]>

Here, FpuPRF describes a register file for MMX/XMM/YMM registers. On Jaguar
(btver2), a YMM register definition consumes 2 physical registers, while MMX/XMM
register definitions only cost 1 physical register.

The syntax allows to specify an empty set of register classes.  An empty set of
register classes means: this register file models all the registers specified by
the Target.  For each register class, users can specify an optional register
cost. By default, register costs default to 1.  A value of 0 for the number of
physical registers means: "this register file has an unbounded number of
physical registers".

This patch is structured in two parts.

* Part 1 - MC/Tablegen *

A first part adds the tablegen definition of RegisterFile, and teaches the
SubtargetEmitter how to emit information related to register files.

Information about register files is accessible through an instance of
MCExtraProcessorInfo.
The idea behind this design is to logically partition the processor description
which is only used by external tools (like llvm-mca) from the processor
information used by the llvm machine schedulers.
I think that this design would make easier for targets to get rid of the extra
processor information if they don't want it.

* Part 2 - llvm-mca related *

The second part of this patch is related to changes to llvm-mca.

The main differences are:
 1) class RegisterFile now needs to take into account the "cost of a register"
when allocating physical registers at register renaming stage.
 2) Point 1. triggered a minor refactoring which lef to the removal of the
"maximum 32 register files" restriction.
 3) The BackendStatistics view has been updated so that we can print out extra
details related to each register file implemented by the processor.

The effect of point 3. is also visible in tests register-files-[1..5].s.

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

llvm-svn: 329067
2018-04-03 13:36:24 +00:00
..
bugpoint
count
crosstool
docker Migrate dockerfiles to use multi-stage builds. 2018-03-26 15:12:30 +00:00
emacs Add attributes and fix some keywords in llvm-mode.el 2018-03-08 01:28:45 +00:00
FileCheck [FileCheck] - Fix possible buffer out of bounds access when parsing --check-prefix. 2018-01-16 08:09:24 +00:00
fpcmp
gdb-scripts
git
git-svn [git-llvm] Handle files ignored by svn correctly 2017-12-22 21:19:13 +00:00
jedit
kate
KillTheDoctor
lint
lit [lit] Prefer opening files with open (Python 2) rather than io.open which requires io. 2018-04-03 00:22:12 +00:00
llvm-build
llvm-lit [lit] Actually do normalize the case of files in the config map. 2017-09-21 21:27:11 +00:00
LLVMVisualizers
Misc
not [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
PerfectShuffle
release build_llvm_package.bat: Drop LLDB from the package. 2018-03-19 13:05:37 +00:00
sanitizers Add libstd++-4.8 exceptions to ubsan_blacklist.txt 2017-11-29 20:10:14 +00:00
TableGen [MC][Tablegen] Allow the definition of processor register files in the scheduling model for llvm-mca 2018-04-03 13:36:24 +00:00
Target/ARM
testgen
textmate
unittest Revert r326092: [gtest] Add PrintTo overload for StringRef. 2018-02-26 15:54:59 +00:00
UpdateTestChecks [x86] Fix a pretty obvious think-o with my asm scrubbing. You have to in 2018-04-03 10:28:56 +00:00
valgrind
vim vim: rename singlethread to syncscope 2018-03-22 16:39:54 +00:00
vscode
yaml-bench [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
abtest.py
bisect
bisect-skip-count
bugpoint_gisel_reducer.py Add a utility to reduce GlobalISel tests 2018-01-23 19:47:10 +00:00
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
create_ladder_graph.py
DSAclean.py
DSAextract.py
extract_symbols.py Fix some user facing typos 2018-03-17 17:30:08 +00:00
findmisopt
findoptdiff
findsym.pl
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
getsrcs.sh
indirect_calls.py Add a wrapper around llvm-objdump to look for indirect calls/jmps in x86 assembly. 2018-04-03 07:01:33 +00:00
lldbDataFormatters.py
llvm-compilers-check
llvm-gisel-cov.py [globalisel][tablegen] Generate rule coverage and use it to identify untested rules 2017-11-16 00:46:35 +00:00
llvm-native-gxx
llvm.grm
LLVMBuild.txt
llvmdo
llvmgrep
prepare-code-coverage-artifact.py
schedcover.py [MachineScheduler] Add itinerary to schedcover.py. Make default work in the command line filter 2018-03-27 04:26:39 +00:00
shuffle_fuzz.py
shuffle_select_fuzz_tester.py Adding a shufflevector and select LLVM IR instructions fuzz tool 2017-10-31 11:39:31 +00:00
sort_includes.py
unicode-case-fold.py Resubmit r325107 (case folding DJB hash) 2018-02-21 22:36:31 +00:00
update_cc_test_checks.py Fix LLVM IR check lines in utils/update_cc_test_checks.py 2018-03-14 17:47:07 +00:00
update_llc_test_checks.py [utils] Refactor utils/update_{,llc_}test_checks.py to share more code 2018-02-10 05:01:33 +00:00
update_mir_test_checks.py update_mir_test_checks: Fix handling of IR input after r326284 2018-03-12 18:06:58 +00:00
update_test_checks.py Fix LLVM IR check lines in utils/update_cc_test_checks.py 2018-03-14 17:47:07 +00:00
UpdateCMakeLists.pl
wciia.py