[PATCH] D113787: [llvm-reduce] keep terminator instructions during ReduceGlobalVars
    Dwight Guth via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Nov 15 10:51:24 PST 2021
    
    
  
dwightguth added a comment.
I genuinely don't understand the concern here. There are two types of common bugs in the llvm compiler. The first is when the compiler itself crashes. For this, all you need the interestingness test in llvm-reduce to do is run `llc` and report that it is interesting if the compiler crashes. In this case, you don't care what the program does when linked or executed, it's true. However, there is another type of common bug: namely, when the compiler miscompiles a program. In order to test whether the reduced program is interesting in this case, it's necessary to actually link and run it. Right now, llvm-reduce can be effectively used to reduce test cases that the compiler miscompiles. It's rather slow, but it works. If we make this change, it will no longer be able to effectively reduce global variables in this case because the reduced global variables will cause the attempts at reduction to segfault, rendering them uninteresting. As a result, the final reduced program will not be able to reduce any live global variables, which seems undesirable to me in a minimizer.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113787/new/
https://reviews.llvm.org/D113787
    
    
More information about the llvm-commits
mailing list