Improve collectEphemeralValues to find ephemeral induction variable
and be based on wouldInstructionBeTriviallyDead utility function.
Also use this function in CodeGenPrepare to collect and erase the same
set of ephemeral values.
Paths
| Differential D154584
Improve collectEphemeralValues and use it in CodeGenPrepare Needs ReviewPublic Authored by skatkov on Jul 6 2023, 2:16 AM.
Details Summary Improve collectEphemeralValues to find ephemeral induction variable Also use this function in CodeGenPrepare to collect and erase the same
Diff Detail
Unit TestsFailed Event Timeline
Comment Actions ping. I wonder whether it will easier to review if I split this patch into three one:
I'd like to make a progress on this, so I need feedback. Comment Actions
Each of these steps is a reasonable improvement to what we have today. Given these improvements are independent (e.g. we would benefit from the more accurate collection of ephemeral values even without the CGP piece), I think it makes sense to split up and review them separately.
Revision Contents
Diff 537979 llvm/include/llvm/Analysis/CodeMetrics.h
llvm/lib/Analysis/CodeMetrics.cpp
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll
|
will be removed after https://reviews.llvm.org/D154601 landed.