Alexey Milovidov
c4ff517b8e
Fixed style [#CLICKHOUSE-2]
2018-05-07 05:08:38 +03:00
Alexey Milovidov
1dc1ccc1d8
Applied clang-format #2272
2018-05-07 05:08:38 +03:00
Alexey Milovidov
e26abf0ab4
Applied clang-format to some imported code [#CLICKHOUSE-2]
2018-05-07 05:08:38 +03:00
Alexey Milovidov
59bc8e1b48
Applied clang-format to some imported code [#CLICKHOUSE-2]
2018-05-07 05:07:47 +03:00
Alexey Milovidov
619a0dbd8c
Fixed style [#CLICKHOUSE-2]
2018-05-07 05:07:17 +03:00
Alexey Milovidov
90427db854
Applied clang-format #2272
2018-05-07 05:06:55 +03:00
Alexey Milovidov
598c7fddb7
Applied clang-format to some imported code [#CLICKHOUSE-2]
2018-05-07 05:06:00 +03:00
Alexey Milovidov
94369e55d3
Fixed style a bit [#CLICKHOUSE-2]
2018-05-07 05:01:29 +03:00
Alexey Milovidov
956128a67a
Fixed style a bit [#CLICKHOUSE-2]
2018-05-07 05:01:11 +03:00
Alexey Milovidov
a687c90100
Allow to link with LLVM if it was compiled without RTTI #2277
2018-05-07 03:00:12 +03:00
proller
81e2467283
Squashed commit of the following:
...
commit f1c193ea483872fee44e2969fc79a9b111a61d3d
Author: proller <proller@github.com>
Date: Sun May 6 16:28:46 2018 +0300
Clang5 build fix
commit c0ff4234747858dfd7741c90a5c77e9f8d47cd40
Merge: 852e11b
71814a3
Author: proller <proller@github.com>
Date: Sun May 6 16:04:26 2018 +0300
Merge remote-tracking branch 'upstream/master' into fix15
commit 852e11b409
Author: proller <proller@github.com>
Date: Sat May 5 20:15:40 2018 +0300
Try master
commit 2a5cebb5e5
Author: proller <proller@github.com>
Date: Sat May 5 19:34:55 2018 +0300
Try fix contrib/capnproto error with new compilers
commit bbfe581683
Merge: f493474
634ba89
Author: proller <proller@github.com>
Date: Sat May 5 19:25:01 2018 +0300
Merge remote-tracking branch 'upstream/master' into fix15
commit f49347469d
Author: proller <proller@github.com>
Date: Sat May 5 15:31:47 2018 +0300
Build fixes
2018-05-06 16:29:51 +03:00
Alexey Milovidov
71814a33d5
Fixed code #2272
2018-05-06 14:34:31 +03:00
Alexey Milovidov
9da677719c
Fixed code #2272
2018-05-06 14:34:16 +03:00
Alexey Milovidov
daed1ea0dc
Fixed code #2272
2018-05-06 14:33:19 +03:00
Alexey Milovidov
63625c0a30
Fixed code #2272
2018-05-06 14:33:03 +03:00
Alexey Milovidov
ee019183d2
Fixed code #2272
2018-05-06 14:31:14 +03:00
Alexey Milovidov
04d1c8c449
Fixed code #2272
2018-05-06 14:29:17 +03:00
Alexey Milovidov
b580d1c487
Allow to build with clang 7
2018-05-06 14:16:38 +03:00
Alexey Milovidov
6c7f896f9f
Miscellaneous #2277
2018-05-06 13:42:35 +03:00
Alexey Milovidov
69c67b4cd4
Addition to prev. revision #2277
2018-05-06 12:37:16 +03:00
Alexey Milovidov
c4a26764ce
Miscellaneous #2277
2018-05-06 12:32:36 +03:00
Alexey Milovidov
f495d8cfa5
Removed deprecated CMake function #2277
2018-05-06 12:30:35 +03:00
Alexey Milovidov
b1b95454cc
Make warning suppressions more local #2277
2018-05-06 12:29:57 +03:00
Alexey Milovidov
53f03a4909
Merge branch 'llvm-jit' of https://github.com/pyos/ClickHouse into pyos-llvm-jit
2018-05-06 12:22:42 +03:00
Alexey Milovidov
f589149189
Fixed build of embedded compiler with clang 7 [#CLICKHOUSE-2]
2018-05-06 12:04:10 +03:00
Alexey Milovidov
a8deddbc68
Removed useless code [#CLICKHOUSE-2]
2018-05-06 09:52:23 +03:00
Alexey Milovidov
4bc5163b80
Fixed build with clang 7 #2277
2018-05-06 09:35:59 +03:00
Alexey Milovidov
a227a984b5
Fixed warning found by clang 7 [#CLICKHOUSE-2]
2018-05-06 09:29:57 +03:00
Alexey Milovidov
a5dd90c35e
Added a patch for cc1as_main from clang7 #2277
2018-05-06 09:03:36 +03:00
Alexey Milovidov
2ba241b06e
Fixed build of embedded compiler with clang 7 #2277
2018-05-06 09:03:05 +03:00
Alexey Milovidov
a0f1b1f1ee
Whitespace [#CLICKHOUSE-2]
2018-05-06 05:21:59 +03:00
proller
634ba89f90
Build fixes
2018-05-05 15:34:17 +03:00
pyos
88bb2f7c25
Resolve symbols right after compiling.
...
llvm::orc::RTDyldObjectLinkingLayer::findSymbol appears to be non-threadsafe.
2018-05-05 00:38:17 +03:00
proller
7781492624
Fix user name on distributed queries ( #2292 )
...
* Fix user name on distributed queries
* wip
* fix
2018-05-05 00:21:23 +03:00
KochetovNicolai
e0addcdfec
Update ColumnVector.cpp
...
Fixed memset bytes count.
2018-05-03 20:29:53 +03:00
pyos
a286dea2e1
Don't waste time jit-compiling isolated functions.
...
This is already done ahead of time when building the executable.
2018-05-03 16:34:42 +03:00
Vitaliy Lyudvichenko
63cc34d3f6
Fixed incorrect failed OP detection in ZooKeeper. [#CLICKHOUSE-2]
2018-05-03 16:34:19 +03:00
pyos
23bbf632e5
If all inputs to a jitted function are constant, return a constant
2018-05-03 16:33:40 +03:00
pyos
accbbdb9e3
Add a setting that disables jit-compilation
2018-05-03 00:48:20 +03:00
pyos
900b92f744
Merge API changes from upstream
2018-05-01 22:52:33 +03:00
pyos
27f12eeaa3
Merge branch 'master' of https://github.com/yandex/ClickHouse into llvm-jit
2018-05-01 22:51:37 +03:00
alexey-milovidov
52c58d3a82
Merge pull request #2308 from ilyshnikova/master
...
Without std::move
2018-05-01 12:35:57 -07:00
Tsarkova Anastasia
3a36569439
Without std::move
2018-05-01 21:34:42 +02:00
alexey-milovidov
81161be755
Merge pull request #2307 from ilyshnikova/master
...
Without std::move
2018-05-01 12:32:37 -07:00
Tsarkova Anastasia
8245dc3f6a
Without std::move
2018-05-01 21:31:01 +02:00
alexey-milovidov
cb221cee29
Merge pull request #2306 from ilyshnikova/master
...
struct instead of class
2018-05-01 12:20:03 -07:00
Tsarkova Anastasia
ba901ebc3f
struct instead of class
2018-05-01 21:18:13 +02:00
alexey-milovidov
9be89bd0d4
Merge pull request #2272 from ilyshnikova/master
...
Conditional computations.
2018-05-01 12:08:46 -07:00
Tsarkova Anastasia
7c9741ed5b
Fix style.
2018-05-01 15:31:38 +02:00
Tsarkova Anastasia
fe0753a128
Minor fixes, adding test case.
2018-05-01 15:24:43 +02:00
pyos
7483ed24f0
Implement jit for logic functions
2018-05-01 14:43:15 +03:00
Tsarkova Anastasia
210a389592
Getting rid of measure action, other small fixes applied.
2018-04-30 21:33:32 +02:00
pyos
e4ace21f24
Remove laziness on nullable arguments from default implementation
...
It breaks semantics, sadly.
2018-04-30 15:35:32 +03:00
pyos
4970b06b57
Remove outdated comments
2018-04-30 02:21:45 +03:00
pyos
039c377a7a
Work around a bug in llvm::IRBuilder::CreateMaxNum
2018-04-30 02:07:39 +03:00
pyos
059bbcacca
Implement jit for most arithmetic functions, remove the test function
2018-04-30 01:43:02 +03:00
pyos
7529aa55a4
Fix a bug that limited inlining depth at 2
2018-04-30 01:23:27 +03:00
Tsarkova Anastasia
a99ff6f380
Fix tests.
2018-04-29 23:48:33 +02:00
Tsarkova Anastasia
9286c98789
Fix build.
2018-04-29 23:13:01 +02:00
pyos
b4c7bee12b
Merge branch 'master' of https://github.com/yandex/ClickHouse into llvm-jit
2018-04-29 23:22:18 +03:00
pyos
72f2fea837
Extract the code that compiles a single IFunctionBase from LLVMFunction
2018-04-29 21:03:58 +03:00
pyos
1be009d485
Remove getDefaultNativeValue in favor of llvm::Constant::getNullValue
2018-04-29 20:32:30 +03:00
Tsarkova Anastasia
4bce6035b1
Merge branch 'master' into master
2018-04-29 18:02:34 +02:00
Tsarkova Anastasia
2c96b1c684
Add comments. Change projection restoring function.
2018-04-29 15:49:58 +02:00
pyos
01aaf99d75
Use C++17 fold expressions to simplify FunctionsArithmetic.h
2018-04-29 16:04:28 +03:00
pyos
fb577b1049
Hide the whole JIT API behind #if USE_EMBEDDED_COMPILER
...
Kind ugly, but at least the conditionals are used consistently now.
2018-04-29 13:48:16 +03:00
pyos
4641e2960f
Move ExpressionActions::compileFunctions to ExpressionJIT.cpp.
...
This means ExpressionJIT.h only has to expose one function.
2018-04-29 13:39:01 +03:00
pyos
08345628a2
Support {Date,DateTime,Interval,UUID,FixedString} in compiled functions
2018-04-28 18:55:48 +03:00
pyos
6e05c5ace4
compilePrologue() isn't particularly useful after all.
...
Basically the only thing it can do that compile() can't is create 'alloca'
instructions, which are only needed to get pointers to stack variables.
Given that dynamically-sized allocations aren't possible with this API,
such pointers are probably completely pointless (heh).
2018-04-28 18:11:23 +03:00
pyos
1ffc2a0775
Make LLVMFunction monotonicity computation shorter (and fix a typo-bug)
2018-04-28 17:41:24 +03:00
pyos
a1eb938ed2
Inline nullable number constants into compiled code.
...
Also, protect against some segfaults during compilation by checking
correctness of the type returned by compile().
2018-04-28 17:12:00 +03:00
pyos
ccc895d162
Represent nullable types as pairs instead of pointers.
...
Turns out LLVM has insertvalue & extractvalue for struct in registers. This is
faster than pointers because null checks are now subject to more optimizations.
2018-04-28 14:12:23 +03:00
pyos
5c75342d54
Check nativity of all types *before* calling isCompilable
2018-04-28 01:03:52 +03:00
pyos
979c4d959f
Let jit-compilable functions deal with NULLs themselves.
...
And provide a default implementation of compile() for nullable columns
that actually works and is consistent with execute().
2018-04-28 00:34:27 +03:00
alexey-milovidov
093c054b1f
Merge pull request #2263 from luc1ph3r/arbitrary-csv-delimiter
...
Support an arbitrary CSV delimiter
2018-04-27 13:13:09 -07:00
alexey-milovidov
96e2dfa790
Update SettingsCommon.h
2018-04-27 13:12:26 -07:00
pyos
49b61cd27d
Refactor LLVMFunction to make extending to DataTypeNullable easier
2018-04-27 18:44:38 +03:00
Vitaliy Lyudvichenko
e152f223c9
Fix nodes leak in case of session expiration. [#CLICKHOUSE-2]
2018-04-26 22:46:45 +03:00
pyos
a9e0b6de9f
Use system LLVMConfig.cmake with minor tweaks.
...
Should fix Travis build, finally.
2018-04-26 22:45:39 +03:00
Ivan Zhukov
4094e21be5
Code review
2018-04-26 20:41:43 +03:00
pyos
b4d527ee85
Inline compile-time constants into jitted functions.
2018-04-26 14:30:16 +03:00
pyos
c95f8a669f
Throw in untyped versions of IFunction::{isCompilable,compile}
...
IFunction inherits IFunctionBase for some reason despite not actually knowing
the types, so these two methods make no sense. The versions with DataTypes&
as an argument should be used instead.
2018-04-25 20:07:19 +03:00
pyos
9ae5fe1b6d
Minor style fixes
2018-04-25 18:33:58 +03:00
pyos
854f85dd9b
Put #if USE_EMBEDDED_COMPILER in ExpressionJIT.{cpp,h}
2018-04-25 18:19:22 +03:00
pyos
d59b0d7ec0
Add IColumn::getRawData to fixed-contiguous columns
2018-04-25 18:16:48 +03:00
pyos
6c275c27d0
Remove an unnoticed debug return
2018-04-25 16:44:24 +03:00
pyos
c419d5a1a5
Poison only columns actually used by ARRAY_JOIN and JOIN
2018-04-25 16:01:06 +03:00
pyos
5482282943
Implement informational methods for LLVMFunction
2018-04-25 16:01:06 +03:00
pyos
af7ecd4c4a
Move function compilation before insertion of REMOVE_COLUMNs
2018-04-25 16:01:06 +03:00
pyos
162a0c8b33
Fix some comments' style
2018-04-25 16:01:06 +03:00
pyos
0da110234c
Do not compile the jit if USE_EMBEDDED_COMPILER is disabled
2018-04-25 16:01:00 +03:00
pyos
1bece1de46
Support nullable columns (with default behavior) in jitted functions
2018-04-25 13:37:26 +03:00
pyos
4bd0906613
Fix some comments
2018-04-25 13:37:26 +03:00
pyos
df2d2e0b25
Tweak the jit compilation API to be more amenable to lazy computation
2018-04-25 13:37:26 +03:00
pyos
b2077a466a
Inline jit-compilable functions into other jit-compilable functions
2018-04-25 13:37:26 +03:00
pyos
3810173103
Remove IFunction::createResultColumn.
...
Given that the list of supported types is hardcoded in
LLVMContext::Data::toNativeType, this method is redundant because
LLVMPreparedFunction can create a ColumnVector itself.
2018-04-25 13:37:26 +03:00
pyos
6b526f784c
Enable the default set of LLVM optimization passes
...
I honestly can't tell if they work. LLVM has surprisingly bad API documentation.
2018-04-25 13:37:26 +03:00
pyos
8c8a8f9c0f
Extend the test jit-compilable function to arbitrary numbers
2018-04-25 13:37:25 +03:00
pyos
5f1bf11ede
Implement a loop over the columns in jit-compiled code
2018-04-25 13:37:25 +03:00
pyos
407008a4d9
Separate jit-compilability checks from actual compilation
2018-04-25 13:37:25 +03:00