Chad Rosier [Wed, 14 Sep 2016 16:43:19 +0000 (16:43 +0000)]
[LoopInterchange] Cleanup debug whitespace. NFC.
llvm-svn: 281497
Rafael Espindola [Wed, 14 Sep 2016 16:40:33 +0000 (16:40 +0000)]
Add a test showing we handle .tbss sections in linker scripts.
llvm-svn: 281496
Sanjay Patel [Wed, 14 Sep 2016 16:37:15 +0000 (16:37 +0000)]
getVectorElementType().getSizeInBits() -> getScalarSizeInBits() ; NFCI
llvm-svn: 281495
Simon Atanasyan [Wed, 14 Sep 2016 16:26:19 +0000 (16:26 +0000)]
[ELF] Do not adjust TLS symbol value when produce relocatable object
When the linker generates a relocatable object there is no TLS program
header and we should not adjust TLS symbols value.
llvm-svn: 281494
Sanjay Patel [Wed, 14 Sep 2016 16:05:51 +0000 (16:05 +0000)]
getValueType().getSizeInBits() -> getValueSizeInBits() ; NFCI
llvm-svn: 281493
Etienne Bergeron [Wed, 14 Sep 2016 15:59:32 +0000 (15:59 +0000)]
Fix typo in comment [NFC]
llvm-svn: 281492
Matt Arsenault [Wed, 14 Sep 2016 15:51:33 +0000 (15:51 +0000)]
AMDGPU: Support folding FrameIndex operands
This avoids test regressions in a future commit.
llvm-svn: 281491
Sanjay Patel [Wed, 14 Sep 2016 15:43:44 +0000 (15:43 +0000)]
getValueType().getScalarSizeInBits() -> getScalarValueSizeInBits() ; NFCI
llvm-svn: 281490
Sanjay Patel [Wed, 14 Sep 2016 15:21:00 +0000 (15:21 +0000)]
getScalarType().getSizeInBits() -> getScalarSizeInBits() ; NFCI
llvm-svn: 281489
Matt Arsenault [Wed, 14 Sep 2016 15:19:03 +0000 (15:19 +0000)]
AMDGPU: Improve splitting 64-bit bit ops by constants
This addresses a TODO to handle operations besides and. This
also starts eliminating no-op operations with a constant that
can emerge later.
llvm-svn: 281488
Saleem Abdulrasool [Wed, 14 Sep 2016 15:17:46 +0000 (15:17 +0000)]
CodeGen: simplify the logic a slight bit
Move the definition of `getTriple()` into the header. It would just call
`getTarget().getTriple()`. Inline the definition to allow the compiler to see
the same amount of the layout as previously. Remove the more verbose
`getTarget().getTriple()` in favour of `getTriple()`.
llvm-svn: 281487
Jonas Hahnfeld [Wed, 14 Sep 2016 15:02:32 +0000 (15:02 +0000)]
[interception] Avoid duplicate declaration of isdigit in test
Differential Revision: https://reviews.llvm.org/D24504
llvm-svn: 281486
Matthew Simpson [Wed, 14 Sep 2016 14:47:40 +0000 (14:47 +0000)]
[LV] Process pointer IVs with PHINodes in collectLoopUniforms
This patch moves the processing of pointer induction variables in
collectLoopUniforms from the consecutive pointer phase of the analysis to the
phi node phase. Previously, if a pointer induction variable was used by both a
scalarized non-memory instruction as well as a vectorized memory instruction,
we would incorrectly identify the pointer as uniform. Pointer induction
variables should be treated the same as other phi nodes. That is, they are
uniform if all users of the induction variable and induction variable update
are uniform.
Differential Revision: https://reviews.llvm.org/D24511
llvm-svn: 281485
James Molloy [Wed, 14 Sep 2016 14:47:27 +0000 (14:47 +0000)]
[ARM] Promote small global constants to constant pools
If a constant is unamed_addr and is only used within one function, we can save
on the code size and runtime cost of an indirection by changing the global's storage
to inside the constant pool. For example, instead of:
ldr r0, .CPI0
bl printf
bx lr
.CPI0: &format_string
format_string: .asciz "hello, world!\n"
We can emit:
adr r0, .CPI0
bl printf
bx lr
.CPI0: .asciz "hello, world!\n"
This can cause significant code size savings when many small strings are used in one
function (4 bytes per string).
llvm-svn: 281484
Sjoerd Meijer [Wed, 14 Sep 2016 14:32:17 +0000 (14:32 +0000)]
MCInstrDesc: this fixes an issue setting/getting member Flags, which
is an uint64_t. However, getter function getFlags returned an unsigned,
and in function hasProperty (1 << MCFlag) was used instead of (1ULL << MCFlag).
llvm-svn: 281483
Rafael Espindola [Wed, 14 Sep 2016 14:32:08 +0000 (14:32 +0000)]
Move helper function higher in the file. NFC
This just makes a followup patch easier to read.
llvm-svn: 281482
Simon Pilgrim [Wed, 14 Sep 2016 14:30:00 +0000 (14:30 +0000)]
[X86][SSE] Removed unused getTargetShuffleNode function
llvm-svn: 281481
Simon Pilgrim [Wed, 14 Sep 2016 14:29:16 +0000 (14:29 +0000)]
[X86] Added i128 lshr+shl -> mask combine test
llvm-svn: 281480
Nemanja Ivanovic [Wed, 14 Sep 2016 14:19:09 +0000 (14:19 +0000)]
Fix code-gen crash on Power9 for insert_vector_elt with variable index (PR30189)
This patch corresponds to review:
https://reviews.llvm.org/D24021
In the initial implementation of this instruction, I forgot to account for
variable indices. This patch fixes PR30189 and should probably be merged into
3.9.1 (I'll open a bug according to the new instructions).
llvm-svn: 281479
Andrea Di Biagio [Wed, 14 Sep 2016 14:18:21 +0000 (14:18 +0000)]
[InstCombine] Merged two test files and regenerated checks using update_test_checks.py. NFC.
llvm-svn: 281478
Kuba Brecka [Wed, 14 Sep 2016 14:15:42 +0000 (14:15 +0000)]
[libcxx] Add a TSan regression test for a data race in call_once
Differential Revision: https://reviews.llvm.org/D24297
llvm-svn: 281477
Kuba Brecka [Wed, 14 Sep 2016 14:13:50 +0000 (14:13 +0000)]
[libcxx] Fix a typo in test/libcxx/test/target_info.py that prevents running tests on Darwin with sanitizers
Differential Revision: https://reviews.llvm.org/D24297
llvm-svn: 281476
Kuba Brecka [Wed, 14 Sep 2016 14:12:50 +0000 (14:12 +0000)]
[libcxx] Enable building and testing of libcxx with ThreadSanitizer on OS X
This patch enables building and testing libcxx under ThreadSanitizer on OS X. CMake builds that have -DLLVM_USE_SANITIZER=Thread will automatically build libcxx with -fsanitize=thread and testing via lit then runs under TSan.
Differential Revision: https://reviews.llvm.org/D24297
llvm-svn: 281475
Silviu Baranga [Wed, 14 Sep 2016 14:09:43 +0000 (14:09 +0000)]
[StackProtector] Use INITIALIZE_TM_PASS instead of INITIALIZE_PASS
in order to make sure that its TargetMachine constructor is
registered.
This allows us to run the PEI machine pass with MIR input
(see PR30324).
llvm-svn: 281474
Nemanja Ivanovic [Wed, 14 Sep 2016 14:09:39 +0000 (14:09 +0000)]
Adding missing directive for Power9.
There is currently no codegen for Power9 that depends on the directive
so this is NFC for now but will be important in the future. This was
missed in r268950 so I'm adding it now.
llvm-svn: 281473
Kuba Brecka [Wed, 14 Sep 2016 14:09:18 +0000 (14:09 +0000)]
[asan] Enable -asan-use-private-alias on Darwin/Mach-O, add test for ODR false positive with LTO (compiler-rt part)
The '-asan-use-private-alias’ option (disabled by default) option is currently only enabled for Linux and ELF, but it also works on Darwin and Mach-O. This option also fixes a known problem with LTO on Darwin (https://github.com/google/sanitizers/issues/647). This patch enables the support for Darwin (but still keeps it off by default) and adds the LTO test case.
Differential Revision: https://reviews.llvm.org/D24292
llvm-svn: 281472
Simon Pilgrim [Wed, 14 Sep 2016 14:08:18 +0000 (14:08 +0000)]
[X86][SSE] Don't blend vector shifts with MOVSS/MOVSD directly, lower from generic shuffle
Shuffle lowering will correctly lower to MOVSS/MOVSD/PBLEND, improving commutation opportunities
llvm-svn: 281471
Kuba Brecka [Wed, 14 Sep 2016 14:06:33 +0000 (14:06 +0000)]
[asan] Enable -asan-use-private-alias on Darwin/Mach-O, add test for ODR false positive with LTO (llvm part)
The '-asan-use-private-alias’ option (disabled by default) option is currently only enabled for Linux and ELF, but it also works on Darwin and Mach-O. This option also fixes a known problem with LTO on Darwin (https://github.com/google/sanitizers/issues/647). This patch enables the support for Darwin (but still keeps it off by default) and adds the LTO test case.
Differential Revision: https://reviews.llvm.org/D24292
llvm-svn: 281470
Stephan Bergmann [Wed, 14 Sep 2016 14:03:50 +0000 (14:03 +0000)]
Fix documentation of MemberExpr::getMemberDecl
Differential Revision: https://reviews.llvm.org/D23907
llvm-svn: 281469
Jonas Hahnfeld [Wed, 14 Sep 2016 13:59:39 +0000 (13:59 +0000)]
[OMPT] fix task frame information for gomp interface
Previous differencials D23305-D23310 changed task frame information management only for the kmp interface, but not for the whole gomp interface. This broke some testcases when building with gcc.
This patch fixes the broken task frame information for the gomp interface.
Patch by Joachim Protze!
Differential Revision: https://reviews.llvm.org/D24502
llvm-svn: 281468
Jonas Hahnfeld [Wed, 14 Sep 2016 13:59:31 +0000 (13:59 +0000)]
[OMPT] save exit address to lwt if available
In case, the current team is a serialized team (lwt), the frame information should be written to this data structure.
Before, nested serialized teams would overwrite the same task information.
Patch by Joachim Protze!
Differential Revision: https://reviews.llvm.org/D23310
llvm-svn: 281467
Jonas Hahnfeld [Wed, 14 Sep 2016 13:59:24 +0000 (13:59 +0000)]
[OMPT] fix __ompt_get_teaminfo to consult lwt entries of parent teams
The comment already states, that this function should work similarly as __ompt_get_taskinfo.
The function only looked for lwt entries of the current team, but not when unrolling the parents. This fix aligns the implementation to __ompt_get_taskinfo.
The new test case creates a single theaded team (->lwt) and then a nested active team.
Before the innermost print_id(1) would deliver a different team then the outer print_id(0).
Patch by Joachim Protze!
Differential Revision: https://reviews.llvm.org/D23309
llvm-svn: 281466
Jonas Hahnfeld [Wed, 14 Sep 2016 13:59:19 +0000 (13:59 +0000)]
[OMPT] Reset task exit frame when execution is finished
The exit address is set when execution of a task is started and should be reset as soon as the execution is finished.
Especially for the asm implementation of __kmp_invoke_microtask, resetting in this call would be painfull, so reset just after the invokation.
The testcase shows the effect of this patch:
Before, the implicit barriers at the end of an implicit task would see an exit address for the implicit task.
This barrier is a task scheduling point. Thus, any explicit task scheduled there would see an exit, but no reenter address for the implicit task.
Patch by Joachim Protze!
Differential Revision: https://reviews.llvm.org/D23307
llvm-svn: 281465
Jonas Hahnfeld [Wed, 14 Sep 2016 13:59:13 +0000 (13:59 +0000)]
[OMPT] Align implementation of reenter frame address to latest (frozen) version of OMPT spec
The latest OMPT spec changed the semantic of a tasks reenter frame to be the application frame, that will be entered, when the runtime frame drops.
Before it was the last frame in the runtime. This doesn't work for some gcc execution pathes or even clang generated code for :
Since there is no runtime frame between the executed task and the encountering task.
The test case compares exit and reenter addresses against addresses captured in application code
Patch by Joachim Protze!
Differential Revision: https://reviews.llvm.org/D23305
llvm-svn: 281464
Jonas Hahnfeld [Wed, 14 Sep 2016 13:59:05 +0000 (13:59 +0000)]
[OMPT] extend ompt tests by checks for frame pointers
OMPT tests can check for right frame information of tasks:
* parent_task_frame was directly printed as a pointer, but actually points to a struct ompt_frame {void*, void*}
* NULL is printed in the beginning of execution and loaded to FileChecker variable [[NULL]]
* implicit tasks now also print their frame information
* macro to print frame address from application
* print task info for barrier begin
Patch by Joachim Protze!
Differential Revision: https://reviews.llvm.org/D23304
llvm-svn: 281463
Kuba Brecka [Wed, 14 Sep 2016 13:53:06 +0000 (13:53 +0000)]
[tsan] Fix hanging gcd-apply and gcd-apply-race tests on macOS Sierra
llvm-svn: 281462
Michal Gorny [Wed, 14 Sep 2016 13:42:31 +0000 (13:42 +0000)]
[cmake] Support overriding llvm-config query results
Support overriding LLVM_* variables obtained from llvm-config when doing
stand-alone builds. The override of LLVM_MAIN_SRC_DIR is necessary to
provide LLVM sources when the initial directory used to build LLVM does
no longer exist when compiler-rt is built stand-alone. This is
especially the case when building the projects separately in temporary
directories with unpredictable names.
The code is based on existing CMakeLists.txt from clang. Alike clang, it
extends the override to all queried variables.
Differential Revision: https://reviews.llvm.org/D24005
llvm-svn: 281461
Martin Bohme [Wed, 14 Sep 2016 13:33:11 +0000 (13:33 +0000)]
[clang-tidy] Add dependency on clangAnalysis to clangTidyMiscModule
Summary:
This is needed for the recently submitted misc-use-after-move check (rL281453).
For some reason, this still built under Linux, but it caused the PPC build bot
to fail.
Subscribers: beanz, cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D24561
llvm-svn: 281460
Kirill Bobyrev [Wed, 14 Sep 2016 13:23:14 +0000 (13:23 +0000)]
reverting r281456
llvm-svn: 281459
George Rimar [Wed, 14 Sep 2016 13:07:13 +0000 (13:07 +0000)]
[ELF] - Implemented --section-start, -Ttext, -Tdata, -Tbss options.
--section-start=sectionname=org
Locate a section in the output file at the absolute address given by org.
You may use this option as many times as necessary to locate multiple sections in the command line.
org must be a single hexadecimal integer; for compatibility with other linkers,
you may omit the leading `0x' usually associated with hexadecimal values.
Note: there should be no white space between sectionname, the equals sign (“<=>”), and org.
-Tbss=org
-Tdata=org
-Ttext=org
Same as --section-start, with .bss, .data or .text as the sectionname.
Differential revision: https://reviews.llvm.org/D24294
llvm-svn: 281458
Eric Liu [Wed, 14 Sep 2016 13:04:51 +0000 (13:04 +0000)]
Supports adding insertion around non-insertion replacements.
Summary:
Extend `tooling::Replacements::add()` to support adding order-independent replacements.
Two replacements are considered order-independent if one of the following conditions is true:
- They do not overlap. (This is already supported.)
- One replacement is insertion, and the other is a replacement with
length > 0, and the insertion is adjecent to but not contained in the
other replacement. In this case, the replacement should always change
the original code instead of the inserted text.
Reviewers: klimek, djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D24515
llvm-svn: 281457
Kirill Bobyrev [Wed, 14 Sep 2016 13:00:36 +0000 (13:00 +0000)]
[clang-rename] Merge rename-{at|all} & optimize.
Having both rename-at and rename-all both seems confusing and introduces
unneeded difficulties. Allowing to use both -qualified-name and -offset at once
while performing efficient renamings seems like a feature, too. Maintaining main
function wrappers and custom help becomes redundant while CLI becomes less
confusing.
Reviewers: alexfh
Differential Revision: https://reviews.llvm.org/D24224
llvm-svn: 281456
Martin Bohme [Wed, 14 Sep 2016 12:22:35 +0000 (12:22 +0000)]
[clang-tidy] Make test for misc-use-after-move pass under Windows
Summary: Adds -fno-delayed-template-parsing
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D24550
llvm-svn: 281455
Rafael Espindola [Wed, 14 Sep 2016 11:32:57 +0000 (11:32 +0000)]
Use murmurhash2 instead of fnv.
It is substantially faster by processing 8 bytes at a time.
llvm-svn: 281454
Martin Bohme [Wed, 14 Sep 2016 10:29:32 +0000 (10:29 +0000)]
[clang-tidy] Add check 'misc-use-after-move'
Summary:
The check warns if an object is used after it has been moved, without an
intervening reinitialization.
See user-facing documentation for details.
Reviewers: sbenza, Prazek, alexfh
Subscribers: beanz, mgorny, shadeware, omtcyfz, Eugene.Zelenko, Prazek, fowles, ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D23353
llvm-svn: 281453
Eric Liu [Wed, 14 Sep 2016 10:05:10 +0000 (10:05 +0000)]
Revert "[modules] When merging one definition into another, propagate the list of re-exporting modules from the discarded definition to the retained definition."
This reverts commit r281429.
llvm-svn: 281452
James Molloy [Wed, 14 Sep 2016 09:45:28 +0000 (09:45 +0000)]
Revert "[Thumb] Teach ISel how to lower compares of AND bitmasks efficiently"
This reverts commit r281323. It caused chromium test failures and a selfhost failure.
llvm-svn: 281451
Vassil Vassilev [Wed, 14 Sep 2016 08:55:18 +0000 (08:55 +0000)]
Missing includes.
llvm-svn: 281450
Eugene Leviant [Wed, 14 Sep 2016 08:32:36 +0000 (08:32 +0000)]
[ELF] Replace HasContents with HasSections. NFC
llvm-svn: 281449
Tim Northover [Wed, 14 Sep 2016 08:28:54 +0000 (08:28 +0000)]
GlobalISel: mark pointer stores as legal on AArch64.
llvm-svn: 281448
Sjoerd Meijer [Wed, 14 Sep 2016 08:20:03 +0000 (08:20 +0000)]
This reapplies r281304. The issue was that I had missed
to copy the new isAdd field in the tablegen data structure.
llvm-svn: 281447
Elena Demikhovsky [Wed, 14 Sep 2016 08:06:54 +0000 (08:06 +0000)]
AVX-512: Fixed a bug in kortest.z intrinsic
Lowering was wrong - X86ISD::SETCC node should return i8 type.
llvm-svn: 281446
Igor Breger [Wed, 14 Sep 2016 08:04:28 +0000 (08:04 +0000)]
[AVX512BW] Change truncStore action (v16i16->v16i18). It can be legal only with AVX512VL.
Differential Revision: http://reviews.llvm.org/D24547
llvm-svn: 281445
Filipe Cabecinhas [Wed, 14 Sep 2016 07:37:20 +0000 (07:37 +0000)]
[asan] Reify ErrorStringFunctionSizeOverflow
Summary: Continuing implementation mentioned in this thread: http://lists.llvm.org/pipermail/llvm-dev/2016-July/101933.html
Reviewers: kcc, eugenis, vitalybuka
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D24394
llvm-svn: 281444
Filipe Cabecinhas [Wed, 14 Sep 2016 07:37:14 +0000 (07:37 +0000)]
[asan] Reify ErrorStringFunctionMemoryRangesOverlap
Summary: Continuing implementation mentioned in this thread: http://lists.llvm.org/pipermail/llvm-dev/2016-July/101933.html
Reviewers: kcc, eugenis, vitalybuka
Subscribers: kubabrecka, llvm-commits
Differential Revision: https://reviews.llvm.org/D24393
llvm-svn: 281443
Craig Topper [Wed, 14 Sep 2016 06:27:46 +0000 (06:27 +0000)]
[X86] Remove the VCVTSI2SD32 with rounding intrinsic. It's not used by clang and not needed since 32-bit integer to double is always exact.
llvm-svn: 281442
Roman Gareev [Wed, 14 Sep 2016 06:26:09 +0000 (06:26 +0000)]
Perform copying to created arrays according to the packing transformation
This is the fourth patch to apply the BLIS matmul optimization pattern on matmul
kernels (http://www.cs.utexas.edu/users/flame/pubs/TOMS-BLIS-Analytical.pdf).
BLIS implements gemm as three nested loops around a macro-kernel, plus two
packing routines. The macro-kernel is implemented in terms of two additional
loops around a micro-kernel. The micro-kernel is a loop around a rank-1
(i.e., outer product) update. In this change we perform copying to created
arrays, which is the last step to implement the packing transformation.
Reviewed-by: Tobias Grosser <tobias@grosser.es>
Differential Revision: https://reviews.llvm.org/D23260
llvm-svn: 281441
Jonas Hahnfeld [Wed, 14 Sep 2016 05:52:21 +0000 (05:52 +0000)]
Document option '-rtlib' in clang's man page and help info
This patch adds an entry for "-rtlib" in the output of `man clang` and `clang -help`.
Patch by Lei Zhang!
Differential Revision: https://reviews.llvm.org/D24069
llvm-svn: 281440
Wei Mi [Wed, 14 Sep 2016 04:39:50 +0000 (04:39 +0000)]
Create a getelementptr instead of sub expr for ValueOffsetPair if the
value is a pointer.
This patch is to fix PR30213. When expanding an expr based on ValueOffsetPair,
if the value is of pointer type, we can only create a getelementptr instead
of sub expr.
Differential Revision: https://reviews.llvm.org/D24088
llvm-svn: 281439
Tobias Grosser [Wed, 14 Sep 2016 03:09:48 +0000 (03:09 +0000)]
Ensure Polly linking works without BUILD_SHARED_LIBS
This change ensures all necessary symbols are resolved correctly. Before this
change on some systems, the linker may have eliminated some symbols not directly
used in bugpoint, but used in Polly.
Suggested-by: Michael Kruse <lvm@meinersbur.de>
llvm-svn: 281438
Peter Collingbourne [Wed, 14 Sep 2016 02:55:16 +0000 (02:55 +0000)]
gold: Simplify. Do not unnecessarily enumerate Obj's symbols.
llvm-svn: 281437
Richard Smith [Wed, 14 Sep 2016 02:24:50 +0000 (02:24 +0000)]
[docs] Fix formatting of characters so that tables line up properly. Add
padding around table cells so the borders of adjacent tables don't run into
each other (now that they're perfectly aligned).
llvm-svn: 281436
Kostya Serebryany [Wed, 14 Sep 2016 02:13:06 +0000 (02:13 +0000)]
[libFuzzer] start using trace-pc-guard as an alternative source of coverage
llvm-svn: 281435
Richard Smith [Wed, 14 Sep 2016 01:55:42 +0000 (01:55 +0000)]
[docs] Order diagnostic cross-references alphabetically rather than based on
order in the .td file.
llvm-svn: 281434
Richard Smith [Wed, 14 Sep 2016 01:51:10 +0000 (01:51 +0000)]
Update DiagnosticsReference and fix emitter to emit -Wpedantic diagnostics and groups in a deterministic order.
llvm-svn: 281433
Kostya Serebryany [Wed, 14 Sep 2016 01:39:49 +0000 (01:39 +0000)]
[sanitizer-coverage] add yet another flavour of coverage instrumentation: trace-pc-guard. The intent is to eventually replace all of {bool coverage, 8bit-counters, trace-pc} with just this one. Clang part
llvm-svn: 281432
Kostya Serebryany [Wed, 14 Sep 2016 01:39:35 +0000 (01:39 +0000)]
[sanitizer-coverage] add yet another flavour of coverage instrumentation: trace-pc-guard. The intent is to eventually replace all of {bool coverage, 8bit-counters, trace-pc} with just this one. LLVM part
llvm-svn: 281431
Nico Weber [Wed, 14 Sep 2016 01:16:54 +0000 (01:16 +0000)]
Follow-up to r281367: Compare uuids case-insensitively.
llvm-svn: 281430
Richard Smith [Wed, 14 Sep 2016 01:05:35 +0000 (01:05 +0000)]
[modules] When merging one definition into another, propagate the list of
re-exporting modules from the discarded definition to the retained definition.
llvm-svn: 281429
Sean Callanan [Wed, 14 Sep 2016 00:48:19 +0000 (00:48 +0000)]
Cleaned up the code that handles function return addresses in "frame diagnose."
llvm-svn: 281428
Richard Smith [Wed, 14 Sep 2016 00:35:56 +0000 (00:35 +0000)]
Color warnings purple rather than orange, to match actual Clang output.
llvm-svn: 281427
Rui Ueyama [Wed, 14 Sep 2016 00:09:50 +0000 (00:09 +0000)]
Turn a no-op assignment into an assertion.
r279456 guarantees that this condition is always satisfied.
llvm-svn: 281426
Rui Ueyama [Wed, 14 Sep 2016 00:05:51 +0000 (00:05 +0000)]
Simplify InputFile ownership management.
Previously, all input files were owned by the symbol table.
Files were created at various places, such as the Driver, the lazy
symbols, or the bitcode compiler, and the ownership of new files
was transferred to the symbol table using std::unique_ptr.
All input files were then free'd when the symbol table is freed
which is on program exit.
I think we don't have to transfer ownership just to free all
instance at once on exit.
In this patch, all instances are automatically collected to a
vector and freed on exit. In this way, we no longer have to
use std::unique_ptr.
Differential Revision: https://reviews.llvm.org/D24493
llvm-svn: 281425
Jason Henline [Tue, 13 Sep 2016 23:59:10 +0000 (23:59 +0000)]
[SE] Pack global dev handle addresses
Summary:
We were packing global device memory handles in
`PackedKernelArgumentArray`, but as I was implementing the CUDA
platform, I realized that CUDA wants the address of the handle, not the
handle itself. So this patch switches to packing the address of the
handle.
Reviewers: jlebar
Subscribers: jprice, jlebar, parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D24528
llvm-svn: 281424
Jason Henline [Tue, 13 Sep 2016 23:56:47 +0000 (23:56 +0000)]
Device doc says device is small
llvm-svn: 281423
Jason Henline [Tue, 13 Sep 2016 23:56:46 +0000 (23:56 +0000)]
[SE] Platforms return Device values
Summary:
Platforms were returning Device pointers, but a Device is now basically
just a pointer to an underlying PlatformDevice, so we will now just pass
it around as a value.
Reviewers: jlebar
Subscribers: jprice, jlebar, parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D24537
llvm-svn: 281422
Akira Hatanaka [Tue, 13 Sep 2016 23:53:43 +0000 (23:53 +0000)]
Address Pete's review comment and define OrigArg on its own line.
This is a follow-up to r281419.
llvm-svn: 281421
Zachary Turner [Tue, 13 Sep 2016 23:45:11 +0000 (23:45 +0000)]
Force c++14 when running tests on Windows.
VS 2015 and higher begin making use of c++14 in their standard
library headers. As such, -std=c++11 makes it so you can't compile
trivial programs. Bump this to -std=c++14 when this situation is
detected.
llvm-svn: 281420
Akira Hatanaka [Tue, 13 Sep 2016 23:43:11 +0000 (23:43 +0000)]
[ObjCARC] Traverse chain downwards to replace uses of argument passed to
ObjC library call with call return.
ARC contraction tries to replace uses of an argument passed to an
objective-c library call with the call return value. For example, in the
following IR, it replaces uses of argument %9 and uses of the values
discovered traversing the chain upwards (%7 and %8) with the call return
%10, if they are dominated by the call to @objc_autoreleaseReturnValue.
This transformation enables code-gen to tail-call the call to
@objc_autoreleaseReturnValue, which is necessary to enable auto release
return value optimization.
%7 = tail call i8* @objc_loadWeakRetained(i8** %6)
%8 = bitcast i8* %7 to %0*
%9 = bitcast %0* %8 to i8*
%10 = tail call i8* @objc_autoreleaseReturnValue(i8* %9)
ret %0* %8
Since r276727, llvm started removing redundant bitcasts and as a result
started feeding the following IR to ARC contraction:
%7 = tail call i8* @objc_loadWeakRetained(i8** %6)
%8 = bitcast i8* %7 to %0*
%9 = tail call i8* @objc_autoreleaseReturnValue(i8* %7)
ret %0* %8
ARC contraction no longer does the optimization described above since it
only traverses the chain upwards and fails to recognize that the
function return can be replaced by the call return. This commit changes
ARC contraction to traverse the chain downwards too and replace uses of
bitcasts with the call return.
rdar://problem/
28011339
Differential Revision: https://reviews.llvm.org/D24523
llvm-svn: 281419
Jason Molenda [Tue, 13 Sep 2016 23:29:46 +0000 (23:29 +0000)]
TestQueues could error out because the one second sleep main.c was
using to enqueue all the jobs wasn't enough time on a slow/overloaded
system. Instead use a global to indicate when all the work has
been enqueued, let's see if this makes the CIs work more reliably.
llvm-svn: 281418
Jason Henline [Tue, 13 Sep 2016 23:29:25 +0000 (23:29 +0000)]
[SE] KernelSpec return best PTX
Summary:
Before, the kernel spec would only return PTX for exactly the requested
compute capability. With this patch it will now return the PTX with the
largest compute capability that does not exceed that requested compute
capability.
Reviewers: jlebar
Subscribers: jprice, jlebar, parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D24531
llvm-svn: 281417
Richard Smith [Tue, 13 Sep 2016 23:03:41 +0000 (23:03 +0000)]
Missed update from r281412.
llvm-svn: 281415
Vedant Kumar [Tue, 13 Sep 2016 23:00:13 +0000 (23:00 +0000)]
[llvm-cov] Just emit the version number in the index file
Having the version information in every view is distracting, especially
if there are several sub-views.
llvm-svn: 281414
Hans Wennborg [Tue, 13 Sep 2016 22:51:42 +0000 (22:51 +0000)]
Also don't inline dllimport functions referring to non-dllimport constructors.
The AST walker wasn't visiting CXXConstructExprs before.
This is a follow-up to r281395.
llvm-svn: 281413
Richard Smith [Tue, 13 Sep 2016 22:51:09 +0000 (22:51 +0000)]
Warning flag updates:
-Wdiv-by-zero may as well be an alias for -Wdivision-by-zero rather than a GCC-compatibility no-op.
-Wno-shadow should disable -Wshadow-ivar.
-Weffc++ may as well enable -Wnon-virtual-dtor like it does in GCC.
llvm-svn: 281412
George Rimar [Tue, 13 Sep 2016 22:26:12 +0000 (22:26 +0000)]
revert: [ELF] - Versionscript: support mangled symbols with the same name.
Something broked BBots:
281318 failed on step 9:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/413
r281317 built step 9 green:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/415
Initial revision commits were:
This is PR30312. Info from bug page:
Both of these symbols demangle to abc::abc():
_ZN3abcC1Ev
_ZN3abcC2Ev
(These would be abc's complete object constructor and base object constructor, respectively.)
however with "abc::abc()" in the version script only one of the two receives the symbol version.
Patch fixes that.
It uses testcase created by Ed Maste (D24306).
Differential revision: https://reviews.llvm.org/D24336
llvm-svn: 281411
Evgeniy Stepanov [Tue, 13 Sep 2016 22:25:44 +0000 (22:25 +0000)]
[asan] alloc_dealloc_mismatch=0 by default on Android.
All known (to me) Android deployments are disabling this flag anyway.
The in-tree script (asan_device_setup) does that, too.
llvm-svn: 281410
Evgeniy Stepanov [Tue, 13 Sep 2016 22:25:41 +0000 (22:25 +0000)]
[asan] Remove lit -j5 flag for android tests.
It makes the tests extremely slow due to high latency of the test launcher.
The main reason for -j5 was high memory usage with handle_abort=1, which
is now disabled in the test runner.
llvm-svn: 281409
Reid Kleckner [Tue, 13 Sep 2016 22:22:56 +0000 (22:22 +0000)]
Fix a FIXME about MSVC 2013 in the diagnostic doc generation code
Ultimately it boiled down to adding a move constructor.
llvm-svn: 281408
Ahmed Bougacha [Tue, 13 Sep 2016 22:16:40 +0000 (22:16 +0000)]
[AArch64] Simplify patchpoint/stackmap size test (r281301). NFC.
llvm-svn: 281407
Artem Belevich [Tue, 13 Sep 2016 22:16:30 +0000 (22:16 +0000)]
[CUDA] Do not merge CUDA target attributes.
CUDA target attributes are used for function overloading and must not be merged.
This fixes a bug where attributes were inherited during function template
specialization in CUDA and made it impossible for specialized function
to provide its own target attributes.
Differential Revision: https://reviews.llvm.org/D24522
llvm-svn: 281406
Akira Hatanaka [Tue, 13 Sep 2016 22:13:02 +0000 (22:13 +0000)]
[CodeGen] Fix an assert in EmitNullConstant.
r235815 changed CGRecordLowering::accumulateBases to ignore non-virtual
bases of size 0, which prevented adding those non-virtual bases to
CGRecordLayout's NonVirtualBases. This caused clang to assert when
CGRecordLayout::getNonVirtualBaseLLVMFieldNo was called in
EmitNullConstant. This commit fixes the bug by ignoring zero-sized
non-virtual bases in EmitNullConstant.
rdar://problem/
28100139
Differential Revision: https://reviews.llvm.org/D24312
llvm-svn: 281405
Manman Ren [Tue, 13 Sep 2016 21:57:28 +0000 (21:57 +0000)]
ObjectiveC Generics: follow-up commit to r281355.
Correct getExtraLocalDataSize for ObjCTypeParamTypeLoc.
rdar://
24619481
rdar://
25060179
llvm-svn: 281404
Pawel Bylica [Tue, 13 Sep 2016 21:55:41 +0000 (21:55 +0000)]
[CodeGen] Fix invalid shift in mul expansion
Summary: When expanding mul in type legalization make sure the type for shift amount can actually fit the value. This fixes PR30354 https://llvm.org/bugs/show_bug.cgi?id=30354.
Reviewers: hfinkel, majnemer, RKSimon
Subscribers: RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D24478
llvm-svn: 281403
Michael Kuperstein [Tue, 13 Sep 2016 21:53:32 +0000 (21:53 +0000)]
[DAG] Allow build-to-shuffle combine to combine builds from two wide vectors.
This allows us to, in some cases, create a vector_shuffle out of a build_vector, when
the inputs to the build are extract_elements from two different vectors, at least one
of which is wider than the output. (E.g. a <8 x i16> being constructed out of
elements from a <16 x i16> and a <8 x i16>).
Differential Revision: https://reviews.llvm.org/D24491
llvm-svn: 281402
Albert Gutowski [Tue, 13 Sep 2016 21:51:37 +0000 (21:51 +0000)]
Temporary fix for MS _Interlocked intrinsics
llvm-svn: 281401
Kevin Enderby [Tue, 13 Sep 2016 21:42:28 +0000 (21:42 +0000)]
Next set of additional error checks for invalid Mach-O files for bad load commands
that use the Mach::dyld_info_command type for the load commands that are
currently use in the MachOObjectFile constructor.
This contains the missing checks for LC_DYLD_INFO and
LC_DYLD_INFO_ONLY load commands and the fields for the
Mach::dyld_info_command type.
llvm-svn: 281400
Albert Gutowski [Tue, 13 Sep 2016 21:24:51 +0000 (21:24 +0000)]
Reverse commit 281375 (breaks building Chromium)
llvm-svn: 281399
Sean Callanan [Tue, 13 Sep 2016 21:18:27 +0000 (21:18 +0000)]
Cleaned up some of the "frame diagnose" code to use Operands as currency.
Also added some utility functions around Operands to make code easier and more
compact to write.
llvm-svn: 281398
Krzysztof Parzyszek [Tue, 13 Sep 2016 21:16:07 +0000 (21:16 +0000)]
[Hexagon] Better handling of HVX vector lowering
- Expand SELECT_CC and BR_CC for vector types.
- Implement TLI::isShuffleMaskLegal.
llvm-svn: 281397