|
@@ -587,8 +587,7 @@ void SpirvEmitter::HandleTranslationUnit(ASTContext &context) {
|
|
|
needsLegalization = needsLegalization ||
|
|
|
declIdMapper.requiresLegalization() ||
|
|
|
spirvOptions.flattenResourceArrays ||
|
|
|
- declIdMapper.requiresFlatteningCompositeResources() ||
|
|
|
- spirvOptions.debugInfoRich;
|
|
|
+ declIdMapper.requiresFlatteningCompositeResources();
|
|
|
|
|
|
// Run legalization passes
|
|
|
if (needsLegalization) {
|
|
@@ -606,8 +605,7 @@ void SpirvEmitter::HandleTranslationUnit(ASTContext &context) {
|
|
|
}
|
|
|
|
|
|
// Run optimization passes
|
|
|
- if (!spirvOptions.debugInfoRich &&
|
|
|
- theCompilerInstance.getCodeGenOpts().OptimizationLevel > 0) {
|
|
|
+ if (theCompilerInstance.getCodeGenOpts().OptimizationLevel > 0) {
|
|
|
std::string messages;
|
|
|
if (!spirvToolsOptimize(&m, &messages)) {
|
|
|
emitFatalError("failed to optimize SPIR-V: %0", {}) << messages;
|