[llvm-bugs] [Bug 28942] New: MachineScheduler: clusterNeighboringMemOps can lead to unstable output
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 11 12:27:27 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28942
Bug ID: 28942
Summary: MachineScheduler: clusterNeighboringMemOps can lead to
unstable output
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: gberry at codeaurora.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The code in BaseMemOpClusterMutation::clusterNeighboringMemOps() builds a
sorted list of MemOpInfos, and the ordering of this list can ultimately effect
the code generated (whether loads/stores get clustered when scheduling).
std::sort is used to sort the entries, which is not stable w.r.t. the order of
equal elements.
Unstable output could be generated for the same input if two different
implementations of std::sort were used. The clustering decision for equal
MemOpInfos could also be altered e.g. by the addition of extra MemOpInfos in
the list before or after the equal elements. I ran into the latter case
refactoring the code for AArch64InstrInfo::getMemOpBaseRegImmOfs().
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160811/7f8411ca/attachment.html>
More information about the llvm-bugs
mailing list