[PATCH] D34818: [Hexagon] Emit lookup tables in text section based on a flag

Sumanth Gundapaneni via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 09:49:20 PDT 2017


sgundapa added inline comments.


================
Comment at: lib/Target/Hexagon/HexagonTargetObjectFile.cpp:419
+    auto *I = dyn_cast<Instruction>(U);
+    if (I) {
+      auto *Bb = I->getParent();
----------------
kparzysz wrote:
> Maybe replace it with "if (!I) continue" to reduce indentation.
I will work on indentation and push a new one 


================
Comment at: lib/Target/Hexagon/HexagonTargetObjectFile.cpp:421
+      auto *Bb = I->getParent();
+      if (Bb) {
+        auto *UserFn = Bb->getParent();
----------------
kparzysz wrote:
> Are there legitimate cases where instruction does not have a parent?  If not, you could remove this test (maybe add an assertion instead).
I am not sure about this which is why I am trying to be safe by returning a nullptr.  There might be scenarios of dead basic blocks or functions . I probably need to run a big code base to see what might happen. 


Repository:
  rL LLVM

https://reviews.llvm.org/D34818





More information about the llvm-commits mailing list