aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2017-10-03 06:15:34 +0000
committerDean Michael Berris <dberris@google.com>2017-10-03 06:15:34 +0000
commita1b8e0352f3a7c806f9958839bf9b6880e1340b8 (patch)
tree1bb629855449513f54cfe1bc5a8fb43ac7f7493c /llvm/lib/CodeGen/MachineScheduler.cpp
parent4204464c76845b1b9334ab1758e3a72120af84c3 (diff)
downloadllvm-a1b8e0352f3a7c806f9958839bf9b6880e1340b8.zip
llvm-a1b8e0352f3a7c806f9958839bf9b6880e1340b8.tar.gz
llvm-a1b8e0352f3a7c806f9958839bf9b6880e1340b8.tar.bz2
[XRay][compiler-rt] Use a hand-written circular buffer in BufferQueue
Summary: This change removes the dependency on using a std::deque<...> for the storage of the buffers in the buffer queue. We instead implement a fixed-size circular buffer that's resilient to exhaustion, and preserves the semantics of the BufferQueue. We're moving away from using std::deque<...> for two reasons: - We want to remove dependencies on the STL for data structures. - We want the data structure we use to not require re-allocation in the normal course of operation. The internal implementation of the buffer queue uses heap-allocated arrays that are initialized once when the BufferQueue is created, and re-uses slots in the buffer array as buffers are returned in order. We also change the lock used in the implementation to a spinlock instead of a blocking mutex. We reason that since the release operations now take very little time in the critical section, that a spinlock would be appropriate. This change is related to D38073. Reviewers: dblaikie, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38119 llvm-svn: 314766
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
0 files changed, 0 insertions, 0 deletions