[llvm] [SimplifyCFG] Treat umul + extract pattern as cheap single instruction (Approach 2) (PR #128021)
Gábor Spaits via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 07:53:36 PST 2025
================
@@ -3810,6 +3815,7 @@ static bool foldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI,
// instructions. While we are at it, keep track of the instructions
// that need to be moved to the dominating block.
SmallPtrSet<Instruction *, 4> AggressiveInsts;
+ SmallPtrSet<Instruction *, 2> ZeroCostInstructions;
----------------
spaits wrote:
Even though I would need to carry only one instruction, I have decided to still use a set.
I want this to be somewhat future proof, so if someone adds another pattern, that is 5 instructions long they can just add those instruction to this Set.
Or it even works, when there is one pattern, but multiple times.
https://github.com/llvm/llvm-project/pull/128021
More information about the llvm-commits
mailing list