annotate openmp/runtime/src/tsan_annotations.cpp @ 165:597b3f1c2c93

fix call createTailCallEliminationPass
author anatofuz
date Tue, 24 Mar 2020 15:30:52 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 /*
anatofuz
parents:
diff changeset
2 * tsan_annotations.cpp -- ThreadSanitizer annotations to support data
anatofuz
parents:
diff changeset
3 * race detection in OpenMP programs.
anatofuz
parents:
diff changeset
4 */
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
7 //
anatofuz
parents:
diff changeset
8 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
anatofuz
parents:
diff changeset
9 // See https://llvm.org/LICENSE.txt for license information.
anatofuz
parents:
diff changeset
10 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
anatofuz
parents:
diff changeset
11 //
anatofuz
parents:
diff changeset
12 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 #include "tsan_annotations.h"
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 #include <stdio.h>
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 typedef unsigned long uptr;
anatofuz
parents:
diff changeset
19 typedef signed long sptr;
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 extern "C" __attribute__((weak)) void AnnotateHappensBefore(const char *f,
anatofuz
parents:
diff changeset
22 int l, uptr addr) {}
anatofuz
parents:
diff changeset
23 extern "C" __attribute__((weak)) void AnnotateHappensAfter(const char *f, int l,
anatofuz
parents:
diff changeset
24 uptr addr) {}
anatofuz
parents:
diff changeset
25 extern "C" __attribute__((weak)) void AnnotateCondVarSignal(const char *f,
anatofuz
parents:
diff changeset
26 int l, uptr cv) {}
anatofuz
parents:
diff changeset
27 extern "C" __attribute__((weak)) void AnnotateCondVarSignalAll(const char *f,
anatofuz
parents:
diff changeset
28 int l, uptr cv) {
anatofuz
parents:
diff changeset
29 }
anatofuz
parents:
diff changeset
30 extern "C" __attribute__((weak)) void AnnotateMutexIsNotPHB(const char *f,
anatofuz
parents:
diff changeset
31 int l, uptr mu) {}
anatofuz
parents:
diff changeset
32 extern "C" __attribute__((weak)) void AnnotateCondVarWait(const char *f, int l,
anatofuz
parents:
diff changeset
33 uptr cv, uptr lock) {}
anatofuz
parents:
diff changeset
34 extern "C" __attribute__((weak)) void AnnotateRWLockCreate(const char *f, int l,
anatofuz
parents:
diff changeset
35 uptr m) {}
anatofuz
parents:
diff changeset
36 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
37 AnnotateRWLockCreateStatic(const char *f, int l, uptr m) {}
anatofuz
parents:
diff changeset
38 extern "C" __attribute__((weak)) void AnnotateRWLockDestroy(const char *f,
anatofuz
parents:
diff changeset
39 int l, uptr m) {}
anatofuz
parents:
diff changeset
40 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
41 AnnotateRWLockAcquired(const char *f, int l, uptr m, uptr is_w) {}
anatofuz
parents:
diff changeset
42 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
43 AnnotateRWLockReleased(const char *f, int l, uptr m, uptr is_w) {}
anatofuz
parents:
diff changeset
44 extern "C" __attribute__((weak)) void AnnotateTraceMemory(const char *f, int l,
anatofuz
parents:
diff changeset
45 uptr mem) {}
anatofuz
parents:
diff changeset
46 extern "C" __attribute__((weak)) void AnnotateFlushState(const char *f, int l) {
anatofuz
parents:
diff changeset
47 }
anatofuz
parents:
diff changeset
48 extern "C" __attribute__((weak)) void AnnotateNewMemory(const char *f, int l,
anatofuz
parents:
diff changeset
49 uptr mem, uptr size) {}
anatofuz
parents:
diff changeset
50 extern "C" __attribute__((weak)) void AnnotateNoOp(const char *f, int l,
anatofuz
parents:
diff changeset
51 uptr mem) {}
anatofuz
parents:
diff changeset
52 extern "C" __attribute__((weak)) void AnnotateFlushExpectedRaces(const char *f,
anatofuz
parents:
diff changeset
53 int l) {}
anatofuz
parents:
diff changeset
54 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
55 AnnotateEnableRaceDetection(const char *f, int l, int enable) {}
anatofuz
parents:
diff changeset
56 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
57 AnnotateMutexIsUsedAsCondVar(const char *f, int l, uptr mu) {}
anatofuz
parents:
diff changeset
58 extern "C" __attribute__((weak)) void AnnotatePCQGet(const char *f, int l,
anatofuz
parents:
diff changeset
59 uptr pcq) {}
anatofuz
parents:
diff changeset
60 extern "C" __attribute__((weak)) void AnnotatePCQPut(const char *f, int l,
anatofuz
parents:
diff changeset
61 uptr pcq) {}
anatofuz
parents:
diff changeset
62 extern "C" __attribute__((weak)) void AnnotatePCQDestroy(const char *f, int l,
anatofuz
parents:
diff changeset
63 uptr pcq) {}
anatofuz
parents:
diff changeset
64 extern "C" __attribute__((weak)) void AnnotatePCQCreate(const char *f, int l,
anatofuz
parents:
diff changeset
65 uptr pcq) {}
anatofuz
parents:
diff changeset
66 extern "C" __attribute__((weak)) void AnnotateExpectRace(const char *f, int l,
anatofuz
parents:
diff changeset
67 uptr mem, char *desc) {
anatofuz
parents:
diff changeset
68 }
anatofuz
parents:
diff changeset
69 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
70 AnnotateBenignRaceSized(const char *f, int l, uptr mem, uptr size, char *desc) {
anatofuz
parents:
diff changeset
71 }
anatofuz
parents:
diff changeset
72 extern "C" __attribute__((weak)) void AnnotateBenignRace(const char *f, int l,
anatofuz
parents:
diff changeset
73 uptr mem, char *desc) {
anatofuz
parents:
diff changeset
74 }
anatofuz
parents:
diff changeset
75 extern "C" __attribute__((weak)) void AnnotateIgnoreReadsBegin(const char *f,
anatofuz
parents:
diff changeset
76 int l) {}
anatofuz
parents:
diff changeset
77 extern "C" __attribute__((weak)) void AnnotateIgnoreReadsEnd(const char *f,
anatofuz
parents:
diff changeset
78 int l) {}
anatofuz
parents:
diff changeset
79 extern "C" __attribute__((weak)) void AnnotateIgnoreWritesBegin(const char *f,
anatofuz
parents:
diff changeset
80 int l) {}
anatofuz
parents:
diff changeset
81 extern "C" __attribute__((weak)) void AnnotateIgnoreWritesEnd(const char *f,
anatofuz
parents:
diff changeset
82 int l) {}
anatofuz
parents:
diff changeset
83 extern "C" __attribute__((weak)) void AnnotateIgnoreSyncBegin(const char *f,
anatofuz
parents:
diff changeset
84 int l) {}
anatofuz
parents:
diff changeset
85 extern "C" __attribute__((weak)) void AnnotateIgnoreSyncEnd(const char *f,
anatofuz
parents:
diff changeset
86 int l) {}
anatofuz
parents:
diff changeset
87 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
88 AnnotatePublishMemoryRange(const char *f, int l, uptr addr, uptr size) {}
anatofuz
parents:
diff changeset
89 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
90 AnnotateUnpublishMemoryRange(const char *f, int l, uptr addr, uptr size) {}
anatofuz
parents:
diff changeset
91 extern "C" __attribute__((weak)) void AnnotateThreadName(const char *f, int l,
anatofuz
parents:
diff changeset
92 char *name) {}
anatofuz
parents:
diff changeset
93 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
94 WTFAnnotateHappensBefore(const char *f, int l, uptr addr) {}
anatofuz
parents:
diff changeset
95 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
96 WTFAnnotateHappensAfter(const char *f, int l, uptr addr) {}
anatofuz
parents:
diff changeset
97 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
98 WTFAnnotateBenignRaceSized(const char *f, int l, uptr mem, uptr sz,
anatofuz
parents:
diff changeset
99 char *desc) {}
anatofuz
parents:
diff changeset
100 extern "C" __attribute__((weak)) int RunningOnValgrind() { return 0; }
anatofuz
parents:
diff changeset
101 extern "C" __attribute__((weak)) double ValgrindSlowdown(void) { return 0; }
anatofuz
parents:
diff changeset
102 extern "C" __attribute__((weak)) const char __attribute__((weak)) *
anatofuz
parents:
diff changeset
103 ThreadSanitizerQuery(const char *query) {
anatofuz
parents:
diff changeset
104 return 0;
anatofuz
parents:
diff changeset
105 }
anatofuz
parents:
diff changeset
106 extern "C" __attribute__((weak)) void
anatofuz
parents:
diff changeset
107 AnnotateMemoryIsInitialized(const char *f, int l, uptr mem, uptr sz) {}