Loading llvm/lib/Transforms/Tapir/LoweringUtils.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -21,8 +21,10 @@ #include "llvm/Transforms/Tapir/CudaABI.h" #include "llvm/Transforms/Tapir/OpenCilkABI.h" #include "llvm/Transforms/Tapir/OpenMPABI.h" #include "llvm/Transforms/Tapir/OpenCLABI.h" #include "llvm/Transforms/Tapir/Outline.h" #include "llvm/Transforms/Tapir/QthreadsABI.h" #include "llvm/Transforms/Tapir/RealmABI.h" #include "llvm/Transforms/Tapir/SerialABI.h" #include "llvm/Transforms/Tapir/TapirLoopInfo.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" Loading Loading @@ -51,8 +53,12 @@ TapirTarget *llvm::getTapirTargetFromID(Module &M, TapirTargetID ID) { return new OpenCilkABI(M); case TapirTargetID::OpenMP: return new OpenMPABI(M); case TapirTargetID::OpenCL: return new OpenCLABI(M); case TapirTargetID::Qthreads: return new QthreadsABI(M); case TapirTargetID::Realm: return new RealmABI(M); default: llvm_unreachable("Invalid TapirTargetID"); } Loading llvm/lib/Transforms/Tapir/OpenCilkABI.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include "llvm/Transforms/Utils/EscapeEnumerator.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Transforms/Utils/TapirUtils.h" #include "llvm/Support/Process.h" using namespace llvm; Loading Loading @@ -86,8 +87,14 @@ void OpenCilkABI::prepareModule() { Type *Int32Ty = Type::getInt32Ty(C); if (UseOpenCilkRuntimeBC) { assert("" != OpenCilkRuntimeBCPath && "Missing path to OpenCilk runtime bitcode file."); Optional<std::string> path; if("" == OpenCilkRuntimeBCPath){ path = sys::Process::FindInEnvPath("LD_LIBRARY_PATH", "libopencilk-abi.bc"); assert(path.hasValue() && "Couldn't find OpenCilk runtime bitcode file in LD_LIBRARY_PATH."); } else { path = OpenCilkRuntimeBCPath.getValue(); } LLVM_DEBUG(dbgs() << "Using external bitcode file for OpenCilk ABI: " << OpenCilkRuntimeBCPath << "\n"); SMDiagnostic SMD; Loading @@ -95,7 +102,7 @@ void OpenCilkABI::prepareModule() { // Parse the bitcode file. This call imports structure definitions, but not // function definitions. std::unique_ptr<Module> ExternalModule = parseIRFile(OpenCilkRuntimeBCPath.getValue(), SMD, C); parseIRFile(*path, SMD, C); // Strip any debug info from the external module. For convenience, this // Tapir target synthesizes some helper functions, like Loading Loading
llvm/lib/Transforms/Tapir/LoweringUtils.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -21,8 +21,10 @@ #include "llvm/Transforms/Tapir/CudaABI.h" #include "llvm/Transforms/Tapir/OpenCilkABI.h" #include "llvm/Transforms/Tapir/OpenMPABI.h" #include "llvm/Transforms/Tapir/OpenCLABI.h" #include "llvm/Transforms/Tapir/Outline.h" #include "llvm/Transforms/Tapir/QthreadsABI.h" #include "llvm/Transforms/Tapir/RealmABI.h" #include "llvm/Transforms/Tapir/SerialABI.h" #include "llvm/Transforms/Tapir/TapirLoopInfo.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" Loading Loading @@ -51,8 +53,12 @@ TapirTarget *llvm::getTapirTargetFromID(Module &M, TapirTargetID ID) { return new OpenCilkABI(M); case TapirTargetID::OpenMP: return new OpenMPABI(M); case TapirTargetID::OpenCL: return new OpenCLABI(M); case TapirTargetID::Qthreads: return new QthreadsABI(M); case TapirTargetID::Realm: return new RealmABI(M); default: llvm_unreachable("Invalid TapirTargetID"); } Loading
llvm/lib/Transforms/Tapir/OpenCilkABI.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include "llvm/Transforms/Utils/EscapeEnumerator.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Transforms/Utils/TapirUtils.h" #include "llvm/Support/Process.h" using namespace llvm; Loading Loading @@ -86,8 +87,14 @@ void OpenCilkABI::prepareModule() { Type *Int32Ty = Type::getInt32Ty(C); if (UseOpenCilkRuntimeBC) { assert("" != OpenCilkRuntimeBCPath && "Missing path to OpenCilk runtime bitcode file."); Optional<std::string> path; if("" == OpenCilkRuntimeBCPath){ path = sys::Process::FindInEnvPath("LD_LIBRARY_PATH", "libopencilk-abi.bc"); assert(path.hasValue() && "Couldn't find OpenCilk runtime bitcode file in LD_LIBRARY_PATH."); } else { path = OpenCilkRuntimeBCPath.getValue(); } LLVM_DEBUG(dbgs() << "Using external bitcode file for OpenCilk ABI: " << OpenCilkRuntimeBCPath << "\n"); SMDiagnostic SMD; Loading @@ -95,7 +102,7 @@ void OpenCilkABI::prepareModule() { // Parse the bitcode file. This call imports structure definitions, but not // function definitions. std::unique_ptr<Module> ExternalModule = parseIRFile(OpenCilkRuntimeBCPath.getValue(), SMD, C); parseIRFile(*path, SMD, C); // Strip any debug info from the external module. For convenience, this // Tapir target synthesizes some helper functions, like Loading