Go to file
Roman Tereshin b2d3f2e5da [MIR][MachineCSE] Implementing proper MachineInstr::getNumExplicitDefs()
Apparently, MachineInstr class definition as well as pretty much all of
the machine passes assume that the only kind of MachineInstr's operands
that is variadic for variadic opcodes is explicit non-definitions.

In particular, this assumption is made by MachineInstr::defs(), uses(),
and explicit_uses() methods, as well as by MachineCSE pass.

The assumption is incorrect judging from at least TableGen backend
implementation, that recognizes variable_ops in OutOperandList, and the
very existence of G_UNMERGE_VALUES generic opcode, or ARM load multiple
instructions, all of which have variadic defs.

In particular, MachineCSE pass breaks MIR with CSE'able G_UNMERGE_VALUES
instructions in it.

This commit implements MachineInstr::getNumExplicitDefs() similar to
pre-existing MachineInstr::getNumExplicitOperands(), fixes
MachineInstr::defs(), uses(), and explicit_uses(), and fixes MachineCSE
pass.

As the issue addressed seems to affect only machine passes that could be
ran mid-GlobalISel pipeline at the moment, the other passes aren't fixed
by this commit, like MachineLICM: that could be done on per-pass basis
when (if ever) they get adopted for GlobalISel.

Reviewed By: arsenm

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

llvm-svn: 334520
2018-06-12 18:30:37 +00:00
clang Refactor ExecuteAndWait to take StringRefs. 2018-06-12 17:43:52 +00:00
clang-tools-extra [clangd] Trace time the operations wait on Semaphore. 2018-06-12 11:56:21 +00:00
compiler-rt [Fuzzer] Afl driver changing iterations handling 2018-06-12 15:47:58 +00:00
debuginfo-tests [debuginfo-tests] Always use the system python to invoke llgdb.py. 2018-06-10 19:38:26 +00:00
libclc r600/fmin: Flush denormals before calling builtin. 2018-06-07 20:27:58 +00:00
libcxx [CMake] Use common variable for all header targets NFC 2018-06-12 06:58:06 +00:00
libcxxabi private_typeinfo: limit is_dst_type_derived_from_static_type optimization 2018-05-18 20:51:38 +00:00
libunwind [OR1K] Add the EPCR special-purpose register to register state. 2018-05-16 19:09:48 +00:00
lld Refactor ExecuteAndWait to take StringRefs. 2018-06-12 17:43:52 +00:00
lldb Refactor ExecuteAndWait to take StringRefs. 2018-06-12 17:43:52 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [MIR][MachineCSE] Implementing proper MachineInstr::getNumExplicitDefs() 2018-06-12 18:30:37 +00:00
openmp [OpenMP] Fix formatting issues in kmp_stats.h 2018-06-08 22:27:53 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Drop unnecessary whitespace [NFCI] 2018-06-11 15:11:57 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +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.