Commit Graph

252318 Commits

Author SHA1 Message Date
Eric Fiselier bbcf944abf Add mechanism to override LIT options using enviroment variables
llvm-svn: 292346
2017-01-18 06:08:38 +00:00
Eric Fiselier 337a7c542d Fix filesystem::path assignment from {}
Adding `path::operator=(string_type&&)` made the expression `p = {}`
ambiguous. This path fixes that ambiguity by making the `string&&`
overload a template so it ranks lower during overload resolution.

llvm-svn: 292345
2017-01-18 05:48:55 +00:00
Petr Hosek 0320314249 [CMake] Separate LLVM_ENABLE_LTO and LLVM_ENABLE_LLD
These two are independent: it's possible to use LLD without LTO,
and it's possible to do LTO build without LLD.

Differential Revision: https://reviews.llvm.org/D28821

llvm-svn: 292343
2017-01-18 05:41:17 +00:00
Eric Fiselier 673c5f9cea Get more std::string _LIBCPP_DEBUG tests passing
llvm-svn: 292342
2017-01-18 05:34:42 +00:00
Eric Fiselier 4f5f8967eb More configuration changes for running the test suite against MSVC's STL
llvm-svn: 292337
2017-01-18 03:57:38 +00:00
Rui Ueyama 40eaa9968d Return early if writeMapFile failed.
This patch adds a test for an invalid output path for -Map option,
though that test is not for verifying that we are using error()
instead of fatal() in writeMapFile.

llvm-svn: 292336
2017-01-18 03:34:38 +00:00
Aaron Watry c606efabb7 math: Add logb builtin
Ported from the amd-builtins branch.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
CC: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 292335
2017-01-18 03:14:10 +00:00
Aaron Watry 900bd7eb7f math: Add expm1 builtin function
Ported from the amd-builtins branch.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
CC: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 292334
2017-01-18 03:13:37 +00:00
Chandler Carruth 8aaad7c4d9 [LoopDeletion] (cleanup, NFC) Fix one more local variable that didn't
follow LLVM's naming conventions while I'm here.

Again, sorry I didn't spot this earlier to coalesce with other cleanup
changes.

llvm-svn: 292333
2017-01-18 02:43:01 +00:00
Chandler Carruth d50c5fb13f [PM] Teach LoopDeletion to correctly update the LPM when loops are
deleted.

I've expanded its test coverage a bit including adding one test that
will crash clearly without this change.

llvm-svn: 292332
2017-01-18 02:41:26 +00:00
Chandler Carruth 88c36d7852 [LoopDeletion] (cleanup, NFC) Make this test actually test what it
claims to test.

LoopSimplify was unifying the multiple exits in this test case, making
it never even test the multiple exit handling of LoopDeletion. Doh.

Now it works (thanks to a great idea from mkuper) and will fail if we
ever change something to make it stop working.

llvm-svn: 292331
2017-01-18 02:29:35 +00:00
Peter Collingbourne ae30386fb3 ELF: Add support for relocation type R_X86_64_8.
Although this relocation type is not part of the x86-64 psABI, I intend to
use it internally as part of the ThinLTO implementation.

Differential Revision: https://reviews.llvm.org/D28841

llvm-svn: 292330
2017-01-18 02:20:53 +00:00
Craig Topper 367c86ddbe [AVX-512] Replace subvector broadcast builtins with shufflevectors and selects.
Verified that the backend codegens this equally well.

llvm-svn: 292329
2017-01-18 02:17:10 +00:00
Matt Arsenault f411071d63 DAG: Consider nnan in isKnownNeverNaN
llvm-svn: 292328
2017-01-18 02:10:08 +00:00
Wei Mi ce9d04ce58 Revert rL292292 since it causes a SEGV on sanitizer-x86_64-linux-fuzzer build bot.
llvm-svn: 292327
2017-01-18 01:53:53 +00:00
Eric Fiselier ae2c8de6bf Add support for running our test suite against MSVC's STL
llvm-svn: 292326
2017-01-18 01:48:54 +00:00
Kostya Serebryany bb91170cb5 [libFuzzer] remove stale code
llvm-svn: 292325
2017-01-18 01:10:18 +00:00
Dan Gohman 0c5954195b [WebAssembly] Update grow_memory's return type.
The grow_memory instruction now returns the previous memory size. Add the
return type to the clang intrinsic.

llvm-svn: 292324
2017-01-18 01:03:35 +00:00
Pengxuan Zheng ac6595c960 [test-release.sh] Add Polly to the list of projects
Reviewers: zinob, hans, grosser

Reviewed By: hans, grosser

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D28712

llvm-svn: 292323
2017-01-18 01:03:29 +00:00
Dan Gohman 73e3aaa61e [WebAssembly] Update grow_memory's return type.
The grow_memory instruction now returns the previous memory size. Add the
return type to the LLVM intrinsic.

