1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/lib
Ahmed Bougacha a84a7cf9e8 [AArch64][GlobalISel] Legalize narrow scalar ops again.
Since r279760, we've been marking as legal operations on narrow integer
types that have wider legal equivalents (for instance, G_ADD s8).
Compared to legalizing these operations, this reduced the amount of
extends/truncates required, but was always a weird legalization decision
made at selection time.

So far, we haven't been able to formalize it in a way that permits the
selector generated from SelectionDAG patterns to be sufficient.

Using a wide instruction (say, s64), when a narrower instruction exists
(s32) would introduce register class incompatibilities (when one narrow
generic instruction is selected to the wider variant, but another is
selected to the narrower variant).

It's also impractical to limit which narrow operations are matched for
which instruction, as restricting "narrow selection" to ranges of types
clashes with potentially incompatible instruction predicates.

Concerns were also raised regarding  MIPS64's sign-extended register
assumptions, as well as wrapping behavior.
See discussions in https://reviews.llvm.org/D26878.

Instead, legalize the operations.

Should we ever revert to selecting these narrow operations, we should
try to represent this more accurately: for instance, by separating
a "concrete" type on operations, and an "underlying" type on vregs, we
could move the "this narrow-looking op is really legal" decision to the
legalizer, and let the selector use the "underlying" vreg type only,
which would be guaranteed to map to a register class.

In any case, we eventually should mitigate:
- the performance impact by selecting no-op extract/truncates to COPYs
  (which we currently do), and the COPYs to register reuses (which we
  don't do yet).
- the compile-time impact by optimizing away extract/truncate sequences
  in the legalizer.

llvm-svn: 292827
2017-01-23 21:10:05 +00:00
..
Analysis [PGO] add debug option to view annotated cfg after prof use annotation 2017-01-23 18:58:24 +00:00
AsmParser
Bitcode [ThinLTO] Fix lazy-loading of MDString instruction attachments 2017-01-20 20:29:16 +00:00
CodeGen DAG: Allow legalization of fcanonicalize vector types 2017-01-23 18:52:26 +00:00
DebugInfo [pdb] Write the Named Stream mapping to Yaml and binary. 2017-01-20 22:42:09 +00:00
Demangle Revert "Demangle: only demangle mangled symbols" 2017-01-20 03:54:04 +00:00
ExecutionEngine RuntimeDyldELF: add LDST128_ABS_LO12_NC reloc 2017-01-23 13:52:08 +00:00
Fuzzer [libFuzzer] deflake a test 2017-01-23 18:44:40 +00:00
IR [IR] Use const_cast to reuse the const version of two BasicBlock methods that are duplicated for both const and non-const. NFC 2017-01-22 06:53:04 +00:00
IRReader
LibDriver
LineEditor
Linker
LTO [ThinLTO] Don't perform computeDeadSymbols during O0 link, as the result is never used (NFC) 2017-01-20 23:34:12 +00:00
MC [Assembler] Improve error when unable to evaluate expression. 2017-01-19 20:06:32 +00:00
Object Add LC_BUILD_VERSION load command 2017-01-23 20:07:55 +00:00
ObjectYAML Add LC_BUILD_VERSION load command 2017-01-23 20:07:55 +00:00
Option
Passes [PM] Port LoopSink to the new pass manager. 2017-01-20 08:42:19 +00:00
ProfileData [WebAssembly] Add triple support for the new wasm object format 2017-01-17 20:34:09 +00:00
Support raw_fd_ostream: Make file handles non-inheritable by default 2017-01-18 15:46:50 +00:00
TableGen [Hexagon, TableGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-04 02:02:05 +00:00
Target [AArch64][GlobalISel] Legalize narrow scalar ops again. 2017-01-23 21:10:05 +00:00
Transforms [PGO] add debug option to view annotated cfg after prof use annotation 2017-01-23 18:58:24 +00:00
XRay Avoid std::errc::protocol_* to appease mingw 2017-01-12 18:33:14 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt