blob: 2cee473e28998bcfd15c6e3df968a9db043a88b9 [file] [log] [blame]
Max Kazantsev3c284bd2018-08-30 03:39:16 +00001//===-- GuardUtils.cpp - Utils for work with guards -------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Max Kazantsev3c284bd2018-08-30 03:39:16 +00006//
7//===----------------------------------------------------------------------===//
8// Utils that are used to perform analyzes related to guards and their
9// conditions.
10//===----------------------------------------------------------------------===//
11
12#include "llvm/Analysis/GuardUtils.h"
13#include "llvm/IR/PatternMatch.h"
14
15using namespace llvm;
16
17bool llvm::isGuard(const User *U) {
18 using namespace llvm::PatternMatch;
19 return match(U, m_Intrinsic<Intrinsic::experimental_guard>());
20}