This is a part of https://reviews.llvm.org/D95835.
Added
- TLS storage
- a weak global used to set by instrumented code
- move origins
These APIs are similar to MSan's APIs
https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/msan/msan_poisoning.cpp
We first improved MSan's by https://reviews.llvm.org/D94572 and https://reviews.llvm.org/D94552.
So the correctness has been verified by MSan.
After the DFSan instrument code is ready, we will be adding more test cases.
- read
To reduce origin tracking cost, some of the read APIs return only
the origin from the first taint data.
Note that we did not add origin set APIs here because they are related
to code instrumentation, will be added later with IR transformation code.
Why return them in the same u64? Would it be simpler to return the label and write the origin to a pointer passed in as an arg?