llvm-svn: 292322
2017-01-18 01:02:45 +00:00
Matthias Braun de5fea2c30 MIRParser: Allow regclass specification on operand
You can now define the register class of a virtual register on the
operand itself avoiding the need to use a "registers:" block.

Example: "%0:gr64 = COPY %rax"

Differential Revision: https://reviews.llvm.org/D22398

llvm-svn: 292321
2017-01-18 00:59:19 +00:00
Eugene Zelenko 34c23279c2 [Target, Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 292320
2017-01-18 00:57:48 +00:00
Kostya Serebryany 9d0f02af3d [libFuzzer] exit(1) on failed merge
llvm-svn: 292319
2017-01-18 00:55:29 +00:00
Kostya Serebryany 924978bb43 [libFuzzer] better link for trophies
llvm-svn: 292318
2017-01-18 00:45:02 +00:00
Justin Lebar 1cf6bf4989 [NVPTX] Support global variables of integer type larger than i64.
Reviewers: tra, majnemer

Subscribers: llvm-commits, jholewinski

Differential Revision: https://reviews.llvm.org/D28825

llvm-svn: 292316
2017-01-18 00:29:53 +00:00
Xin Tong 58e8142f0e 2 returns next to each other =). NFC
llvm-svn: 292315
2017-01-18 00:26:17 +00:00
Xin Tong 99c3da0e8b Skip loop header while we can when computing loop safety info
llvm-svn: 292310
2017-01-18 00:15:11 +00:00
Eric Fiselier f744e7e15a [LIT] Make util.executeCommand python3 friendly
Summary: The parameter `input` to `subprocess.Popen.communicate(...)` must be an object of type `bytes` . This is strictly enforced in python3. This patch (1) allows `to_bytes` to be safely called redundantly. (2) Explicitly convert `input` within `executeCommand`. This allows for usages like `executeCommand(['clang++', '-'], input='int main() {}\n')`.

Reviewers: ddunbar, BinaryKhaos, modocache, dim, EricWF

Reviewed By: EricWF

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D28736

llvm-svn: 292308
2017-01-18 00:12:41 +00:00
Justin Lebar 9c46450dbb [NVPTX] Standardize asm printer on "foo \tbar".
Some instructions were printed as "foo\tbar", but most are printed as
"foo \bar".  Standardize on the latter form.

llvm-svn: 292306
2017-01-18 00:09:36 +00:00
Justin Lebar 2a2d6f0ddd [NVPTX] Clean up nested !strconcat calls.
!strconcat is a variadic function; it will concatenate an arbitrary
number of strings.  There's no need to nest it.

llvm-svn: 292305
2017-01-18 00:09:19 +00:00
Justin Lebar cc938fc197 [NVPTX] Implement min/max in tablegen, rather than with custom DAGComine logic.
Summary:
This change also lets us use max.{s,u}16.  There's a vague warning in a
test about this maybe being less efficient, but I could not come up with
a case where the resulting SASS (sm_35 or sm_60) was different with or
without max.{s,u}16.  It's true that nvcc seems to emit only
max.{s,u}32, but even ptxas 7.0 seems to have no problem generating
efficient SASS from max.{s,u}16 (the casts up to i32 and back down to
i16 seem to be implicit and nops, happening via register aliasing).

In the absence of evidence, better to have fewer special cases, emit
more straightforward code, etc.  In particular, if a new GPU has 16-bit
min/max instructions, we want to be able to use them.

Reviewers: tra

Subscribers: jholewinski, llvm-commits

Differential Revision: https://reviews.llvm.org/D28732

llvm-svn: 292304
2017-01-18 00:09:01 +00:00
Justin Lebar 7dc3d6c341 [NVPTX] Lower integer absolute value idiom to abs instruction.
Summary: Previously we lowered it literally, to shifts and xors.

Reviewers: tra

Subscribers: jholewinski, llvm-commits

Differential Revision: https://reviews.llvm.org/D28722

llvm-svn: 292303
2017-01-18 00:08:44 +00:00
Justin Lebar 1091a9f566 [NVPTX] Improve lowering of llvm.ctpop.
Summary:
Avoid an unnecessary conversion operation when using the result of
ctpop.i32 or ctpop.i16 as an i32, as in both cases the ptx instruction
we run returns an i32.

(Previously if we used the value as an i32, we'd do an unnecessary
zext+trunc.)

Reviewers: tra

Subscribers: jholewinski, llvm-commits

Differential Revision: https://reviews.llvm.org/D28721

llvm-svn: 292302
2017-01-18 00:08:27 +00:00
Justin Lebar c7d20128bd [NVPTX] Add lowering for llvm.bitreverse.
Reviewers: tra

