Commit Graph

127000 Commits

Author SHA1 Message Date
Xinliang David Li
fd32fbe9a5 Improve test speed (interchange loop, reducing padding)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 21:13:55 +00:00
Yaron Keren
55307987a1 Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment.
clang part in r259232, this is the LLVM part of the patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 20:50:44 +00:00
Sanjay Patel
b17df8b4d7 [InstCombine] avoid an insertelement transformation that induces the opposite extractelement fold (PR26354)
We would infinite loop because we created a shufflevector that was wider than
needed and then failed to combine that with the insertelement. When subsequently
visiting the extractelement from that shuffle, we see that it's unnecessary,
delete it, and trigger another visit to the insertelement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 20:21:02 +00:00
David Majnemer
3a1ed8c7cb Unbreak windows buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259231 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 19:38:03 +00:00
David Majnemer
5c900cb299 [CodeView] Implement .cv_inline_linetable
This support is _very_ rudimentary, just enough to get some basic data
into the CodeView debug section.

Left to do is:
- Use the combined opcodes to save space.
- Do something about code offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259230 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 19:24:12 +00:00
Tim Northover
b226159d1c ARM: don't mangle DAG constant if it has more than one use
The basic optimisation was to convert (mul $LHS, $complex_constant) into
roughly "(shl (mul $LHS, $simple_constant), $simple_amt)" when it was expected
to be cheaper. The original logic checks that the mul only has one use (since
we're mangling $complex_constant), but when used in even more complex
addressing modes there may be an outer addition that can pick up the wrong
value too.

I *think* the ARM addressing-mode problem is actually unreachable at the
moment, but that depends on complex assessments of the profitability of
pre-increment addressing modes so I've put a real check in there instead of an
assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259228 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 19:18:46 +00:00
Derek Schuff
a42f385f92 [WebAssembly] Update test expectations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 18:54:38 +00:00
Derek Schuff
f36f66ff2f [WebAssembly] Support frame pointer
Add support for frame pointer use in prolog/epilog.
Supports dynamic allocas but not yet over-aligned locals.
Target-independend CG generates SP updates, but we still need to write
back the SP value to memory when necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259220 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 18:37:49 +00:00
Ahmed Bougacha
cda3a83cc9 [X86] Add missing "CHECK" colon in r259065 test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 18:25:33 +00:00
Reid Kleckner
b5d1bc265b [codeview] Begin to add support for inlined call sites
Summary:
There are three parts to inlined call frames:
1. The inlinee line subsection
2. The inline site symbol record
3. The function ids referenced by both

This change starts by emitting function ids (3) for all subprograms and
emitting the base inline site symbol record (2). The actual line numbers
in (2) use an encoded format that will come next, along with the inlinee
line subsection.

Reviewers: majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16333

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 18:16:43 +00:00
David Majnemer
0b7532c243 Fix the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259215 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 17:46:57 +00:00
Jonas Paulsson
c8d11e8593 Temporarily revert "[ScheduleDAGInstrs::buildSchedGraph()] Handling of memory dependecies rewritten."
Some buildbot failures needs to be debugged.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259213 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 17:22:43 +00:00
Matthew Simpson
fd50cfc8b4 [SLP] Fix printing of debug statement (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259212 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 17:21:38 +00:00
Sanjoy Das
9a08fab238 [RS4GC] Address post-commit review on r259208 from David
NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259211 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 17:20:49 +00:00
Sanjoy Das
a46730f103 [RS4GC] Remove unnecessary const_cast; NFC
GCRelocateInst::getDerivedPtr already returns a non-const llvm::Value
pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 16:54:49 +00:00
Sanjoy Das
a36c5336f9 [RS4GC] Minor local cleanup to StabilizeOrder; NFC
- Locally declare struct, and call it BaseDerivedPair
 - Use a lambda to compare, instead of a singleton with uninitialized
   fields
 - Add a constructor to BaseDerivedPair and use SmallVector::emplace_back

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259208 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 16:50:34 +00:00
Reid Kleckner
78ee0ee137 [CodeView] Fix dumping the is_stmt bit from the line table
Bug pointed out by George Rimar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259205 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 16:39:04 +00:00
Sanjoy Das
f3d1bcf4be [RS4GC] Remove unnecessary redirections from tests; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 16:32:30 +00:00
Sanjoy Das
194a874752 [RS4GC] Add some missing tests and CHECK: lines
I missed porting these in rL259129.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 16:32:25 +00:00
Zoran Jovanovic
8922077b90 [mips] Absolute value macro expansion
Author: obucina
Reviewers: dsanders
Differential Revision: http://reviews.llvm.org/D16323


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 16:18:34 +00:00
Jonas Paulsson
72374d2610 [ScheduleDAGInstrs::buildSchedGraph()] Handling of memory dependecies rewritten.
The buildSchedGraph() was in need of reworking as the AA features had been
added on top of earlier code. It was very difficult to understand, and buggy.
There had been found cases where scheduling dependencies had actually been
missed (see r228686).

AliasChain, RejectMemNodes, adjustChainDeps() and iterateChainSucc() have
been removed. There are instead now just the four maps from Value to SUs, which
have been renamed to Stores, Loads, NonAliasStores and NonAliasLoads.

An unknown store used to become the AliasChain, but now becomes a store mapped
to 'unknownValue' (in Stores). What used to be PendingLoads is instead the
list of SUs mapped to 'unknownValue' in Loads.

RejectMemNodes and adjustChainDeps() used to be a safety-net for everything.
The SU maps were sometimes cleared and SUs were put in RejectMemNodes, where
adjustChainDeps() would look. Instead of this, a more straight forward approach
is used in maintaining the SU maps without clearing them and simply letting
them grow over time. Instead of the cutt-off in adjustChainDeps() search, a
reduction of maps will be done if needed (see below).

Each SUnit either becomes the BarrierChain, or is put into one of the maps. For
each SUnit encountered, all the information about previous ones are still
available until a new BarrierChain is set, at which point the maps are cleared.

For huge regions, the algorithm becomes slow, therefore the maps will get
reduced at a threshold (current default is 1000 nodes), by a fraction (default 1/2).
These values can be tuned by use of CL options in case some test case shows that
they need to be changed (-dag-maps-huge-region and -dag-maps-reduction-size).

There has not been any considerable change observed in output quality or compile
time. There may now be more DAG edges inserted than before (i.e. if A->B->C,
then A->C is not needed). However, in a comparison run there were fewer total
calls to AA, and a somewhat improved compile time, which means this seems to
be not a problem.

http://reviews.llvm.org/D8705
Reviewers: Hal Finkel, Andy Trick.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 16:11:18 +00:00
Benjamin Kramer
18481855bd [IR] Move definitions of users of Use::set to Value.h
Still ugly, but at least Use.h is self-contained again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 12:47:05 +00:00
Benjamin Kramer
9bffff5b5b [IR] Shuffle the code for getSequentialElementType to type.h to avoid circular header dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 12:47:01 +00:00
Alexandros Lamprineas
73895c4cf0 [ARM] Emit trap instruction using .inst directive
The trap instruction is emitted as a data-in-text rather
than an instruction. This patch uses the .inst directive
for emitting trap.

Differential Revision: http://reviews.llvm.org/D16684

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259182 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 10:23:32 +00:00
Matt Arsenault
3d679fa973 AMDGPU: Remove 24-bit intrinsics
The known bit matching code seems to work reasonably well,
so these shouldn't really be needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259180 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 10:05:16 +00:00
George Burgess IV
ca9ee4390a Minor bugfix in AAResults::getModRefInfo.
Also removed a few redundant `else`s.

Bug was found by a test I wrote for MemorySSA (in review at
http://reviews.llvm.org/D7864; shiny update coming soon). So, assuming
that lands at some point, this should be covered by that. If anyone
feels this deserves its own explicit test case, please let me know.
I'll write one.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 07:51:15 +00:00
Eric Christopher
f704e77392 Refactor common code for PPC fast isel load immediate selection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259178 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 07:20:30 +00:00
Eric Christopher
d1416a5661 Since LI/LIS sign extend the constant passed into the instruction we should
check that the sign extended constant fits into 16-bits if we want a
zero extended value, otherwise go ahead and put it together piecemeal.

Fixes PR26356.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259177 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 07:20:01 +00:00
Eric Christopher
f25be927dc Fix up conditional formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259176 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 07:19:49 +00:00
Akira Hatanaka
0dc389daac [llvm-bcanalyzer] Dump bitcode wrapper header
This patch enables llvm-bcanalyzer to print the bitcode wrapper header
if the file has one, which is needed to test the changes made in
r258627 (bitcode-wrapper-header-armv7m.ll is the test case for r258627).

Differential Revision: http://reviews.llvm.org/D16642


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259162 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 05:55:09 +00:00
David Majnemer
707c12c224 [WinEH] Don't perform state stores in cleanups
Our cleanups do not support true lexical nesting of funclets which
obviates the need to perform state stores.

This fixes PR26361.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 05:33:15 +00:00
Matthias Braun
13a0516b3c SmallPtrSetTest: More checks for the swap() testing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259152 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 03:34:36 +00:00
Matthias Braun
2f0c787077 SmallPtrSetTest: Check that iterators are still valid after erase()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 03:34:34 +00:00
David Majnemer
208a5cc2b0 Revert "Reapply commit r258404 with fix"
This reverts commit r258929, it caused PR26364.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 02:43:22 +00:00
David Blaikie
70c5668b87 Fix some -Wstring-conversion warnings
I don't seem to see these locally, maybe just need to update my
compiler, or we haven't turned them on for LLVM's build and we should...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259146 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 02:23:13 +00:00
Philip Reames
e0561f3765 [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
2016-01-29 02:23:10 +00:00
Junmo Park
7d3e90397f Minor code cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 01:39:39 +00:00
Ahmed Bougacha
3ea0d92811 [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
2016-01-29 01:08:41 +00:00
Sanjoy Das
79cc2baa7b [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
2016-01-29 01:03:20 +00:00
Sanjoy Das
e601fa2860 [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
2016-01-29 01:03:17 +00:00
Reid Kleckner
1689efb4d2 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
2016-01-29 00:49:42 +00:00
Sanjoy Das
403c3ea899 [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
2016-01-29 00:28:57 +00:00
Reid Kleckner
ae8e13919a 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
2016-01-29 00:13:28 +00:00
Sanjoy Das
99d459d91e [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
2016-01-29 00:13:26 +00:00
Reid Kleckner
cb176fdd52 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
2016-01-29 00:03:34 +00:00
Reid Kleckner
778020bb36 Silence gcc warning about ternary and enumerations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259123 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 23:59:35 +00:00
Sanjoy Das
85426463f8 [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
2016-01-28 23:49:27 +00:00
Easwaran Raman
4cee58480b 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
2016-01-28 23:44:41 +00:00
Reid Kleckner
200dc330a0 [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
2016-01-28 23:31:52 +00:00
Reid Kleckner
eac4c34846 Remove unused MC includes from LTOModule.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 23:21:12 +00:00