Changeset View
Changeset View
Standalone View
Standalone View
lib/CodeGen/TargetPassConfig.cpp
Show First 20 Lines • Show All 810 Lines • ▼ Show 20 Lines | void TargetPassConfig::addMachinePasses() { | ||||
// Expand pseudo-instructions emitted by ISel. | // Expand pseudo-instructions emitted by ISel. | ||||
addPass(&ExpandISelPseudosID); | addPass(&ExpandISelPseudosID); | ||||
// Add passes that optimize machine instructions in SSA form. | // Add passes that optimize machine instructions in SSA form. | ||||
if (getOptLevel() != CodeGenOpt::None) { | if (getOptLevel() != CodeGenOpt::None) { | ||||
addMachineSSAOptimization(); | addMachineSSAOptimization(); | ||||
} else { | } else { | ||||
// Ensure lowering to the appropriate memroy type occurs even when no | |||||
// optimizations are enabled. This type of lowering is required for | |||||
// correctness by the NVPTX backend. | |||||
addMachineSSALowering(); | |||||
// If the target requests it, assign local variables to stack slots relative | // If the target requests it, assign local variables to stack slots relative | ||||
// to one another and simplify frame index references where possible. | // to one another and simplify frame index references where possible. | ||||
addPass(&LocalStackSlotAllocationID, false); | addPass(&LocalStackSlotAllocationID, false); | ||||
} | } | ||||
if (TM->Options.EnableIPRA) | if (TM->Options.EnableIPRA) | ||||
addPass(createRegUsageInfoPropPass()); | addPass(createRegUsageInfoPropPass()); | ||||
▲ Show 20 Lines • Show All 323 Lines • Show Last 20 Lines |