Merge remote-tracking branch 'origin/loopinfo'

This commit is contained in:
Lixuanwang
2025-07-16 13:17:32 +08:00
6 changed files with 59 additions and 10 deletions

View File

@@ -2,6 +2,8 @@
#include "IR.h"
#include "SysYIRAnalyser.h"
#include "SysYIRPrinter.h"
namespace sysy {
class DeadCodeElimination {

View File

@@ -62,6 +62,8 @@ private:
public:
SysYIRGenerator() = default;
bool HasReturnInst;
public:
Module *get() const { return module.get(); }
IRBuilder *getBuilder(){ return &builder; }

View File

@@ -15,15 +15,16 @@ public:
public:
void printIR();
void printGlobalVariable();
void printFunction(Function *function);
void printInst(Instruction *pInst);
void printType(Type *type);
void printValue(Value *value);
public:
static void printFunction(Function *function);
static void printInst(Instruction *pInst);
static void printType(Type *type);
static void printValue(Value *value);
static std::string getOperandName(Value *operand);
std::string getTypeString(Type *type);
std::string getValueName(Value *value);
static std::string getTypeString(Type *type);
static std::string getValueName(Value *value);
};
} // namespace sysy