Move some functions to allow them to be inlined with clang
authorKoundinya Veluri <kouvel@microsoft.com>
Tue, 20 Oct 2015 17:37:01 +0000 (10:37 -0700)
committerKoundinya Veluri <kouvel@microsoft.com>
Thu, 22 Oct 2015 04:34:12 +0000 (21:34 -0700)
commit6559e05a45ae9d9ae925dddd04bce34a59c09263
tree3a190c14af9869fbf6f104f2eb9ae08e9741497b
parent6dc78eb8b2280485ca32bc3850fd97f85b9be43d
Move some functions to allow them to be inlined with clang

For the moment, GetThread, _rotl/_rotr, Interlocked..., and similar functions were moved to allow inlining them with clang.

The plan is to eventually enable link-time optimization (LTO) to cover inlining across translation units.

Renamed some code files in PAL tests to compile as C++ to use the C++ inline semantics.

Commit migrated from https://github.com/dotnet/coreclr/commit/194d5a41455bda3f348524a1b54f59b5e0c19f0c
50 files changed:
docs/coreclr/building/unix-test-instructions.md
src/coreclr/src/pal/inc/pal.h
src/coreclr/src/pal/src/CMakeLists.txt
src/coreclr/src/pal/src/cruntime/misc.cpp
src/coreclr/src/pal/src/misc/interlock.cpp [deleted file]
src/coreclr/src/pal/src/misc/miscpalapi.cpp
src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/test1.cpp [moved from src/coreclr/src/pal/tests/palsuite/c_runtime/_rotl/test1/test1.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/test1.cpp [moved from src/coreclr/src/pal/tests/palsuite/c_runtime/_rotr/test1/test1.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterLockedExchangeAdd/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterLockedExchangeAdd/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterLockedExchangeAdd/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test1/test.c with 84% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedBit/test2/test.c with 84% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test2/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test2/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange/test2/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchange64/test2/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedCompareExchangePointer/test1/test.c with 98% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test2/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test2/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement/test2/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test2/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test2/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedDecrement64/test2/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchange64/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/InterlockedExchangePointer.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedExchangePointer/test1/InterlockedExchangePointer.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test2/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test2/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement/test2/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test1/test.c with 100% similarity]
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test2/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test2/test.cpp [moved from src/coreclr/src/pal/tests/palsuite/miscellaneous/InterlockedIncrement64/test2/test.c with 100% similarity]
src/coreclr/src/vm/threads.cpp
src/coreclr/src/vm/threads.inl