Tim Northover [Thu, 4 Aug 2016 20:54:05 +0000 (20:54 +0000)]
GlobalISel: refuse to halve size of 1-byte & odd-sized LLTs.
llvm-svn: 277768
Matt Arsenault [Thu, 4 Aug 2016 20:52:57 +0000 (20:52 +0000)]
GVNHoist: Don't hoist convergent calls
llvm-svn: 277767
Lang Hames [Thu, 4 Aug 2016 20:32:37 +0000 (20:32 +0000)]
[ExecutionEngine] Refactor - Roll JITSymbolFlags functionality into JITSymbol.h
and remove the JITSymbolFlags header.
llvm-svn: 277766
David Majnemer [Thu, 4 Aug 2016 20:30:07 +0000 (20:30 +0000)]
[coroutines] Part 4[ab]: Coroutine Devirtualization: Lower coro.resume and coro.destroy.
This is the forth patch in the coroutine series. CoroEaly pass now lowers coro.resume
and coro.destroy intrinsics by replacing them with an indirect call to an address
returned by coro.subfn.addr intrinsic. This is done so that CGPassManager recognizes
devirtualization when CoroElide replaces a call to coro.subfn.addr with an appropriate
function address.
Patch by Gor Nishanov!
Differential Revision: https://reviews.llvm.org/D22998
llvm-svn: 277765
Reid Kleckner [Thu, 4 Aug 2016 20:05:13 +0000 (20:05 +0000)]
Avoid re-entrancy between __sanitizer::Report, OutputDebugString, and RtlRaiseException
Our Report implementation calls OutputDebugString, which calls
RtlRaiseException, which can re-enter back into the ASan runtime and
cause a hang.
Don't treat this special debugger-only exception code as a noreturn
event, since the stack won't really unwind all the way.
llvm-svn: 277763
Sanjay Patel [Thu, 4 Aug 2016 20:05:02 +0000 (20:05 +0000)]
[InstCombine] use m_APInt to allow icmp eq (and X, C1), C2 folds for splat constant vectors
llvm-svn: 277762
Davide Italiano [Thu, 4 Aug 2016 19:56:26 +0000 (19:56 +0000)]
[MachO] Factor out some common code in the Driver.
llvm-svn: 277761
Davide Italiano [Thu, 4 Aug 2016 19:49:11 +0000 (19:49 +0000)]
[MachO/Core] Remove (now) unused static member function. NFCI.
llvm-svn: 277760
Yaxun Liu [Thu, 4 Aug 2016 19:45:00 +0000 (19:45 +0000)]
[OpenCL] Add missing tests for getOCLTypeName
Adding missing tests for OCL type names for half, float, double, char, short, long, and unknown.
Patch by Aaron En Ye Shi.
Differential Revision: https://reviews.llvm.org/D22964
llvm-svn: 277759
Zachary Turner [Thu, 4 Aug 2016 19:39:55 +0000 (19:39 +0000)]
[CodeView] Use llvm::Error instead of std::error_code.
This eliminates the remnants of std::error_code from the
DebugInfo libraries.
llvm-svn: 277758
Artem Dergachev [Thu, 4 Aug 2016 19:37:00 +0000 (19:37 +0000)]
[analyzer] Make CloneDetector recognize different variable patterns.
CloneDetector should be able to detect clones with renamed variables.
However, if variables are referenced multiple times around the code sample,
the usage patterns need to be recognized.
For example, (x < y ? y : x) and (y < x ? y : x) are no longer clones,
however (a < b ? b : a) is still a clone of the former.
Variable patterns are computed and compared during a separate filtering pass.
Patch by Raphael Isemann!
Differential Revision: https://reviews.llvm.org/D22982
llvm-svn: 277757
Yaxun Liu [Thu, 4 Aug 2016 19:35:17 +0000 (19:35 +0000)]
[OpenCL] Add the lit test for image size which was omitted by r277647.
llvm-svn: 277756
Tim Northover [Thu, 4 Aug 2016 19:32:28 +0000 (19:32 +0000)]
AArch64: don't assume all i128s are BUILD_PAIRs
It leads to a crash when they're not. I'm *sure* I've made this mistake before,
at least once.
llvm-svn: 277755
Yaxun Liu [Thu, 4 Aug 2016 19:30:54 +0000 (19:30 +0000)]
[OpenCL] Remove extra native_ functions from opencl-c.h
There should be no native_ builtin functions with double type arguments.
Patch by Aaron En Ye Shi.
Differential Revision : https://reviews.llvm.org/D23071
llvm-svn: 277754
Chris Bieneman [Thu, 4 Aug 2016 19:19:25 +0000 (19:19 +0000)]
[macho2yaml] String table can contain null strings
Since the string table being read from the MachO is a properly bounded StringRef including null strings is safe and reasonable.
This occurs frequently with stripped binaries where the string table has been modified.
llvm-svn: 277753
Sanjay Patel [Thu, 4 Aug 2016 19:12:12 +0000 (19:12 +0000)]
[InstCombine] use m_APInt to allow icmp eq (or X, C1), C2 folds for splat constant vectors
llvm-svn: 277752
Tim Northover [Thu, 4 Aug 2016 18:35:17 +0000 (18:35 +0000)]
GlobalISel: also add G_TRUNC to IRTranslator.
llvm-svn: 277749
Tim Northover [Thu, 4 Aug 2016 18:35:11 +0000 (18:35 +0000)]
GlobalISel: add code to widen scalar G_ADD
llvm-svn: 277747
Etienne Bergeron [Thu, 4 Aug 2016 18:30:41 +0000 (18:30 +0000)]
fix whitespaces from https://reviews.llvm.org/D23170
llvm-svn: 277746
Etienne Bergeron [Thu, 4 Aug 2016 18:15:38 +0000 (18:15 +0000)]
[compiler-rt] Fix memory allocator for dynamic address space
Summary:
The sanitizer allocators can works with a dynamic address space
(i.e. specified with ~0ULL).
Unfortunately, the code was broken on GetMetadata and GetChunkIdx.
The current patch is moving the Win64 memory test to a dynamic
address space. There is a migration to move every concept to a
dynamic address space on windows.
To have a better coverage, the unittest are now testing
dynamic address space on other platforms too.
Reviewers: rnk, kcc
Subscribers: kubabrecka, dberris, llvm-commits, chrisha
Differential Revision: https://reviews.llvm.org/D23170
llvm-svn: 277745
Sanjay Patel [Thu, 4 Aug 2016 18:14:02 +0000 (18:14 +0000)]
remove FIXME comments (fixed with r277738)
llvm-svn: 277744
Alexey Bader [Thu, 4 Aug 2016 18:06:27 +0000 (18:06 +0000)]
[OpenCL] Added underscores to the names of 'to_addr' OpenCL built-ins.
Summary:
In order to re-define OpenCL built-in functions
'to_{private,local,global}' in OpenCL run-time library LLVM names must
be different from the clang built-in function names.
Reviewers: yaxunl, Anastasia
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23120
llvm-svn: 277743
Derek Schuff [Thu, 4 Aug 2016 18:01:52 +0000 (18:01 +0000)]
[WebAssembly] Check return value of getRegForValue in FastISel
Previously, FastISel for WebAssembly wasn't checking the return value of
`getRegForValue` in certain cases, which would generate instructions
referencing NoReg. This patch fixes this behavior.
Patch by Dominic Chen
Differential Revision: https://reviews.llvm.org/D23100
llvm-svn: 277742
Vedant Kumar [Thu, 4 Aug 2016 18:00:42 +0000 (18:00 +0000)]
[llvm-cov] Add some documentation for the -tab-size option
Also, un-hide the cl::opt.
llvm-svn: 277741
Krzysztof Parzyszek [Thu, 4 Aug 2016 17:56:19 +0000 (17:56 +0000)]
[Hexagon] Validate register class when doing bit simplification
llvm-svn: 277740
Sanjay Patel [Thu, 4 Aug 2016 17:48:04 +0000 (17:48 +0000)]
[InstCombine] use m_APInt to allow icmp eq (op X, Y), C folds for splat constant vectors
I'm removing a misplaced pair of more specific folds from InstCombine in this patch as well,
so we know where those folds are happening in InstSimplify.
llvm-svn: 277738
Simon Pilgrim [Thu, 4 Aug 2016 17:16:50 +0000 (17:16 +0000)]
[X86][SSE] Rename target shuffle unary permute matching function. NFCI.
In preparation for adding a binary permute matching function.
llvm-svn: 277737
Sanjay Patel [Thu, 4 Aug 2016 16:48:30 +0000 (16:48 +0000)]
add tests for missing vector folds
llvm-svn: 277736
Alina Sbirlea [Thu, 4 Aug 2016 16:38:44 +0000 (16:38 +0000)]
LoadStoreVectorizer: Remove TargetBaseAlign. Keep alignment for stack adjustments.
Summary:
TargetBaseAlign is no longer required since LSV checks if target allows misaligned accesses.
A constant defining a base alignment is still needed for stack accesses where alignment can be adjusted.
Previous patch (D22936) was reverted because tests were failing. This patch also fixes the cause of those failures:
- x86 failing tests either did not have the right target, or the right alignment.
- NVPTX failing tests did not have the right alignment.
- AMDGPU failing test (merge-stores) should allow vectorization with the given alignment but the target info
considers <3xi32> a non-standard type and gives up early. This patch removes the condition and only checks
for a maximum size allowed and relies on the next condition checking for %4 for correctness.
This should be revisited to include 3xi32 as a MVT type (on arsenm's non-immediate todo list).
Note that checking the sizeInBits for a MVT is undefined (leads to an assertion failure),
so we need to create an EVT, hence the interface change in allowsMisaligned to include the Context.
Reviewers: arsenm, jlebar, tstellarAMD
Subscribers: jholewinski, arsenm, mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D23068
llvm-svn: 277735
Adrian Prantl [Thu, 4 Aug 2016 16:28:22 +0000 (16:28 +0000)]
Shamelessly add myself to CREDITS.TXT
llvm-svn: 277734
Bruno Cardoso Lopes [Thu, 4 Aug 2016 15:57:30 +0000 (15:57 +0000)]
[ASAN] Mark test/asan/TestCases/ill.cc as unsupported on darwin
Introduced in r277621, this test is currently failing all around in
public bots: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/20787
and internal bots. Mark it as unsupported on darwin until we figure
out how it should behave.
llvm-svn: 277733
Daniel Sanders [Thu, 4 Aug 2016 15:36:03 +0000 (15:36 +0000)]
[mips] Set Personality and LSDA encoding for FreeBSD
Reviewers: seanbruno, sdardis
Subscribers: tberghammer, danalbert, srhines, dsanders, sdardis, llvm-commits, seanbruno
Differential Revision: https://reviews.llvm.org/D23113
llvm-svn: 277732
Sanjay Patel [Thu, 4 Aug 2016 15:19:25 +0000 (15:19 +0000)]
[InstCombine] use m_APInt to allow icmp eq (sub C1, X), C2 folds for splat constant vectors
llvm-svn: 277731
Jonas Hahnfeld [Thu, 4 Aug 2016 14:55:56 +0000 (14:55 +0000)]
Add test case for nested creation of tasks
For discussion in D23115
llvm-svn: 277730
Alexander Kornienko [Thu, 4 Aug 2016 14:54:54 +0000 (14:54 +0000)]
[clang-tidy] misc-argument-comment non-strict mode
Summary:
The misc-argument-comment check now ignores leading and trailing underscores and
case. The new `StrictMode` local/global option can be used to switch back to
strict checking.
Add getLocalOrGlobal version for integral types, minor cleanups.
Reviewers: hokein, aaron.ballman
Subscribers: aaron.ballman, Prazek, cfe-commits
Differential Revision: https://reviews.llvm.org/D23135
llvm-svn: 277729
Simon Pilgrim [Thu, 4 Aug 2016 14:21:32 +0000 (14:21 +0000)]
[X86][SSE] Split off shuffle mask canonicalization from lowerVectorShuffle. NFCI.
The new function now returns true if the shuffle should be commuted.
This will allow target shuffle combines to share the code.
llvm-svn: 277728
Krzysztof Parzyszek [Thu, 4 Aug 2016 14:17:16 +0000 (14:17 +0000)]
[Hexagon] Clear kill flags from modified registers in peephole optimizer
llvm-svn: 277727
Tobias Grosser [Thu, 4 Aug 2016 13:57:29 +0000 (13:57 +0000)]
GPGPU: Support scalars that are mapped to shared memory
llvm-svn: 277726
Nikolai Bozhenov [Thu, 4 Aug 2016 12:47:28 +0000 (12:47 +0000)]
[X86] Heuristic to selectively build Newton-Raphson SQRT estimation
On modern Intel processors hardware SQRT in many cases is faster than RSQRT
followed by Newton-Raphson refinement. The patch introduces a simple heuristic
to choose between hardware SQRT instruction and Newton-Raphson software
estimation.
The patch treats scalars and vectors differently. The heuristic is that for
scalars the compiler should optimize for latency while for vectors it should
optimize for throughput. It is based on the assumption that throughput bound
code is likely to be vectorized.
Basically, the patch disables scalar NR for big cores and disables NR completely
for Skylake. Firstly, scalar SQRT has shorter latency than NR code in big cores.
Secondly, vector SQRT has been greatly improved in Skylake and has better
throughput compared to NR.
Differential Revision: https://reviews.llvm.org/D21379
llvm-svn: 277725
Tobias Grosser [Thu, 4 Aug 2016 12:44:03 +0000 (12:44 +0000)]
GPGPU: Disable verbose debug output
llvm-svn: 277724
Tobias Grosser [Thu, 4 Aug 2016 12:41:28 +0000 (12:41 +0000)]
Remove leftover debug output
llvm-svn: 277723
Tobias Grosser [Thu, 4 Aug 2016 12:39:03 +0000 (12:39 +0000)]
GPGPU: Add private memory support
llvm-svn: 277722
Tobias Grosser [Thu, 4 Aug 2016 12:18:14 +0000 (12:18 +0000)]
GPGPU: Add support for shared memory
llvm-svn: 277721
Rafael Espindola [Thu, 4 Aug 2016 12:13:05 +0000 (12:13 +0000)]
Remove redundant argument.
But always set Script<ELFT>::X->OutputSections.
llvm-svn: 277720
Hrvoje Varga [Thu, 4 Aug 2016 11:22:52 +0000 (11:22 +0000)]
[mips][microMIPS] Implement CFC1, CFC2, CTC1 and CTC2 instructions
Differential Revision: https://reviews.llvm.org/D22347
llvm-svn: 277719
Simon Pilgrim [Thu, 4 Aug 2016 11:04:13 +0000 (11:04 +0000)]
[X86] Dropped XOP ctbits checks - they match the AVX checks
llvm-svn: 277718
Jonas Hahnfeld [Thu, 4 Aug 2016 11:03:47 +0000 (11:03 +0000)]
kmp_taskdeps.cpp: Fix debugging output
node->dn.task is only filled after the dependencies are already processed.
This currently leads to unhelpful output from KA_TRACE or even a crash
if one enables KMP_SUPPORT_GRAPH_OUTPUT.
llvm-svn: 277717
Simon Pilgrim [Thu, 4 Aug 2016 10:51:41 +0000 (10:51 +0000)]
[X86][SSE] Add initial costs for vector CTTZ/CTLZ
llvm-svn: 277716
Ying Yi [Thu, 4 Aug 2016 10:39:43 +0000 (10:39 +0000)]
[LLVM-COV]Replace tabs to the space indentations in the HTML coverage report.
When using orbis-llvm-cov.exe to generate the HTML report, the HTML report
can look quite different to the source file if it includes tabs.The default
tab size is 2 spaces instead of 8 spaces. A command line switch is
be added to set the tab size.
Differential Revision: https://reviews.llvm.org/D23087
llvm-svn: 277715
Jonas Hahnfeld [Thu, 4 Aug 2016 10:24:48 +0000 (10:24 +0000)]
Remove LLVM_ENABLE_LIBCXXABI
libc++.so is now a linker script that includes -lc++abi if necessary.
Differential Revision: https://reviews.llvm.org/D22861
llvm-svn: 277714
Simon Pilgrim [Thu, 4 Aug 2016 10:14:39 +0000 (10:14 +0000)]
[X86][SSE] Don't decide when to scalarize CTTZ/CTLZ for performance at lowering - this is what cost models are for
Improved CTTZ/CTLZ costings will be added shortly
llvm-svn: 277713
Benjamin Kramer [Thu, 4 Aug 2016 10:02:03 +0000 (10:02 +0000)]
Make isExternC work on VarDecls too.
llvm-svn: 277712
George Rimar [Thu, 4 Aug 2016 09:49:26 +0000 (09:49 +0000)]
[ELF] - Attemp to fix buildbot.
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/25733/steps/test_lld/logs/stdio
Fix: removed excessive whitespace.
llvm-svn: 277711
George Rimar [Thu, 4 Aug 2016 09:29:31 +0000 (09:29 +0000)]
[ELF] - Linkerscript: implemented ASSERT() keyword.
ASSERT(exp, message)
Ensure that exp is non-zero. If it is zero, then exit the linker with an error
code, and print message.
ASSERT is useful and was seen in few projects in the wild.
Differential revision: https://reviews.llvm.org/D22912
llvm-svn: 277710
Kirill Bobyrev [Thu, 4 Aug 2016 09:23:30 +0000 (09:23 +0000)]
[clang-rename] add missing clang-format improvements
r277702 introduced clang-format changes so that later commits wouldn't introduce
non-functional changes while running clang-format before commiting. Though,
few changes by clang-format weren't in the patch.
llvm-svn: 277709
Simon Dardis [Thu, 4 Aug 2016 09:17:07 +0000 (09:17 +0000)]
[mips] Enable tail calls by default
Enable tail calls by default for (micro)MIPS(64).
microMIPS is slightly more tricky than doing it for MIPS(R6) or microMIPSR6.
microMIPS has two instruction encodings: 16bit and 32bit along with some
restrictions on the size of the instruction that can fill the delay slot.
For safe tail calls for microMIPS, the delay slot filler attempts to find
a correct size instruction for the delay slot of TAILCALL pseudos.
Reviewers: dsanders, vkalintris
Subscribers: jfb, dsanders, sdardis, llvm-commits
Differential Revision: https://reviews.llvm.org/D21138
llvm-svn: 277708
Tobias Grosser [Thu, 4 Aug 2016 09:15:58 +0000 (09:15 +0000)]
GPGPU: Cache PTX kernels
We always keep a number of already compiled kernels available to ensure to avoid
costly recompilation.
llvm-svn: 277707
George Rimar [Thu, 4 Aug 2016 08:56:17 +0000 (08:56 +0000)]
[ELF] - Linkerscript: Fixed SORT_BY_ALIGNMENT sorting order.
According to spec:
"SORT_BY_ALIGNMENT will sort sections into descending order by
alignment before placing them in the output file"
Previously they were sorted into ascending order.
llvm-svn: 277706
George Rimar [Thu, 4 Aug 2016 08:26:02 +0000 (08:26 +0000)]
[ELF] - Remove trailing whitespaces. NFC.
llvm-svn: 277705
Diana Picus [Thu, 4 Aug 2016 08:25:08 +0000 (08:25 +0000)]
Typo fix in comment. NFC
llvm-svn: 277704
Eugene Leviant [Thu, 4 Aug 2016 08:20:23 +0000 (08:20 +0000)]
[ELF] Linkerscript: remove repeated sections in filter()
llvm-svn: 277703
Miklos Vajna [Thu, 4 Aug 2016 07:43:29 +0000 (07:43 +0000)]
Run clang-format on clang-rename code
So that later commits don't introduce non-functional changes when
running clang-format before committing.
Reviewers: klimek
Differential Revision: https://reviews.llvm.org/D23153
llvm-svn: 277702
Dean Michael Berris [Thu, 4 Aug 2016 07:37:28 +0000 (07:37 +0000)]
[XRay] Align entry and return sleds to 2 byte boundaries
This should ensure that we can atomically write two bytes (on top of the
retq and the one past it) and have those two bytes not straddle cache
lines.
We also move the label past the alignment instruction so that we can refer
to the actual first instruction, as opposed to potential padding before the
aligned instruction.
Update the tests to allow us to reflect the new order of assembly.
Reviewers: rSerge, echristo, majnemer
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23101
llvm-svn: 277701
Matt Arsenault [Thu, 4 Aug 2016 07:04:54 +0000 (07:04 +0000)]
AMDGPU: Fix a slow test by using basic regalloc
This just tests that the register limit isn't exceeded,
so the regisetr allocation doesn't need to be great.'
The critically slow part is all in greedy RA, so
switch to basic.
llvm-svn: 277700
Tobias Grosser [Thu, 4 Aug 2016 06:55:59 +0000 (06:55 +0000)]
GPGPU: Handle scalar array references
Pass the content of scalar array references to the alloca on the kernel side
and do not pass them additional as normal LLVM scalar value.
llvm-svn: 277699
Tobias Grosser [Thu, 4 Aug 2016 06:55:53 +0000 (06:55 +0000)]
BlockGenerator: Assert that we do not get alloca of array access
llvm-svn: 277698
Tobias Grosser [Thu, 4 Aug 2016 06:55:49 +0000 (06:55 +0000)]
GPGPU: Pass subtree values correctly to the kernel
llvm-svn: 277697
Eric Christopher [Thu, 4 Aug 2016 06:02:50 +0000 (06:02 +0000)]
After PR28761 use -Wall with -Werror in builtins tests to identify
possible problems in headers.
llvm-svn: 277696
Amaury Sechet [Thu, 4 Aug 2016 05:35:25 +0000 (05:35 +0000)]
Fix intrinsics.ll test
llvm-svn: 277695
Amaury Sechet [Thu, 4 Aug 2016 05:27:20 +0000 (05:27 +0000)]
Add popcount(n) == bitsize(n) -> n == -1 transformation.
Summary: As per title.
Reviewers: majnemer, spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23139
llvm-svn: 277694
David Majnemer [Thu, 4 Aug 2016 04:47:18 +0000 (04:47 +0000)]
Forgot the dyn_cast_or_null intended for r277691.
llvm-svn: 277693
Bruno Cardoso Lopes [Thu, 4 Aug 2016 04:46:39 +0000 (04:46 +0000)]
[Darwin] Exclude interception union tests on Darwin and Android
Since the directory is empty on Darwin, disable the inclusion and avoid
the warning below. Exclude on Android as well to match the behavior from
lib/interception/tests/CMakeLists.txt
lit.py:
/Users/buildslave/jenkins/sharedspace/clang-R_master@2/llvm/utils/lit/lit/discovery.py:224:
warning: input
'/Users/buildslave/jenkins/sharedspace/clang-R_master@2/clang-build/Build/tools/clang/runtime/compiler-rt-bins/test/interception/Unit'
contained no tests
This fixes the above warning in some of public bots, like
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/8686
Differential Revision: https://reviews.llvm.org/D23128
rdar://problem/
27581108
llvm-svn: 277692
David Majnemer [Thu, 4 Aug 2016 04:24:02 +0000 (04:24 +0000)]
Reinstate "[CloneFunction] Don't remove side effecting calls"
This reinstates r277611 + r277614 and reverts r277642. A cast_or_null
should have been a dyn_cast_or_null.
llvm-svn: 277691
Bruno Cardoso Lopes [Thu, 4 Aug 2016 04:16:24 +0000 (04:16 +0000)]
Revert "GVN-hoist: enable by default" & "Make GVN Hoisting obey optnone/bisect."
This reverts commits r277685 & r277688. r277685 broke compiler-rt
compilation http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/23335
and r277685 is a followup from it.
llvm-svn: 277690
Chandler Carruth [Thu, 4 Aug 2016 03:52:53 +0000 (03:52 +0000)]
[PM] Change the name of the repeating utility to something less
overloaded (and simpler).
Sean rightly pointed out in code review that we've started using
"wrapper pass" as a specific part of the old pass manager, and in fact
it is more applicable there. Here, we really have a pass *template* to
build a repeated pass, so call it that.
llvm-svn: 277689
Sebastian Pop [Thu, 4 Aug 2016 02:05:08 +0000 (02:05 +0000)]
Make GVN Hoisting obey optnone/bisect.
Differential Revision: https://reviews.llvm.org/D23136
llvm-svn: 277688
Rui Ueyama [Thu, 4 Aug 2016 02:03:29 +0000 (02:03 +0000)]
Remove buggy PROVIDE-in-output-description command.
With the previous change, it is now obvious that readProvide in
this context appended new commands to a wrong command list.
It was mistakenly adding new commands to the top level.
Thus, all commands inside output section descriptions were
interpreted as they were written on top level.
PROVIDE command naturally requires symbol assignment support
in the output section description. We don't have that one yet.
I removed the implementation because there's no way to fix it now.
We can resurrect the test once we support the symbol assignment
(with a modification to detect errors that we failed to find as
described.)
llvm-svn: 277687
Rui Ueyama [Thu, 4 Aug 2016 02:03:27 +0000 (02:03 +0000)]
Make ScriptParser::read* functions more functional style.
Previously, many read* functions created new command objects and
add them directly to the top-level data structure. This is not
work for some commands because some commands, such as the assignment,
can appear inside and outside of the output section description.
This patch is to not append objects to the top-level data structure.
Callers are now responsible to do that.
llvm-svn: 277686
Sebastian Pop [Thu, 4 Aug 2016 01:59:42 +0000 (01:59 +0000)]
GVN-hoist: enable by default
As we addressed all compilation time problems with GVN-hoist
https://llvm.org/bugs/show_bug.cgi?id=28670
this patch turns GVN-hoist back by default.
Differential Revision: https://reviews.llvm.org/D23136
llvm-svn: 277685
Dean Michael Berris [Thu, 4 Aug 2016 00:09:35 +0000 (00:09 +0000)]
[compiler-rt][XRay] Stash xmm registers in the trampolines
We now stash and restore the xmm registers in the trampolines so that
log handlers don't need to worry about clobbering these registers.
In response to comments in D21612.
Reviewers: rSerge, eugenis, echristo, rnk
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D23051
llvm-svn: 277683
Rui Ueyama [Wed, 3 Aug 2016 23:54:39 +0000 (23:54 +0000)]
pdbdump: Add a test to verify the result of PDB -> YAML -> PDB conversions.
Currently not all information can be restored from YAML.
This test verifies only the PDB header.
llvm-svn: 277682
Rui Ueyama [Wed, 3 Aug 2016 23:43:23 +0000 (23:43 +0000)]
pdbdump: Fix crash bug.
pdbdump calls DbiStreamBuilder::commit through PDBFileBuilder::commit
without calling DbiStreamBuilder::finalize. Because `finalize` initializes
`Header` member, `Header` remained nullptr which caused a crash bug.
Differential Revision: https://reviews.llvm.org/D23143
llvm-svn: 277681
Rui Ueyama [Wed, 3 Aug 2016 23:25:15 +0000 (23:25 +0000)]
Make filler expression compatible with gold.
Previously, a decimal filler expression is interpreted as a byte value.
Gold on the other hand use it as a 32-bit big-endian value.
This patch fixes the compatibility issue.
Differential Revision: https://reviews.llvm.org/D23142
llvm-svn: 277680
Reid Kleckner [Wed, 3 Aug 2016 23:24:06 +0000 (23:24 +0000)]
Only run ill.cc test on x86, 32 or 64 bit
llvm-svn: 277679
Justin Bogner [Wed, 3 Aug 2016 23:10:51 +0000 (23:10 +0000)]
llvm-profdata: Clarify the top level help
It wasn't very obvious that you're supposed to call help on the
subcommands. This should help.
llvm-svn: 277678
Alexander Kornienko [Wed, 3 Aug 2016 23:06:03 +0000 (23:06 +0000)]
[clang-tidy] Inefficient string operation
Patch by Bittner Barni!
Differential revision: https://reviews.llvm.org/D20196
llvm-svn: 277677
Kirill Bobyrev [Wed, 3 Aug 2016 23:00:32 +0000 (23:00 +0000)]
[clang-rename] improve USRFindingAction
1. Improve templated class renaming, namely add capabilities of finding partial
and full specializations. Every class partial specialization has reference to
the specialized class. Thus, storing all partial specializations and
comparing specialized class decls to the FoundDecl solves this. All full class
specializations can be found by calling ClassTemplateDecl::specializations().
2. Fix virtual function and its overriding functions renaming. Renaming a
virtual function requires renaming every other function in its "overriding
graph".
3. Merge TemplateClassInstantiationFindBy{Declaration|TypeUse}.cpp tests into
one test by adding multiple invocations of clang-rename to one test, because
the only different thing across these tests is -offset passed to clang-rename.
Reviewers: alexfh
Differential Revision: https://reviews.llvm.org/D23058
llvm-svn: 277663
Jim Ingham [Wed, 3 Aug 2016 22:46:11 +0000 (22:46 +0000)]
Errors compiling breakpoint conditions will cause the breakpoint not to be hit
This was a shadowed variable error from the big Expression Parser plugin-ification. I also
added a test case for this.
<rdar://problem/
27682376>
llvm-svn: 277662
Matthias Braun [Wed, 3 Aug 2016 22:37:47 +0000 (22:37 +0000)]
RenameIndependentSubregs: Fix liveness query in rewriteOperands()
rewriteOperands() always performed liveness queries at the base index
rather than the RegSlot/Base as apropriate for the machine operand. This
could lead to illegal rewriting in some cases.
llvm-svn: 277661
Jim Ingham [Wed, 3 Aug 2016 22:12:00 +0000 (22:12 +0000)]
Add the new OCaml support files to the Xcode project file.
llvm-svn: 277660
Sanjay Patel [Wed, 3 Aug 2016 22:08:44 +0000 (22:08 +0000)]
[InstCombine] use m_APInt to allow icmp eq (add X, C1), C2 folds for splat constant vectors
llvm-svn: 277659
Hubert Tong [Wed, 3 Aug 2016 22:07:50 +0000 (22:07 +0000)]
[Concepts] remove default argument for RequiresClause; NFC
llvm-svn: 277658
Kevin Enderby [Wed, 3 Aug 2016 21:58:48 +0000 (21:58 +0000)]
Needed change to lld for the changes to libObject/Archive interfaces now returning Expected<>
for the llvm trunk change in r277656
llvm-svn: 277657
Kevin Enderby [Wed, 3 Aug 2016 21:57:47 +0000 (21:57 +0000)]
Clean up of libObject/Archive interfaces and change the last three uses of ErrorOr<>
changing them to Expected<> to allow them to pass through llvm Errors.
No functional change.
This commit by itself will break the next lld builds. I’ll be committing the
matching change for lld immediately next.
llvm-svn: 277656
Guozhi Wei [Wed, 3 Aug 2016 21:43:51 +0000 (21:43 +0000)]
[PPC] Handling CallInst in PPCBoolRetToInt
This patch fixes pr25548.
Current implementation of PPCBoolRetToInt doesn't handle CallInst correctly, so it failed to do the intended optimization when there is a CallInst with parameters. This patch fixed that.
llvm-svn: 277655
Bruno Cardoso Lopes [Wed, 3 Aug 2016 21:26:21 +0000 (21:26 +0000)]
Revert "[ARM] Constant Materialize: imms with specific value can be encoded into mov.w"
This reverts commit r277610 /
d619aa8878c3dafcc0d29a46517f63ff3209fdd4.
This make subtarget-no-movt.ll fail in
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/26892,
llvm-svn: 277654
Rui Ueyama [Wed, 3 Aug 2016 21:12:09 +0000 (21:12 +0000)]
Create only one vector instead of two.
In this for-loop, we append elements from one vector to another,
which is a bit inefficient.
llvm-svn: 277653
George Burgess IV [Wed, 3 Aug 2016 21:07:52 +0000 (21:07 +0000)]
[MSSA] Fix a bug in MemorySSA's move ctor.
Not a correctness issue, but it would be nice if we didn't have to
recompute our block numbering (worst-case) every time we move MSSA.
llvm-svn: 277652
Sebastian Pop [Wed, 3 Aug 2016 20:54:38 +0000 (20:54 +0000)]
GVN-hoist: limit the length of dependent instructions
Limit the number of times the while(1) loop is executed. With this restriction
the number of hoisted instructions does not change in a significant way on the
test-suite.
Differential Revision: https://reviews.llvm.org/D23028
llvm-svn: 277651
Sebastian Pop [Wed, 3 Aug 2016 20:54:36 +0000 (20:54 +0000)]
GVN-hoist: compute DFS numbers once
With this patch we compute the DFS numbers of instructions only once and update
them during the code generation when an instruction gets hoisted.
Differential Revision: https://reviews.llvm.org/D23021
llvm-svn: 277650