LLVM 22.0.0git
PseudoSourceValueManager.h
Go to the documentation of this file.
1//===-- llvm/CodeGen/PseudoSourceValueManager.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//
9// This file contains the declaration of the PseudoSourceValueManager class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CODEGEN_PSEUDOSOURCEVALUEMANAGER_H
14#define LLVM_CODEGEN_PSEUDOSOURCEVALUEMANAGER_H
15
17#include "llvm/ADT/StringMap.h"
19#include "llvm/IR/ValueMap.h"
21
22namespace llvm {
23
24class GlobalValue;
25class TargetMachine;
26
27/// Manages creation of pseudo source values.
29 const TargetMachine &TM;
30 const PseudoSourceValue StackPSV, GOTPSV, JumpTablePSV, ConstantPoolPSV;
33 ExternalCallEntries;
34 ValueMap<const GlobalValue *,
35 std::unique_ptr<const GlobalValuePseudoSourceValue>>
36 GlobalCallEntries;
37
38public:
40
41 /// Return a pseudo source value referencing the area below the stack frame of
42 /// a function, e.g., the argument space.
44
45 /// Return a pseudo source value referencing the global offset table
46 /// (or something the like).
48
49 /// Return a pseudo source value referencing the constant pool. Since constant
50 /// pools are constant, this doesn't need to identify a specific constant
51 /// pool entry.
53
54 /// Return a pseudo source value referencing a jump table. Since jump tables
55 /// are constant, this doesn't need to identify a specific jump table.
57
58 /// Return a pseudo source value referencing a fixed stack frame entry,
59 /// e.g., a spill slot.
61
64
66};
67
68} // end namespace llvm
69
70#endif
This file defines the StringMap class.
#define LLVM_ABI
Definition Compiler.h:213
This file defines the SmallVector class.
LLVM_ABI const PseudoSourceValue * getJumpTable()
Return a pseudo source value referencing a jump table.
LLVM_ABI const PseudoSourceValue * getExternalSymbolCallEntry(const char *ES)
LLVM_ABI const PseudoSourceValue * getFixedStack(int FI)
Return a pseudo source value referencing a fixed stack frame entry, e.g., a spill slot.
LLVM_ABI const PseudoSourceValue * getGOT()
Return a pseudo source value referencing the global offset table (or something the like).
LLVM_ABI const PseudoSourceValue * getGlobalValueCallEntry(const GlobalValue *GV)
LLVM_ABI const PseudoSourceValue * getStack()
Return a pseudo source value referencing the area below the stack frame of a function,...
LLVM_ABI const PseudoSourceValue * getConstantPool()
Return a pseudo source value referencing the constant pool.
LLVM_ABI PseudoSourceValueManager(const TargetMachine &TM)
Special value supplied for machine level alias analysis.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition StringMap.h:133
Primary interface to the complete machine description for the target machine.
See the file comment.
Definition ValueMap.h:84
This is an optimization pass for GlobalISel generic memory operations.