OSDN Git Service
Philip Reames [Fri, 29 Jan 2016 02:23:10 +0000 (02:23 +0000)]
[GVN] Add clarifying assert [NFCI]
Just adding an assert which makes invariants between AnalyzeLoadsFromClobberingLoads and GetLoadValueForLoad slightly more clear.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259145
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Fri, 29 Jan 2016 01:39:39 +0000 (01:39 +0000)]
Minor code cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259139
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 29 Jan 2016 01:08:41 +0000 (01:08 +0000)]
[AArch64] Fix i64 nontemporal high-half extraction.
Since we only have pair - not single - nontemporal store instructions,
we have to extract the high part into a separate register to be able
to use them.
When the initial nontemporal codegen support was added, I wrote the
extract using the nonsensical UBFX [0,32[.
Use the correct LSR form instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259134
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 29 Jan 2016 01:03:20 +0000 (01:03 +0000)]
[RS4GC] Minor cleanups enabled by the previous change; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259133
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 29 Jan 2016 01:03:17 +0000 (01:03 +0000)]
[RS4GC] Delete code that is dead due to r259129; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259132
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 29 Jan 2016 00:49:42 +0000 (00:49 +0000)]
Reland "[CodeView] Use assembler directives for line tables"
This reverts commit r259126 and relands r259117.
This time with updated library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259130
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 29 Jan 2016 00:28:57 +0000 (00:28 +0000)]
[RS4GC] Clamp UseDeoptBundles to true and update tests
The full diff for the test directory may be hard to read because of the
filename clash; so here's all that happened as far as the tests are
concerned:
```
cd test/Transforms/RewriteStatepointsForGC
git rm *ll
git mv deopt-bundles/* ./
rmdir deopt-bundles
find . -name '*.ll' | xargs gsed -i 's/-rs4gc-use-deopt-bundles //g'
```
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259129
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 29 Jan 2016 00:13:28 +0000 (00:13 +0000)]
Revert "[CodeView] Use assembler directives for line tables"
This reverts commit r259117.
The LineInfo constructor is defined in the codeview library and we have
to link against it now. Doing that isn't trivial, so reverting for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259126
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 29 Jan 2016 00:13:26 +0000 (00:13 +0000)]
[RS4GC] Port three tests to the deopt bundles directory
two-invokes-one-landingpad.ll was only moved (and not "ported"), but
having everything in the `deopt-bundles` directory will make later
changes more obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259125
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 29 Jan 2016 00:03:34 +0000 (00:03 +0000)]
Add missing raw_ostream include
Prior to r259115 this was coming via LTOModule.h and MCContext.h.
Apparently this target is not built by 'check'. =(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259124
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 28 Jan 2016 23:59:35 +0000 (23:59 +0000)]
Silence gcc warning about ternary and enumerations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259123
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 23:49:27 +0000 (23:49 +0000)]
[PlaceSafepoints] Use DEBUG() instead of TraceLSP
DEBUG() is the more idiomatic LLVM style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259121
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Thu, 28 Jan 2016 23:44:41 +0000 (23:44 +0000)]
Lower inlining threshold when the caller has minsize attribute.
When the caller has optsize attribute, we reduce the inlinining threshold
to OptSizeThreshold (=75) if it is not already lower than that. We don't do
the same for minsize and I suspect it was not intentional. This also addresses
a FIXME regarding checking optsize attribute explicitly instead of using the
right wrapper.
Differential Revision: http://reviews.llvm.org/D16493
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259120
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 28 Jan 2016 23:31:52 +0000 (23:31 +0000)]
[CodeView] Use assembler directives for line tables
Adds a new family of .cv_* directives to LLVM's variant of GAS syntax:
- .cv_file: Similar to DWARF .file directives
- .cv_loc: Similar to the DWARF .loc directive, but starts with a
function id. CodeView line tables are emitted by function instead of
by compilation unit, so we needed an extra field to communicate this.
Rather than overloading the .loc direction further, we decided it was
better to have our own directive.
- .cv_stringtable: Emits the codeview string table at the current
position. Currently this just contains the filenames as
null-terminated strings.
- .cv_filechecksums: Emits the file checksum table for all files used
with .cv_file so far. There is currently no support for emitting
actual checksums, just filenames.
This moves the line table emission code down into the assembler. This
is in preparation for implementing the inlined call site line table
format. The inline line table format encoding algorithm requires knowing
the absolute code offsets, so it must run after the assembler has laid
out the code.
David Majnemer collaborated on this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259117
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 28 Jan 2016 23:21:12 +0000 (23:21 +0000)]
Remove unused MC includes from LTOModule.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259115
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 23:03:19 +0000 (23:03 +0000)]
[PlaceSafepoints] Misc. minor cleanups; NFC
These changes are aimed at bringing PlaceSafepoints up to code with the
LLVM coding guidelines:
- Fix variable naming
- Use DenseSet instead of std::set
- Remove dead code
- Minor local code simplifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259112
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 23:03:17 +0000 (23:03 +0000)]
[PlaceSafepoints] Remvoe unused headers, and sort #includes; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259111
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 23:03:14 +0000 (23:03 +0000)]
[PlaceSafepoints] Eliminate dead code; NFC
Now that NoStatepoints is a constant `true`, we can get rid of a bunch
of dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259110
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Jan 2016 22:55:45 +0000 (22:55 +0000)]
Don't mention a command line option in an error.
The program using this code may not have it.
Patch by Wilfred Hughes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259106
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 28 Jan 2016 22:35:48 +0000 (22:35 +0000)]
[RuntimeDyld][MachO] Fix handling of empty eh-frame sections.
This patch switches from an unguarded to a guarded loop for eh-frame record
fixups. In the unguarded version we would always make at least one call to
processFDE, which would then crash trying to fix up a frame that didn't exist.
Fixes <rdar://problem/
24301582>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259103
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 28 Jan 2016 22:29:51 +0000 (22:29 +0000)]
[X86][AVX] Added more thorough 256-bit vector consecutive load tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259100
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 21:51:21 +0000 (21:51 +0000)]
[RS4GC] Change opt %s to opt < %s; NFC
This is as per http://llvm.org/docs/TestingGuide.html#fragile-tests. I
didn't touch the tests outside deopt-bundles/ since they'll be gone
soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259097
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 21:51:14 +0000 (21:51 +0000)]
[PlaceSafepoints] Clamp NoStatepoints to true
This change permanently clamps -spp-no-statepoints to true (the code
deletion will come later). Tests that specifically tested
PlaceSafepoint's ability to wrap calls in gc.statepoint have been moved
to RS4GC's test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259096
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 28 Jan 2016 21:09:50 +0000 (21:09 +0000)]
Bring back the test-suite export in test-release without bringing back the build failures.
Summary:
r257791 disabled the test-suite export since the addition of CMakeLists.txt was
causing build failures. This patch exports the test-suite again but does so
outside the source tree so that it isn't included in the Phase[123] builds.
Reviewers: hans
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16679
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259094
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 28 Jan 2016 20:53:48 +0000 (20:53 +0000)]
AMDGPU: Match fmed3 patterns with legacy fmin/fmax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259090
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 28 Jan 2016 20:53:42 +0000 (20:53 +0000)]
AMDGPU: Match some med3 patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259089
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 28 Jan 2016 20:53:35 +0000 (20:53 +0000)]
AMDGPU: Set DX10Clamp bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259088
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 28 Jan 2016 20:36:46 +0000 (20:36 +0000)]
Fixed compilation issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259087
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 28 Jan 2016 19:54:20 +0000 (19:54 +0000)]
add masked intrinsic tests to show missed opportunities
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259083
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergei Larin [Thu, 28 Jan 2016 18:59:28 +0000 (18:59 +0000)]
[SplitModule] In split module utility we should never separate alias with its aliasee.
Summary: When splitting module with preserving locals, we currently do not handle case of global alias being separated with its aliasee.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16585
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259075
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 28 Jan 2016 18:59:04 +0000 (18:59 +0000)]
Address buildbot fallout from r259065
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259074
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 28 Jan 2016 18:20:05 +0000 (18:20 +0000)]
[X86] Don't transform X << 1 to X + X during type legalization
While legalizing a 64-bit shift left by 1, the following occurs:
We split the shift operand in half: a high half and a low half.
We then create an ADDC with the low half and a ADDE with the high half +
the carry bit from the ADDC.
This is problematic if X is any_ext'd because the high half computation
is now undef + undef + carry bit and there is no way to ensure that the
two undef values had the same bitwise representation. This results in
the lowest bit in the high half turning into garbage.
Instead, do not try to turn shifts into arithmetic during type
legalization.
This fixes PR26350.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259065
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 18:01:03 +0000 (18:01 +0000)]
[PlaceSafepoints] Clean up tests; NFC
Use `opt < %s` instead of `opt %s` as specified in
http://llvm.org/docs/TestingGuide.html#fragile-tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259062
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Jan 2016 17:48:29 +0000 (17:48 +0000)]
Make header self-contained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259060
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 28 Jan 2016 17:13:44 +0000 (17:13 +0000)]
AMDGPU: waitcnt operand fixes
Summary:
Allow lgkmcnt up to 0xF (hardware allows that).
Fix mask for ExpCnt in AMDGPUInstPrinter.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16314
Patch by: Nikolay Haustov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259059
91177308-0d34-0410-b5e6-
96231b3b80d8
Mitch Bodart [Thu, 28 Jan 2016 16:40:51 +0000 (16:40 +0000)]
[X86] Test commit, fixed typos in comments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259057
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 16:11:27 +0000 (16:11 +0000)]
[PlaceSafepoints] Minor test cleanup; NFC
There is no need to place quotes around some_call and
personality_function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259055
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 28 Jan 2016 16:04:37 +0000 (16:04 +0000)]
AMDGPU: Move subtarget specific code out of AMDGPUInstrInfo.cpp
Summary:
Also delete all the stub functions that are identical to the
implementations in TargetInstrInfo.cpp.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D16609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259054
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 28 Jan 2016 15:51:58 +0000 (15:51 +0000)]
[LICM] Keep metadata on control equivalent hoists
Summary:
If the instruction we're hoisting out of a loop into its preheader is
guaranteed to have executed in the loop, then the metadata associated
with the instruction (e.g. !range or !dereferenceable) is valid in the
preheader. This is because once we're in the preheader, we know we're
eventually going to reach the location the metadata was valid at.
This change makes LICM smarter around this, and helps it recognize cases
like these:
```
do {
int a = *ptr; !range !0
...
} while (i++ < N);
```
to
```
int a = *ptr; !range !0
do {
...
} while (i++ < N);
```
Earlier we'd drop the `!range` metadata after hoisting the load from
`ptr`.
Reviewers: igor-laevsky
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D16669
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259053
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 28 Jan 2016 15:38:24 +0000 (15:38 +0000)]
[AArch64] Set MMOs on pre- and post-index instructions.
Without the MMOs the MI scheduler is unable to reason about the dependencies of
these instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259052
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 28 Jan 2016 15:29:11 +0000 (15:29 +0000)]
[x86] Merge multiple calls to DAG.getTargetLoweringInfo(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259050
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 28 Jan 2016 15:08:09 +0000 (15:08 +0000)]
Improve efficiency of handling unmapped subprogram metadata
The stripNullSubprograms function is very inefficient because
it walks all subprograms in all compile units in the dest module
any time a new module is linked in. For LTO in particular this will
get increasingly expensive as more modules are linked.
This patch improves the efficiency in several ways. The first is that
no scanning is necessary when there were no unneeded subprograms
identified in the first place. The second is that only the newly-linked
module's compile unit metadata should be examined.
Fixes PR26346.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259049
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Thu, 28 Jan 2016 13:19:47 +0000 (13:19 +0000)]
Revert r259035, it introduces a cyclic library dependency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259045
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 28 Jan 2016 13:19:25 +0000 (13:19 +0000)]
AVX512: Fix truncate v32i8 to v32i1 lowering implementation.
Enable truncate 128/256bit packed byte/word with AVX512BW but without AVX512VL, use 512bit instructions.
Differential Revision: http://reviews.llvm.org/D16531
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259044
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Jan 2016 11:26:34 +0000 (11:26 +0000)]
Unbreak the wasm backend again after r259035.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259040
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 28 Jan 2016 11:08:03 +0000 (11:08 +0000)]
[mips][microMIPS] Disable FastISel for microMIPS
Author: milena.vujosevic.janicic
Reviewers: dsanders
FastIsel is not supported for microMIPS, thus it needs to be disabled.
Test micromips-zero-mat-uses.ll is deleted since the tested sequence of instructions is not generated for microMIPS without FastISel.
Differential Revision: http://reviews.llvm.org/D15892
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259039
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Thu, 28 Jan 2016 10:07:27 +0000 (10:07 +0000)]
Add backend dignostic printer for unsupported features
Re-commit of r258951 after fixing layering violation.
The related LLVM patch adds a backend diagnostic type for reporting
unsupported features, this adds a printer for them to clang.
In the case where debug location information is not available, I've
changed the printer to report the location as the first line of the
function, rather than the closing brace, as the latter does not give the
user any information. This also affects optimisation remarks.
Differential Revision: http://reviews.llvm.org/D16590
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259035
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 28 Jan 2016 09:45:01 +0000 (09:45 +0000)]
[X86][SSE] Move setTargetShuffleZeroElements closer to getTargetShuffleMask. NFCI.
Keep target shuffle mask helper functions closer together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259034
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Thu, 28 Jan 2016 09:42:39 +0000 (09:42 +0000)]
Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259033
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Thu, 28 Jan 2016 08:33:22 +0000 (08:33 +0000)]
[X86][AVX512] small fix in ptestm intrinsics
move ptestm{q|d} intrinsics from patterns form (in td file) to the intrinsics table
Differential Revision: http://reviews.llvm.org/D16633
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259029
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 28 Jan 2016 06:29:33 +0000 (06:29 +0000)]
ValueTracking: Use fixed array for assumption exclude set in Query.
The Query structure is constructed often and is relevant for compiletime
performance. We can replace the SmallPtrSet for assumption exclusions in
this structure with a fixed size array because we know the maximum
number of elements. This improves typical clang -O3 -emit-llvm compiletime
by 1.2% in my measurements.
Differential Revision: http://reviews.llvm.org/D16204
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259025
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Thu, 28 Jan 2016 06:23:33 +0000 (06:23 +0000)]
[DAGCombiner] Don't add volatile or indexed stores to ChainedStores
Summary:
findBetterNeighborChains does not handle volatile or indexed stores.
However, it did not check when adding stores to ChainedStores.
Reviewers: arsenm
Differential Revision: http://reviews.llvm.org/D16463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259024
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 28 Jan 2016 05:09:01 +0000 (05:09 +0000)]
SmallPtrSet: Add missing include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259021
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Thu, 28 Jan 2016 05:05:17 +0000 (05:05 +0000)]
WebAssembly: fix build
r259016 didn't also revert r258957 which broken the WebAssembly build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259020
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 28 Jan 2016 04:49:14 +0000 (04:49 +0000)]
SmallPtrSet: Make destructor available for inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259019
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 28 Jan 2016 04:49:11 +0000 (04:49 +0000)]
SmallPtrSet: Share some code between copy/move constructor/assignment operator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259018
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 28 Jan 2016 04:49:07 +0000 (04:49 +0000)]
SmallPtrSet: Remove trailing whitespace, fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259017
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 28 Jan 2016 04:41:32 +0000 (04:41 +0000)]
Revert r258951 (and r258950), "Refactor backend diagnostics for unsupported features"
It broke layering violation in LLVMIR.
clang r258950 "Add backend dignostic printer for unsupported features"
llvm r258951 "Refactor backend diagnostics for unsupported features"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259016
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Jan 2016 03:59:09 +0000 (03:59 +0000)]
[WebAssembly] Don't stackify a register def past a get_local use in the same tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259013
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Thu, 28 Jan 2016 01:23:18 +0000 (01:23 +0000)]
Minor code formatting cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259010
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 28 Jan 2016 01:22:44 +0000 (01:22 +0000)]
[WebAssembly] Enhanced register stackification
This patch revamps the RegStackifier pass with a new tree traversal mechanism,
enabling three major new features:
- Stackification of values with multiple uses, using the result value of set_local
- More aggressive stackification of instructions with side effects
- Reordering operands in commutative instructions to enable more stackification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259009
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Thu, 28 Jan 2016 00:54:01 +0000 (00:54 +0000)]
Minor style cleanup of CFLAA. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259008
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 28 Jan 2016 00:03:16 +0000 (00:03 +0000)]
less indenting; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259002
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 27 Jan 2016 22:21:25 +0000 (22:21 +0000)]
[TTI] Add getPrefetchDistance from PPCLoopDataPrefetch, NFC
This patch is part of the work to make PPCLoopDataPrefetch
target-independent
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758).
As it was discussed in the above thread, getPrefetchDistance is
currently using instruction count which may change in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258995
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 27 Jan 2016 21:53:08 +0000 (21:53 +0000)]
Tweak unnamed label syntax in textual IR for easier matching in tests.
Change the unnamed label comments like
; <label>:8 ; preds = %1
to
; <label>:8: ; preds = %1
This way lit tests can match [[LABEL]]: in both asserts and no-asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258993
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Wed, 27 Jan 2016 21:17:39 +0000 (21:17 +0000)]
[WebAssembly] Implement byval arguments
Summary:
Just does the simple allocation of a stack object and passes
a pointer to the callee.
Differential Revision: http://reviews.llvm.org/D16610
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258989
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 27 Jan 2016 21:13:18 +0000 (21:13 +0000)]
[utils] Add windows support to update_llc_test_checks.py
Strip dos line endings from llc generated files to allow the regex patterns to match them.
Ensure updated *.ll files are generated with unix style line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258987
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 27 Jan 2016 20:27:44 +0000 (20:27 +0000)]
[llvm-nm] Remove redundant check for file validity.
We already perform it at the beginning of the function so we can't
arrive here with an invalid object. Also, add a test so that bugs
won't sneak in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258982
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 27 Jan 2016 19:32:29 +0000 (19:32 +0000)]
ARMv7k: base ABI decision on v7k Arch rather than watchos OS.
Various bits we want to use the new ABI actually compile with "-arch armv7k
-miphoneos-version-min=9.0". Not ideal, but also not ridiculous given how
slices work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258975
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 19:29:56 +0000 (19:29 +0000)]
One more batch of self-containing headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258974
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 19:29:42 +0000 (19:29 +0000)]
Don't put classes in headers into anonymous namespaces.
You want ODR violations? That's how you get ODR violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258973
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 27 Jan 2016 19:22:45 +0000 (19:22 +0000)]
[SimplifyCFG] limit recursion depth when speculating instructions (PR26308)
This is a fix for:
https://llvm.org/bugs/show_bug.cgi?id=26308
With the switch to using the TTI cost model in:
http://reviews.llvm.org/rL228826
...it became possible to hit a zero-cost cycle of instructions (gep -> phi -> gep...),
so we need a cap for the recursion in DominatesMergePoint().
A recursion depth parameter was already added for a different reason in:
http://reviews.llvm.org/rL255660
...so we can just set a limit for it.
I pulled "10" out of the air and made it an independent parameter that we can play with.
It might be higher than it needs to be given the currently low default value of
PHINodeFoldingThreshold (2). That's the starting cost value that we enter the recursion
with, and most instructions have cost set to TCC_Basic (1), so I don't think we're going
to speculate more than 2 instructions with the current parameters.
As noted in the review and the TODO comment, we can do better than just limiting recursion
depth.
Differential Revision: http://reviews.llvm.org/D16637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258971
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 27 Jan 2016 19:05:08 +0000 (19:05 +0000)]
Add support for objc_unsafeClaimAutoreleasedReturnValue to the
ObjC ARC Optimizer.
The main implication of this is:
1. Ensuring that we treat it conservatively in terms of optimization.
2. We put the ASM marker on it so that the runtime can recognize
objc_unsafeClaimAutoreleasedReturnValue from releaseRV.
<rdar://problem/
21567064>
Patch by Michael Gottesman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258970
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 18:03:40 +0000 (18:03 +0000)]
Unbreak wasm build after r258951.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258957
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 18:03:37 +0000 (18:03 +0000)]
Make more headers self-contained.
A lot of this comes from the new complete type requirement of DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258956
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Wed, 27 Jan 2016 17:30:33 +0000 (17:30 +0000)]
Refactor backend diagnostics for unsupported features
The BPF and WebAssembly backends had identical code for emitting errors
for unsupported features, and AMDGPU had very similar code. This merges
them all into one DiagnosticInfo subclass, that can be used by any
backend.
There should be minimal functional changes here, but some AMDGPU tests
have been updated for the new format of errors (it used a slightly
different format to BPF and WebAssembly). The AMDGPU error messages will
now benefit from having precise source locations when debug info is
available.
The implementation of DiagnosticInfoUnsupported::print must be in
lib/Codegen rather than in the existing file in lib/IR/ to avoid
introducing a dependency from IR to CodeGen.
Differential Revision: http://reviews.llvm.org/D16590
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258951
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 27 Jan 2016 17:05:09 +0000 (17:05 +0000)]
[IndVars] Hoist DataLayout load out of loop; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258946
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 27 Jan 2016 17:05:06 +0000 (17:05 +0000)]
[IndVars] Use isSCEVable; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258945
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 27 Jan 2016 17:05:03 +0000 (17:05 +0000)]
[IndVars] Use range-for; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258944
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 16:53:42 +0000 (16:53 +0000)]
Move SafeStack to CodeGen.
It depends on the target machinery, that's not available for
instrumentation passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258942
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 27 Jan 2016 16:51:57 +0000 (16:51 +0000)]
[X86][SSE] Test insertps instrinsic calls with masks that can't combine to something simpler
For these basic tests of the intrinsic, make sure the mask can't simplify to movss, blend-with-zero or something else
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258941
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 16:32:26 +0000 (16:32 +0000)]
Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/
It's a SelectionDAG thing, not a Target thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258939
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 16:05:42 +0000 (16:05 +0000)]
Move passes that live in lib/CodeGen out of Scalar.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258938
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 16:05:37 +0000 (16:05 +0000)]
Make some headers self-contained, remove unused includes that violate layering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258937
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 27 Jan 2016 15:53:52 +0000 (15:53 +0000)]
AMDGPU/SI: Fix commuting of 32-bit VOPC instructions
Summary:
We didn't have entries in the commuting table for the 32-bit
instructions. I don't think we hit this problem now, but we
will once uniform branching is enabled. Tests will come in
a later commit.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D16600
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258936
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Wed, 27 Jan 2016 14:05:35 +0000 (14:05 +0000)]
[DebugInfo] Support zero-length CIE in the _eh_frame parser
MCJIT emits zero-length CIE at the end of the _eh_frame section. This change
ensures that parser inside DebugInfo will not crash and correctly record such cases.
We are now recording DW_EH_PE_omit as a default value for FDE and LSDA encodings.
Also Offset != EndAugmentationOffset assertion check will only happen if augmentation
string had 'z' letter in it.
Differential Revision: http://reviews.llvm.org/D16588
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258931
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Wed, 27 Jan 2016 13:43:27 +0000 (13:43 +0000)]
Reapply commit r258404 with fix
This patch is the second attempt to reapply commit r258404. There was bug in
the initial patch and subsequent fix (mentioned below).
The initial patch caused an assertion because we were computing smaller type
sizes for instructions that cannot be demoted. The fix first determines the
instructions that will be demoted, and then applies the smaller type size to
only those instructions.
This should fix PR26239 and PR26307.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258929
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 13:22:39 +0000 (13:22 +0000)]
Remove superfluous call to std::to_string that's breaking the cygwin build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258928
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 12:44:12 +0000 (12:44 +0000)]
Revert "Allow X86::COND_NE_OR_P and X86::COND_NP_OR_E to be reversed."
and "Add a missing test case for r258847."
This reverts commit r258847, r258848. Causes miscompilations and backend
errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258927
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Wed, 27 Jan 2016 11:34:51 +0000 (11:34 +0000)]
Add missing build attribute regression tests for Cortex-A8
Differential Revision: http://reviews.llvm.org/D16576
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258923
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 27 Jan 2016 11:19:45 +0000 (11:19 +0000)]
AMDGPU/SI: Stoney has only 16 LDS banks
Summary:
This is a candidate for stable, along with all patches that add the "stoney"
processor.
Reviewers: tstellarAMD
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16485
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258922
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Jan 2016 10:01:28 +0000 (10:01 +0000)]
Move MCTargetAsmParser.h to llvm/MC/MCParser where it belongs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258917
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 27 Jan 2016 08:57:46 +0000 (08:57 +0000)]
AVX512: Fix vpmovzxbw predicate for AVX1/2 instructions.
Differential Revision: http://reviews.llvm.org/D16595
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258915
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 27 Jan 2016 08:43:25 +0000 (08:43 +0000)]
AVX512: Add store mask patterns.
Differential Revision: http://reviews.llvm.org/D16596
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258914
91177308-0d34-0410-b5e6-
96231b3b80d8
Chen Li [Wed, 27 Jan 2016 07:40:41 +0000 (07:40 +0000)]
[IndVarSimplify] Rewrite loop exit values with their initial values from loop preheader
Summary:
This is a revised version of D13974, and the following quoted summary are from D13974
"This patch adds support to check if a loop has loop invariant conditions which lead to loop exits. If so, we know that if the exit path is taken, it is at the first loop iteration. If there is an induction variable used in that exit path whose value has not been updated, it will keep its initial value passing from loop preheader. We can therefore rewrite the exit value with
its initial value. This will help remove phis created by LCSSA and enable other optimizations like loop unswitch."
D13974 was committed but failed one lnt test. The bug was that we only checked the condition from loop exit's incoming block was a loop invariant. But there could be another condition from loop header to that incoming block not being a loop invariant. This would produce miscompiled code.
This patch fixes the issue by checking if the incoming block is loop header, and if not, don't perform the rewrite. The could be further improved by recursively checking all conditions leading to loop exit block, but I'd like to check in this simple version first and improve it with future patches.
Reviewers: sanjoy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16570
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258912
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Wed, 27 Jan 2016 04:59:05 +0000 (04:59 +0000)]
[SLPVectorizer] Swap the checking order of isCommutative and isConsecutiveAccess
NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258909
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 27 Jan 2016 04:20:24 +0000 (04:20 +0000)]
SmallPtrSet: Inline the part of insert_imp in the small case
Most of the time we only hit the small case, so it is beneficial to pull
it out of the insert_imp() implementation. This improves compile time
at least for non-LTO builds.
Differential Revision: http://reviews.llvm.org/D16619
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258908
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 27 Jan 2016 03:45:25 +0000 (03:45 +0000)]
Function: Slightly simplify code by using existing hasFnAttribute() convenience function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258907
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 27 Jan 2016 03:13:09 +0000 (03:13 +0000)]
[Coverage] Fix more bugs in covmap V1 documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258906
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 27 Jan 2016 02:59:41 +0000 (02:59 +0000)]
Revert "Revert "[SimplifyCFG] allow speculation of exactly one expensive instruction (PR24818)""
This reverts commit r258903 which reverted r255660. r258903 was an
accidental commit and should not have been committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258905
91177308-0d34-0410-b5e6-
96231b3b80d8