llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
9 #include <llvm/ADT/ArrayRef.h>
10 #include <llvm/ADT/iterator_range.h>
11 #include <llvm/MC/MCRegister.h>
13 #include "core/inst.h"
14 #include "emitter/call_lowering.h"
67 llvm::ArrayRef<llvm::MCPhysReg>
GetUsedGPRs()
const;
71 llvm::ArrayRef<llvm::MCPhysReg>
GetUsedFPRs()
const;
78 void AssignArgC(
unsigned i,
FlaggedType type)
override;
80 void AssignArgOCaml(
unsigned i,
FlaggedType type)
override;
82 void AssignArgOCamlAlloc(
unsigned i,
FlaggedType type)
override;
84 void AssignArgOCamlGc(
unsigned i,
FlaggedType type)
override;
86 void AssignArgXen(
unsigned i,
FlaggedType type)
override;
88 void AssignArgWin64(
unsigned i,
FlaggedType type)
override;
91 void AssignRetC(
unsigned i,
FlaggedType type)
override;
93 void AssignRetOCaml(
unsigned i,
FlaggedType type)
override;
95 void AssignRetOCamlAlloc(
unsigned i,
FlaggedType type)
override;
97 void AssignRetOCamlGc(
unsigned i,
FlaggedType type)
override;
99 void AssignRetXen(
unsigned i,
FlaggedType type)
override;
101 void AssignRetWin64(
unsigned i,
FlaggedType type)
override;
104 void AssignArgReg(ArgLoc &loc, llvm::MVT vt, llvm::Register reg);
106 void AssignArgStack(ArgLoc &loc, llvm::MVT type,
unsigned size);
108 void AssignRetReg(RetLoc &loc, llvm::MVT vt, llvm::Register reg);
111 llvm::ArrayRef<llvm::MCPhysReg> GetGPRs()
const;
113 llvm::ArrayRef<llvm::MCPhysReg> GetFPRs()
const;
unsigned GetFrameSize() const override
Returns the number of bytes allocated on the stack.
Definition: aarch64call.h:74
void AnalyseFunc(const Func *func)
Analyse a function.
Definition: call_lowering.cpp:64
void AnalyseReturn(const ReturnInst *inst)
Analyse a return instruction.
Definition: call_lowering.cpp:73
Definition: aarch64call.h:27
AArch64Call(const LandingPadInst *inst)
Analyses a return site.
Definition: aarch64call.h:51
Definition: call_lowering.h:21
void AnalyseRaise(const RaiseInst *inst)
Analyse a raise instruction.
Definition: call_lowering.cpp:82
llvm::ArrayRef< llvm::MCPhysReg > GetUsedFPRs() const
Returns the used FPRs.
Definition: aarch64call.cpp:91
AArch64Call(const Func *func)
Analyses a function for arguments.
Definition: aarch64call.h:30
AArch64Call(const RaiseInst *inst)
Analyses a raise site.
Definition: aarch64call.h:58
void AnalyseCall(const CallSite *call)
Analyse a call.
Definition: call_lowering.cpp:48
AArch64Call(const CallSite *inst)
Analyses a call site.
Definition: aarch64call.h:37
llvm::ArrayRef< llvm::MCPhysReg > GetUnusedGPRs() const
Returns unused GPRs.
Definition: aarch64call.cpp:70
void AnalysePad(const LandingPadInst *inst)
Analyse a landing pad instruction.
Definition: call_lowering.cpp:91
llvm::ArrayRef< llvm::MCPhysReg > GetUsedGPRs() const
Returns the used GPRs.
Definition: aarch64call.cpp:77
AArch64Call(const ReturnInst *inst)
Analyses a return site.
Definition: aarch64call.h:44
llvm::ArrayRef< llvm::MCPhysReg > GetUnusedFPRs() const
Returns unused FPRs.
Definition: aarch64call.cpp:84