LLVM 17.0.0git
|
#include "llvm/Transforms/Scalar/Reg2Mem.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PassManager.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
#include <list>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "reg2mem" |
Functions | |
STATISTIC (NumRegsDemoted, "Number of registers demoted") | |
STATISTIC (NumPhisDemoted, "Number of phi-nodes demoted") | |
static bool | valueEscapes (const Instruction &Inst) |
static bool | runPass (Function &F) |
INITIALIZE_PASS_BEGIN (RegToMemLegacy, "reg2mem", "Demote all values to stack slots", false, false) INITIALIZE_PASS_END(RegToMemLegacy | |
Variables | |
reg2mem | |
Demote all values to stack | slots |
Demote all values to stack | false |
#define DEBUG_TYPE "reg2mem" |
Definition at line 37 of file Reg2Mem.cpp.
INITIALIZE_PASS_BEGIN | ( | RegToMemLegacy | , |
"reg2mem" | , | ||
"Demote all values to stack slots" | , | ||
false | , | ||
false | |||
) |
Definition at line 55 of file Reg2Mem.cpp.
References assert(), llvm::BasicBlock::begin(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), F, llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), I, instructions, llvm::pred_empty(), and valueEscapes().
Referenced by llvm::RegToMemPass::run().
STATISTIC | ( | NumPhisDemoted | , |
"Number of phi-nodes demoted" | |||
) |
STATISTIC | ( | NumRegsDemoted | , |
"Number of registers demoted" | |||
) |
|
static |
Definition at line 42 of file Reg2Mem.cpp.
References llvm::Instruction::getParent(), llvm::Value::getType(), llvm::Type::isSized(), and llvm::Value::users().
Referenced by runPass().
Demote all values to stack false |
Definition at line 136 of file Reg2Mem.cpp.
reg2mem |
Definition at line 135 of file Reg2Mem.cpp.
Demote all values to stack slots |
Definition at line 136 of file Reg2Mem.cpp.