Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:10

0001 //===- SSAContext.h ---------------------------------------------*- 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 /// \file
0009 ///
0010 /// This file declares a specialization of the GenericSSAContext<X>
0011 /// class template for LLVM IR.
0012 ///
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_IR_SSACONTEXT_H
0016 #define LLVM_IR_SSACONTEXT_H
0017 
0018 #include "llvm/ADT/GenericSSAContext.h"
0019 #include "llvm/IR/BasicBlock.h"
0020 
0021 namespace llvm {
0022 class BasicBlock;
0023 class Function;
0024 class Instruction;
0025 class Value;
0026 
0027 inline auto instrs(const BasicBlock &BB) {
0028   return llvm::make_range(BB.begin(), BB.end());
0029 }
0030 
0031 template <> struct GenericSSATraits<Function> {
0032   using BlockT = BasicBlock;
0033   using FunctionT = Function;
0034   using InstructionT = Instruction;
0035   using ValueRefT = Value *;
0036   using ConstValueRefT = const Value *;
0037   using UseT = Use;
0038 };
0039 
0040 using SSAContext = GenericSSAContext<Function>;
0041 
0042 } // namespace llvm
0043 
0044 #endif // LLVM_IR_SSACONTEXT_H