tsan: remove indirection when selecting the active mapping
authorDmitry Vyukov <dvyukov@google.com>
Sat, 7 Aug 2021 18:10:54 +0000 (20:10 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 10 Aug 2021 18:07:31 +0000 (20:07 +0200)
commit5d106f16b972884fb81c7dac338eeeb09d6c35b9
tree9e5f14575f0893c3324919793be62d913dc55f11
parent959076c596c77999a4ca5fd1d0b2403ae43d0c29
tsan: remove indirection when selecting the active mapping

Currently there are 2 levels when selecting the active mapping:
the branchy ifdef tree + another ifdef tree in SelectMapping.
Moreover, there is an additional indirection for some platforms
via HAS_48_BIT_ADDRESS_SPACE define. This makes already complex
logic even more complex and almost impossible to read.
Remove one level of indirection and define the active mapping
in SelectMapping.

Depends on D107742.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107743
compiler-rt/lib/tsan/rtl/tsan_platform.h
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp