[PATCH] D124044: llvm-reduce: Add pass to reduce MIR instruction flags

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 20:54:00 PDT 2022


MatzeB added a comment.

Removing instruction flags seems dangerous to me:

- Dropping `BundledPred`, `BundledSucc` will unbundle instructions and leave a bundle header around in the instruction stream, which seems bad.
- I wouldn't be surprised if some targets break/segfault when `FrameSetup`/`FrameDestroy` is dropped randomly.

I could see this work okay for the math and overflow flags. Maybe it would be best to explicitely list those "mostly harmless" flags here and leave the others untouched?



================
Comment at: llvm/tools/llvm-reduce/ReducerWorkItem.cpp:247
                                               /*NoImplicit=*/true);
+      DstMI->setFlags(SrcMI.getFlags());
+
----------------
Nice catch.


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

https://reviews.llvm.org/D124044



More information about the llvm-commits mailing list