mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 14:16:12 +00:00
remove the pointless check of MemoryUseIntrinsic from
is trivially dead, since these have side effects. This makes the (misnamed) MemoryUseIntrinsic class dead, so remove it. llvm-svn: 120382
This commit is contained in:
parent
84d3d220c1
commit
0ec89ea5d9
@ -55,7 +55,7 @@ namespace llvm {
|
||||
return isa<CallInst>(V) && classof(cast<CallInst>(V));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/// DbgInfoIntrinsic - This is the common base class for debug info intrinsics
|
||||
///
|
||||
class DbgInfoIntrinsic : public IntrinsicInst {
|
||||
@ -297,29 +297,6 @@ namespace llvm {
|
||||
}
|
||||
};
|
||||
|
||||
/// MemoryUseIntrinsic - This is the common base class for the memory use
|
||||
/// marker intrinsics.
|
||||
///
|
||||
class MemoryUseIntrinsic : public IntrinsicInst {
|
||||
public:
|
||||
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const MemoryUseIntrinsic *) { return true; }
|
||||
static inline bool classof(const IntrinsicInst *I) {
|
||||
switch (I->getIntrinsicID()) {
|
||||
case Intrinsic::lifetime_start:
|
||||
case Intrinsic::lifetime_end:
|
||||
case Intrinsic::invariant_start:
|
||||
case Intrinsic::invariant_end:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -209,9 +209,6 @@ bool llvm::isInstructionTriviallyDead(Instruction *I) {
|
||||
// We don't want debug info removed by anything this general.
|
||||
if (isa<DbgInfoIntrinsic>(I)) return false;
|
||||
|
||||
// Likewise for memory use markers.
|
||||
if (isa<MemoryUseIntrinsic>(I)) return false;
|
||||
|
||||
if (!I->mayHaveSideEffects()) return true;
|
||||
|
||||
// Special case intrinsics that "may have side effects" but can be deleted
|
||||
|
Loading…
x
Reference in New Issue
Block a user