[rebranch] Finish off memory effects change

`ReadOnly`/`ArgMemOnly` were mostly moved over, but a few were missed.
Update them all. Also default to `unknown` for no memory effects rather
than none (ie. we should be conservative).
This commit is contained in:
Ben Barham
2023-08-01 15:23:28 -07:00
parent b134541111
commit 1d3b5f40a0
12 changed files with 71 additions and 66 deletions

View File

@@ -750,7 +750,7 @@ IRGenModule::~IRGenModule() {
// They have to be non-local because otherwise we'll get warnings when
// a particular x-macro expansion doesn't use one.
namespace RuntimeConstants {
const auto ReadNone = llvm::Attribute::ReadNone;
const auto ReadNone = llvm::MemoryEffects::none();
const auto ReadOnly = llvm::MemoryEffects::readOnly();
const auto ArgMemOnly = llvm::MemoryEffects::argMemOnly();
const auto NoReturn = llvm::Attribute::NoReturn;
@@ -1104,7 +1104,7 @@ void IRGenModule::registerRuntimeEffect(ArrayRef<RuntimeEffect> effect,
#define NO_ATTRS {}
#define EFFECT(...) { __VA_ARGS__ }
#define NO_MEMEFFECTS \
{ llvm::MemoryEffects::none() }
{ llvm::MemoryEffects::unknown() }
#define MEMEFFECTS(...) \
{ __VA_ARGS__ }