mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 14:06:36 +00:00
ScoreboardHazardRecognizer: unbreak TSAN by moving a static mutated variable to a member
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266837
This commit is contained in:
parent
9f5298cb03
commit
6696baf203
@ -83,11 +83,9 @@ class ScoreboardHazardRecognizer : public ScheduleHazardRecognizer {
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
#ifndef NDEBUG
|
||||
// Support for tracing ScoreboardHazardRecognizer as a component within
|
||||
// another module. Follows the current thread-unsafe model of tracing.
|
||||
static const char *DebugType;
|
||||
#endif
|
||||
// another module.
|
||||
const char *DebugType;
|
||||
|
||||
// Itinerary data for the target.
|
||||
const InstrItineraryData *ItinData;
|
||||
|
@ -23,22 +23,13 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE ::llvm::ScoreboardHazardRecognizer::DebugType
|
||||
#define DEBUG_TYPE DebugType
|
||||
|
||||
#ifndef NDEBUG
|
||||
const char *ScoreboardHazardRecognizer::DebugType = "";
|
||||
#endif
|
||||
|
||||
ScoreboardHazardRecognizer::
|
||||
ScoreboardHazardRecognizer(const InstrItineraryData *II,
|
||||
const ScheduleDAG *SchedDAG,
|
||||
const char *ParentDebugType) :
|
||||
ScheduleHazardRecognizer(), ItinData(II), DAG(SchedDAG), IssueWidth(0),
|
||||
IssueCount(0) {
|
||||
|
||||
#ifndef NDEBUG
|
||||
DebugType = ParentDebugType;
|
||||
#endif
|
||||
ScoreboardHazardRecognizer::ScoreboardHazardRecognizer(
|
||||
const InstrItineraryData *II, const ScheduleDAG *SchedDAG,
|
||||
const char *ParentDebugType)
|
||||
: ScheduleHazardRecognizer(), DebugType(ParentDebugType), ItinData(II),
|
||||
DAG(SchedDAG), IssueWidth(0), IssueCount(0) {
|
||||
|
||||
// Determine the maximum depth of any itinerary. This determines the depth of
|
||||
// the scoreboard. We always make the scoreboard at least 1 cycle deep to
|
||||
|
Loading…
Reference in New Issue
Block a user