[PATCH] D34818: [Hexagon] Emit lookup tables in text section based on a flag
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 12:37:59 PDT 2017
kparzysz added inline comments.
================
Comment at: lib/Target/Hexagon/HexagonTargetObjectFile.cpp:142-145
+ const Function *Fn = getLutUsedFunction(GO);
+ if (Fn) {
+ return selectSectionForLookupTable(GO, TM, Fn);
+ }
----------------
This could be
```
if (const Function *Fn = getLutUsedFunction(GO))
return selectSectionForLookupTable(G0, TM, Fn);
```
================
Comment at: lib/Target/Hexagon/HexagonTargetObjectFile.cpp:419
+ auto *I = dyn_cast<Instruction>(U);
+ if (I) {
+ auto *Bb = I->getParent();
----------------
Maybe replace it with "if (!I) continue" to reduce indentation.
================
Comment at: lib/Target/Hexagon/HexagonTargetObjectFile.cpp:421
+ auto *Bb = I->getParent();
+ if (Bb) {
+ auto *UserFn = Bb->getParent();
----------------
Are there legitimate cases where instruction does not have a parent? If not, you could remove this test (maybe add an assertion instead).
Repository:
rL LLVM
https://reviews.llvm.org/D34818
More information about the llvm-commits
mailing list