diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-20 00:21:24 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-20 00:21:24 +0000 |
commit | ea0b1e7c17eee8b514c026fbb30dc515bdf1c4bd (patch) | |
tree | 2f195d8efc173a32b1527a7e1e829d1a28779582 /llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp | |
parent | 840fa745ca493123c44d7e9b62676f3a0cd23c0d (diff) | |
download | bcm5719-llvm-ea0b1e7c17eee8b514c026fbb30dc515bdf1c4bd.tar.gz bcm5719-llvm-ea0b1e7c17eee8b514c026fbb30dc515bdf1c4bd.zip |
ScoreboardHazardRecognizer: unbreak TSAN by moving a static mutated variable to a member
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266837
Diffstat (limited to 'llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp b/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp index e765486c74b..69c48703301 100644 --- a/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp +++ b/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp @@ -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 |