[PATCH] D120000: [1/2] TLS loads opimization (hoist)

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 21 05:13:41 PST 2022


LuoYuanke added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Scalar/TLSVariableControl.h:74
+
+class BasicBlock;
+class DominatorTree;
----------------
I curious why not include the header file BasicBlock.h?


================
Comment at: llvm/include/llvm/Transforms/Scalar/TLSVariableControl.h:94
+
+/// Keeps track of a TLS variable candidate and its uses.
+struct TLSCandidate {
----------------
uses -> users?


================
Comment at: llvm/lib/Transforms/Scalar/TLSVariableControl.cpp:46
+    cl::desc("Control the TLS loads in PIC model: "
+             "tls-load-control=Optimize: Eleminate remove redundant TLS load(s)."
+             "tls-load-control=Strict: Strictly load TLS address before every use."
----------------
"Eleminate remove" -> Eliminate?


================
Comment at: llvm/lib/Transforms/Scalar/TLSVariableControl.cpp:135
+      TLSCandMap[GV].addUser(Inst, Idx);
+    }
+  } // end of for all operands
----------------
Drop brace.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120000/new/

https://reviews.llvm.org/D120000



More information about the llvm-commits mailing list