[PATCH] D105516: [clang][PassManager] Add -falways-mem2reg to run mem2reg at -O0

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 19 21:20:26 PDT 2021


jrtc27 added a comment.

This is not meant to be an -O0.5, this is meant to be an -Oepsilon. I don't want optimised code, I just want code that I can actually disassemble and understand without having to trawl through a mess of stack spills and loads. This is for debugging really basic bugs (either compiler or bad C/C++ input) that turn up even at -O0 and that you don't want optimisations for.

This is also so that the myriad of `%clang_cc1 -disable-O0-optnone | opt -S -mem2reg` seen in clang/tests can become `%clang_cc1 -falways-mem2reg` as the current way to write those tests is really clunky.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105516



More information about the cfe-commits mailing list