LLVM 22.0.0git
MachineFunction.cpp File Reference
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/CodeGen/PseudoSourceValueManager.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/WasmEHFuncInfo.h"
#include "llvm/CodeGen/WinEHFuncInfo.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/EHPersonalities.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSlotTracker.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/SectionKind.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DOTGraphTraits.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <string>
#include <utility>
#include <vector>
#include "LiveDebugValues/LiveDebugValues.h"

Go to the source code of this file.

Classes

struct  llvm::DOTGraphTraits< const MachineFunction * >

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Macros

#define DEBUG_TYPE   "codegen"

Functions

static const chargetPropertyName (MachineFunctionProperties::Property Prop)
void setUnsafeStackSize (const Function &F, MachineFrameInfo &FrameInfo)
static Align getFnStackAlignment (const TargetSubtargetInfo &STI, const Function &F)
static bool CanShareConstantPoolEntry (const Constant *A, const Constant *B, const DataLayout &DL)
 Test whether the given two constants can be allocated the same constant pool entry referenced by.
template<>
std::optional< Function::ProfileCountProfileSummaryInfo::getEntryCount< llvm::MachineFunction > (const llvm::MachineFunction *F) const
Exception Handling
static const MachineInstrgetCallInstr (const MachineInstr *MI)
 Return the call machine instruction or find a call within bundle.

Variables

static cl::opt< unsignedAlignAllFunctions ("align-all-functions", cl::desc("Force the alignment of all functions in log2 format (e.g. 4 " "means align on 16B boundaries)."), cl::init(0), cl::Hidden)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "codegen"

Definition at line 82 of file MachineFunction.cpp.

Function Documentation

◆ CanShareConstantPoolEntry()

bool CanShareConstantPoolEntry ( const Constant * A,
const Constant * B,
const DataLayout & DL )
static

Test whether the given two constants can be allocated the same constant pool entry referenced by.

Parameters
A.

Definition at line 1516 of file MachineFunction.cpp.

References A(), B(), llvm::ConstantFoldCastOperand(), DL, llvm::IntegerType::get(), and llvm::isa().

Referenced by llvm::MachineConstantPool::getConstantPoolIndex().

◆ getCallInstr()

◆ getFnStackAlignment()

Align getFnStackAlignment ( const TargetSubtargetInfo & STI,
const Function & F )
inlinestatic

◆ getPropertyName()

const char * getPropertyName ( MachineFunctionProperties::Property Prop)
static

Definition at line 90 of file MachineFunction.cpp.

References llvm_unreachable, and P.

◆ ProfileSummaryInfo::getEntryCount< llvm::MachineFunction >()

template<>
std::optional< Function::ProfileCount > ProfileSummaryInfo::getEntryCount< llvm::MachineFunction > ( const llvm::MachineFunction * F) const

Definition at line 1604 of file MachineFunction.cpp.

◆ setUnsafeStackSize()

void setUnsafeStackSize ( const Function & F,
MachineFrameInfo & FrameInfo )

Variable Documentation

◆ AlignAllFunctions

cl::opt< unsigned > AlignAllFunctions("align-all-functions", cl::desc("Force the alignment of all functions in log2 format (e.g. 4 " "means align on 16B boundaries)."), cl::init(0), cl::Hidden) ( "align-all-functions" ,
cl::desc("Force the alignment of all functions in log2 format (e.g. 4 " "means align on 16B boundaries).") ,
cl::init(0) ,
cl::Hidden  )
static