Skip to content

Commit fba3e06

Browse files
authored
[VPlan] Remove overlapping VPInstruction::mayWriteToMemory. NFCI (#120039)
VPInstruction has a definition of mayWriteToMemory, which seems to only be used by VPlanSLP. However VPInstructions are already handled in VPRecipeBase::mayWriteToMemory, and everywhere else seems to use this definition. I think these should be the same for all intents and purposes. The VPRecipeBase definition is more conservative but returns true for stores/calls/invokes/SLPStores.
1 parent bf700c3 commit fba3e06

File tree

1 file changed

+0
-8
lines changed
  • llvm/lib/Transforms/Vectorize

1 file changed

+0
-8
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,14 +1347,6 @@ class VPInstruction : public VPRecipeWithIRFlags,
13471347
LLVM_DUMP_METHOD void dump() const;
13481348
#endif
13491349

1350-
/// Return true if this instruction may modify memory.
1351-
bool mayWriteToMemory() const {
1352-
// TODO: we can use attributes of the called function to rule out memory
1353-
// modifications.
1354-
return Opcode == Instruction::Store || Opcode == Instruction::Call ||
1355-
Opcode == Instruction::Invoke || Opcode == SLPStore;
1356-
}
1357-
13581350
bool hasResult() const {
13591351
// CallInst may or may not have a result, depending on the called function.
13601352
// Conservatively return calls have results for now.

0 commit comments

Comments
 (0)