add the lock of CastInst and GetElementPtrInst