|
|
|||
File indexing completed on 2026-05-10 08:43:28
0001 //===-- IntrinsicLowering.h - Intrinsic Function Lowering -------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 // 0009 // This file defines the IntrinsicLowering interface. This interface allows 0010 // addition of domain-specific or front-end specific intrinsics to LLVM without 0011 // having to modify all of the C backend or interpreter. 0012 // 0013 //===----------------------------------------------------------------------===// 0014 0015 #ifndef LLVM_CODEGEN_INTRINSICLOWERING_H 0016 #define LLVM_CODEGEN_INTRINSICLOWERING_H 0017 0018 namespace llvm { 0019 class CallInst; 0020 class DataLayout; 0021 0022 class IntrinsicLowering { 0023 const DataLayout &DL; 0024 0025 bool Warned = false; 0026 0027 public: 0028 explicit IntrinsicLowering(const DataLayout &DL) : DL(DL) {} 0029 0030 /// Replace a call to the specified intrinsic function. 0031 /// If an intrinsic function must be implemented by the code generator 0032 /// (such as va_start), this function should print a message and abort. 0033 /// 0034 /// Otherwise, if an intrinsic function call can be lowered, the code to 0035 /// implement it (often a call to a non-intrinsic function) is inserted 0036 /// _after_ the call instruction and the call is deleted. The caller must 0037 /// be capable of handling this kind of change. 0038 void LowerIntrinsicCall(CallInst *CI); 0039 0040 /// Try to replace a call instruction with a call to a bswap intrinsic. Return 0041 /// false if the call is not a simple integer bswap. 0042 static bool LowerToByteSwap(CallInst *CI); 0043 }; 0044 } 0045 0046 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|