Commit Graph

127816 Commits

Author SHA1 Message Date
Justin Lebar
97a9fd0f0b Update langref to indicate that calls may be convergent.
Summary:
As previously written, only functions could be convergent.  But calls
need to have a notion of convergence as well.

To see why this is important, consider an indirect call.  We may or may
not want to disable optimizations around it and behave as though we're
calling a convergent function -- it depends on the semantics of the
language we're compiling.  Thus the need for this attr on the call.

Reviewers: jingyue, joker.eph

Subscribers: llvm-commits, tra, jhen, arsenm, chandlerc, hfinkel, resistor

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 17:46:41 +00:00
Justin Lebar
e4a9a482ae Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261110 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 17:46:39 +00:00
Rafael Espindola
f90cf923f6 Represent the dynamic table itself with a DynRegionInfo.
The dynamic table is also an array of a fixed structure, so it can be
represented with a DynReginoInfo.

No major functionality change. The extra error checking is covered by
existing tests with a broken dynamic program header.

Idea extracted from r260488. I did the extra cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261107 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 16:48:00 +00:00
Mitch Bodart
b26327c7b7 Fix some erroneous lit test failures due to unlucky name of working directory.
Differential Revision:  http://reviews.llvm.org/D17044


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261104 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 16:35:18 +00:00
Rafael Espindola
bf33cfed0e Add a unwrapOrError utility and use it to simplify ELFDumper.cpp.
Utility extracted from r260488.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261103 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 16:21:49 +00:00
Simon Pilgrim
192b67b576 [X86][SSE] Update pshufb mask tests.
We are getting better at combining constant pshufb masks - use a real input instead of undef.

Add test for decoding multi-use bitcasted masks as well (actual support will come soon).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261101 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 15:52:39 +00:00
Rafael Espindola
7ecc477012 Change how readobj stores info about dynamic symbols.
We used to keep both a section and a pointer to the first symbol.

The oddity of keeping a section for dynamic symbols is because there is
a DT_SYMTAB but no DT_SYMTABZ, so to print the table we have to find the
size via a section table.

The reason for still keeping a pointer to the first symbol is because we
want to be able to print relocation tables even if the section table is
missing (it is mandatory only for files used in linking).

With this patch we keep just a DynRegionInfo. This then requires
changing a few places that were asking for a Elf_Shdr but actually just
needed the first symbol.

The test change is to delete the program header pointer.
Now that we use the information of both DT_SYMTAB and .dynsym, we don't
depend on the sh_entsize of .dynsym if we see DT_SYMTAB.

Note: It is questionable if it is worth it putting the effort to report
broken sh_entsize given that in files with no section table we have to
assume it is sizeof(Elf_Sym), but that is for another change.

Extracted from r260488.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 15:38:21 +00:00
Krzysztof Parzyszek
c264560dc8 [Hexagon] Fold object construction into map::insert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 15:02:07 +00:00
Simon Pilgrim
a1e2a8fb10 [X86][SSE] Update pshufb mask test to use a real input instead of undef
We are getting better at combining constant pshufb masks - this test would've failed once we decode bitcasted masks as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261095 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 14:56:58 +00:00
Chad Rosier
45f4118982 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 14:45:36 +00:00
Igor Breger
4261b074f6 AVX512: Fix LowerMSCATTER() return value.
Bug description:
  The bug was discovered when test was compiled with -O0.
  In case scatter result is DAG root , VectorLegalizer failed (assert) due to LowerMSCATTER() return kmask as result.
Change LowerMSCATTER() to return chain as original node do.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261090 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 14:04:33 +00:00
Scott Egerton
56809f502f [mips] Removed the SHF_ALLOC flag and the SHT_REL flag from the .pdr section.
This section is used for debug information and has no need to be
in memory at runtime. This patch also fixes an error when compiling
the Linux kernel. The error is that there are relocations within the
.pdr section in a VDSO. SHT_REL was removed as it is a section type
and not a section flag, therefore it does not make sense for it to
be there. With this patch, LLVM now emits the same flags as
the GNU assembler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261083 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 11:15:16 +00:00
Simon Pilgrim
63d2194a7c [X86][AVX] Support bit-blend integer shuffles for 256-bit integer vectors
AVX1 doesn't support the shuffling of 256-bit integer vectors. For 32/64-bit elements we get around this by shuffling as float/double but for 8/16-bit elements (assuming they can't widen) we currently just split, shuffle as 128-bit vectors and concatenate the results back.

This patch adds the ability to lower using the bit-blend patterns before defaulting to the splitting behaviour.

Part 2 of 2

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261082 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 10:50:06 +00:00
Simon Pilgrim
19033384c0 [X86][AVX] Support bit-mask integer shuffles for 256-bit integer vectors
AVX1 doesn't support the shuffling of 256-bit integer vectors. For 32/64-bit elements we get around this by shuffling as float/double but for 8/16-bit elements (assuming they can't widen) we currently just split, shuffle as 128-bit vectors and concatenate the results back.

