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

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 5 03:48:46 PDT 2021


gchatelet 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;
----------------
@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?


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