[PATCH] D83351: [llvm-reduce] Reducing attributes

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 5 05:09:00 PDT 2021


lebedev.ri added inline comments.


================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp:87
+    AttributeSetsToPreserve.reserve(AL.getNumAttrSets());
+    for (unsigned SetIdx : seq(AL.index_begin(), AL.index_end())) {
+      AttrPtrIdxVecVecTy AttributesToPreserve;
----------------
gchatelet wrote:
> @lebedev.ri I was updating `seq` in D103900 and an assertion fired at this location because `seq` is being called with `begin` being greater than `end`
> `seq(AL.index_begin(), AL.index_end())` => `seq(4294967295, 3)`
> 
> I'm not familiar with this code but it seems that in the context of function attributes `begin_index` and `end_index` have special meaning (See [[ https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/Attributes.h#L378-L384 | here ]] and [[ https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/Attributes.h#L752-L753 | here ]]).
> 
> Can you have a look?
It probably should be an integer, not an unsigned then.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83351



More information about the llvm-commits mailing list