[Beignet] [PATCH 1/7] backend: Handle (but ignore) -dump-opt-asm=[PATH].
Laura Ekstrand
laura.d.ekstrand at intel.com
Mon Jul 27 10:25:11 PDT 2015
---
backend/src/backend/program.cpp | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
index b55f75a..bdccc22 100644
--- a/backend/src/backend/program.cpp
+++ b/backend/src/backend/program.cpp
@@ -641,6 +641,7 @@ namespace gbe {
const char *temp_header_path,
std::vector<std::string>& clOpt,
std::string& dumpLLVMFileName,
+ std::string& dumpASMFileName,
std::string& clName,
int& optLevel,
size_t stringSize,
@@ -725,6 +726,11 @@ namespace gbe {
continue; // Don't push this str back; ignore it.
}
+ if(str.find("-dump-opt-asm=") != std::string::npos) {
+ dumpASMFileName = str.substr(str.find("=") + 1);
+ continue; // Don't push this str back; ignore it.
+ }
+
clOpt.push_back(str);
}
free(str);
@@ -787,9 +793,10 @@ namespace gbe {
int optLevel = 1;
std::vector<std::string> clOpt;
std::string clName;
- std::string dumpLLVMFileName;
+ std::string dumpLLVMFileName, dumpASMFileName;
if (!processSourceAndOption(source, options, NULL, clOpt,
- dumpLLVMFileName, clName, optLevel,
+ dumpLLVMFileName, dumpASMFileName,
+ clName, optLevel,
stringSize, err, errSize))
return NULL;
@@ -852,9 +859,9 @@ namespace gbe {
int optLevel = 1;
std::vector<std::string> clOpt;
std::string clName;
- std::string dumpLLVMFileName;
+ std::string dumpLLVMFileName, dumpASMFileName;
if (!processSourceAndOption(source, options, temp_header_path, clOpt,
- dumpLLVMFileName, clName,
+ dumpLLVMFileName, dumpASMFileName, clName,
optLevel, stringSize, err, errSize))
return NULL;
--
2.1.0
More information about the Beignet
mailing list