Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
name: ${{ matrix.title }}
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
timeout-minutes: 60
timeout-minutes: 75
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
name: AMD64 macOS 11 C++
runs-on: macos-latest
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
timeout-minutes: 60
timeout-minutes: 75
strategy:
fail-fast: false
env:
Expand Down Expand Up @@ -179,7 +179,11 @@ jobs:
key: cpp-ccache-macos-${{ hashFiles('cpp/**') }}
restore-keys: cpp-ccache-macos-
- name: Build
run: ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
# use brew version of clang, to be consistent with LLVM lib, see ARROW-17790.
run: |
export CC=$(brew --prefix llvm)/bin/clang
export CXX=$(brew --prefix llvm)/bin/clang++
ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
- name: Test
shell: bash
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ jobs:
-r python/requirements-test.txt
- name: Build
shell: bash
# use brew version of clang, to be consistent with LLVM lib, see ARROW-17790.
run: |
export CC=$(brew --prefix llvm)/bin/clang
export CXX=$(brew --prefix llvm)/bin/clang++
export PYTHON=python3
ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
ci/scripts/python_build.sh $(pwd) $(pwd)/build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ jobs:
key: ruby-ccache-macos-${{ hashFiles('cpp/**') }}
restore-keys: ruby-ccache-macos-
- name: Build C++
# use brew version of clang, to be consistent with LLVM lib, see ARROW-17790.
run: |
export CC=$(brew --prefix llvm)/bin/clang
export CXX=$(brew --prefix llvm)/bin/clang++
ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
- name: Build GLib
run: |
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/arrow/array/array_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2831,8 +2831,6 @@ class DecimalTest : public ::testing::TestWithParam<int> {
auto type = std::make_shared<TYPE>(precision, 4);
auto builder = std::make_shared<DecimalBuilder>(type);

size_t null_count = 0;

const size_t size = draw.size();

ARROW_EXPECT_OK(builder->Reserve(size));
Expand All @@ -2842,7 +2840,6 @@ class DecimalTest : public ::testing::TestWithParam<int> {
ARROW_EXPECT_OK(builder->Append(draw[i]));
} else {
ARROW_EXPECT_OK(builder->AppendNull());
++null_count;
}
}

Expand Down
1 change: 1 addition & 0 deletions cpp/src/arrow/filesystem/gcsfs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <algorithm> // Missing include in boost/process

#define BOOST_NO_CXX98_FUNCTION_BASE // ARROW-17805
// This boost/asio/io_context.hpp include is needless for no MinGW
// build.
//
Expand Down
1 change: 1 addition & 0 deletions cpp/src/arrow/filesystem/s3_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#ifdef __MINGW32__
#include <boost/asio/io_context.hpp>
#endif
#define BOOST_NO_CXX98_FUNCTION_BASE // ARROW-17805
// We need BOOST_USE_WINDOWS_H definition with MinGW when we use
// boost/process.hpp. See BOOST_USE_WINDOWS_H=1 in
// cpp/cmake_modules/ThirdpartyToolchain.cmake for details.
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/arrow/flight/test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
// We need Windows fixes before including Boost
#include "arrow/util/windows_compatibility.h"

#include <gtest/gtest.h>
#include <boost/filesystem.hpp>
#define BOOST_NO_CXX98_FUNCTION_BASE // ARROW-17805
// We need BOOST_USE_WINDOWS_H definition with MinGW when we use
// boost/process.hpp. See BOOST_USE_WINDOWS_H=1 in
// cpp/cmake_modules/ThirdpartyToolchain.cmake for details.
#include <gtest/gtest.h>
#include <boost/process.hpp>

