[ModuleSummaryAnalysis] Use helper methods to check readnone/readonly (NFC)
authorNikita Popov <npopov@redhat.com>
Fri, 21 Oct 2022 10:16:57 +0000 (12:16 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 21 Oct 2022 10:18:57 +0000 (12:18 +0200)
commiteb470e67c148089d8d5c0c379a569ac55591546c
tree29b6dd8a22c3cba0e8d9f117cd9c8052f79f6d86
parentfd236772f5665ce9e55f85ac992be6c22a918d3e
[ModuleSummaryAnalysis] Use helper methods to check readnone/readonly (NFC)

This makes sure that this code continue working when switching to
the memory attribute.

A caveat here is that onlyReadsMemory() will also true for readnone.
To be conservative, I'm explicitly excluding that case here.
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp