forked from hn2602439437/nudt-compiler-cpp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
537 B
26 lines
537 B
#include "mir/MIR.h"
|
|
|
|
namespace mir {
|
|
|
|
void RunMIRPreRegAllocPassPipeline(MachineModule& module) {
|
|
RunAddressHoisting(module);
|
|
|
|
constexpr int kMaxIterations = 4;
|
|
for (int iteration = 0; iteration < kMaxIterations; ++iteration) {
|
|
if (!RunPeephole(module)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
void RunMIRPostRegAllocPassPipeline(MachineModule& module) {
|
|
constexpr int kMaxIterations = 2;
|
|
for (int iteration = 0; iteration < kMaxIterations; ++iteration) {
|
|
if (!RunPeephole(module)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
} // namespace mir
|