4
Makefile
4
Makefile
@@ -83,6 +83,10 @@ ifeq ($(LLVM_VERSION),LLVM_3_4)
|
|||||||
ISPC_LIBS += -lcurses
|
ISPC_LIBS += -lcurses
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(LLVM_VERSION),LLVM_3_5)
|
||||||
|
ISPC_LIBS += -lcurses
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH_OS),Linux)
|
ifeq ($(ARCH_OS),Linux)
|
||||||
ISPC_LIBS += -ldl
|
ISPC_LIBS += -ldl
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -2196,7 +2196,7 @@ bool CWriter::doInitialization(llvm::Module &M) {
|
|||||||
#endif
|
#endif
|
||||||
TAsm = new CBEMCAsmInfo();
|
TAsm = new CBEMCAsmInfo();
|
||||||
MRI = new llvm::MCRegisterInfo();
|
MRI = new llvm::MCRegisterInfo();
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
TCtx = new llvm::MCContext(TAsm, MRI, NULL);
|
TCtx = new llvm::MCContext(TAsm, MRI, NULL);
|
||||||
#else
|
#else
|
||||||
TCtx = new llvm::MCContext(*TAsm, *MRI, NULL);
|
TCtx = new llvm::MCContext(*TAsm, *MRI, NULL);
|
||||||
|
|||||||
2
ctx.cpp
2
ctx.cpp
@@ -348,7 +348,7 @@ FunctionEmitContext::FunctionEmitContext(Function *func, Symbol *funSym,
|
|||||||
AssertPos(currentPos, diSubprogramType.Verify());
|
AssertPos(currentPos, diSubprogramType.Verify());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
Assert(diSubprogramType.isCompositeType());
|
Assert(diSubprogramType.isCompositeType());
|
||||||
llvm::DICompositeType diSubprogramType_n =
|
llvm::DICompositeType diSubprogramType_n =
|
||||||
static_cast<llvm::DICompositeType>(diSubprogramType);
|
static_cast<llvm::DICompositeType>(diSubprogramType);
|
||||||
|
|||||||
24
ispc.cpp
24
ispc.cpp
@@ -312,7 +312,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 32;
|
this->m_dataTypeWidth = 32;
|
||||||
this->m_vectorWidth = 4;
|
this->m_vectorWidth = 4;
|
||||||
this->m_attributes = "+sse,+sse2,-sse3,-sse4a,-ssse3,-popcnt"
|
this->m_attributes = "+sse,+sse2,-sse3,-sse4a,-ssse3,-popcnt"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",-sse4.1,-sse4.2"
|
",-sse4.1,-sse4.2"
|
||||||
#else
|
#else
|
||||||
",-sse41,-sse42"
|
",-sse41,-sse42"
|
||||||
@@ -328,7 +328,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 32;
|
this->m_dataTypeWidth = 32;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
this->m_attributes = "+sse,+sse2,-sse3,-sse4a,-ssse3,-popcnt"
|
this->m_attributes = "+sse,+sse2,-sse3,-sse4a,-ssse3,-popcnt"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",-sse4.1,-sse4.2"
|
",-sse4.1,-sse4.2"
|
||||||
#else
|
#else
|
||||||
",-sse41,-sse42"
|
",-sse41,-sse42"
|
||||||
@@ -345,7 +345,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_vectorWidth = 4;
|
this->m_vectorWidth = 4;
|
||||||
// TODO: why not sse42 and popcnt?
|
// TODO: why not sse42 and popcnt?
|
||||||
this->m_attributes = "+sse,+sse2,+sse3,-sse4a,+ssse3,-popcnt,+cmov"
|
this->m_attributes = "+sse,+sse2,+sse3,-sse4a,+ssse3,-popcnt,+cmov"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+sse4.1,-sse4.2"
|
",+sse4.1,-sse4.2"
|
||||||
#else
|
#else
|
||||||
",+sse41,-sse42"
|
",+sse41,-sse42"
|
||||||
@@ -362,7 +362,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 32;
|
this->m_dataTypeWidth = 32;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
this->m_attributes = "+sse,+sse2,+sse3,-sse4a,+ssse3,-popcnt,+cmov"
|
this->m_attributes = "+sse,+sse2,+sse3,-sse4a,+ssse3,-popcnt,+cmov"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+sse4.1,-sse4.2"
|
",+sse4.1,-sse4.2"
|
||||||
#else
|
#else
|
||||||
",+sse41,-sse42"
|
",+sse41,-sse42"
|
||||||
@@ -377,7 +377,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 8;
|
this->m_dataTypeWidth = 8;
|
||||||
this->m_vectorWidth = 16;
|
this->m_vectorWidth = 16;
|
||||||
this->m_attributes = "+sse,+sse2,+sse3,-sse4a,+ssse3,-popcnt,+cmov"
|
this->m_attributes = "+sse,+sse2,+sse3,-sse4a,+ssse3,-popcnt,+cmov"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+sse4.1,-sse4.2"
|
",+sse4.1,-sse4.2"
|
||||||
#else
|
#else
|
||||||
",+sse41,-sse42"
|
",+sse41,-sse42"
|
||||||
@@ -392,7 +392,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 16;
|
this->m_dataTypeWidth = 16;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
this->m_attributes = "+sse,+sse2,+sse3,-sse4a,+ssse3,-popcnt,+cmov"
|
this->m_attributes = "+sse,+sse2,+sse3,-sse4a,+ssse3,-popcnt,+cmov"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+sse4.1,-sse4.2"
|
",+sse4.1,-sse4.2"
|
||||||
#else
|
#else
|
||||||
",+sse41,-sse42"
|
",+sse41,-sse42"
|
||||||
@@ -512,7 +512,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 32;
|
this->m_dataTypeWidth = 32;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
this->m_attributes = "+avx,+popcnt,+cmov,+f16c"
|
this->m_attributes = "+avx,+popcnt,+cmov,+f16c"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+rdrnd"
|
",+rdrnd"
|
||||||
#else
|
#else
|
||||||
",+rdrand"
|
",+rdrand"
|
||||||
@@ -533,7 +533,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 32;
|
this->m_dataTypeWidth = 32;
|
||||||
this->m_vectorWidth = 16;
|
this->m_vectorWidth = 16;
|
||||||
this->m_attributes = "+avx,+popcnt,+cmov,+f16c"
|
this->m_attributes = "+avx,+popcnt,+cmov,+f16c"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+rdrnd"
|
",+rdrnd"
|
||||||
#else
|
#else
|
||||||
",+rdrand"
|
",+rdrand"
|
||||||
@@ -553,7 +553,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 64;
|
this->m_dataTypeWidth = 64;
|
||||||
this->m_vectorWidth = 4;
|
this->m_vectorWidth = 4;
|
||||||
this->m_attributes = "+avx,+popcnt,+cmov,+f16c"
|
this->m_attributes = "+avx,+popcnt,+cmov,+f16c"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+rdrnd"
|
",+rdrnd"
|
||||||
#else
|
#else
|
||||||
",+rdrand"
|
",+rdrand"
|
||||||
@@ -574,7 +574,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 32;
|
this->m_dataTypeWidth = 32;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c"
|
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+rdrnd"
|
",+rdrnd"
|
||||||
#else
|
#else
|
||||||
",+rdrand"
|
",+rdrand"
|
||||||
@@ -599,7 +599,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 32;
|
this->m_dataTypeWidth = 32;
|
||||||
this->m_vectorWidth = 16;
|
this->m_vectorWidth = 16;
|
||||||
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c"
|
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+rdrnd"
|
",+rdrnd"
|
||||||
#else
|
#else
|
||||||
",+rdrand"
|
",+rdrand"
|
||||||
@@ -623,7 +623,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_dataTypeWidth = 64;
|
this->m_dataTypeWidth = 64;
|
||||||
this->m_vectorWidth = 4;
|
this->m_vectorWidth = 4;
|
||||||
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c"
|
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c"
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
",+rdrnd"
|
",+rdrnd"
|
||||||
#else
|
#else
|
||||||
",+rdrand"
|
",+rdrand"
|
||||||
|
|||||||
4
ispc.h
4
ispc.h
@@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
#define ISPC_VERSION "1.5.1dev"
|
#define ISPC_VERSION "1.5.1dev"
|
||||||
|
|
||||||
#if !defined(LLVM_3_1) && !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4)
|
#if !defined(LLVM_3_1) && !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4) && !defined(LLVM_3_5)
|
||||||
#error "Only LLVM 3.1, 3.2, 3.3 and the 3.4 development branch are supported"
|
#error "Only LLVM 3.1, 3.2, 3.3, 3.4 and the 3.5 development branch are supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
|||||||
6
main.cpp
6
main.cpp
@@ -70,6 +70,8 @@ lPrintVersion() {
|
|||||||
"3.3"
|
"3.3"
|
||||||
#elif defined(LLVM_3_4)
|
#elif defined(LLVM_3_4)
|
||||||
"3.4"
|
"3.4"
|
||||||
|
#elif defined(LLVM_3_5)
|
||||||
|
"3.5"
|
||||||
#else
|
#else
|
||||||
#error "Unhandled LLVM version"
|
#error "Unhandled LLVM version"
|
||||||
#endif
|
#endif
|
||||||
@@ -164,7 +166,7 @@ devUsage(int ret) {
|
|||||||
printf(" disable-uniform-memory-optimizations\tDisable uniform-based coherent memory access\n");
|
printf(" disable-uniform-memory-optimizations\tDisable uniform-based coherent memory access\n");
|
||||||
printf(" [--yydebug]\t\t\t\tPrint debugging information during parsing\n");
|
printf(" [--yydebug]\t\t\t\tPrint debugging information during parsing\n");
|
||||||
printf(" [--debug-phase=<value>]\t\tSet optimization phases to dump. --debug-phase=first,210:220,300,305,310:last\n");
|
printf(" [--debug-phase=<value>]\t\tSet optimization phases to dump. --debug-phase=first,210:220,300,305,310:last\n");
|
||||||
#ifdef LLVM_3_4
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
printf(" [--debug-ir=<value>]\t\tSet optimization phase to generate debugIR after it\n");
|
printf(" [--debug-ir=<value>]\t\tSet optimization phase to generate debugIR after it\n");
|
||||||
#endif
|
#endif
|
||||||
printf(" [--off-phase=<value>]\t\tSwitch off optimization phases. --off-phase=first,210:220,300,305,310:last\n");
|
printf(" [--off-phase=<value>]\t\tSwitch off optimization phases. --off-phase=first,210:220,300,305,310:last\n");
|
||||||
@@ -547,7 +549,7 @@ int main(int Argc, char *Argv[]) {
|
|||||||
"away or introduce the new ones.\n");
|
"away or introduce the new ones.\n");
|
||||||
g->debug_stages = ParsingPhases(argv[i] + strlen("--debug-phase="));
|
g->debug_stages = ParsingPhases(argv[i] + strlen("--debug-phase="));
|
||||||
}
|
}
|
||||||
#ifdef LLVM_3_4
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
else if (strncmp(argv[i], "--debug-ir=", 11) == 0) {
|
else if (strncmp(argv[i], "--debug-ir=", 11) == 0) {
|
||||||
g->debugIR = ParsingPhaseName(argv[i] + strlen("--debug-ir="));
|
g->debugIR = ParsingPhaseName(argv[i] + strlen("--debug-ir="));
|
||||||
}
|
}
|
||||||
|
|||||||
4
opt.cpp
4
opt.cpp
@@ -63,7 +63,7 @@
|
|||||||
#include <llvm/IR/BasicBlock.h>
|
#include <llvm/IR/BasicBlock.h>
|
||||||
#include <llvm/IR/Constants.h>
|
#include <llvm/IR/Constants.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined (LLVM_3_4)
|
#if defined (LLVM_3_4) || defined(LLVM_3_5)
|
||||||
#include <llvm/Transforms/Instrumentation.h>
|
#include <llvm/Transforms/Instrumentation.h>
|
||||||
#endif
|
#endif
|
||||||
#include <llvm/PassManager.h>
|
#include <llvm/PassManager.h>
|
||||||
@@ -441,7 +441,7 @@ DebugPassManager::add(llvm::Pass * P, int stage = -1) {
|
|||||||
number, P->getPassName());
|
number, P->getPassName());
|
||||||
PM.add(CreateDebugPass(buf));
|
PM.add(CreateDebugPass(buf));
|
||||||
}
|
}
|
||||||
#ifdef LLVM_3_4
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
if (g->debugIR == number) {
|
if (g->debugIR == number) {
|
||||||
// adding generating of LLVM IR debug after optimization
|
// adding generating of LLVM IR debug after optimization
|
||||||
char buf[100];
|
char buf[100];
|
||||||
|
|||||||
2
type.cpp
2
type.cpp
@@ -2879,7 +2879,7 @@ FunctionType::GetDIType(llvm::DIDescriptor scope) const {
|
|||||||
for (int i = 0; i < GetNumParameters(); ++i) {
|
for (int i = 0; i < GetNumParameters(); ++i) {
|
||||||
const Type *t = GetParameterType(i);
|
const Type *t = GetParameterType(i);
|
||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
#if defined(LLVM_3_4)
|
#if defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||||
return llvm::DICompositeType();
|
return llvm::DICompositeType();
|
||||||
#else
|
#else
|
||||||
return llvm::DIType();
|
return llvm::DIType();
|
||||||
|
|||||||
Reference in New Issue
Block a user