This patch adds the ability to lower using the bit-mask patterns before defaulting to the splitting behaviour. In some cases this ends up matching what AVX2 would do anyhow or what AVX1 does on the split vectors.

Part 1 of 2

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 10:37:49 +00:00
Simon Pilgrim
159b9f800a [X86][SSE] Tidyup BUILD_VECTOR operand collection. NFCI.
Avoid reuse of operand variables, keep them local to a particular lowering - the operand collection is unique to each case anyhow.

Renamed from V to Ops to more closely match their purpose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261078 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 10:12:30 +00:00
Benjamin Kramer
e9fbdcd8e7 [Hexagon] cast<> a reference instead of referencing + dereferencing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 09:28:45 +00:00
David Blaikie
11dc371299 llvm-dwp: Support for type units when merging DWPs into larger DWPs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 07:00:24 +00:00
David Blaikie
2697fc5688 Fix the hash function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261071 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 07:00:22 +00:00
Cong Hou
ff3f2ebae3 Detecte vector reduction operations just before instruction selection.
This patch detects vector reductions before instruction selection. Vector
reductions are vectorized reduction operations, and for such operations we have
freedom to reorganize the elements of the result as long as the reduction of them
stay unchanged. This will enable some reduction pattern recognition during
instruction combine such as SAD/dot-product on X86. A flag is added to
SDNodeFlags to mark those vector reduction nodes to be checked during instruction
combine.

To detect those vector reductions, we search def-use chains starting from the
given instruction, and check if all uses fall into two categories:

1. Reduction with another vector.
2. Reduction on all elements.

in which 2 is detected by recognizing the pattern that the loop vectorizer
generates to reduce all elements in the vector outside of the loop, which
includes several ShuffleVector and one ExtractElement instructions.


Differential revision: http://reviews.llvm.org/D15250



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 06:37:04 +00:00
Hans Wennborg
84b54daea5 Revert r260979 "[X86] Enable the LEA optimization pass by default."
Asserts are still firing in Chromium builds. PR26575.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261058 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 02:49:59 +00:00
Xinliang David Li
1c988595b7 revert r261038: arm/aarch64 bot failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 02:39:34 +00:00
Mehdi Amini
1df6c24ac6 Revert "Query the StringMap only once when creating MDString (NFC)"
This reverts commit r261030 and r261036.
(The revision was marked "approved" on phabricator, but some concerns
were raised on the mailing list. Thanks D. Blaikie for notifying me.)

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261055 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 02:18:58 +00:00
Haicheng Wu
5ce6e32359 [AliasSetTracker] Teach AliasSetTracker about MemSetInst
This change is to fix the problem discussed in
http://lists.llvm.org/pipermail/llvm-dev/2016-February/095446.html.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 02:01:50 +00:00
JF Bastien
eeab9a44a1 WebAssembly: update expected failures
r261050 seems to inadvertently fix the assertion failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 01:59:23 +00:00
Dan Gohman
1a8392e483 [WebAssembly] Call memcpy for large byval copies.
This fixes very slow compilation on
test/CodeGen/Generic/2010-11-04-BigByval.ll . Note that MaxStoresPerMemcpy
and friends are not yet carefully tuned so the cutoff point is currently
somewhat arbitrary. However, it's important that there be a cutoff point
so that we don't emit unbounded quantities of loads and stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 01:43:37 +00:00
JF Bastien
39e0580624 WebAssembly: update expected test failures
r261032 adds frame address support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261044 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 00:34:15 +00:00
Chandler Carruth
a59e5882a0 [LCG] Construct an actual call graph with call-edge SCCs nested inside
reference-edge SCCs.

This essentially builds a more normal call graph as a subgraph of the
"reference graph" that was the old model. This allows both to exist and
the different use cases to use the aspect which addresses their needs.
Specifically, the pass manager and other *ordering* constrained logic
can use the reference graph to achieve conservative order of visit,
while analyses reasoning about attributes and other properties derived
from reachability can reason about the direct call graph.

Note that this isn't necessarily complete: it doesn't model edges to
declarations or indirect calls. Those can be found by scanning the
instructions of the function if desirable, and in fact every user
currently does this in order to handle things like calls to instrinsics.
If useful, we could consider caching this information in the call graph
to save the instruction scans, but currently that doesn't seem to be
important.

An important realization for why the representation chosen here works is
that the call graph is a formal subset of the reference graph and thus
both can live within the same data structure. All SCCs of the call graph
are necessarily contained within an SCC of the reference graph, etc.

The design is to build 'RefSCC's to model SCCs of the reference graph,
and then within them more literal SCCs for the call graph.

