Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 59188b6

Browse files
authored
Merge branch 'master' into catalog_update
2 parents 05b2da7 + 89ddd0b commit 59188b6

File tree

5 files changed

+31
-50
lines changed

5 files changed

+31
-50
lines changed

.travis.yml

Lines changed: 19 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ matrix:
1010
compiler: clang
1111
env:
1212
# NAME has no actual use, just to make the travis jobs overview more clear
13-
- NAME="clang Debug"
13+
- NAME="clang Debug/Tests/AddressSanitizer"
1414
- PELOTON_BUILD_TYPE=Debug
15+
- SANITIZER=Address
1516
- COVERALLS=Off
1617

1718
# Linux builds for gcc 5
@@ -32,31 +33,8 @@ matrix:
3233
- CXX=g++-5
3334
- CC=gcc-5
3435
- PELOTON_BUILD_TYPE=Debug
36+
- SANITIZER=Address
3537
- COVERALLS=On
36-
# override script value to run also tests and benchmarks
37-
script:
38-
# create build directory
39-
- mkdir build
40-
- cd build
41-
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
42-
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
43-
# build
44-
- make -j4
45-
# run tests
46-
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then make check -j4; fi
47-
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 make check -j4; fi
48-
# build benchmarks
49-
- make benchmark -j4
50-
# install peloton
51-
- make install
52-
# run psql tests
53-
- bash ../script/testing/psql/psql_test.sh
54-
# run jdbc tests
55-
- python ../script/validators/jdbc_validator.py
56-
# run junit tests
57-
- python ../script/testing/junit/run_junit.py
58-
# upload coverage info
59-
- make coveralls
6038

6139
- os: linux
6240
sudo: required
@@ -75,29 +53,8 @@ matrix:
7553
- CXX=g++-5
7654
- CC=gcc-5
7755
- PELOTON_BUILD_TYPE=Release
56+
- SANITIZER=
7857
- COVERALLS=Off
79-
# override script value to run also tests and benchmarks
80-
script:
81-
# create build directory
82-
- mkdir build
83-
- cd build
84-
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
85-
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
86-
# build
87-
- make -j4
88-
# run tests
89-
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then make check -j4; fi
90-
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 make check -j4; fi
91-
# build benchmarks
92-
- make benchmark -j4
93-
# install peloton
94-
- make install
95-
# run psql tests
96-
- bash ../script/testing/psql/psql_test.sh
97-
# run jdbc tests
98-
- python ../script/validators/jdbc_validator.py
99-
# run junit tests
100-
- python ../script/testing/junit/run_junit.py
10158

10259
install:
10360
# setup environment
@@ -114,6 +71,20 @@ script:
11471
- mkdir build
11572
- cd build
11673
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
117-
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
74+
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=$SANITIZER ..
11875
# build
11976
- make -j4
77+
# run tests
78+
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then make check -j4; fi
79+
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 make check -j4; fi
80+
# install peloton
81+
- make install
82+
# run psql tests
83+
- bash ../script/testing/psql/psql_test.sh
84+
# run jdbc tests
85+
- python ../script/validators/jdbc_validator.py
86+
# run junit tests
87+
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then python ../script/testing/junit/run_junit.py; fi
88+
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 python ../script/testing/junit/run_junit.py; fi
89+
# upload coverage info
90+
- if [[ $TRAVIS_OS_NAME == 'On' ]]; then make coveralls; fi

script/installation/packages.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ elif [ "$DISTRO" = "DARWIN" ]; then
353353
brew install python
354354
brew upgrade python
355355
brew install eigen
356+
brew install ant
356357
# Brew installs correct version of Protobuf(3.5.1 >= 3.4.0)
357358
# So we can directly install tensorflow
358359
install_tf "$TFCApiFile" "$TF_VERSION" "$LinkerConfigCmd"

src/codegen/codegen.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,19 @@ llvm::Value *CodeGen::AllocateVariable(llvm::Type *type,
9191
// matter where we insert it.
9292

9393
auto *entry_block = code_context_.GetCurrentFunction()->GetEntryBlock();
94+
#if LLVM_VERSION_GE(5, 0)
95+
if (entry_block->empty()) {
96+
return new llvm::AllocaInst(type, 0, name, entry_block);
97+
} else {
98+
return new llvm::AllocaInst(type, 0, name, &entry_block->front());
99+
}
100+
#else
94101
if (entry_block->empty()) {
95102
return new llvm::AllocaInst(type, name, entry_block);
96103
} else {
97104
return new llvm::AllocaInst(type, name, &entry_block->front());
98105
}
106+
#endif
99107
}
100108

101109
llvm::Value *CodeGen::AllocateBuffer(llvm::Type *element_type,

src/codegen/function_builder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ FunctionBuilder::~FunctionBuilder() {
143143
// Here, we just need to iterate over the arguments in the function to find a
144144
// match. The names of the arguments were provided and set at construction time.
145145
llvm::Value *FunctionBuilder::GetArgumentByName(std::string name) {
146-
for (auto &arg : func_->getArgumentList()) {
146+
for (auto &arg : func_->args()) {
147147
if (arg.getName().equals(name)) {
148148
return &arg;
149149
}

src/udf/udf_parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "udf/udf_parser.h"
1414

1515
#include "llvm/ADT/STLExtras.h"
16+
#include "llvm/Support/raw_ostream.h"
1617

1718
#include "codegen/codegen.h"
1819

@@ -45,7 +46,7 @@ void UDFParser::ParseUDF(codegen::CodeGen &cg, codegen::FunctionBuilder &fb,
4546
code_context.SetUDF(func_ptr);
4647

4748
// To check correctness of the codegened UDF
48-
func_ptr->dump();
49+
func_ptr->print(llvm::errs(), nullptr);
4950
}
5051
}
5152
}

0 commit comments

Comments
 (0)