diff options
author | Vedant Kumar <vsk@apple.com> | 2020-04-24 11:16:43 -0700 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2020-04-24 11:28:17 -0700 |
commit | c0fa447e02c4cd8c53c3ab03efa6391175e3d56e (patch) | |
tree | 932f899954c11da07311e363fe56c0d722d0acda /llvm/lib/Support/Threading.cpp | |
parent | ef423a3ba57045f80b0fcafce72121449a8b54d4 (diff) | |
download | llvm-c0fa447e02c4cd8c53c3ab03efa6391175e3d56e.zip llvm-c0fa447e02c4cd8c53c3ab03efa6391175e3d56e.tar.gz llvm-c0fa447e02c4cd8c53c3ab03efa6391175e3d56e.tar.bz2 |
AArch64: Remove reversedInstructionsWithoutDebug helper
When using reversedInstructionsWithoutDebug to construct a range from a
pair of MachineInstrBundleIterators, the range unexpectedly leaves out an
element. This results in mis-optimization as @mstorsjo points out in
https://reviews.llvm.org/D78157.
The problem is that when we convert a MachineInstrBundleIterator to a
reverse iterator, the result gets incremented:
MachineInstrBundleIterator(++I.getReverse())
The comment there explains that the "resulting iterator will dereference
... to the previous node, which is somewhat unexpected; but converting
the two endpoints in a range will give the same range in reverse". This
makes it hard to understand what reversedInstructionsWithoutDebug will
do: I've removed the helper to prevent similar mistakes in the future.
Diffstat (limited to 'llvm/lib/Support/Threading.cpp')
0 files changed, 0 insertions, 0 deletions