LLVM  15.0.0git
SSAContext.h
Go to the documentation of this file.
1 //===- SSAContext.h ---------------------------------------------*- 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 /// \file
9 ///
10 /// This file declares a specialization of the GenericSSAContext<X>
11 /// class template for LLVM IR.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_IR_SSACONTEXT_H
16 #define LLVM_IR_SSACONTEXT_H
17 
18 #include "llvm/Support/Printable.h"
19 
20 namespace llvm {
21 class BasicBlock;
22 class Function;
23 class Instruction;
24 class Value;
25 template <typename, bool> class DominatorTreeBase;
26 template <typename _FunctionT> class GenericSSAContext;
27 
28 template <> class GenericSSAContext<Function> {
29  Function *F;
30 
31 public:
32  using BlockT = BasicBlock;
35  using ValueRefT = Value *;
37 
38  static BasicBlock *getEntryBlock(Function &F);
39 
40  void setFunction(Function &Fn);
41  Function *getFunction() const { return F; }
42 
43  Printable print(BasicBlock *Block) const;
44  Printable print(Instruction *Inst) const;
45  Printable print(Value *Value) const;
46 };
47 
49 
50 } // namespace llvm
51 
52 #endif // LLVM_IR_SSACONTEXT_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
print
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
Definition: ArchiveWriter.cpp:189
Printable.h
llvm::Function
Definition: Function.h:60
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::BasicBlock
LLVM Basic Block Representation.
Definition: BasicBlock.h:55
llvm::Instruction
Definition: Instruction.h:42
llvm::GenericSSAContext
Definition: GenericSSAContext.h:24
llvm::ISD::BasicBlock
@ BasicBlock
Various leaf nodes.
Definition: ISDOpcodes.h:71
llvm::DominatorTreeBase
Core dominator tree base class.
Definition: LoopInfo.h:65
llvm::GenericSSAContext< Function >
Definition: SSAContext.h:28
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::Printable
Simple wrapper around std::function<void(raw_ostream&)>.
Definition: Printable.h:38
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::codeview::PublicSymFlags::Function
@ Function
llvm::GenericSSAContext< Function >::getFunction
Function * getFunction() const
Definition: SSAContext.h:41