================ @@ -3362,6 +3367,54 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddress(SDValue Op, return LowerGlobalTLSAddressLinux(Op, DAG); } +/// updateForAIXShLibTLSModelOpt - Helper to initialize TLS model opt settings, +/// and then apply the update. +static void updateForAIXShLibTLSModelOpt(TLSModel::Model &Model, + SelectionDAG &DAG, + const TargetMachine &TM) { + // Initialize TLS model opt setting lazily: + // (1) Use initial-exec for single TLS var references within current function. + // (2) Use local-dynamic for multiple TLS var references within current + // function. + PPCFunctionInfo *FuncInfo = + DAG.getMachineFunction().getInfo<PPCFunctionInfo>(); + if (!FuncInfo->isAIXFuncTLSModelOptInitDone()) { + SmallPtrSet<const GlobalValue *, 8> TLSGV; + // Iterate over all instructions within current function, collect all TLS ---------------- amy-kwan wrote:
nit on comment: ```suggestion // Iterate over all instructions within the current function and collect all TLS ``` https://github.com/llvm/llvm-project/pull/84132 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits