llvm with tablegen backend for capstone disassembler
Go to file
Daniel Sanders 7c2cf5c5cc Allow similar TargetOpcodes to use inheritance to factor out commonality. NFC.
Summary:
While implementing atomicrmw in https://reviews.llvm.org/D40092 I found that
inheritance is unusable for all the Generic Opcodes in GlobalISel. This is
because the whole header is included inside a 'let mayLoad = 0, mayStore = 0 ... in'
block. In TableGen, the order of precedence for field assignments is:
  1. Values from classes the record inherits from.
  2. Values from 'let Name=Value in { ... }'
  3. Values from 'let Name=Value;'
As such the 'let mayLoad = 0, mayStore = 0, ... in' surrounding the
'include "GenericOpcodes.td"' was overriding any values provided via inheritance.
We hadn't noticed this before because we were only using 'let Name=Value;' to
specialize opcodes.

Fix this by moving the default values to the lowest precedence. This is
accomplished by moving the values to a common base class
(StandardPseudoInstruction for most TargetOpcodes, and GenericOpcode for
GlobalISel specific TargetOpcodes)

Reviewers: qcolombet

Reviewed By: qcolombet

Subscribers: llvm-commits, igorb

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

llvm-svn: 319701
2017-12-04 21:40:57 +00:00
clang [OPENMP] Fix PR35486: crash when collapsing loops with dependent iteration spaces. 2017-12-04 21:30:42 +00:00
clang-tools-extra Fix build after r319688: s/CPlusPlus1z/CPlusPlus17/ 2017-12-04 20:38:21 +00:00
compiler-rt [libFuzzer] Remove const from ignoreRemainingArgs return value. 2017-12-04 20:06:52 +00:00
debuginfo-tests Re-revert "Refactor debuginfo-tests." 2017-11-21 01:20:28 +00:00
libclc configure.py: Add gfx900 (Vega, Raven) 2017-11-27 11:14:06 +00:00
libcxx Ooops. I checked in a test for a bug I haven't fixed yet. Temporrarily commented it out. 2017-12-04 20:46:38 +00:00
libcxxabi [libc++abi] Add install-cxxabi-stripped target 2017-11-30 23:25:51 +00:00
libunwind [libunwind] Switch to add_llvm_install_targets 2017-11-30 23:24:08 +00:00
lld [ELF] Add BYTE expression to test case for non-contiguous relro [NFC] 2017-12-04 10:34:15 +00:00
lldb Switch from C++1z to C++17; corresponds to r319688 in Clang. 2017-12-04 20:46:43 +00:00
llgo
llvm Allow similar TargetOpcodes to use inheritance to factor out commonality. NFC. 2017-12-04 21:40:57 +00:00
openmp [CMake] Detect information about test compiler 2017-11-30 17:08:31 +00:00
parallel-libs
polly [NFC] In GPGPU testcases, replace numeric registers in CHECK directives. 2017-12-01 14:16:39 +00:00
README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.