The formation of actual call edge SCCs is not done lazily, unlike
reference edge 'RefSCC's. Instead, once a reference SCC is formed, it
directly builds the call SCCs within it and stores them in a post-order
sequence. This is used to provide a consistent platform for mutation and
update of the graph. The post-order also allows for very efficient
updates in common cases by bounding the number of nodes (and thus edges)
considered.

There is considerable common code that I'm still looking for the best
way to factor out between the various DFS implementations here. So far,
my attempts have made the code harder to read and understand despite
reducing the duplication, which seems a poor tradeoff. I've not given up
on figuring out the right way to do this, but I wanted to wait until
I at least had the system working and tested to continue attempting to
factor it differently.

This also requires introducing several new algorithms in order to handle
all of the incremental update scenarios for the more complex structure
involving two edge colorings. I've tried to comment the algorithms
sufficiently to make it clear how this is expected to work, but they may
still need more extensive documentation.

I know that there are some changes which are not strictly necessarily
coupled here. The process of developing this started out with a very
focused set of changes for the new structure of the graph and
algorithms, but subsequent changes to bring the APIs and code into
consistent and understandable patterns also ended up touching on other
aspects. There was no good way to separate these out without causing
*massive* merge conflicts. Ultimately, to a large degree this is
a rewrite of most of the core algorithms in the LCG class and so I don't
think it really matters much.

Many thanks to the careful review by Sanjoy Das!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261040 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 00:18:16 +00:00
Reid Kleckner
f8cab7eaae [X86] Fix a shrink-wrapping miscompile around __chkstk
__chkstk clobbers EAX. If EAX is live across the prologue, then we have
to take extra steps to save it. We already had code to do this if EAX
was a register parameter. This change adapts it to work when shrink
wrapping is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261039 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 00:17:33 +00:00
Xinliang David Li
20fb2a1a13 New test case: make sure alloc bit is not set for covmap section on Linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 00:14:52 +00:00
Dan Gohman
884b0026bf [WebAssembly] Use SDValue::getConstantOperandVal. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 00:14:03 +00:00
Mehdi Amini
6407ba7698 Fix MSVC bot: apparently visual studio does not like explicitly defaulted move ctor
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17 00:11:59 +00:00
Andrew Kaylor
4d774f8097 Fix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows
Differential Revision: http://reviews.llvm.org/D16940



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 23:52:18 +00:00
Dan Gohman
f3e241c3c2 [WebAssembly] Implement __builtin_frame_address.
Differential Revision: http://reviews.llvm.org/D17307


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261032 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 23:48:04 +00:00
Mehdi Amini
30d7b4334a Query the StringMap only once when creating MDString (NFC)
Summary: Loading IR with debug info improves MDString::get() from 19ms to 10ms.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261030 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 23:05:56 +00:00
Mehdi Amini
f5146973a3 Define the ThinLTO Pipeline (experimental)
Summary:
On the contrary to Full LTO, ThinLTO can afford to shift compile time
from the frontend to the linker: both phases are parallel (even if
it is not totally "free": projects like clang are reusing product
from the "compile phase" for multiple link, think about
libLLVMSupport reused for opt, llc, etc.).

This pipeline is based on the proposal in D13443 for full LTO. We
didn't move forward on this proposal because the LTO link was far too
long after that. We believe that we can afford it with ThinLTO.

The ThinLTO pipeline integrates in the regular O2/O3 flow:

 - The compile phase perform the inliner with a somehow lighter
   function simplification. (TODO: tune the inliner thresholds here)
   This is intendend to simplify the IR and get rid of obvious things
   like linkonce_odr that will be inlined.
 - The link phase will run the pipeline from the start, extended with
   some specific passes that leverage the augmented knowledge we have
   during LTO. Especially after the inliner is done, a sequence of
   globalDCE/globalOpt is performed, followed by another run of the
   "function simplification" passes. It is not clear if this part
   of the pipeline will stay as is, as the split model of ThinLTO
   does not allow the same benefit as FullLTO without added tricks.

The measurements on the public test suite as well as on our internal
suite show an overall net improvement. The binary size for the clang
executable is reduced by 5%. We're still tuning it with the bringup
of ThinLTO and it will evolve, but this should provide a good starting
point.

