This patch adds lowering for global TLS addresses for the TLS models of InitialExec, GlobalDynamic, LocalExec and LocalDynamic.
LocalExec support required using a 4-operand add instruction, which uses the fourth operand to express a relocation on the symbol. The necessary fixup is emitted when the instruction is emitted.
Because we run BranchRelaxation in addPreEmitPass but the expansion of these pseudos happens in addPreEmitPass2 I think we need to update RISCVInstrInfo::getInstSizeInBytes to state that PseudoLA_TLS_IE and PseudoLA_TLS_GD will take 8 bytes (otherwise we run into "fixup errors" because the relaxation has been done using an underestimation).
(Alternatively we could use the Size attribute in tablegen but currently only PseudoLI does this and we don't use that one in codegen, so that is probably OK)
Also I wonder if the attribute isAsmParserOnly = 1 should be updated to 0 so we are more honest with the current usage of these pseudos. That said from a cursory check in tablegen, that attribute does not seem very important at the moment.