summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2016-05-17 16:02:35 +0200
committerFrancisco Jerez <currojerez@riseup.net>2016-07-11 20:20:05 -0700
commit11afde89b82174c499007b79152a38fd61839c57 (patch)
treede9bd33ea5e9cf4163bfd5c4661f2af1d598938f /src/gallium
parent600ac51448f0dc62808e962a206d11e1b179a32f (diff)
clover/llvm: Drop dead code.
This ifdef'ed out code was meant to handle compilation into TGSI, but it doesn't seem likely that it will ever be useful even if the TGSI back-end is resurrected because the TGSI bitcode can just be plumbed through in ELF format and dealt with as a regular "native" back-end. Reviewed-by: Serge Martin <edb+mesa@sigluy.net> Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 4d0f0f8a10d..b9255a8ae48 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -84,46 +84,6 @@
using namespace clover;
namespace {
-#if 0
- void
- build_binary(const std::string &source, const std::string &target,
- const std::string &name) {
- clang::CompilerInstance c;
- clang::EmitObjAction act(&llvm::getGlobalContext());
- std::string log;
- llvm::raw_string_ostream s_log(log);
-
- LLVMInitializeTGSITarget();
- LLVMInitializeTGSITargetInfo();
- LLVMInitializeTGSITargetMC();
- LLVMInitializeTGSIAsmPrinter();
-
- c.getFrontendOpts().Inputs.push_back(
- std::make_pair(clang::IK_OpenCL, name));
- c.getHeaderSearchOpts().UseBuiltinIncludes = false;
- c.getHeaderSearchOpts().UseStandardIncludes = false;
- c.getLangOpts().NoBuiltin = true;
- c.getTargetOpts().Triple = target;
- c.getInvocation().setLangDefaults(clang::IK_OpenCL);
- c.createDiagnostics(0, NULL, new clang::TextDiagnosticPrinter(
- s_log, c.getDiagnosticOpts()));
-
- c.getPreprocessorOpts().addRemappedFile(
- name, llvm::MemoryBuffer::getMemBuffer(source));
-
- if (!c.ExecuteAction(act))
- throw compile_error(log);
- }
-
- module
- load_binary(const char *name) {
- std::ifstream fs((name));
- std::vector<unsigned char> str((std::istreambuf_iterator<char>(fs)),
- (std::istreambuf_iterator<char>()));
- compat::istream cs(str);
- return module::deserialize(cs);
- }
-#endif
void debug_log(const std::string &msg, const std::string &suffix) {
const char *dbg_file = debug_get_option("CLOVER_DEBUG_FILE", "stderr");
if (!strcmp("stderr", dbg_file)) {