Reviewers: tejohnson

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261029 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 23:02:29 +00:00
Mehdi Amini
e300292233 Refactor the PassManagerBuilder: extract a "addFunctionSimplificationPasses()" (NFC)
It is intended to contains the passes run over a function after the
inliner is done with a function and before it moves to its callers.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261028 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:54:27 +00:00
Adam Nemet
6782c499e7 Fix test from r261013
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261027 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:50:19 +00:00
Simon Pilgrim
900da0f340 [X86][AVX] Regenerated vselect tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261026 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:33:27 +00:00
Ahmed Bougacha
9867695c88 [X86] Remove the now-unused X86ISD::PSIGN. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261025 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:14:12 +00:00
Ahmed Bougacha
3c43b12f76 [X86] Generalize logic blend of (x, -x) combine to match (-x, x).
I suspect this is what let PR26110 lie dormant for so long.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261024 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:14:07 +00:00
Ahmed Bougacha
a16d991795 [X86] Don't turn (c?-v:v) into (c?-v:0) by blindly using PSIGN.
Currently, we sometimes miscompile this vector pattern:
    (c ? -v : v)
We lower it to (because "c" is <4 x i1>, lowered as a vector mask):
    (~c & v) | (c & -v)

When we have SSSE3, we incorrectly lower that to PSIGN, which does:
    (c < 0 ? -v : c > 0 ? v : 0)
in other words, when c is either all-ones or all-zero:
    (c ? -v : 0)
While this is an old bug, it rarely triggers because the PSIGN combine
is too sensitive to operand order. This will be improved separately.

Note that the PSIGN tests are also incorrect. Consider:
    %b.lobit = ashr <4 x i32> %b, <i32 31, i32 31, i32 31, i32 31>
    %sub = sub nsw <4 x i32> zeroinitializer, %a
    %0 = xor <4 x i32> %b.lobit, <i32 -1, i32 -1, i32 -1, i32 -1>
    %1 = and <4 x i32> %a, %0
    %2 = and <4 x i32> %b.lobit, %sub
    %cond = or <4 x i32> %1, %2
    ret <4 x i32> %cond
if %b is zero:
    %b.lobit = <4 x i32> zeroinitializer
    %sub = sub nsw <4 x i32> zeroinitializer, %a
    %0 = <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
    %1 = <4 x i32> %a
    %2 = <4 x i32> zeroinitializer
    %cond = or <4 x i32> %a, zeroinitializer
    ret <4 x i32> %a
whereas we currently generate:
    psignd %xmm1, %xmm0
    retq
which returns 0, as %xmm1 is 0.

Instead, use a pure logic sequence, as described in:
https://graphics.stanford.edu/~seander/bithacks.html#ConditionalNegate

Fixes PR26110.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261023 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:14:03 +00:00
Ahmed Bougacha
27eebc518c [X86] Extract PSIGN/BLENDVP tests into vector-blend.ll. NFC.
We're going to stop generating PSIGN, so calling a test "psign"
isn't ideal. Instead, call these tests what they really are:
variable blends using logic.
Also add a test to exhibit a case we're currently missing in
the PSIGN combine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261022 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:13:59 +00:00
Ahmed Bougacha
b996694d5e [X86] Extract PSIGN/BLENDVP combine. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:13:55 +00:00
Ahmed Bougacha
606d338533 [X86] Extract ANDNP combine. NFC.
This makes it IMO more readable and reduces indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:13:49 +00:00
Mehdi Amini
1eec0de2d8 Bitcode writer: fix a typo, using getName() instead of getSourceFileName()
When emitting the source filename, the encoding of the string
was checked against the name instead of the filename.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261019 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 22:07:03 +00:00
Derek Schuff
c523ec4855 [WebAssembly] Update torture test expectations
These were fixed with r260978

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 21:52:06 +00:00
Reid Kleckner
e1fec78f3f [codeview] Bail on a DBG_VALUE register operand with no register
This apparently comes up when the register allocator decides that a
variable will become undef along a certain path.

Also improve the error message we emit when we can't map from LLVM
register number to CV register number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 21:49:26 +00:00
Derek Schuff
7ea47333dc [WebAssemly] Don't move calls or stores past intervening loads
The register stackifier currently checks for intervening stores (and
loads that may alias them) but doesn't account for the fact that the
instruction being moved may affect intervening loads.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261014 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 21:44:19 +00:00
Adam Nemet
6df4a6f175 [LTO] Support Statistics
Summary:
I thought -Xlinker -mllvm -Xlinker -stats worked at some point but maybe
it never did.

For clang, I believe that stats are printed from cc1_main.  This patch
also prints them for LTO, specifically right after codegen happens.

I only looked at the C API for LTO briefly to see if this is a good
place.  Probably there are still cases where this wouldn't be printed
but it seems to be working for the common case.  I also experimented
putting this in the LTOCodeGenerator destructor but that didn't trigger
for me because ld64 does not destroy the LTOCodeGenerator.

Reviewers: dexonsmith, joker.eph

Subscribers: rafael, joker.eph, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261013 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 21:41:51 +00:00
Reid Kleckner
78eacd7a04 [codeview] Fix assertion on non-memory, non-register DBG_VALUE instructions
Eventually we should find a way to describe constant variables, but it
is not obvious how to do this at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261010 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 21:14:51 +00:00