[PATCH] D130230: [llvm][IROutliner] Account for return void in sort comparator

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 08:47:27 PDT 2022


AndrewLitteken added a comment.

There shouldn't be a case where there are two ret voids in a function. I am pretty sure that there will only more than one return value when the function has more than one exit block. In that case, there are multiple return values have an integer value.  So the cases you laid out should be correct.

So it may be better to use your suggestion to only sort when there is more than one value, and add two assertions. One to check that the only value is a nullptr when the map is size 1, and then another in the sort itself that checks that neither the LHS or the RHS is a nullptr.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130230



More information about the llvm-commits mailing list