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
Sebastian Pop [Wed, 3 Aug 2016 20:54:33 +0000 (20:54 +0000)]
GVN-hoist: compute MSSA once per function (PR28670)
With this patch we compute the MemorySSA once and update it in the code generator.
Differential Revision: https://reviews.llvm.org/D22966
llvm-svn: 277649
Sanjoy Das [Wed, 3 Aug 2016 20:53:23 +0000 (20:53 +0000)]
[IndVars] Un-grepify test; NFC
Some of these tests need to be cleaned up further to make it obvious
what they're testing, but as a first step remove all instances of
"grep".
llvm-svn: 277648
Yaxun Liu [Wed, 3 Aug 2016 20:38:06 +0000 (20:38 +0000)]
[OpenCL] Fix size of image type
The size of image type is reported incorrectly as size of a pointer to address space 0, which causes error when casting image type to pointers by __builtin_astype.
The fix is to get image address space from TargetInfo then report the size accordingly.
Differential Revision: https://reviews.llvm.org/D22927
llvm-svn: 277647
Rui Ueyama [Wed, 3 Aug 2016 20:33:17 +0000 (20:33 +0000)]
Rename functions that handle bitcode files.
getELFKind was overloaded with bitcode files and regular object files,
and I found that is a bit confusing. This patch renames them.
llvm-svn: 277646
Matthias Braun [Wed, 3 Aug 2016 20:28:19 +0000 (20:28 +0000)]
opt-bisect-legacy-pass-manager.ll: Test only works with default triple configured
llvm-svn: 277645
Rui Ueyama [Wed, 3 Aug 2016 20:25:29 +0000 (20:25 +0000)]
Do not instantiate Triple twice.
Also removes redundant variables. NFC.
llvm-svn: 277644
Rui Ueyama [Wed, 3 Aug 2016 20:15:56 +0000 (20:15 +0000)]
Add EM_IAMCU support.
This patch adds "-m elf_iamcu" to ldd for IAMCU psABI:
https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI
Patch by H.J Lu.
llvm-svn: 277643
Reid Kleckner [Wed, 3 Aug 2016 20:01:01 +0000 (20:01 +0000)]
Revert "[CloneFunction] Don't remove side effecting calls"
This reverts commit r277611 and the followup r277614.
Bootstrap builds and chromium builds are crashing during inlining after
this change.
llvm-svn: 277642
George Burgess IV [Wed, 3 Aug 2016 19:59:11 +0000 (19:59 +0000)]
[MSSA] clang-format. NFC.
Didn't want to fold this in with r277640, since it touches bits that
aren't entirely related to r277640.
llvm-svn: 277641
George Burgess IV [Wed, 3 Aug 2016 19:57:02 +0000 (19:57 +0000)]
[MSSA] Add special handling for invariant/constant loads.
This is a follow-up to r277637. It teaches MemorySSA that invariant
loads (and loads of provably constant memory) are always liveOnEntry.
llvm-svn: 277640
Sanjay Patel [Wed, 3 Aug 2016 19:48:40 +0000 (19:48 +0000)]
[InstCombine] use m_APInt to allow icmp eq (srem X, C1), C2 folds for splat constant vectors
llvm-svn: 277638
George Burgess IV [Wed, 3 Aug 2016 19:39:54 +0000 (19:39 +0000)]
[MSSA] Add logic for special handling of atomics/volatiles.
This patch makes MemorySSA recognize atomic/volatile loads, and makes
MSSA treat said loads specially. This allows us to be a bit more
aggressive in some cases.
Administrative note: Revision was LGTM'ed by reames in person.
Additionally, this doesn't include the `invariant.load` recognition in
the differential revision, because I feel it's better to commit that
separately. Will commit soon.
Differential Revision: https://reviews.llvm.org/D16875
llvm-svn: 277637
Elliot Colp [Wed, 3 Aug 2016 19:39:20 +0000 (19:39 +0000)]
I can't reproduce this buildbot failure locally, so temporarily remove this test while I investigate.
http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/27427
llvm-svn: 277636
Tobias Grosser [Wed, 3 Aug 2016 19:30:35 +0000 (19:30 +0000)]
[InstCombine] Refactor optimization of zext(or(icmp, icmp)) to enable more aggressive cast-folding
Summary:
InstCombine unfolds expressions of the form `zext(or(icmp, icmp))` to `or(zext(icmp), zext(icmp))` such that in a later iteration of InstCombine the exposed `zext(icmp)` instructions can be optimized. We now combine this unfolding and the subsequent `zext(icmp)` optimization to be performed together. Since the unfolding doesn't happen separately anymore, we also again enable the folding of `logic(cast(icmp), cast(icmp))` expressions to `cast(logic(icmp, icmp))` which had been disabled due to its interference with the unfolding transformation.
Tested via `make check` and `lnt`.
Background
==========
For a better understanding on how it came to this change we subsequently summarize its history. In commit r275989 we've already tried to enable the folding of `logic(cast(icmp), cast(icmp))` to `cast(logic(icmp, icmp))` which had to be reverted in r276106 because it could lead to an endless loop in InstCombine (also see http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20160718/374347.html). The root of this problem is that in `visitZExt()` in InstCombineCasts.cpp there also exists a reverse of the above folding transformation, that unfolds `zext(or(icmp, icmp))` to `or(zext(icmp), zext(icmp))` in order to expose `zext(icmp)` operations which would then possibly be eliminated by subsequent iterations of InstCombine. However, before these `zext(icmp)` would be eliminated the folding from r275989 could kick in and cause InstCombine to endlessly switch back and forth between the folding and the unfolding transformation. This is the reason why we now combine the `zext`-unfolding and the elimination of the exposed `zext(icmp)` to happen at one go because this enables us to still allow the cast-folding in `logic(cast(icmp), cast(icmp))` without entering an endless loop again.
Details on the submitted changes
================================
- In `visitZExt()` we combine the unfolding and optimization of `zext` instructions.
- In `transformZExtICmp()` we have to use `Builder->CreateIntCast()` instead of `CastInst::CreateIntegerCast()` to make sure that the new `CastInst` is inserted in a `BasicBlock`. The new calls to `transformZExtICmp()` that we introduce in `visitZExt()` would otherwise cause according assertions to be triggered (in our case this happend, for example, with lnt for the MultiSource/Applications/sqlite3 and SingleSource/Regression/C++/EH/recursive-throw tests). The subsequent usage of `replaceInstUsesWith()` is necessary to ensure that the new `CastInst` replaces the `ZExtInst` accordingly.
- In InstCombineAndOrXor.cpp we again allow the folding of casts on `icmp` instructions.
- The instruction order in the optimized IR for the zext-or-icmp.ll test case is different with the introduced changes.
- The test cases in zext.ll have been adopted from the reverted commits r275989 and r276105.
Reviewers: grosser, majnemer, spatel
Subscribers: eli.friedman, majnemer, llvm-commits
Differential Revision: https://reviews.llvm.org/D22864
Contributed-by: Matthias Reisinger <d412vv1n@gmail.com>
llvm-svn: 277635
Sebastian Pop [Wed, 3 Aug 2016 19:13:50 +0000 (19:13 +0000)]
Pass EphValues by const-ref as it is not modified in the callee
Patch by Aditya Kumar.
Differential Revision: https://reviews.llvm.org/D22967
llvm-svn: 277634
Nicolai Haehnle [Wed, 3 Aug 2016 19:10:13 +0000 (19:10 +0000)]
[InstCombine] Cleanup select-bitext.ll tests
Follow-up to r277596.
llvm-svn: 277633
Ivan Krasin [Wed, 3 Aug 2016 19:08:55 +0000 (19:08 +0000)]
Add CFI tests for -lowertypetests-bitsets-level.
Summary:
-lowertypetests-bitsets-level controls which kinds of bitsets
are generated, as introduced in r277556. This change adds tests
to compiler-rt.
Reviewers: kcc
Differential Revision: https://reviews.llvm.org/D23103
llvm-svn: 277632
Simon Pilgrim [Wed, 3 Aug 2016 19:08:24 +0000 (19:08 +0000)]
[X86][SSE] Enable target shuffle combining to combine multiple shuffle inputs.
We currently only support combining target shuffles that consist of a single source input (plus elements known to be undef/zero).
This patch generalizes the recursive combining of the target shuffle to collect all the inputs, merging any duplicates along the way, into a full set of src ops and its shuffle mask.
We uncover a number of cases where we have failed to combine a unary shuffle because the input has been duplicated and separated during lowering.
This will allow us to combine to 2-input shuffles in a future patch.
Differential Revision: https://reviews.llvm.org/D22859
llvm-svn: 277631
Vedant Kumar [Wed, 3 Aug 2016 19:02:50 +0000 (19:02 +0000)]
Reapply "More fixes to get good error messages for bad archives."
This reverts commit the revert commit r277627. The build errors
mentioned in r277627 were likely caused by an unclean build directory.
Sorry for the noise.
llvm-svn: 277630
Sanjay Patel [Wed, 3 Aug 2016 18:59:03 +0000 (18:59 +0000)]
[InstCombine] use m_APInt to allow icmp (binop X, Y), C folds with constant splat vectors
This removes the restriction for the icmp constant, but as noted by the FIXME comments,
we still need to change individual checks for binop operand constants.
llvm-svn: 277629
Vedant Kumar [Wed, 3 Aug 2016 18:44:32 +0000 (18:44 +0000)]
Revert "More fixes to get good error messages for bad archives."
This reverts commit r277540. It breaks the build with:
../lib/Object/Archive.cpp:264:41: error: return type of out-of-line definition of 'llvm::object::ArchiveMemberHeader::getUID' differs from that in the declaration
Expected<unsigned> ArchiveMemberHeader::getUID() const {
~~~~~~~~~~~~~~~~~~ ^
include/llvm/Object/Archive.h:53:12: note: previous declaration is here
unsigned getUID() const;
~~~~~~~~ ^
llvm-svn: 277627
Krzysztof Parzyszek [Wed, 3 Aug 2016 18:35:48 +0000 (18:35 +0000)]
[Hexagon] Generate COPY/REG_SEQUENCE more aggressively for vectors
llvm-svn: 277626
Duncan P. N. Exon Smith [Wed, 3 Aug 2016 18:19:43 +0000 (18:19 +0000)]
IR: Drop uniquing when an MDNode Value operand is deleted
This is a fix for PR28697.
An MDNode can indirectly refer to a GlobalValue, through a
ConstantAsMetadata. When the GlobalValue is deleted, the MDNode operand
is reset to `nullptr`. If the node is uniqued, this can lead to a
hard-to-detect cache invalidation in a Metadata map that's shared across
an LLVMContext.
Consider:
1. A map from Metadata* to `T` called RemappedMDs.
2. A node that references a global variable, `!{i1* @GV}`.
3. Insert `!{i1* @GV} -> SomeT` in the map.
4. Delete `@GV`, leaving behind `!{null} -> SomeT`.
Looking up the generic and uninteresting `!{null}` gives you `SomeT`,
which is likely related to `@GV`. Worse, `SomeT`'s lifetime may be tied
to the deleted `@GV`.
This occurs in practice in the shared ValueMap used since r266579 in the
IRMover. Other code that handles more than one Module (with different
lifetimes) in the same LLVMContext could hit it too.
The fix here is a partial revert of r225223: in the rare case that an
MDNode operand is a ConstantAsMetadata (i.e., wrapping a node from the
Value hierarchy), drop uniquing if it gets replaced with `nullptr`.
This changes step #4 above to leave behind `distinct !{null} -> SomeT`,
which can't be confused with the generic `!{null}`.
In theory, this can cause some churn in the LLVMContext's MDNode
uniquing map when Values are being deleted. However:
- The number of GlobalValues referenced from uniqued MDNodes is
expected to be quite small. E.g., the debug info metadata schema
only references GlobalValues from distinct nodes.
- Other Constants have the lifetime of the LLVMContext, whose teardown
is careful to drop references before deleting the constants.
As a result, I don't expect a compile time regression from this change.
llvm-svn: 277625
Ehsan Amiri [Wed, 3 Aug 2016 18:17:35 +0000 (18:17 +0000)]
Adding -verify-machineinstrs option to PowerPC tests
Currently we have a number of tests that fail with -verify-machineinstrs.
To detect this cases earlier we add the option to the testcases with the
exception of tests that will currently fail with this option. PR 27456 keeps
track of this failures.
No code review, as discussed with Hal Finkel.
llvm-svn: 277624
Kirill Bobyrev [Wed, 3 Aug 2016 18:15:07 +0000 (18:15 +0000)]
[docs] fix typo in clang-rename docs
clang-rename is a refactoring tool, not "linter" tool. Fix typo in docs.
llvm-svn: 277623
Krzysztof Parzyszek [Wed, 3 Aug 2016 18:13:32 +0000 (18:13 +0000)]
[Hexagon-ish] Add function to print cell map contents in bit tracker
llvm-svn: 277622
Reid Kleckner [Wed, 3 Aug 2016 18:13:14 +0000 (18:13 +0000)]
[ASan] Report illegal instruction exceptions in ASan
Summary:
Respect the handle_sigill common flag and handle_segv flags while we're
at it.
We still handle signals/exceptions differently on Unix and Windows. The
installation process is tricky on Windows, and difficult to push down
into sanitizer_common without concerning it with the different
static/dynamic CRT models on Windows.
Reviewers: kcc, etienneb
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D23098
llvm-svn: 277621
Pirama Arumuga Nainar [Wed, 3 Aug 2016 18:08:57 +0000 (18:08 +0000)]
Disable KMP_CANCEL_THREADS on Android
Summary:
Android does not have pthread_cancel. Disable KMP_CANCEL_THREADS if
__ANDROID__ is defined.
Subscribers: tberghammer, srhines, openmp-commits, danalbert
Differential Revision: https://reviews.llvm.org/D23029
llvm-svn: 277618
Nico Weber [Wed, 3 Aug 2016 18:07:28 +0000 (18:07 +0000)]
lld-link: Include the name of bad input files in several "input file is bad" diagnostics.
Also change a few getName() calls to getShortName() calls.
https://reviews.llvm.org/D23123
Part of PR28553.
llvm-svn: 277616
Jason Henline [Wed, 3 Aug 2016 18:04:13 +0000 (18:04 +0000)]
[StreamExecutor] Add KernelLoaderSpec
Summary:
Add definitions for the KernelLoaderSpec and MultiKernelLoaderSpec
classes to StreamExecutor. Instances of these classes are generated by the
compiler in order to provide host code with a handle to device code.
Reviewers: jlebar, tra
Subscribers: parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D23038
llvm-svn: 277615
David Majnemer [Wed, 3 Aug 2016 17:37:10 +0000 (17:37 +0000)]
[CloneFunction] Don't crash if the value map doesn't hold something
It is possible for the value map to not have an entry for some value
that has already been removed.
I don't have a testcase, this is fall-out from a buildbot.
llvm-svn: 277614
Luke Drummond [Wed, 3 Aug 2016 17:31:58 +0000 (17:31 +0000)]
[RenderScript] Always create a new allocation ID in CaptureAllocationInit hook
Due to internal reuse of buffers in the RenderScript runtime by the system allocator,
comparing pointers is not a safe way to check whether an allocation is tracked by lldb.
This change updates the lldb RenderScript internal hook callback to properly
identify and remove old allocations that had have an address that is currently
being tracked.
This change also removes the need for `lldb_private::renderscript::LookupAllocation`
to take a `create` flag, as this is now always the case.
Original Author: <dean@codeplay.com>
Subscribers: lldb-commits
llvm-svn: 277613
Sanjay Patel [Wed, 3 Aug 2016 17:23:08 +0000 (17:23 +0000)]
use local variables; NFC
llvm-svn: 277612
David Majnemer [Wed, 3 Aug 2016 17:12:47 +0000 (17:12 +0000)]
[CloneFunction] Don't remove side effecting calls
We were able to figure out that the result of a call is some constant.
While propagating that fact, we added the constant to the value map.
This is problematic because it results in us losing the call site when
processing the value map.
This fixes PR28802.
llvm-svn: 277611
Weiming Zhao [Wed, 3 Aug 2016 17:05:23 +0000 (17:05 +0000)]
[ARM] Constant Materialize: imms with specific value can be encoded into mov.w
Summary: Thumb2 supports encoding immediates with specific patterns into mov.w by splatting the low 8 bits into other bytes.
Reviewers: john.brawn, jmolloy
Subscribers: jmolloy, aemerson, rengolin, samparker, llvm-commits
Differential Revision: https://reviews.llvm.org/D23090
llvm-svn: 277610
Zachary Turner [Wed, 3 Aug 2016 16:53:21 +0000 (16:53 +0000)]
[msf] Make FPM reader use MappedBlockStream.
MappedBlockSTream can work with any sequence of block data where
the ordering is specified by a list of block numbers. So rather
than manually stitch them together in the case of the FPM, reuse
this functionality so that we can treat the FPM as if it were
contiguous.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D23066
llvm-svn: 277609
Luke Drummond [Wed, 3 Aug 2016 16:29:45 +0000 (16:29 +0000)]
Fix an unused variable warning in release builds.
``num_params`` was unused in RenderScript ABI fixup pass ``cloneToStructRetFnTy``
and was only used in an `assert()` that the number of function parameters for the cloned
function was correct.
Now we actually use this variable, rather than recomputing it, and avoid the unused variable
warning when building without asserts enabled.
Subscribers: lldb-commits
llvm-svn: 277608
Renato Golin [Wed, 3 Aug 2016 16:20:48 +0000 (16:20 +0000)]
Revert "Teach CorrelatedValuePropagation to mark adds as no wrap"
This reverts commit r277592, trying to fix the AArch64 42VMA buildbot.
llvm-svn: 277607
Benjamin Kramer [Wed, 3 Aug 2016 15:51:10 +0000 (15:51 +0000)]
Hexagon: Use llvm_unreachable. NFC.
llvm-svn: 277605
Etienne Bergeron [Wed, 3 Aug 2016 15:47:40 +0000 (15:47 +0000)]
[compiler-rt] Fix CHECK coding style [NFC]
llvm-svn: 277604
Manuel Klimek [Wed, 3 Aug 2016 15:12:00 +0000 (15:12 +0000)]
Fix bug in conflict check for Replacements::add().
We would not detect conflicts when inserting insertions at the same
offset as previously contained replacements.
llvm-svn: 277603
Elliot Colp [Wed, 3 Aug 2016 15:09:21 +0000 (15:09 +0000)]
Disable shrinking of SNaN constants
When expanding FP constants, we attempt to shrink doubles to floats and perform an extending load.
However, on SystemZ, and possibly on other targets (I've only confirmed the problem on SystemZ), the FP extending load instruction may convert SNaN into QNaN, or may cause an exception. So in the general case, we would still like to shrink FP constants, but SNaNs should be left as doubles.
Differential Revision: https://reviews.llvm.org/D22685
llvm-svn: 277602
Krzysztof Parzyszek [Wed, 3 Aug 2016 15:06:18 +0000 (15:06 +0000)]
[Hexagon] Do not check alignment for unsized types in isLegalAddressingMode
When the same base address is used to load two different data types, LSR
would assume a memory type of "void". This type is not sized and has no
alignment information. Checking for it causes a crash.
llvm-svn: 277601
Nico Weber [Wed, 3 Aug 2016 14:38:52 +0000 (14:38 +0000)]
Revert an unintentional change from r277599
llvm-svn: 277600
Nico Weber [Wed, 3 Aug 2016 14:37:57 +0000 (14:37 +0000)]
Revert 277594, it caused PR28827
llvm-svn: 277599
Sanjay Patel [Wed, 3 Aug 2016 14:25:55 +0000 (14:25 +0000)]
add a vector variant of each test
llvm-svn: 277598
Manuel Klimek [Wed, 3 Aug 2016 14:12:17 +0000 (14:12 +0000)]
Fix quadratic runtime when adding items to tooling::Replacements.
Previously, we would search through all replacements when inserting a
new one to check for overlaps. Instead, make use of the fact that we
already have a set of replacments without overlaps to find the potential
overlap with lower_bound.
Differential Revision: https://reviews.llvm.org/D23119
llvm-svn: 277597
Nicolai Haehnle [Wed, 3 Aug 2016 13:37:56 +0000 (13:37 +0000)]
[InstCombine] Add select-bitext.ll tests
As requested for D22747.
llvm-svn: 277596
Gil Rapaport [Wed, 3 Aug 2016 13:23:43 +0000 (13:23 +0000)]
[Loop Vectorizer] Move store-predication into its own function, remove obsolete comment (NFC)
Differential Revision: https://reviews.llvm.org/D23013
llvm-svn: 277595
Rafael Espindola [Wed, 3 Aug 2016 13:21:16 +0000 (13:21 +0000)]
Remove redundant argument.
llvm-svn: 277594
Artur Pilipenko [Wed, 3 Aug 2016 13:11:39 +0000 (13:11 +0000)]
Teach CorrelatedValuePropagation to mark adds as no wrap
Use LVI to prove that adds do not wrap. The change is motivated by https://llvm.org/bugs/show_bug.cgi?id=28620 bug and it's the first step to fix that problem.
Reviewed By: sanjoy
Differential Revision: http://reviews.llvm.org/D23059
llvm-svn: 277592
Tobias Grosser [Wed, 3 Aug 2016 12:00:07 +0000 (12:00 +0000)]
GPGPU: Mark kernel functions as polly.skip
Otherwise, we would try to re-optimize them with Polly-ACC and possibly even
generate kernels that try to offload themselves, which does not work as the
GPURuntime is not available on the accelerator and also does not make any
sense.
llvm-svn: 277589
Igor Breger [Wed, 3 Aug 2016 10:58:05 +0000 (10:58 +0000)]
[AVX512] Add aliases for vcvttss2si{l|q}, vcvttsd2si{l|q}, vcvttss2usi{l|q}, vcvttsd2usi{l|q} instructions.
Differential Revision: http://reviews.llvm.org/D23111
llvm-svn: 277586
Ismail Donmez [Wed, 3 Aug 2016 10:46:42 +0000 (10:46 +0000)]
Fix the BUILD_SHARED_LIBS=ON build, was getting the following error while linking liblldb.so:
../include/llvm/Target/TargetOptions.h:104: error: undefined reference to 'llvm::TargetRecip::TargetRecip()'
llvm-svn: 277585
Chandler Carruth [Wed, 3 Aug 2016 09:14:03 +0000 (09:14 +0000)]
[PM] Fix a mis-named parameter in parseLoopPass -- the pass manager was
called "FPM" instead of "LPM" in a hold-over from when the code was
modeled on that used to parse function passes.
llvm-svn: 277584
George Rimar [Wed, 3 Aug 2016 08:35:59 +0000 (08:35 +0000)]
[ELF] - Linkerscript: support all kinds of sorting (including nested).
Previously we supported only sorting by name.
When there are nested section sorting commands in linker script, there can be at most 1
level of nesting for section sorting commands.
SORT_BY_NAME (SORT_BY_ALIGNMENT (wildcard section pattern)). It will sort the input
sections by name first, then by alignment if 2 sections have the same name.
SORT_BY_ALIGNMENT (SORT_BY_NAME (wildcard section pattern)). It will sort the input
sections by alignment first, then by name if 2 sections have the same alignment.
SORT_BY_NAME (SORT_BY_NAME (wildcard section pattern)) is treated the same as SORT_
BY_NAME (wildcard section pattern).
SORT_BY_ALIGNMENT (SORT_BY_ALIGNMENT (wildcard section pattern)) is treated the
same as SORT_BY_ALIGNMENT (wildcard section pattern).
All other nested section sorting commands are invalid.
Patch implements that all above.
Differential revision: https://reviews.llvm.org/D23019
llvm-svn: 277583
Chandler Carruth [Wed, 3 Aug 2016 08:16:08 +0000 (08:16 +0000)]
[PM] Add the explicit copy, move, swap, and assignment boilerplate
required by MSVC 2013.
This also makes the repeating pass wrapper assignable. Mildly
unfortunate as it means we can't use a const member for the int, but
that is a really minor invariant to try to preserve at the cost of loss
of regularity of the type. Yet another annoyance of the particular C++
object / move semantic model.
llvm-svn: 277582
Chandler Carruth [Wed, 3 Aug 2016 07:44:48 +0000 (07:44 +0000)]
[PM] Add a generic 'repeat N times' pass wrapper to the new pass
manager.
While this has some utility for debugging and testing on its own, it is
primarily intended to demonstrate the technique for adding custom
wrappers that can provide more interesting interation behavior in
a nice, orthogonal, and composable layer.
Being able to write these kinds of very dynamic and customized controls
for running passes was one of the motivating use cases of the new pass
manager design, and this gives a hint at how they might look. The actual
logic is tiny here, and most of this is just wiring in the pipeline
parsing so that this can be widely used.
I'm adding this now to show the wiring without a lot of business logic.
This is a precursor patch for showing how a "iterate up to N times as
long as we devirtualize a call" utility can be added as a separable and
composable component along side the CGSCC pass management.
Differential Revision: https://reviews.llvm.org/D22405
llvm-svn: 277581
Dean Michael Berris [Wed, 3 Aug 2016 07:21:55 +0000 (07:21 +0000)]
[XRay] Make the xray_instr_map section specification more correct
Summary:
We also add a test to show what currently happens when we create a
section per function and emit an xray_instr_map. This illustrates the
relationship (or lack thereof) between the per-function section and the
xray_instr_map section.
We also change the code generation slightly so that we don't always
create group sections, but rather only do so if a function where the
table is associated with is in a group.
Also in this change:
- Remove the "merge" flag on the xray_instr_map section.
- Test that we're generating the right table for comdat and non-comdat functions.
Reviewers: echristo, majnemer
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23104
llvm-svn: 277580
Etienne Bergeron [Wed, 3 Aug 2016 07:18:49 +0000 (07:18 +0000)]
[compiler-rt] Remove incorrect folder layout for scudo.
Summary:
This code got landed and it's a mistake.
I suspect an incorrect patch was uploaded/applied.
The folders seems to be created here:
https://reviews.llvm.org/D23018
Reviewers: rnk
Subscribers: llvm-commits, chrisha, kcc
Differential Revision: https://reviews.llvm.org/D23109
llvm-svn: 277579
Etienne Bergeron [Wed, 3 Aug 2016 06:59:46 +0000 (06:59 +0000)]
[extra-tools] Fix extra tools build bot warnings due to incorrect doc
/home/llvmbb/llvm-build-dir/clang-x86_64-debian-fast/llvm.src/tools/clang/tools/extra/clang-tidy/mpi/TypeMismatchCheck.cpp:172:12: warning: parameter 'Complex' not found in the function declaration [-Wdocumentation]
/home/llvmbb/llvm-build-dir/clang-x86_64-debian-fast/llvm.src/tools/clang/tools/extra/clang-tidy/mpi/TypeMismatchCheck.cpp:206:12: warning: parameter 'Complex' not fo
llvm-svn: 277578
Kirill Bobyrev [Wed, 3 Aug 2016 06:54:24 +0000 (06:54 +0000)]
[clang-tidy] address concerns with rL277340
alexfh raised a concern with https://reviews.llvm.org/rL277340
After retabbing indentation of .. code-block:: was increased to 8, 4 spaces
indentation should be enough.
Reviewers: alexfh
llvm-svn: 277577
Etienne Bergeron [Wed, 3 Aug 2016 06:10:15 +0000 (06:10 +0000)]
[clang/test] Fix a flaky unittest on windows
Summary:
The append operator on a shell command for quick command-line is
causing trouble on windows. [NFC]
The easiest way to fix them is to avoid using them.
This patch is an attempt to fix this broken build bot:
clang-x86-win2008-selfhost
http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9523
Reviewers: rnk
Subscribers: cfe-commits, chrisha
Differential Revision: https://reviews.llvm.org/D23105
llvm-svn: 277576
Eric Fiselier [Wed, 3 Aug 2016 05:51:19 +0000 (05:51 +0000)]
Add MSVC specifics to .gitignore. Patch from STL@microsoft.com
llvm-svn: 277575
Eric Fiselier [Wed, 3 Aug 2016 05:50:03 +0000 (05:50 +0000)]
Fix compile error due to mismatched iterator types. Patch from STL@microsoft.com
llvm-svn: 277574
Eric Fiselier [Wed, 3 Aug 2016 05:48:09 +0000 (05:48 +0000)]
Fix an MSVC x64 compiler warning. Patch from STL@microsoft.com
llvm-svn: 277573
Eric Fiselier [Wed, 3 Aug 2016 05:46:36 +0000 (05:46 +0000)]
Silence another occurrence of MSVC's suprious unused warning. Patch from STL@microsoft.com
llvm-svn: 277572
Jonas Paulsson [Wed, 3 Aug 2016 05:46:35 +0000 (05:46 +0000)]
[IfConversion] Bugfix: Don't use undef flag while adding use operands.
IfConversion used to always add the undef flag when adding a use operand
on a newly predicated instruction. This would be an operand for the register
being conditionally redefined. Due to the undef flag, the liveness of this
register prior to the predicated instruction would get lost.
This patch changes this so that such use operands are added only when the
register is live, without the undef flag.
This was reverted but pushed again now, for details follow link below.
Reviewed by Quentin Colombet.
http://reviews.llvm.org/D209077
llvm-svn: 277571
Argyrios Kyrtzidis [Wed, 3 Aug 2016 05:38:53 +0000 (05:38 +0000)]
[index] Fix crash with indexing designated init expressions inside templates.
rdar://
27452869
llvm-svn: 277570
Tobias Grosser [Wed, 3 Aug 2016 05:28:09 +0000 (05:28 +0000)]
Fix a couple of spelling mistakes
llvm-svn: 277569
Rui Ueyama [Wed, 3 Aug 2016 05:28:02 +0000 (05:28 +0000)]
Do not handle zero-sized mergeable section as mergeable.
Mergeable sections with size zero are useless because they don't
actually contain data, and therefore there's no merit ot merge them.
However, in reality, there are object files in the wild containing
such sections. Currently, LLD can't handle them proerply.
This patch makes LLD to handle such sections as if they are non-
mergeable to fix the issue.
Fixes bug 28822.
llvm-svn: 277568
Etienne Bergeron [Wed, 3 Aug 2016 05:03:35 +0000 (05:03 +0000)]
[compilter-rt] Try to fix correctly rL277560
rL277560: [compiler-rt] Fix broken interception unittest
llvm-svn: 277567
Rui Ueyama [Wed, 3 Aug 2016 04:39:42 +0000 (04:39 +0000)]
Include filenames and section names to error messages.
llvm-svn: 277566
David Callahan [Wed, 3 Aug 2016 04:28:39 +0000 (04:28 +0000)]
[ADCE] Refactor anticipating new functionality (NFC)
Summary:
This is the first refactoring before adding new functionality.
Add a class wrapper for the functions and container for
state associated with the transformation.
No functional change
Reviewers: majnemer, nadav, mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23065
llvm-svn: 277565