aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2023-11-04 12:55:39 -0700
committerGitHub <noreply@github.com>2023-11-04 20:55:39 +0100
commitb23c01e8cc3b14d17a13b6501d18d23904944a04 (patch)
tree61312657170c3a4f83be3af367fe9b8067edc93e /lib/compilers
parent971889e5d77be91b854ab9376613b51d3ea6aec9 (diff)
downloadcompiler-explorer-b23c01e8cc3b14d17a13b6501d18d23904944a04.tar.gz
compiler-explorer-b23c01e8cc3b14d17a13b6501d18d23904944a04.zip
Support the opt pipeline view in dxc for HLSL (#5704)gh-9393
Diffstat (limited to 'lib/compilers')
-rw-r--r--lib/compilers/hlsl.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/compilers/hlsl.ts b/lib/compilers/hlsl.ts
index 26d5423b1..f103869b7 100644
--- a/lib/compilers/hlsl.ts
+++ b/lib/compilers/hlsl.ts
@@ -22,7 +22,6 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
-import path from 'path';
import _ from 'underscore';
import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
@@ -40,6 +39,10 @@ export class HLSLCompiler extends BaseCompiler {
this.compiler.supportsIntel = false;
this.spirvAsm = new SPIRVAsmParser(this.compilerProps);
+
+ this.compiler.supportsLLVMOptPipelineView = true;
+ this.compiler.llvmOptArg = ['-print-before-all', '-print-after-all'];
+ this.compiler.llvmOptNoDiscardValueNamesArg = [];
}
override async generateAST(inputFilename, options) {
@@ -91,10 +94,6 @@ export class HLSLCompiler extends BaseCompiler {
return options;
}
- override getIrOutputFilename(inputFilename: string) {
- return this.getOutputFilename(path.dirname(inputFilename), this.outputFilebase).replace('.s', '.dxil');
- }
-
override async processAsm(result, filters, options) {
if (this.isSpirv(result.asm)) {
return this.spirvAsm.processAsm(result.asm, filters);