//===- LowerGuardIntrinsic.cpp - Lower the guard intrinsic ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This pass lowers the llvm.experimental.guard intrinsic to a conditional call // to @llvm.experimental.deoptimize. Once this happens, the guard can no longer // be widened. // //===----------------------------------------------------------------------===// #include "llvm/Transforms/Scalar/LowerGuardIntrinsic.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/GuardUtils.h" #include "llvm/IR/Function.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/Module.h" #include "llvm/Transforms/Utils/GuardUtils.h" usingnamespacellvm; static bool lowerGuardIntrinsic(Function &F) { … } PreservedAnalyses LowerGuardIntrinsicPass::run(Function &F, FunctionAnalysisManager &AM) { … }