Diego Novillo [Wed, 14 Oct 2015 18:36:30 +0000 (18:36 +0000)]
Sample profiles - Add documentation for binary profile encoding. NFC.
This adds documentation for the binary profile encoding and moves the
documentation for the text encoding into the header file
SampleProfReader.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250309
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Wed, 14 Oct 2015 17:18:35 +0000 (17:18 +0000)]
A doccomment for CombineTo, and some NFC refactorings
Summary:
Caching SDLoc(N), instead of recreating it in every single
function call, keeps the code denser, and allows to unwrap long lines.
Reviewers: sunfish, atrick, sdmitrouk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13726
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250305
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Wed, 14 Oct 2015 16:54:14 +0000 (16:54 +0000)]
Merge DAGCombiner::visitSREM and DAGCombiner::visitUREM (NFC)
Summary: The two implementations had more code in common than not.
Reviewers: sunfish, MatzeB, sdmitrouk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13724
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250302
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Kudrin [Wed, 14 Oct 2015 12:21:30 +0000 (12:21 +0000)]
[llvm-readobj/ELF] fix: add correct test inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250292
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Kudrin [Wed, 14 Oct 2015 12:11:50 +0000 (12:11 +0000)]
[llvm-readobj/ELF] Print GNU Hash section
Add a new command line switch, -gnu-hash-table, to print the content of that section.
Differential Revision: http://reviews.llvm.org/D13696
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250291
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 14 Oct 2015 10:03:13 +0000 (10:03 +0000)]
[x86][FastISel] Teach how to select nontemporal stores.
This patch teaches x86 fast-isel how to select nontemporal stores.
On x86, we can use MOVNTI for nontemporal stores of doublewords/quadwords.
Instructions (V)MOVNTPS/PD/DQ can be used for SSE2/AVX aligned nontemporal
vector stores.
Before this patch, fast-isel always selected 'movd/movq' instead of 'movnti'
for doubleword/quadword nontemporal stores. In the case of nontemporal stores
of aligned vectors, fast-isel always selected movaps/movapd/movdqa instead of
movntps/movntpd/movntdq.
With this patch, if we use SSE2/AVX intrinsics for nontemporal stores we now
always get the expected (V)MOVNT instructions.
The lack of fast-isel support for nontemporal stores was spotted when analyzing
the -O0 codegen for nontemporal stores.
Differential Revision: http://reviews.llvm.org/D13698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250285
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Wed, 14 Oct 2015 07:50:21 +0000 (07:50 +0000)]
[CMake] Add LLVM_VERSION_PATCH to the -current_version flag for libLTO and libLLVM.
This is to match autoconf where LLVM_SUBMIT_SUBVERSION is usually set to ${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250277
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Wed, 14 Oct 2015 07:40:34 +0000 (07:40 +0000)]
[CMake] Fixing the bots I broke.
I meant to put the POLICY setting below the version defaults.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250276
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Wed, 14 Oct 2015 07:37:00 +0000 (07:37 +0000)]
[CMake] Set Policy CMP0048 to NEW
CMake 3.0 introduced the VERSION option for the project() command. If you don't specify the VERSION in the function it will clear out variables matching ${PROJECT_NAME}_VERSION_${MAJOR|MINOR|PATCH|TWEAK}.
This makes overriding LLVM_VERSION_* not work properly with newer versions of CMake. To make this work properly we need to:
(1) Optionally set the policy to NEW
(2) Move default versions and setting PACKAGE_VERSION to before the call to project()
(3) If the policy is set, pass the VERSION and LANGUAGES options in the new format
This change should have no behavioral change for CMake versions before 3.0, and it makes the behavior of later versions match the earlier versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250275
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 14 Oct 2015 07:24:14 +0000 (07:24 +0000)]
Add a instrumentation test for Linux
Make sure __llvm_profile_init is not emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250274
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 14 Oct 2015 05:37:42 +0000 (05:37 +0000)]
[X86] Update CPU detection to only enable XSAVE features if the OS has enabled them and the saving of YMM state. This seems to be consistent with gcc behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250269
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 14 Oct 2015 05:37:38 +0000 (05:37 +0000)]
[X86] Add XSAVE feature flags to their various processors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250268
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 14 Oct 2015 04:36:00 +0000 (04:36 +0000)]
Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250266
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 14 Oct 2015 03:04:03 +0000 (03:04 +0000)]
Revert r250204 and r250240 due to bot failure. We failed to build PGO-ed clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250264
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 14 Oct 2015 00:21:13 +0000 (00:21 +0000)]
[msan] Fix crash on multiplication by a non-integer constant.
Fixes PR25160.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250260
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 14 Oct 2015 00:21:05 +0000 (00:21 +0000)]
[asan] Disabling speculative loads under asan. Patch by Mike Aizatsky
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250259
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 14 Oct 2015 00:04:19 +0000 (00:04 +0000)]
Rename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We used
to get away with this because llvm/Support/GCOV.h was an implementation detail
of the llvm-gcov tool, but it's now being used by FDO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250258
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Tue, 13 Oct 2015 23:51:58 +0000 (23:51 +0000)]
Split -pedantic and -Wno-long-long into two separate flags so libc++ can remove -pedantic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250255
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 13 Oct 2015 23:28:31 +0000 (23:28 +0000)]
[SCEV] Use `SCEV::isAllOnesValue` directly; NFC.
Instead of `dyn_cast` ing to `SCEVConstant` and checking the contained
`ConstantInteger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250251
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 13 Oct 2015 22:54:29 +0000 (22:54 +0000)]
[CMake] Add compatibility and current versioning to libLTO to match autoconf support.
This also adds LLVM_LTO_VERSION_OFFSET to support functional equivalence to autoconf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250245
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 13 Oct 2015 22:54:27 +0000 (22:54 +0000)]
[CMake] libLLVM's compatibility version should be 1.
This is in matching with the autoconf build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250244
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 13 Oct 2015 22:48:48 +0000 (22:48 +0000)]
Sample profile reader - remove dead code. NFC.
This removes old remnants from the gcov reader. I missed these when I
re-wrote it recently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250242
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 13 Oct 2015 22:48:46 +0000 (22:48 +0000)]
Sample profiles - Add a name table to the binary encoding.
Binary encoded profiles used to encode all function names inline at
every reference. This is clearly suboptimal in terms of space. This
patch fixes this by adding a name table to the header of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250241
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Tue, 13 Oct 2015 22:27:41 +0000 (22:27 +0000)]
Update MachineBranchProbabilityInfo::normalizeEdgeWeights to make sure there is no zero weight in the output, and also add a missing test for JumpThreading.
The test is for the patch in http://reviews.llvm.org/D10979 but was missing when committing that patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250240
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 13 Oct 2015 22:24:10 +0000 (22:24 +0000)]
Add missing #include, found by modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250239
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 13 Oct 2015 22:08:17 +0000 (22:08 +0000)]
[InlineFunction] Correctly inline TerminatePadInst
We forgot to append the terminatepad's arguments which resulted in us
treating the old terminatepad as an argument to the new terminatepad
causing us to crash immediately. Instead, add the old terminatepad's
arguments to the new terminatepad.
This fixes PR25155.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250234
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Oct 2015 22:06:40 +0000 (22:06 +0000)]
[WebAssembly] Remove a TODO comment which is no longer needed. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250233
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Oct 2015 21:51:02 +0000 (21:51 +0000)]
[uselistorder] Insert blank line, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250231
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 13 Oct 2015 21:32:32 +0000 (21:32 +0000)]
Fix layering violation: Analysis should not include headers from Transforms
(and in this case isn't even using anything from those headers).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250228
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 13 Oct 2015 20:59:16 +0000 (20:59 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250224
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 13 Oct 2015 20:48:04 +0000 (20:48 +0000)]
Tweak to r250117 and change to use ErrorOr and drop isSizeValid for
ArchiveMemberHeader, suggestion by Rafael Espíndola.
Also The clang-x86-win2008-selfhost bot still does not like the
malformed-machos
00000031.a test, so removing it for now. All
the other bots are fine with it however.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250222
91177308-0d34-0410-b5e6-
96231b3b80d8
Joseph Tremoulet [Tue, 13 Oct 2015 20:18:27 +0000 (20:18 +0000)]
[WinEH] Add CoreCLR EH table emission
Summary:
Emit the handler and clause locations immediately after the standard
xdata.
Clauses are emitted in the same order and format used to communiate them
to the CLR Execution Engine.
Add a lit test to verify correct table generation on a small but
interesting example function.
Reviewers: majnemer, andrew.w.kaylor, rnk
Subscribers: pgavlin, AndyAyers, llvm-commits
Differential Revision: http://reviews.llvm.org/D13451
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250219
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 20:07:10 +0000 (20:07 +0000)]
AMDGPU: Remove implicit ilist iterator conversions, NFC
One of the changes in lib/Target/AMDGPU/AMDGPUMCInstLower.cpp was a new
one. Previously, bundle iterators and single-instruction iterators
could be compared to each other (comparing on underlying pointers).
I changed a comparison from using `MBB->end()` to using
`MBB->instr_end()`, since both end iterators should point at the some
place anyway.
I don't think the implicit conversion between the two iterator types is
a good idea since it's fairly easy to accidentally compare to the wrong
thing (they aren't always end iterators). Otherwise I would have just
added the conversion.
Even with that, no there should be functionality change here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250218
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 20:02:15 +0000 (20:02 +0000)]
AArch64: Remove implicit ilist iterator conversions, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250216
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 19:47:46 +0000 (19:47 +0000)]
SelectionDAG: Remove implicit ilist iterator conversions, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250214
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 19:26:58 +0000 (19:26 +0000)]
Scalar: Remove remaining ilist iterator implicit conversions
Remove remaining `ilist_iterator` implicit conversions from
LLVMScalarOpts.
This change exposed some scary behaviour in
lib/Transforms/Scalar/SCCP.cpp around line 1770. This patch changes a
call from `Function::begin()` to `&Function::front()`, since the return
was immediately being passed into another function that takes a
`Function*`. `Function::front()` started to assert, since the function
was empty. Note that `Function::end()` does not point at a legal
`Function*` -- it points at an `ilist_half_node` -- so the other
function was getting garbage before. (I added the missing check for
`Function::isDeclaration()`.)
Otherwise, no functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250211
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 13 Oct 2015 18:55:34 +0000 (18:55 +0000)]
[AArch64] Check the size of the vector before accessing its elements.
This fixes an assert in AArch64AsmParser::MatchAndEmitInstruction.
rdar://problem/
23081753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250207
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Tue, 13 Oct 2015 18:43:10 +0000 (18:43 +0000)]
Update the branch weight metadata in JumpThreading pass.
Currently in JumpThreading pass, the branch weight metadata is not updated after CFG modification. Consider the jump threading on PredBB, BB, and SuccBB. After jump threading, the weight on BB->SuccBB should be adjusted as some of it is contributed by the edge PredBB->BB, which doesn't exist anymore. This patch tries to update the edge weight in metadata on BB->SuccBB by scaling it by 1 - Freq(PredBB->BB) / Freq(BB->SuccBB).
Differential revision: http://reviews.llvm.org/D10979
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250204
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 13 Oct 2015 18:39:48 +0000 (18:39 +0000)]
[PGO]: Eliminate calls to __llvm_profile_register_function for Linux.
On Linux, the profile runtime can use __start_SECTNAME and __stop_SECTNAME
symbols defined by the linker to locate the start and end location of
a named section (with C name). This eliminates the need for instrumented
binary to call __llvm_profile_register_function during start-up time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250199
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 18:26:00 +0000 (18:26 +0000)]
Scalar: Remove some implicit ilist iterator conversions, NFC
Remove some of the implicit ilist iterator conversions in
LLVMScalarOpts. More to go.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250197
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 18:11:02 +0000 (18:11 +0000)]
ExecutionEngine: Remove implicit ilist iterator conversions, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250193
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 18:10:59 +0000 (18:10 +0000)]
OrcJIT: Remove implicit ilist iterator conversions, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250192
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 17:51:03 +0000 (17:51 +0000)]
IPO: Remove implicit ilist iterator conversions, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250187
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 17:39:10 +0000 (17:39 +0000)]
Instrumentation: Remove ilist iterator implicit conversions, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250186
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 17:33:41 +0000 (17:33 +0000)]
Interpreter: Remove implicit ilist iterator conversions, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250185
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 13 Oct 2015 17:06:34 +0000 (17:06 +0000)]
The issue with the malformed-machos
00000031.a test is that it needed ‘-arch x86_64’
flag as it was a Mach-O universal file.
The default as to which architecture slice that is dumped without an -arch flag
depends on the host architecture and the contents of the universal file. The
malformed archive
00000031.a file has both an x86_64 and i386 slice. So for
for x86_64 hosts only that slice is dumped, for non-x86_64 hosts, which is many
of the bots both slices are dumped.
The test is intended to only check that the malformation of the x86_64 which
has a non-decimal characters in the size field of the archive header so it no
longer crashes.
The problem turned out that the i388 slice of the malformed archive had a
different malformation which was causing the non-x86_64 bots to get this error:
llvm-objdump -macho -disassemble -arch i386
00000031.a
Archive : .
00000031.a
00000031.a(c_start.o):
LLVM ERROR: Symbol name entry points before beginning or past end of file.
and causing the test as it was written to fail. So by adding ‘-arch x86_64’ it
should correct the test and the malformation on the i388 slice will not be
dumped.
Also the removal of the malformed-machos mem-crup-0261.macho was not causing
the issue so that is put back in.
Sorry for the churn on these tests, Kev
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250184
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 16:59:33 +0000 (16:59 +0000)]
InstCombine: Remove ilist iterator implicit conversions, NFC
Stop relying on implicit conversions of ilist iterators in
LLVMInstCombine. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250183
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 16:48:55 +0000 (16:48 +0000)]
BitcodeReader: Remove ilist iterator implicit conversions, NFC
Get LLVMBitReader building without relying on `ilist_iterator` implicit
conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250181
91177308-0d34-0410-b5e6-
96231b3b80d8
Joseph Tremoulet [Tue, 13 Oct 2015 16:44:30 +0000 (16:44 +0000)]
[WinEH] Iterate state changes instead of invokes
Summary:
Add an iterator that can walk across blocks and which visits the state
transitions rather than state ranges, with explicit transitions to -1
indicating the presence of top-level calls that may throw and cause the
current function to unwind to caller. This will simplify code that needs
to identify nested try regions.
Refactor SEH and C++EH table generation to use the new
InvokeStateChangeIterator, and remove the InvokeLabelIterator they were
using.
Reviewers: majnemer, andrew.w.kaylor, rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250179
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 13 Oct 2015 16:35:59 +0000 (16:35 +0000)]
Fix a couple of comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250177
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Oct 2015 16:23:00 +0000 (16:23 +0000)]
function names should start with a lower case letter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250174
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Oct 2015 15:12:27 +0000 (15:12 +0000)]
don't repeat function/class/variable names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250162
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 13 Oct 2015 14:48:54 +0000 (14:48 +0000)]
[InstCombine][SSE4A] Remove broken INSERTQI range combining optimization
As discussed in D13348 - the INSERTQI range combining code is wrong in that it confuses the insertion bit index with an extraction bit index.
The remaining legal combines are very unlikely (especially once we've converted to shuffles in D13348) so I'm removing the optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250160
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 13 Oct 2015 10:43:57 +0000 (10:43 +0000)]
[GlobalsAA] Turn GlobalsAA on again by default
Now that all the known faults with GlobalsAA have been fixed, flip the big switch on -enable-non-lto-gmr again.
Feel free to pester me with any more bugs found, and don't hesitate to flip the switch back off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250157
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 13 Oct 2015 10:43:33 +0000 (10:43 +0000)]
[GlobalsAA] Don't assume anything about functions that may be overridden
Weak linkage and friends allow a symbol to be overriden outside the
code generator's model, so GlobalsAA shouldn't assume that anything it
can compute about such a symbol is valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250156
91177308-0d34-0410-b5e6-
96231b3b80d8
Christof Douma [Tue, 13 Oct 2015 09:38:21 +0000 (09:38 +0000)]
Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250154
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 13 Oct 2015 07:26:04 +0000 (07:26 +0000)]
Remove unnecessary argument in ipo iterator
- Otherwise, it won't be compiled if that template is instantiated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250153
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 13 Oct 2015 07:17:38 +0000 (07:17 +0000)]
[IndVars] NFC Cleanup.
- Rename methods according to the LLVM Coding Style
- Merge adjacent anonymous namespace block
- Use `auto` in two places
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250152
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 13 Oct 2015 06:22:30 +0000 (06:22 +0000)]
Fix line-ending issue. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250151
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 13 Oct 2015 05:35:12 +0000 (05:35 +0000)]
[CMake] LLVM_PROFDATA_FILE only works if you're using clang, so we should error out if it is specified when not using clang.
Also updated the CMake docs.
Based on post-commit review of r250108 from Sean Silvas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250150
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Oct 2015 05:12:07 +0000 (05:12 +0000)]
[X86] Mark the AAD and AAM aliases as not valid in 64-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250148
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Oct 2015 05:06:25 +0000 (05:06 +0000)]
[X86] Change all the i8imm operands in XOP instructions to u8imm so the parser will check the size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250147
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 13 Oct 2015 03:38:02 +0000 (03:38 +0000)]
Revert 250089 due to bot failure. It failed when building clang itself with PGO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250145
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 03:26:19 +0000 (03:26 +0000)]
BitcodeWriter: Stop using implicit ilist iterator conversion, NFC
Now LLVMBitWriter compiles without implicit ilist iterator conversions.
In these cases, the cleanest thing was to switch to range-based for
loops. Since there wasn't much noise I converted sub-loops and parent
loops as a drive-by.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250144
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 13 Oct 2015 02:53:27 +0000 (02:53 +0000)]
[SCEV] Put some utilites in the ScalarEvolution class
In a later commit, `SplitBinaryAdd` will be used outside `IsConstDiff`,
so lift that out. And lift out `IsConstDiff` as
`computeConstantDifference` to keep things clean and to avoid playing
C++ access specifier games.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250143
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 13 Oct 2015 02:39:05 +0000 (02:39 +0000)]
TransformUtils: Remove implicit ilist iterator conversions, NFC
Continuing the work from last week to remove implicit ilist iterator
conversions. First related commit was probably r249767, with some more
motivation in r249925. This edition gets LLVMTransformUtils compiling
without the implicit conversions.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250142
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 13 Oct 2015 01:27:28 +0000 (01:27 +0000)]
Looks like malformed-machos
00000031.a test is just getting a different error
on some of the bots. I’ll remove this test for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250141
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 13 Oct 2015 00:49:00 +0000 (00:49 +0000)]
DAGCombiner: Don't stop finding better chain on 2 aliases
The comment says this was stopped because it was unlikely to be
profitable. This is not true if you want to combine vector loads
with multiple components.
For a simple case that looks like
t0 = load t0 ...
t1 = load t0 ...
t2 = load t0 ...
t3 = load t0 ...
t4 = store t0:1, t0:1
t5 = store t4, t1:0
t6 = store t5, t2:0
t7 = store t6, t3:0
We want to get all of these stores onto a chain
that is a TokenFactor of these N loads. This mostly
solves the AMDGPU merge-stores.ll regressions
with -combiner-alias-analysis for merging vector
stores of vector loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250138
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 13 Oct 2015 00:28:47 +0000 (00:28 +0000)]
x86: preserve flags when folding atomic operations
Summary:
D4796 taught LLVM to fold some atomic integer operations into a single
instruction. The pattern was unaware that the instructions clobbered
flags.
This patch adds the missing EFLAGS definition.
Floating point operations don't set flags, the subsequent fadd
optimization is therefore correct. The same applies for surrounding
load/store optimizations.
Reviewers: rsmith, rtrieu
Subscribers: llvm-commits, reames, morisset
Differential Revision: http://reviews.llvm.org/D13680
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250135
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 13 Oct 2015 00:07:54 +0000 (00:07 +0000)]
AMDGPU: Refactor isVGPRToSGPRCopy
It should now correctly handle physical registers and make
it easier to identify the other direction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250132
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 13 Oct 2015 00:05:17 +0000 (00:05 +0000)]
Remove the correct unstable malformed-machos test mem-crup-0261.macho and
restore the malformed-machos
00000031.a test. Hopefully this will get all the
build bots happy again. I’ll again keep an eye on them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250130
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 12 Oct 2015 23:59:50 +0000 (23:59 +0000)]
DAGCombiner: Combine extract_vector_elt from build_vector
This basic combine was surprisingly missing.
AMDGPU legalizes many operations in terms of 32-bit vector components,
so not doing this results in many extra copies and subregister extracts
that need to be cleaned up later.
InstCombine already does this for the hasOneUse case. The target hook
is to fix a handful of tests which break (e.g. ARM/vmov.ll) which turn
from a vector materialize repeated immediate instruction to a constant
vector load with more scalar copies from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250129
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 12 Oct 2015 23:07:06 +0000 (23:07 +0000)]
[InstCombine] Tidied up SSE4A tests.
First stage of bugfix discussed in D13348
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250121
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 12 Oct 2015 23:03:43 +0000 (23:03 +0000)]
Temporarily remove the test added in r250117 while I investigate why two
of the build bots get a different error on that malformed file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250120
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Mon, 12 Oct 2015 23:02:58 +0000 (23:02 +0000)]
Assign correct edge weights to unwind destinations when lowering invoke statement.
When lowering invoke statement, all unwind destinations are directly added as successors of call site block, and the weight of those new edges are not assigned properly. Actually, default weight 16 are used for those edges. This patch calculates the proper edge weights for those edges when collecting all unwind destinations.
Differential revision: http://reviews.llvm.org/D13354
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250119
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 12 Oct 2015 23:00:11 +0000 (23:00 +0000)]
[SelectionDAG] Add common vector constant folding helper function
We have a number of functions that implement constant folding of vectors (unary and binary ops) in near identical manners (and the differences don't appear to be critical).
This patch introduces a common implementation (SelectionDAG::FoldConstantVectorArithmetic) and calls this in both the unary and binary op cases.
After this initial patch I intend to begin enabling vector constant folding for a wider number of opcodes in SelectionDAG::getNode().
Differential Revision: http://reviews.llvm.org/D13665
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250118
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 12 Oct 2015 22:04:54 +0000 (22:04 +0000)]
Fixed bugs in llvm-obdump while parsing Mach-O files from malformed archives
that caused aborts. This was because of the characters of the ‘Size’ field in
the archive header did not contain decimal characters.
rdar://
22983603
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250117
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 12 Oct 2015 21:13:20 +0000 (21:13 +0000)]
[CMake] Adding support for passing in profiling data.
Adds LLVM_PROFDATA_FILE option to allow specifying a profile data file to be used during compilation of LLVM and subprojects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250108
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Mon, 12 Oct 2015 19:44:08 +0000 (19:44 +0000)]
Update the branch weight metadata in JumpThreading pass.
In JumpThreading pass, the branch weight metadata is not updated after CFG modification. Consider the jump threading on PredBB, BB, and SuccBB. After jump threading, the weight on BB->SuccBB should be adjusted as some of it is contributed by the edge PredBB->BB, which doesn't exist anymore. This patch tries to update the edge weight in metadata on BB->SuccBB by scaling it by 1 - Freq(PredBB->BB) / Freq(BB->SuccBB).
Differential revision: http://reviews.llvm.org/D10979
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250089
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 12 Oct 2015 19:43:34 +0000 (19:43 +0000)]
Make Win64 localescape offsets FP relative instead of SP relative
We made them SP relative back in March (r233137) because that's the
value the runtime passes to EH functions. With the new cleanuppad IR,
funclets adjust their frame argument from SP to FP, so our offsets
should now be FP-relative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250088
91177308-0d34-0410-b5e6-
96231b3b80d8
Hemant Kulkarni [Mon, 12 Oct 2015 19:26:44 +0000 (19:26 +0000)]
[llvm-symbolizer] Add -print-address option
Differential Revision: http://reviews.llvm.org/D13518
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250086
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 12 Oct 2015 19:22:30 +0000 (19:22 +0000)]
[x86] Fix wrong lowering of vsetcc nodes (PR25080).
Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
assumption that for non-AVX512 targets, the source type and destination type
of a type-legalized setcc node were always the same type.
This assumption was unfortunately incorrect; the type legalizer is not always
able to promote the return type of a setcc to the same type as the first
operand of a setcc.
In the case of a vsetcc node, the legalizer firstly checks if the first input
operand has a legal type. If so, then it promotes the return type of the vsetcc
to that same type. Otherwise, the return type is promoted to the 'next legal
type', which, for vectors of MVT::i1 is always a 128-bit integer vector type.
Example (-mattr=+avx):
%0 = trunc <8 x i32> %a to <8 x i23>
%1 = icmp eq <8 x i23> %0, zeroinitializer
The initial selection dag for the code above is:
v8i1 = setcc t5, t7, seteq:ch
t5: v8i23 = truncate t2
t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
t7: v8i32 = build_vector of all zeroes.
The type legalizer would firstly check if 't5' has a legal type. If so, then it
would reuse that same type to promote the return type of the setcc node.
Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to
promote the return type of the setcc node. Consequently, the setcc return type
is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the
following dag node:
v8i16 = setcc t32, t25, seteq:ch
where t32 and t25 are now values of type v8i32.
Before this patch, function LowerVSETCC would have wrongly expanded the setcc
to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
instruction. In our case, ISel would have matched a VPCMPEQWrr:
t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25
However, t36 and t25 are both VR256, while the result type is instead of class
VR128. This inconsistency ended up causing the insertion of COPY instructions
like this:
%vreg7<def> = COPY %vreg3; VR128:%vreg7 VR256:%vreg3
Which is an invalid full copy (not a sub register copy).
Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy
instruction" in the attempt to expand the malformed pseudo COPY instructions.
This patch fixes the problem adding the missing logic in LowerVSETCC to handle
the corner case of a setcc with 128-bit return type and 256-bit operand type.
This problem was originally reported by Dimitry as PR25080. It has been latent
for a very long time. I have added the minimal reproducible from that bugzilla
as test setcc-lowering.ll.
Differential Revision: http://reviews.llvm.org/D13660
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250085
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Mon, 12 Oct 2015 18:34:00 +0000 (18:34 +0000)]
Add - and -= operators to BlockFrequency using saturating arithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250077
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 12 Oct 2015 18:15:42 +0000 (18:15 +0000)]
[libFuzzer] mention more trophies and improve the link formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250076
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Oct 2015 18:15:08 +0000 (18:15 +0000)]
combine predicates; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250075
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Mon, 12 Oct 2015 18:14:15 +0000 (18:14 +0000)]
Turn const/const& into value type for BlockFrequency in functions of this class. Also fix a naming issue. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250074
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 12 Oct 2015 17:57:02 +0000 (17:57 +0000)]
[llvm-symbolizer] Reverting r250067
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250072
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 12 Oct 2015 17:43:59 +0000 (17:43 +0000)]
AMDGPU: Register some more passes so -print-before works
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250071
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 12 Oct 2015 17:43:56 +0000 (17:43 +0000)]
Enable verifier after PeepholeOptimizer
No tests fail with this enabled so I assume it was an accident
that it isn't enabled now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250070
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 12 Oct 2015 17:42:32 +0000 (17:42 +0000)]
Don't call PrepareEHLandingPad on non EH pads
This was a minor bug in r249492. Calling PrepareEHLandingPad on a
non-landingpad was a no-op, but it attempted to get the generic pointer
register class, which apparently doesn't exist for some targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250068
91177308-0d34-0410-b5e6-
96231b3b80d8
Hemant Kulkarni [Mon, 12 Oct 2015 17:31:22 +0000 (17:31 +0000)]
[llvm-symbolizer] Add -print-address option
Differential Revision http://reviews.llvm.org/D13518
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250067
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 12 Oct 2015 16:44:22 +0000 (16:44 +0000)]
[WinEH] Remove CatchObjRecoverIdx
CatchObjRecoverIdx was used for the old scheme, it is no longer
relevant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250065
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Oct 2015 16:09:59 +0000 (16:09 +0000)]
fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250059
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Mon, 12 Oct 2015 16:07:25 +0000 (16:07 +0000)]
[mips][micromips] Initial support for micrmomips DSP instructions and addu.qb implementation
Differential Revision: http://reviews.llvm.org/D12798
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250058
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 12 Oct 2015 15:52:36 +0000 (15:52 +0000)]
[Debug] Look through bitcasts to find argument registers
On targets where f32 is not legal, we have to look through a BITCAST SDNode to
find the register that an argument is stored in when emitting debug info, or we
will not be able to emit a DW_AT_location for it.
Differential Revision: http://reviews.llvm.org/D13005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250056
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Mon, 12 Oct 2015 15:39:41 +0000 (15:39 +0000)]
[mips][FastISel] Clang-format switch statement. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250053
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Mon, 12 Oct 2015 15:34:52 +0000 (15:34 +0000)]
[AArch64]Fix bug in function names in test case
Functions in this test case need to be renamed as its names are the same
as the instructions we are comparing with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250052
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Oct 2015 15:24:01 +0000 (15:24 +0000)]
fix capitalization; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250049
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Bedwell [Mon, 12 Oct 2015 15:11:47 +0000 (15:11 +0000)]
Fix rename() sometimes failing if another process uses openFileForRead()
On Windows, fs::rename() could fail is another process was reading the
file at the same time using fs::openFileForRead(). In most cases the user
wouldn't notice as fs::rename() will continue to retry for 2000ms. Typically
this is enough for the read to complete and a retry to succeed, but if the
disk is being it too hard then the response time might be longer than the
retry time and the rename would fail with a permission error.
Add FILE_SHARE_DELETE to the sharing flags for CreateFileW() in
fs::openFileForRead() and try ReplaceFileW() prior to MoveFileExW()
in fs::rename().
Based on an initial patch by Edd Dawson!
Differential Revision: http://reviews.llvm.org/D13647
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250046
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 12 Oct 2015 14:24:05 +0000 (14:24 +0000)]
[mips][ias] Implement macro expansion when bcc has an immediate where a register belongs.
Summary: Fixes PR24915.
Reviewers: vkalintiris
Subscribers: emaste, seanbruno, llvm-commits
Differential Revision: http://reviews.llvm.org/D13533
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250042
91177308-0d34-0410-b5e6-
96231b3b80d8