23 #ifndef LLVM_LIB_TRANSFORMS_OBJCARC_OBJCARC_H 24 #define LLVM_LIB_TRANSFORMS_OBJCARC_OBJCARC_H 53 Value *OldArg = cast<CallInst>(CI)->getArgOperand(0);
62 "Can't delete non-forwarding instruction with users!");
80 if (
const auto *
C = dyn_cast<CallInst>(Opnd))
86 template<
class PHINodeTy,
class VectorTy>
88 auto *BB = PN.getParent();
89 for (
auto &
P : BB->phis()) {
92 unsigned I = 0,
E = PN.getNumIncomingValues();
94 auto *BB = PN.getIncomingBlock(I);
95 auto *PNOpnd = PN.getIncomingValue(I)->stripPointerCasts();
96 auto *POpnd =
P.getIncomingValueForBlock(BB)->stripPointerCasts();
101 PHIList.push_back(&
P);
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
This class represents lattice values for constants.
bool IsNoopOnNull(ARCInstKind Class)
Test if the given class represents instructions which do nothing if passed a null pointer...
bool IsForwarding(ARCInstKind Class)
Test if the given class represents instructions which return their argument verbatim.
bool IsNullOrUndef(const Value *V)
objc_retainAutoreleasedReturnValue
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
Value * getOperand(unsigned i) const
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
bool RecursivelyDeleteTriviallyDeadInstructions(Value *V, const TargetLibraryInfo *TLI=nullptr, MemorySSAUpdater *MSSAU=nullptr)
If the specified value is a trivially dead instruction, delete it.
const Value * stripPointerCasts() const
Strip off pointer casts, all-zero GEPs, and aliases.
This file defines common analysis utilities used by the ObjC ARC Optimizer.
ARCInstKind GetBasicARCInstKind(const Value *V)
Determine which objc runtime call instruction class V belongs to.
static void EraseInstruction(Instruction *CI)
Erase the given instruction.
static const Instruction * getreturnRVOperand(const Instruction &Inst, ARCInstKind Class)
If Inst is a ReturnRV and its operand is a call or invoke, return the operand.
ARCInstKind
Equivalence classes of instructions in the ARC Model.
Module.h This file contains the declarations for the Module class.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
void getEquivalentPHIs(PHINodeTy &PN, VectorTy &PHIList)
Return the list of PHI nodes that are equivalent to PN.