Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
Show First 20 Lines • Show All 473 Lines • ▼ Show 20 Lines | [EnableOpt](const PassManagerBuilder &, legacy::PassManagerBase &PM) { | ||||
// and before other cleanup optimizations. | // and before other cleanup optimizations. | ||||
PM.add(createAMDGPULowerKernelAttributesPass()); | PM.add(createAMDGPULowerKernelAttributesPass()); | ||||
// Promote alloca to vector before SROA and loop unroll. If we manage | // Promote alloca to vector before SROA and loop unroll. If we manage | ||||
// to eliminate allocas before unroll we may choose to unroll less. | // to eliminate allocas before unroll we may choose to unroll less. | ||||
if (EnableOpt) | if (EnableOpt) | ||||
PM.add(createAMDGPUPromoteAllocaToVector()); | PM.add(createAMDGPUPromoteAllocaToVector()); | ||||
}); | }); | ||||
Builder.addExtension( | |||||
PassManagerBuilder::EP_LoopOptimizerEnd, | |||||
[](const PassManagerBuilder &, legacy::PassManagerBase &PM) { | |||||
// Add SROA after loop unrolling as more promotable patterns are | |||||
// exposed after small loops are fully unrolled. | |||||
PM.add(createSROAPass()); | |||||
}); | |||||
} | } | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// R600 Target Machine (R600 -> Cayman) | // R600 Target Machine (R600 -> Cayman) | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
R600TargetMachine::R600TargetMachine(const Target &T, const Triple &TT, | R600TargetMachine::R600TargetMachine(const Target &T, const Triple &TT, | ||||
StringRef CPU, StringRef FS, | StringRef CPU, StringRef FS, | ||||
▲ Show 20 Lines • Show All 725 Lines • Show Last 20 Lines |