Subscribers: llvm-commits, jholewinski

Differential Revision: https://reviews.llvm.org/D28720

llvm-svn: 292301
2017-01-18 00:08:10 +00:00
Justin Lebar 47087814f1 [NVPTX] Fix function names in ctlz.ll test. Test-only change.
Looks like a copy/paste mistake, all the functions in ctlz.ll were named
"ctpop".

llvm-svn: 292300
2017-01-18 00:07:52 +00:00
Justin Lebar d17de5380b [NVPTX] Improve lowering of llvm.ctlz.
Summary:
* Disable "ctlz speculation", which inserts a branch on every ctlz(x) which
  has defined behavior on x == 0 to check whether x is, in fact zero.

* Add DAG patterns that avoid re-truncating or re-expanding the result
  of the 16- and 64-bit ctz instructions.

Reviewers: tra

Subscribers: llvm-commits, jholewinski

Differential Revision: https://reviews.llvm.org/D28719

llvm-svn: 292299
2017-01-18 00:07:35 +00:00
Justin Lebar 33139053da [IR] Grammar police: "intact" is one word. NFC
llvm-svn: 292298
2017-01-18 00:07:18 +00:00
Eric Fiselier 1da55f532c Allow sym_diff.py to report non-zero for non-breaking ABI changes
llvm-svn: 292297
2017-01-18 00:05:01 +00:00
Sanjay Patel 0e9f681dee [InstCombine] add tests to show missed shrinkage; NFC
A patch to partially solve this:
https://reviews.llvm.org/D28625

llvm-svn: 292296
2017-01-18 00:03:23 +00:00
Kostya Serebryany 3344f3517f [libFuzzer] add ATTRIBUTE_NO_SANITIZE_MEMORY to sanitizer hooks
llvm-svn: 292295
2017-01-17 23:50:21 +00:00
Eric Fiselier 6880885fae Fix type_info's constructor by making it explicit again.
In recent changes type_info's private constructor was
accidentally made implicit. This patch fixes that.

llvm-svn: 292294
2017-01-17 23:41:42 +00:00
Dehao Chen c3f87f02b1 Introduce -unroll-partial-threshold to separate PartialThreshold from Threshold in loop unorller.
Summary: Partial unrolling should have separate threshold with full unrolling.

Reviewers: efriedma, mzolotukhin

Reviewed By: efriedma, mzolotukhin

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D28831

llvm-svn: 292293
2017-01-17 23:39:33 +00:00
Wei Mi 8f4178a59e [RegisterCoalescing] Remove partial redundent copy.
The patch is to solve the performance problem described in PR27827.
Register coalescing sometimes cannot remove a copy because of interference.
But if we can find a reverse copy in one of the predecessor block of the copy,
the copy is partially redundent and we may remove the copy partially by moving
it to the predecessor block without the reverse copy.

Differential Revision: https://reviews.llvm.org/D28585

llvm-svn: 292292
2017-01-17 23:39:07 +00:00
Eric Fiselier 6dede18cb1 Don't strip -m32 from the user provide command line flags. This fixes the compiler-rt 32 bit sanitizer build
llvm-svn: 292291
2017-01-17 23:27:56 +00:00
Mehdi Amini 485db58b84 Fix GettingStarted doc so that the example build command for cmake LLVM_ENABLE_PROJECTS works on linux
I tested the previous one on macOS, however building libc++ on Linux
requires libcxxabi as well.

llvm-svn: 292290
2017-01-17 23:23:08 +00:00
Mike Aizatsky 0e37f8e41d [libfuzzer] fixing collected pc addresses for coverage
Summary: The causes google/ossfuzz#84

Reviewers: kcc

Subscribers: mgorny

Differential Revision: https://reviews.llvm.org/D28827

llvm-svn: 292289
2017-01-17 23:11:32 +00:00
Zachary Turner c095f6a037 [ADT] Add SparseBitVector::find_last().
Differential Revision: https://reviews.llvm.org/D28817

llvm-svn: 292288
2017-01-17 23:09:21 +00:00
Kostya Serebryany 1d8c2ce97e [libFuzzer] use table of recent compares for memcmp/strcmp (to unify the code between cmp and memcmp handling)
llvm-svn: 292287
2017-01-17 23:09:05 +00:00
Kostya Serebryany 138ed2b068 [libFuzzer] copy the options inside MutationDispatcher to avoid use-after-scope in mutator tests
llvm-svn: 292286
2017-01-17 23:05:07 +00:00
Tim Northover 33a1a0b001 GlobalISel: fix comparison order for G_FCMP
As with G_ICMP we'd written the CSET instructions backwards.

llvm-svn: 292285
2017-01-17 23:04:01 +00:00