[PATCH] D73853: [llvm-reduce] add ReduceAttribute delta pass

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 06:55:03 PST 2020


nickdesaulniers marked 2 inline comments as done.
nickdesaulniers added inline comments.


================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp:34
+                              llvm::Module *M) {
+  int AttributeIndex = 0;
+  int ChunkIndex = 0;
----------------
george.burgess.iv wrote:
> nit: indices are generally `unsigned`
The comparison below against `ChunksToKeep[ChunkIndex].end` would be against an `int`.  If I change `AttributesIndex` to `unsigned`, I get the following warning:

```
../tools/llvm-reduce/deltas/ReduceAttributes.cpp:41:26: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
      if (AttributeIndex == ChunksToKeep[ChunkIndex].end)
          ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
since `Chunk::end` is an `int`. (Though I don't think it makes sense for chunks to ever be negative. I could change the Chunk interface if it's not a yak shave, if you'd like?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73853





More information about the llvm-commits mailing list