Skip to content

Commit

Permalink
[SYCL] Add SYCL-specific address spaces fixer pass.
Browse files Browse the repository at this point in the history
Finds all addrspacecasts from named AS to private AS and
changes these casts to cast from named AS to generic AS.
Also replaces all calls and functions with new types
according with new addrspacecasts.

Signed-off-by: Vladimir Lazarev <vladimir.lazarev@intel.com>
  • Loading branch information
vladimirlaz committed Jan 22, 2019
1 parent 79a49d6 commit 65f8c24
Show file tree
Hide file tree
Showing 11 changed files with 1,113 additions and 0 deletions.
1 change: 1 addition & 0 deletions llvm/include/llvm/InitializePasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ void initializeWinEHPreparePass(PassRegistry&);
void initializeWriteBitcodePassPass(PassRegistry&);
void initializeWriteThinLTOBitcodePass(PassRegistry&);
void initializeXRayInstrumentationPass(PassRegistry&);
void initializeASFixerPass(PassRegistry&);

} // end namespace llvm

Expand Down
26 changes: 26 additions & 0 deletions llvm/include/llvm/SYCL/ASFixer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//===- ASFixer.h - SYCL address spaces fixer pass -------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// SYCL address spaces fixer pass
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_SYCL_ASFIXER_H
#define LLVM_SYCL_ASFIXER_H

#include "llvm/IR/Module.h"
#include "llvm/Pass.h"

namespace llvm {

ModulePass *createASFixerPass();

}

#endif
1 change: 1 addition & 0 deletions llvm/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ add_subdirectory(ToolDrivers)
add_subdirectory(XRay)
add_subdirectory(Testing)
add_subdirectory(WindowsManifest)
add_subdirectory(SYCL)
Loading

0 comments on commit 65f8c24

Please sign in to comment.