#include "arrow/array.h"
Expand Down
13 changes: 7 additions & 6 deletions cpp/src/gandiva/decimal_ir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ void DecimalIR::InitializeIntrinsics() {
// CPP: return kScaleMultipliers[scale]
llvm::Value* DecimalIR::GetScaleMultiplier(llvm::Value* scale) {
auto const_array = module()->getGlobalVariable(kScaleMultipliersName);
auto ptr = CreateGEP(ir_builder(), const_array, {types()->i32_constant(0), scale});
return CreateLoad(ir_builder(), ptr);
auto ptr = ir_builder()->CreateGEP(const_array->getValueType(), const_array,
{types()->i32_constant(0), scale});
return ir_builder()->CreateLoad(types()->i128_type(), ptr);
}

// CPP: x <= y ? y : x
Expand Down Expand Up @@ -248,8 +249,8 @@ llvm::Value* DecimalIR::AddLarge(const ValueFull& x, const ValueFull& y,
ir_builder()->CreateCall(module()->getFunction("add_large_decimal128_decimal128"),
args);

auto out_high = CreateLoad(ir_builder(), out_high_ptr);
auto out_low = CreateLoad(ir_builder(), out_low_ptr);
auto out_high = ir_builder()->CreateLoad(types()->i64_type(), out_high_ptr);
auto out_low = ir_builder()->CreateLoad(types()->i64_type(), out_low_ptr);
auto sum = ValueSplit(out_high, out_low).AsInt128(this);
ADD_TRACE_128("AddLarge : sum", sum);
return sum;
Expand Down Expand Up @@ -445,8 +446,8 @@ llvm::Value* DecimalIR::CallDecimalFunction(const std::string& function_name,
// Make call to pre-compiled IR function.
ir_builder()->CreateCall(module()->getFunction(function_name), dis_assembled_args);

auto out_high = CreateLoad(ir_builder(), out_high_ptr);
auto out_low = CreateLoad(ir_builder(), out_low_ptr);
auto out_high = ir_builder()->CreateLoad(i64, out_high_ptr);
auto out_low = ir_builder()->CreateLoad(i64, out_low_ptr);
result = ValueSplit(out_high, out_low).AsInt128(this);
} else {
DCHECK_NE(return_type, types()->void_type());
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/gandiva/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ Status Engine::LoadPreCompiledIR() {
Status::CodeGenError("Could not load module from IR: ",
buffer_or_error.getError().message()));

std::unique_ptr<llvm::MemoryBuffer> buffer = move(buffer_or_error.get());
std::unique_ptr<llvm::MemoryBuffer> buffer = std::move(buffer_or_error.get());

/// Parse the IR module.
llvm::Expected<std::unique_ptr<llvm::Module>> module_or_error =
llvm::getOwningLazyBitcodeModule(move(buffer), *context());
llvm::getOwningLazyBitcodeModule(std::move(buffer), *context());
if (!module_or_error) {
// NOTE: llvm::handleAllErrors() fails linking with RTTI-disabled LLVM builds
// (ARROW-5148)
Expand All @@ -247,14 +247,14 @@ Status Engine::LoadPreCompiledIR() {
stream << module_or_error.takeError();
return Status::CodeGenError(stream.str());
}
std::unique_ptr<llvm::Module> ir_module = move(module_or_error.get());
std::unique_ptr<llvm::Module> ir_module = std::move(module_or_error.get());

// set dataLayout
SetDataLayout(ir_module.get());

ARROW_RETURN_IF(llvm::verifyModule(*ir_module, &llvm::errs()),
Status::CodeGenError("verify of IR Module failed"));
ARROW_RETURN_IF(llvm::Linker::linkModules(*module_, move(ir_module)),
ARROW_RETURN_IF(llvm::Linker::linkModules(*module_, std::move(ir_module)),
Status::CodeGenError("failed to link IR Modules"));

return Status::OK();
Expand Down
5 changes: 3 additions & 2 deletions cpp/src/gandiva/engine_llvm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ class TestEngine : public ::testing::Test {
loop_var->addIncoming(loop_update, loop_body);

// get the current value
llvm::Value* offset = CreateGEP(builder, arg_elements, loop_var, "offset");
llvm::Value* current_value = CreateLoad(builder, offset, "value");
llvm::Value* offset =
builder->CreateGEP(types->i64_type(), arg_elements, loop_var, "offset");
llvm::Value* current_value = builder->CreateLoad(types->i64_type(), offset, "value");

// setup sum PHI
llvm::Value* sum_update = builder->CreateAdd(sum, current_value, "sum+ith");
Expand Down
Loading