Commit Graph

126991 Commits

Author SHA1 Message Date
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
Sanjoy Das
5d26083e75 [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
2016-01-28 23:03:19 +00:00
Sanjoy Das
2f9d3a31a6 [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
2016-01-28 23:03:17 +00:00
Sanjoy Das
a14111b972 [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
2016-01-28 23:03:14 +00:00
Rafael Espindola
158cd22c3c 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
2016-01-28 22:55:45 +00:00
Lang Hames
88ffce3c57 [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
2016-01-28 22:35:48 +00:00
Simon Pilgrim
681c4b8b04 [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
2016-01-28 22:29:51 +00:00
Sanjoy Das
aca48e8203 [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
2016-01-28 21:51:21 +00:00
Sanjoy Das
8c0cdd184d [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
2016-01-28 21:51:14 +00:00
Daniel Sanders
508957013b 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
2016-01-28 21:09:50 +00:00