[PATCH] D109858: [GlobalISel][AMDGPU] Add a -final-dce-legalizer flag to clean up dead code after legalization.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 15 16:50:08 PDT 2021
aemerson added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/Legalizer.cpp:50-53
+static cl::opt<bool> RunDCE(
+ "final-dce-legalizer",
+ cl::desc("Run a final DCE pass after all legalization is completed."),
+ cl::Optional, cl::init(false));
----------------
arsenm wrote:
> Why do these instructions not get deleted as-is? I think this is a very un-discoverable option and if it's worth deleting these instructions, it's worth just always doing it
Maybe if their users have their operands changed to use another def, they might not get readded to the legaliser/arrogant worklist if they’ve already been legalised.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109858/new/
https://reviews.llvm.org/D109858
More information about the llvm-commits
mailing list