[PATCH] D73853: [llvm-reduce] add ReduceAttribute delta pass
George Burgess IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 15:44:50 PST 2020
george.burgess.iv marked an inline comment as done.
george.burgess.iv added a comment.
LGTM after this last nit is addressed. Like said, I plan to leave the final stamp to someone with more context. Thanks again!
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp:34
+ llvm::Module *M) {
+ int AttributeIndex = 0;
+ int ChunkIndex = 0;
----------------
nickdesaulniers wrote:
> 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?)
Ick. Yeah, if you want to fix the API, feel free, but I'm happy with this as-is until that happens.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp:1
+//===- ReduceAttributes.h - Specialized Delta Pass ------------------------===//
+//
----------------
.cpp :)
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