LLVM 19.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
16#include "llvm/ADT/StringMap.h"
18#include "llvm/IR/ValueMap.h"
19#include <map>
20
21namespace llvm {
22
23class GlobalValue;
24class TargetMachine;
25
26/// Manages creation of pseudo source values.
28 const TargetMachine &TM;
29 const PseudoSourceValue StackPSV, GOTPSV, JumpTablePSV, ConstantPoolPSV;
30 std::map<int, std::unique_ptr<FixedStackPseudoSourceValue>> FSValues;
32 ExternalCallEntries;
33 ValueMap<const GlobalValue *,
34 std::unique_ptr<const GlobalValuePseudoSourceValue>>
35 GlobalCallEntries;
36
37public:
39
40 /// Return a pseudo source value referencing the area below the stack frame of
41 /// a function, e.g., the argument space.
43
44 /// Return a pseudo source value referencing the global offset table
45 /// (or something the like).
47
48 /// Return a pseudo source value referencing the constant pool. Since constant
49 /// pools are constant, this doesn't need to identify a specific constant
50 /// pool entry.
52
53 /// Return a pseudo source value referencing a jump table. Since jump tables
54 /// are constant, this doesn't need to identify a specific jump table.
56
57 /// Return a pseudo source value referencing a fixed stack frame entry,
58 /// e.g., a spill slot.
59 const PseudoSourceValue *getFixedStack(int FI);
60
62
63 const PseudoSourceValue *getExternalSymbolCallEntry(const char *ES);
64};
65
66} // end namespace llvm
67
68#endif
This file defines the StringMap class.
const char LLVMTargetMachineRef TM
Manages creation of pseudo source values.
const PseudoSourceValue * getJumpTable()
Return a pseudo source value referencing a jump table.
const PseudoSourceValue * getExternalSymbolCallEntry(const char *ES)
const PseudoSourceValue * getFixedStack(int FI)
Return a pseudo source value referencing a fixed stack frame entry, e.g., a spill slot.
const PseudoSourceValue * getGOT()
Return a pseudo source value referencing the global offset table (or something the like).
const PseudoSourceValue * getGlobalValueCallEntry(const GlobalValue *GV)
const PseudoSourceValue * getStack()
Return a pseudo source value referencing the area below the stack frame of a function,...
const PseudoSourceValue * getConstantPool()
Return a pseudo source value referencing the constant pool.
Special value supplied for machine level alias analysis.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:127
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:76
See the file comment.
Definition: ValueMap.h:84
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18