1 //===-- ExpandVectorPredication.h - Expand vector predication ---*- C++ -*-===// 2 // 3 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_CODEGEN_EXPANDVECTORPREDICATION_H 10 #define LLVM_CODEGEN_EXPANDVECTORPREDICATION_H 11 12 #include "llvm/IR/PassManager.h" 13 14 namespace llvm { 15 16 class TargetTransformInfo; 17 class VPIntrinsic; 18 19 /// Represents the details the expansion of a VP intrinsic. 20 enum class VPExpansionDetails { 21 /// No change happened during expansion. 22 IntrinsicUnchanged, 23 /// At least one operand was updated. 24 IntrinsicUpdated, 25 /// The whole intrinsic was replaced. 26 IntrinsicReplaced, 27 }; 28 29 /// Expand a vector predication intrinsic. Returns the kind of expansion 30 /// that was applied to the intrinsic. 31 VPExpansionDetails 32 expandVectorPredicationIntrinsic(VPIntrinsic &VPI, 33 const TargetTransformInfo &TTI); 34 35 } // end namespace llvm 36 37 #endif // LLVM_CODEGEN_EXPANDVECTORPREDICATION_H 38