[PATCH] D42799: [ThinLTO] Serialize WithGlobalValueDeadStripping index flag for distributed backends

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 09:50:40 PST 2018


grimar added a comment.

Patch looks good and correct to me (with minor comment/suggestion).
I am newbie in LTO though, so I think somebody else should 
give a final approval.



================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:5145
+        TheIndex.setWithGlobalValueDeadStripping();
+      break;
+    }
----------------
I would make it a bit shorter:

```
uint64_t Flags = Record[0];
// Scan flags (set only on the combined index).
assert(Flags <= 1 && "Unexpected bits in flag");

// 1 bit: WithGlobalValueDeadStripping flag.
if (Flags & 0x1)
  TheIndex.setWithGlobalValueDeadStripping();
```


Repository:
  rL LLVM

https://reviews.llvm.org/D42799





More information about the llvm-commits mailing list