1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/tools
Andrea Di Biagio 0792e8ab30 [X86][BtVer2] correctly model the latency/throughput of LEA instructions.
This patch fixes the latency/throughput of LEA instructions in the BtVer2
scheduling model.

On Jaguar, A 3-operands LEA has a latency of 2cy, and a reciprocal throughput of
1. That is because it uses one cycle of SAGU followed by 1cy of ALU1.  An LEA
with a "Scale" operand is also slow, and it has the same latency profile as the
3-operands LEA. An LEA16r has a latency of 3cy, and a throughput of 0.5 (i.e.
RThrouhgput of 2.0).

This patch adds a new TIIPredicate named IsThreeOperandsLEAFn to X86Schedule.td.
The tablegen backend (for instruction-info) expands that definition into this
(file X86GenInstrInfo.inc):
```
static bool isThreeOperandsLEA(const MachineInstr &MI) {
  return (
    (
      MI.getOpcode() == X86::LEA32r
      || MI.getOpcode() == X86::LEA64r
      || MI.getOpcode() == X86::LEA64_32r
      || MI.getOpcode() == X86::LEA16r
    )
    && MI.getOperand(1).isReg()
    && MI.getOperand(1).getReg() != 0
    && MI.getOperand(3).isReg()
    && MI.getOperand(3).getReg() != 0
    && (
      (
        MI.getOperand(4).isImm()
        && MI.getOperand(4).getImm() != 0
      )
      || (MI.getOperand(4).isGlobal())
    )
  );
}
```

A similar method is generated in the X86_MC namespace, and included into
X86MCTargetDesc.cpp (the declaration lives in X86MCTargetDesc.h).

Back to the BtVer2 scheduling model:
A new scheduling predicate named JSlowLEAPredicate now checks if either the
instruction is a three-operands LEA, or it is an LEA with a Scale value
different than 1.
A variant scheduling class uses that new predicate to correctly select the
appropriate latency profile.

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

llvm-svn: 337469
2018-07-19 16:42:15 +00:00
..
dsymutil [dwarfdump] Add pretty printer for accelerator table based on Atom. 2018-07-13 17:21:51 +00:00
gold [gold-plugin] Disable section ordering for relocatable links 2018-07-12 20:35:58 +00:00
llvm-ar [llvm-ar] Temporarily make the tool case detection test Windows-only to fix the build (introduced in r329658) 2018-04-10 10:26:23 +00:00
llvm-cfi-verify [cfi-verify] Abort on unsupported targets 2018-07-16 15:26:44 +00:00
llvm-config llvm-config: Add advapi32 to --system-libs on Windows (PR36372) 2018-02-23 12:20:26 +00:00
llvm-cov [llvm-cov] Use the new PrintHTMLEscaped utility 2018-05-30 23:35:14 +00:00
llvm-cvtres [llvm-cvtres] Allow parameters preceded by '-' in addition to '/' 2018-05-02 21:15:13 +00:00
llvm-cxxdump
llvm-cxxfilt Add test for demangling GNU ABI tags. 2018-03-22 22:04:32 +00:00
llvm-diff Let llvm-diff correctly deal with Undef/ConstantAggregateZero/ConstantVector/IndirectBr 2018-04-12 21:28:04 +00:00
llvm-dlltool [COFF] Improve correctness of def parsing for GNU features 2018-05-09 09:21:53 +00:00
llvm-dwarfdump NFC - Various typo fixes in tests 2018-07-04 13:28:39 +00:00
llvm-dwp llvm-dwarfdump: automatically dump both regular and .dwo variant of sections 2017-09-13 22:09:01 +00:00
llvm-extract BlockExtractor: Don’t delete functions directly 2018-03-12 22:28:18 +00:00
llvm-isel-fuzzer Revert r326710 "Fuzzer: remove temporary files after we're done with them." 2018-03-12 13:22:12 +00:00
llvm-lib Attempt to get test/tools/llvm-lib/help.test passing on sanitizer-x86_64-linux-fast 2018-07-14 11:33:33 +00:00
llvm-lit
llvm-lto [ThinLTO] Serialize WithGlobalValueDeadStripping index flag for distributed backends 2018-02-07 04:05:59 +00:00
llvm-lto2 Fix test by allowing it to accept an upper or lower case letter as the first character. 2018-04-20 15:23:57 +00:00
llvm-mc Replace unused output filenames with /dev/null in tests 2018-07-02 18:16:44 +00:00
llvm-mca [X86][BtVer2] correctly model the latency/throughput of LEA instructions. 2018-07-19 16:42:15 +00:00
llvm-modextract
llvm-mt [llvm-mt] Use WithColor for printing errors. 2018-06-23 16:49:07 +00:00
llvm-nm nm: Add -no-weak flag for hiding weak symbols 2018-07-02 17:24:37 +00:00
llvm-objcopy [llvm-objcopy] %python wants to be in quotes, because it might contain spaces 2018-07-18 16:17:53 +00:00
llvm-objdump [llvm-objdump] Add -demangle (-C) option 2018-07-18 16:39:21 +00:00
llvm-opt-fuzzer Revert r326710 "Fuzzer: remove temporary files after we're done with them." 2018-03-12 13:22:12 +00:00
llvm-opt-report
llvm-pdbdump win: try to fix dia tests with newer msvc versions 2018-05-21 02:09:57 +00:00
llvm-profdata Revert "Revert "[lit] Generalized /dev/null support on Windows."" 2018-03-27 01:39:17 +00:00
llvm-rc [llvm-rc] Add support for the optional CLASS statement for dialogs 2018-05-15 19:21:28 +00:00
llvm-readobj [llvm-readobj] - Do not report invalid amount of sections. 2018-07-19 14:52:57 +00:00
llvm-size
llvm-split Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
llvm-strings [llvm-strings] Add support for the -a/--all options 2017-11-14 19:58:36 +00:00
llvm-symbolizer [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
llvm-xray/X86 [XRay][compiler-rt] Add PID field to llvm-xray tool and add PID metadata record entry in FDR mode 2018-07-13 05:38:22 +00:00
lto Move REQUIRES: line to the top 2018-06-26 17:44:23 +00:00
obj2yaml [obj2yaml] Don't crash for input files without symbol table 2017-09-22 09:30:40 +00:00
opt-viewer [opt-viewer] Set title for the source pages 2018-02-26 21:15:50 +00:00
sancov
sanstats
yaml2obj Add ELF dynamic symbol support to yaml2obj/obj2yaml 2017-11-16 18:10:15 +00:00