oota-llvm.git
8 years ago[Aarch64] Add cost for missing extensions.
Matthew Simpson [Wed, 18 Nov 2015 18:03:06 +0000 (18:03 +0000)]
[Aarch64] Add cost for missing extensions.

This patch adds a cost estimate for some missing sign and zero extensions. The
costs were determined by counting the number of shift instructions generated
without context for each new extension.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253482 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemoving specific target from the generic test
Artyom Skrobov [Wed, 18 Nov 2015 17:50:47 +0000 (17:50 +0000)]
Removing specific target from the generic test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253479 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-profdata] Use SmallSet rather that std::set for keeping track of profdata merge...
Nathan Slingerland [Wed, 18 Nov 2015 17:10:24 +0000 (17:10 +0000)]
[llvm-profdata] Use SmallSet rather that std::set for keeping track of profdata merge errors

Missed bit of feedback from D14720.

Use SmallSet<std::error_code> rather than std::set<...> in order to be more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253474 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Add more whitespace characters to prettify the assembly output.
Dan Gohman [Wed, 18 Nov 2015 17:05:35 +0000 (17:05 +0000)]
[WebAssembly] Add more whitespace characters to prettify the assembly output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253472 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Add +feature names to TargetParser extensions table
Bradley Smith [Wed, 18 Nov 2015 16:32:12 +0000 (16:32 +0000)]
[ARM] Add +feature names to TargetParser extensions table

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253470 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Make bogus inline asm strings in tests be comments.
Dan Gohman [Wed, 18 Nov 2015 16:28:58 +0000 (16:28 +0000)]
[WebAssembly] Make bogus inline asm strings in tests be comments.

These tests aren't testing that the result is valid syntax; they're testing
that the compiler emits the inline asm operands correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253469 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Add some spaces to the assembly output to vertically align operands.
Dan Gohman [Wed, 18 Nov 2015 16:25:38 +0000 (16:25 +0000)]
[WebAssembly] Add some spaces to the assembly output to vertically align operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253468 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Enable register coloring and register stackifying.
Dan Gohman [Wed, 18 Nov 2015 16:12:01 +0000 (16:12 +0000)]
[WebAssembly] Enable register coloring and register stackifying.

This also takes the push/pop syntax another step forward, introducing stack
slot numbers to make it easier to see how expressions are connected. For
example, the value pushed in $push7 is popped in $pop7.

And, this begins an experiment with making get_local and set_local implicit
when an operation directly uses or defines a register. This greatly reduces
clutter. If this experiment succeeds, it may make sense to do this for
const instructions as well.

And, this introduces more special code for ARGUMENTS; hopefully this code
will soon be obviated by proper support for live-in virtual registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253465 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix bug where WinCOFFObjectWriter would assume starting from an empty output.
Manuel Klimek [Wed, 18 Nov 2015 15:24:17 +0000 (15:24 +0000)]
Fix bug where WinCOFFObjectWriter would assume starting from an empty output.

Starting on an input stream that is not at offset 0 would trigger the
assert in WinCOFFObjectWriter.cpp:1065:

  assert(getStream().tell() <= (*i)->Header.PointerToRawData &&
               "Section::PointerToRawData is insane!");

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253464 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix typo in comment. NFC.
Fraser Cormack [Wed, 18 Nov 2015 15:02:59 +0000 (15:02 +0000)]
Fix typo in comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253462 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SelectionDAGBuilder] Make sure DemoteReg ends up in right reg-class.
Jonas Paulsson [Wed, 18 Nov 2015 14:59:00 +0000 (14:59 +0000)]
[SelectionDAGBuilder] Make sure DemoteReg ends up in right reg-class.

The virtual register containing the address for returned value on
stack should in the DAG be represented with a CopyFromReg node and not
a Register node. Otherwise, InstrEmitter will not make sure that it
ends up in the right register class for the target instruction.

SystemZ needs this, becuause the reg class for address registers is a
subset of the general 64 bit register class.

test/SystemZ/CodeGen/args-07.ll and args-04.ll updated to run with
-verify-machineinstrs.

Reviewed by Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253461 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Revert "Strip metadata when speculatively hoisting instructions (r252604)"
Igor Laevsky [Wed, 18 Nov 2015 14:50:18 +0000 (14:50 +0000)]
Revert "Revert "Strip metadata when speculatively hoisting instructions (r252604)"

Failing clang test is now fixed by the r253458.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253459 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LTO] Appease buildbots take 3
James Molloy [Wed, 18 Nov 2015 12:08:24 +0000 (12:08 +0000)]
[LTO] Appease buildbots take 3

This time I've found a linux box and checked it there. This test now passes.

Because I'd introduced an undefined reference in @bar, gold now returns an error. This doesn't matter for the test itself, because it also emits the remarks the test is checking for. But it does cause LIT to notice a nonzero return code which it faults on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253454 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LTO] Buildbot appeasing take 2
James Molloy [Wed, 18 Nov 2015 11:37:32 +0000 (11:37 +0000)]
[LTO] Buildbot appeasing take 2

Let's try again. This time using the right function signature. It's a real pity I can't run this on a darwin machine...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253453 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LTO] Fix up test/tools/gold/X86/remarks.ll
James Molloy [Wed, 18 Nov 2015 11:32:14 +0000 (11:32 +0000)]
[LTO] Fix up test/tools/gold/X86/remarks.ll

It needs the same fixes as in test/LTO/X86/remarks.ll, but this test appears not to get run on my system (but does on the buildbot). Strange.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253452 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LTO] Add an early run of functionattrs
James Molloy [Wed, 18 Nov 2015 11:24:42 +0000 (11:24 +0000)]
[LTO] Add an early run of functionattrs

Because we internalize early, we can potentially mark a bunch of functions as norecurse. Do this before globalopt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253451 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512CD] add mask broadcast intrinsics
Asaf Badouh [Wed, 18 Nov 2015 09:42:45 +0000 (09:42 +0000)]
[X86][AVX512CD] add mask broadcast intrinsics

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253450 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX] Added 256-bit shuffle splat tests.
Simon Pilgrim [Wed, 18 Nov 2015 09:39:38 +0000 (09:39 +0000)]
[X86][AVX] Added 256-bit shuffle splat tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253449 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: Implemented encoding for vpextrw.s instruction.
Igor Breger [Wed, 18 Nov 2015 08:46:16 +0000 (08:46 +0000)]
AVX512: Implemented encoding for vpextrw.s instruction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253447 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OperandBundles] Tighten OperandBundleDef's interface; NFC
Sanjoy Das [Wed, 18 Nov 2015 08:30:07 +0000 (08:30 +0000)]
[OperandBundles] Tighten OperandBundleDef's interface; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253446 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][microMIPS] Implement DPS.W.PH, DPSQ_S.W.PH, DPSQ_SA.L.W, DPSQX_S.W.PH, DPSQX_S...
Hrvoje Varga [Wed, 18 Nov 2015 07:41:35 +0000 (07:41 +0000)]
[mips][microMIPS] Implement DPS.W.PH, DPSQ_S.W.PH, DPSQ_SA.L.W, DPSQX_S.W.PH, DPSQX_SA.W.PH, DPSU.H.QBL, DPSU.H.QBR and DPSX.W.PH instructions
Differential Revision: http://reviews.llvm.org/D14058

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253443 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReplace dyn_cast with isa in places that weren't using the returned value for more...
Craig Topper [Wed, 18 Nov 2015 07:07:59 +0000 (07:07 +0000)]
Replace dyn_cast with isa in places that weren't using the returned value for more than a boolean check. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253441 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDefault SetVector to use a DenseSet.
Rafael Espindola [Wed, 18 Nov 2015 06:52:18 +0000 (06:52 +0000)]
Default SetVector to use a DenseSet.

We use to have an odd difference among MapVector and SetVector. The map
used a DenseMop, but the set used a SmallSet, which in turn uses a
std::set.

I have changed SetVector to use a DenseSet. If you were depending on the
old behaviour you can pass an explicit set type or use SmallSetVector.
The common cases for needing to do it are:

* Optimizing for small sets.
* Sets for types not supported by DenseSet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253439 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTeach the inliner to track deoptimization state
Sanjoy Das [Wed, 18 Nov 2015 06:23:38 +0000 (06:23 +0000)]
Teach the inliner to track deoptimization state

Summary:
This change teaches LLVM's inliner to track and suitably adjust
deoptimization state (tracked via deoptimization operand bundles) as it
inlines through call sites.  The operation is described in more detail
in the LangRef changes.

Reviewers: reames, majnemer, chandlerc, dexonsmith

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253438 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoStop producing .data.rel sections.
Rafael Espindola [Wed, 18 Nov 2015 06:02:15 +0000 (06:02 +0000)]
Stop producing .data.rel sections.

If a section is rw, it is irrelevant if the dynamic linker will write to
it or not.

It looks like llvm implemented this because gcc was doing it. It looks
like gcc implemented this in the hope that it would put all the
relocated items close together and speed up the dynamic linker.

There are two problem with this:
* It doesn't work. Both bfd and gold will map .data.rel to .data and
  concatenate the input sections in the order they are seen.
* If we want a feature like that, it can be implemented directly in the
  linker since it knowns where the dynamic relocations are.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253436 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix LLD testsuite fallout from r253429
David Majnemer [Wed, 18 Nov 2015 04:35:32 +0000 (04:35 +0000)]
Fix LLD testsuite fallout from r253429

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253432 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a test for r253323
David Majnemer [Wed, 18 Nov 2015 02:50:39 +0000 (02:50 +0000)]
Add a test for r253323

Forgot to do this simultaneously with committing the fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253430 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump] Use the COFF export table for additional symbols
David Majnemer [Wed, 18 Nov 2015 02:49:19 +0000 (02:49 +0000)]
[llvm-objdump] Use the COFF export table for additional symbols

Most linked executables do not have a symbol table in COFF.
However, it is pretty typical to have some export entries.  Use those
entries to inform the disassembler about potential function definitions
and call targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253429 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[doc] simplify the doc on compiling CUDA
Jingyue Wu [Wed, 18 Nov 2015 01:59:05 +0000 (01:59 +0000)]
[doc] simplify the doc on compiling CUDA

CUDA support doesn't reply on temporary patches any more. Thanks Artem!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253427 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove a redundant assertion in MachineBasicBlock.cpp. NFC.
Cong Hou [Wed, 18 Nov 2015 01:55:56 +0000 (01:55 +0000)]
Remove a redundant assertion in MachineBasicBlock.cpp. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253426 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove redundant code in MachineBasicBlock.cpp. NFC.
Cong Hou [Wed, 18 Nov 2015 01:45:10 +0000 (01:45 +0000)]
Remove redundant code in MachineBasicBlock.cpp. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253425 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAttempt to fix uninitialized SDAG persistent ids detected by MSan
Reid Kleckner [Wed, 18 Nov 2015 01:21:06 +0000 (01:21 +0000)]
Attempt to fix uninitialized SDAG persistent ids detected by MSan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253422 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLet += and -= operators in BranchProbability have saturation behaviors.
Cong Hou [Wed, 18 Nov 2015 01:20:37 +0000 (01:20 +0000)]
Let += and -= operators in BranchProbability have saturation behaviors.

This commit is for a later patch that is depend on it. The sum of two
branch probabilities can be greater than 1 due to rounding. It is safer
to saturate the results of sum and subtraction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253421 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] remove default initializer as a workaround for https://gcc.gnu.org/bugzil...
Kostya Serebryany [Wed, 18 Nov 2015 01:08:30 +0000 (01:08 +0000)]
[libFuzzer] remove default initializer as a workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68399. Don't need it anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253419 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoModify the interface BranchProbability::normalizeProbabilities to let it accept a...
Cong Hou [Wed, 18 Nov 2015 01:03:19 +0000 (01:03 +0000)]
Modify the interface BranchProbability::normalizeProbabilities to let it accept a pair of iterators. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253417 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper Functions"
Nathan Slingerland [Wed, 18 Nov 2015 00:55:15 +0000 (00:55 +0000)]
Revert "[llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper Functions"

Not ready for merge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253415 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImproving edge probabilities computation when choosing the best successor in machine...
Cong Hou [Wed, 18 Nov 2015 00:52:52 +0000 (00:52 +0000)]
Improving edge probabilities computation when choosing the best successor in machine block placement.

When looking for the best successor from the outer loop for a block
belonging to an inner loop, the edge probability computation can be
improved so that edges in the inner loop are ignored. For example,
suppose we are building chains for the non-loop part of the following
code, and looking for B1's best successor. Assume the true body is very
hot, then B3 should be the best candidate. However, because of the
existence of the back edge from B1 to B0, the probability from B1 to B3
can be very small, preventing B3 to be its successor. In this patch, when
computing the probability of the edge from B1 to B3, the weight on the
back edge B1->B0 is ignored, so that B1->B3 will have 100% probability.

if (...)
  do {
    B0;
    ... // some branches
    B1;
  } while(...);
else
  B2;
B3;

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253414 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-profdata] Fix unhandled enumeration values warning
Nathan Slingerland [Wed, 18 Nov 2015 00:52:45 +0000 (00:52 +0000)]
[llvm-profdata] Fix unhandled enumeration values warning

Fix this:

llvm/tools/llvm-profdata/llvm-profdata.cpp:78:15: warning: 12 enumeration values not handled in switch: 'success', 'eof', 'unrecognized_format'... [-Wswitch]
      switch (instrError) {
                    ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253413 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper Functions
Nathan Slingerland [Wed, 18 Nov 2015 00:52:43 +0000 (00:52 +0000)]
[llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper Functions

Summary:
This change adds MathExtras helper functions for handling unsigned, saturating addition and multiplication. It also updates the instrumentation and sample profile merge implementations to use them.

No functional changes.

Reviewers: dnovillo, bogner, davidxl

Subscribers: davidxl, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253412 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Enable shrink-wrapping by default.
Quentin Colombet [Wed, 18 Nov 2015 00:40:54 +0000 (00:40 +0000)]
[ARM] Enable shrink-wrapping by default.

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

rdar://problem/21942589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253411 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoGeneralize ownership/passing semantics to allow dsymutil to own abbreviations via...
David Blaikie [Wed, 18 Nov 2015 00:34:10 +0000 (00:34 +0000)]
Generalize ownership/passing semantics to allow dsymutil to own abbreviations via unique_ptr

While still allowing CodeGen/AsmPrinter in llvm to own them using a bump
ptr allocator. (might be nice to replace the pointers there with
something that at least automatically calls their dtors, if that's
necessary/useful, rather than having it done explicitly (I think a typed
BumpPtrAllocator already does this, or maybe a unique_ptr with a custom
deleter, etc))

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253409 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove excess white space
Rafael Espindola [Wed, 18 Nov 2015 00:31:34 +0000 (00:31 +0000)]
Remove excess white space

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253408 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] refactor optimizeIntToFloatBitCast() ; NFCI
Sanjay Patel [Wed, 18 Nov 2015 00:00:04 +0000 (00:00 +0000)]
[InstCombine] refactor optimizeIntToFloatBitCast() ; NFCI

The logic for handling the pattern without a shift is identical
to the logic for handling the pattern with a shift if you set
the shift amount to zero for the former.

This should make it easier to see that we probably don't even need
optimizeIntToFloatBitCast().

If we call something like foldVecTruncToExtElt() from visitTrunc(),
we'll solve PR25543:
https://llvm.org/bugs/show_bug.cgi?id=25543

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253403 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-profdata] Show hint for other mismatch errors when merging instr profdata
Nathan Slingerland [Tue, 17 Nov 2015 23:37:09 +0000 (23:37 +0000)]
[llvm-profdata] Show hint for other mismatch errors when merging instr profdata

Missed bit of feedback from D14720.

Show the same "Make sure that all profile
data to be merged is generated from the same binary." hint for hash mismatch
and value site count mismatch as we now do for counter mismatch when merging
incompatible instrumentation profile data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253400 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Added AVX512 SHUFP*/VPERMILP* shuffle decode comments.
Simon Pilgrim [Tue, 17 Nov 2015 23:29:49 +0000 (23:29 +0000)]
[X86][AVX512] Added AVX512 SHUFP*/VPERMILP* shuffle decode comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253396 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix read-of-uninitialized introduced in r253277 exposed on some buildbots
David Blaikie [Tue, 17 Nov 2015 23:26:06 +0000 (23:26 +0000)]
Fix read-of-uninitialized introduced in r253277 exposed on some buildbots

Verified that this was at least /an/ issue, if not the only one, by
initializing NumBuckets to 1 (previously it was uninitialized, so if
this change made a difference, which it did (causing a bunch of tests to
crash) it demonstrates use-of-uninitialized memory). Initializing then
removes the crashes.

Thanks Reid for the debugging assistance

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253395 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PGO] Move value profile data definitions out of IndexedInstrProf
Xinliang David Li [Tue, 17 Nov 2015 23:00:40 +0000 (23:00 +0000)]
[PGO] Move value profile data definitions out of IndexedInstrProf

Move the data structure defintions out of the namespace. The defs will
be shared by raw format. [NFC]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253394 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix null dereference committed in r253277
David Blaikie [Tue, 17 Nov 2015 22:39:26 +0000 (22:39 +0000)]
Fix null dereference committed in r253277

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253393 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodwarfdump: support indexed string dumping in dwp based on the STR_OFFSETS component...
David Blaikie [Tue, 17 Nov 2015 22:39:23 +0000 (22:39 +0000)]
dwarfdump: support indexed string dumping in dwp based on the STR_OFFSETS component of the index

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253392 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Added support for AVX512 UNPCK shuffle decode comments.
Simon Pilgrim [Tue, 17 Nov 2015 22:35:45 +0000 (22:35 +0000)]
[X86][AVX512] Added support for AVX512 UNPCK shuffle decode comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253391 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-profdata] Improve error messaging when merging mismatched profile data
Nathan Slingerland [Tue, 17 Nov 2015 22:08:53 +0000 (22:08 +0000)]
[llvm-profdata] Improve error messaging when merging mismatched profile data

Summary:
This change tries to make the root cause of instrumented profile data merge failures clearer.

Previous:

$ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata
test_1.profraw: foo: Function count mismatch
test_1.profraw: bar: Function count mismatch
test_1.profraw: baz: Function count mismatch
...

Changed:

$ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata
test_1.profraw: foo: Function basic block count change detected (counter mismatch)
Make sure that all profile data to be merged is generated from the same binary.
test_1.profraw: bar: Function basic block count change detected (counter mismatch)
test_1.profraw: baz: Function basic block count change detected (counter mismatch)
...

Reviewers: dnovillo, davidxl, bogner

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253384 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Share AVX1/AVX2 shuffle tests with AVX512 where possible
Simon Pilgrim [Tue, 17 Nov 2015 21:19:45 +0000 (21:19 +0000)]
[X86][SSE] Share AVX1/AVX2 shuffle tests with AVX512 where possible

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253379 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WinEH] Move WinEHFuncInfo from MachineModuleInfo to MachineFunction
Reid Kleckner [Tue, 17 Nov 2015 21:10:25 +0000 (21:10 +0000)]
[WinEH] Move WinEHFuncInfo from MachineModuleInfo to MachineFunction

Summary:
Now that there is a one-to-one mapping from MachineFunction to
WinEHFuncInfo, we don't need to use a DenseMap to select the right
WinEHFuncInfo for the current funclet.

The main challenge here is that X86WinEHStatePass is an IR pass that
doesn't have access to the MachineFunction. I gave it its own
WinEHFuncInfo object that it uses to calculate state numbers, which it
then throws away. As long as nobody creates or removes EH pads between
this pass and SDAG construction, we will get the same state numbers.

The other thing X86WinEHStatePass does is to mark the EH registration
node. Instead of communicating which alloca was the registration through
WinEHFuncInfo, I added the llvm.x86.seh.ehregnode intrinsic.  This
intrinsic generates no code and simply marks the alloca in use.

Reviewers: JCTremoulet

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253378 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodwarfdump: Reference the appropriate line table segment when dumping dwp files
David Blaikie [Tue, 17 Nov 2015 21:08:05 +0000 (21:08 +0000)]
dwarfdump: Reference the appropriate line table segment when dumping dwp files

Also improves .dwo type unit dumping which didn't handle this either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253377 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix -Wunused-function in a non-Win32 build
David Blaikie [Tue, 17 Nov 2015 20:38:54 +0000 (20:38 +0000)]
Fix -Wunused-function in a non-Win32 build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253373 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[EH] Keep filter clauses for types that have been caught.
Andrew Kaylor [Tue, 17 Nov 2015 20:13:04 +0000 (20:13 +0000)]
[EH] Keep filter clauses for types that have been caught.

The instruction combiner previously removed types from filter clauses in Landing Pad instructions if the type had previously been seen in a catch clause.  This is incorrect and prevents unexpected exception handlers from rethrowing the caught type.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253370 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RuntimeDyld] Fix resolving R_PPC64_REL24 relocations
Ulrich Weigand [Tue, 17 Nov 2015 20:08:31 +0000 (20:08 +0000)]
[RuntimeDyld] Fix resolving R_PPC64_REL24 relocations

When resolving R_PPC64_REL24, code used to check for an address delta
that fits in 24 bits, while the instructions that take this relocation
actually can process address deltas that fit into *26* bits (as those
instructions have a 24 bit field, but implicitly append two zero bits
at the end since all instruction addresses are a multiple of 4).

This means that code would signal overflow once a single object's text
section exceeds 8 MB, while we can actually support up to 32 MB.

Partially fixes PR25540.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253369 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadding sancov to Makefile directory list.
Mike Aizatsky [Tue, 17 Nov 2015 20:02:03 +0000 (20:02 +0000)]
adding sancov to Makefile directory list.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253368 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSwitch lto codegen to using diagnostic handlers.
Yunzhong Gao [Tue, 17 Nov 2015 19:48:12 +0000 (19:48 +0000)]
Switch lto codegen to using diagnostic handlers.

This patch removes the std::string& argument from a number of C++ LTO API calls
and instead makes them use the installed diagnostic handler. This would also
improve consistency of diagnostic handling infrastructure: if an LTO client used
lto_codegen_set_diagnostic_handler() to install a custom error handler, we do
not want some error messages to go through the custom error handler, and some
other error messages to go into sLastErrorString.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253367 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSpecify explicit storage type for AllocType. NFC.
George Burgess IV [Tue, 17 Nov 2015 19:48:06 +0000 (19:48 +0000)]
Specify explicit storage type for AllocType. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253366 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoVector of pointers in function attributes calculation
Elena Demikhovsky [Tue, 17 Nov 2015 19:30:51 +0000 (19:30 +0000)]
Vector of pointers in function attributes calculation

While setting function attributes we check all instructions that may access memory. For a call instruction we check all arguments. The special check is required for pointers.
I added vector-of-pointers to the call arguments types that should be checked.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253363 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSamplePGO - Move debug/dump function bodies out of header files. NFC.
Diego Novillo [Tue, 17 Nov 2015 19:04:46 +0000 (19:04 +0000)]
SamplePGO - Move debug/dump function bodies out of header files. NFC.

No point polluting the header declarations with debugging code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253361 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoStringRef-ify some Option APIs
David Blaikie [Tue, 17 Nov 2015 19:00:52 +0000 (19:00 +0000)]
StringRef-ify some Option APIs

Patch by Eugene Kosov!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253360 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typos; NFC
Sanjay Patel [Tue, 17 Nov 2015 18:46:56 +0000 (18:46 +0000)]
fix typos; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253359 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse local variables; NFCI
Sanjay Patel [Tue, 17 Nov 2015 18:37:23 +0000 (18:37 +0000)]
use local variables; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253356 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoenabling sancov tests on linux x86_64 only
Mike Aizatsky [Tue, 17 Nov 2015 18:25:21 +0000 (18:25 +0000)]
enabling sancov tests on linux x86_64 only

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253354 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Don't pessimize i32 vselect.
Charlie Turner [Tue, 17 Nov 2015 17:25:15 +0000 (17:25 +0000)]
[ARM] Don't pessimize i32 vselect.

The underlying issues surrounding codegen for 32-bit vselects have been resolved. The pessimistic costs for 64-bit vselects remain due to the bad
scalarization that is still happening there.

I tested this on A57 in T32, A32 and A64 modes. I saw no regressions, and some improvements.

From my benchmarks, I saw these improvements in A57 (T32)
spec.cpu2000.ref.177_mesa 5.95%
lnt.SingleSource/Benchmarks/Shootout/strcat 12.93%
lnt.MultiSource/Benchmarks/MiBench/telecomm-CRC32/telecomm-CRC32 11.89%

I also measured A57 A32, A53 T32 and A9 T32 and found no performance regressions. I see much bigger wins in third-party benchmarks with this change

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253349 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofunction names start with a lower case letter; NFC
Sanjay Patel [Tue, 17 Nov 2015 17:24:08 +0000 (17:24 +0000)]
function names start with a lower case letter; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253348 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Tweak path::system_temp_directory() on Windows.
Pawel Bylica [Tue, 17 Nov 2015 16:54:32 +0000 (16:54 +0000)]
[Support] Tweak path::system_temp_directory() on Windows.

Summary:
This patch changes the behavior of path::system_temp_directory() on Windows to be closer to GetTempPath Windows API call. Enforces path separator to be the native one, makes path absolute, etc. GetTempPath is not used directly because of limitations/implementation bugs on Windows 7.

Windows specific unit tests are added. Most of them runs in separated process with modified environment variables.

This change fixes FileSystemTest.CreateDir unittest that had been failing when run from Unix-like shell on Windows (Unix-like path separator (/) used in env variables).

Reviewers: chapuni, rafael, aaron.ballman

Subscribers: rafael, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253345 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Promote f16 SELECT_CC CC operands when op is legal.
Ahmed Bougacha [Tue, 17 Nov 2015 16:45:40 +0000 (16:45 +0000)]
[AArch64] Promote f16 SELECT_CC CC operands when op is legal.

SELECT_CC has the nasty property of having operands with unrelated
types. So if you do something like:

  f32 = select_cc f16, f16, f32, f32, cc

You'd only look for the action for <select_cc, f32>, but never f16.
If the types are all legal, but the op isn't (as for f16 on AArch64,
or for f128 on x86_64/AArch64?), then you get into trouble.
For f128, we have softenSetCCOperands to handle this case.

Similarly, for f16, we can directly promote the CC operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253344 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-rtdyld] Don't waste cycles invalidating instruction cache.
Davide Italiano [Tue, 17 Nov 2015 16:37:52 +0000 (16:37 +0000)]
[llvm-rtdyld] Don't waste cycles invalidating instruction cache.

Now that setExecutable() changed to do all the ground work to make
memory executable on the host, we can remove all (redundant) calls
to invalidate instruction cache here.

As an added bonus, this makes invalidateInstructionCache() dead
code, so it can be removed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253343 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[JIT/Memory] Fix up semantic of setExecutable().
Davide Italiano [Tue, 17 Nov 2015 16:34:28 +0000 (16:34 +0000)]
[JIT/Memory] Fix up semantic of setExecutable().

setExecutable() should do everything that's needed to make the memory
executable on host, i.e. unconditionally set permissions + invalidate
instruction cache. llvm-rtdyld will be updated in my next commit.

Discusseed with: Lang Hames (as part of D13631).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253341 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate DebugInfo tests for the change in DEBUG_VALUE output in r253338.
Dan Gohman [Tue, 17 Nov 2015 16:15:11 +0000 (16:15 +0000)]
Update DebugInfo tests for the change in DEBUG_VALUE output in r253338.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253340 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLower statepoints with multi-def targets.
Pat Gavlin [Tue, 17 Nov 2015 16:04:21 +0000 (16:04 +0000)]
Lower statepoints with multi-def targets.

Statepoint lowering currently expects that the target method of a
statepoint only defines a single value. This precludes using
statepoints with ABIs that return values in multiple registers
(e.g. the SysV AMD64 ABI). This change adds support for lowering
statepoints with mutli-def targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253339 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse TargetRegisterInfo for printing MachineOperand register comments
Dan Gohman [Tue, 17 Nov 2015 16:01:28 +0000 (16:01 +0000)]
Use TargetRegisterInfo for printing MachineOperand register comments

Several places in AsmPrinter.cpp print comments describing MachineOperand
registers using MCRegisterInfo, which uses MCOperand-oriented names. This
doesn't work for targets that use virtual registers exclusively, as
WebAssembly does, since virtual registers are represented and printed
differently.

This patch preserves what seems to be the spirit of r229978, avoiding the
use of TM.getSubtargetImpl(), while still using MachineOperand-oriented
printing for MachineOperands.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253338 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTypo.
Chad Rosier [Tue, 17 Nov 2015 13:58:10 +0000 (13:58 +0000)]
Typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253336 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Default to ARMv4t in favour of adding Other to ARMArch
Bradley Smith [Tue, 17 Nov 2015 13:38:29 +0000 (13:38 +0000)]
[ARM] Default to ARMv4t in favour of adding Other to ARMArch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253335 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Match VABDL from log2 shuffles.
Charlie Turner [Tue, 17 Nov 2015 13:21:35 +0000 (13:21 +0000)]
[ARM] Match VABDL from log2 shuffles.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253334 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][microMIPS] Implement EXTP, EXTPDP, EXTPDPV, EXTPV, EXTR[_RS].W, EXTR_S.H,...
Zlatko Buljan [Tue, 17 Nov 2015 12:54:15 +0000 (12:54 +0000)]
[mips][microMIPS] Implement EXTP, EXTPDP, EXTPDPV, EXTPV, EXTR[_RS].W, EXTR_S.H, EXTRV[_RS].W and EXTRV_S.H instructions
Differential Revision: http://reviews.llvm.org/D14174

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253332 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Properly initialize ARMArch in the ARM subtarget
Bradley Smith [Tue, 17 Nov 2015 11:57:33 +0000 (11:57 +0000)]
[ARM] Properly initialize ARMArch in the ARM subtarget

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253331 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][microMIPS] Implement SUBQ[_S].PH, SUBQ_S.W, SUBQH[_R].PH, SUBQH[_R].W, SUBU...
Zlatko Buljan [Tue, 17 Nov 2015 10:11:22 +0000 (10:11 +0000)]
[mips][microMIPS] Implement SUBQ[_S].PH, SUBQ_S.W, SUBQH[_R].PH, SUBQH[_R].W, SUBU[_S].PH, SUBU[_S].QB and SUBUH[_R].QB instructions
Differential Revision: http://reviews.llvm.org/D14114

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253329 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Assembler] Make fatal assembler errors non-fatal
Oliver Stannard [Tue, 17 Nov 2015 10:00:43 +0000 (10:00 +0000)]
[Assembler] Make fatal assembler errors non-fatal

Currently, if the assembler encounters an error after parsing (such as an
out-of-range fixup), it reports this as a fatal error, and so stops after the
first error. However, for most of these there is an obvious way to recover
after emitting the error, such as emitting the fixup with a value of zero. This
means that we can report on all of the errors in a file, not just the first
one. MCContext::reportError records the fact that an error was encountered, so
we won't actually emit an object file with the incorrect contents.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253328 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Assembler] Allow non-fatal errors after parsing
Oliver Stannard [Tue, 17 Nov 2015 09:58:07 +0000 (09:58 +0000)]
[Assembler] Allow non-fatal errors after parsing

This adds reportError to MCContext, which can be used as an alternative to
reportFatalError when the assembler wants to try to continue processing the
rest of the file after the error is reported, so that all of the errors ina
file can be reported. It records the fact that an error was encountered, so we
can avoid emitting an object file if any errors occurred.

This patch doesn't add any uses of this function (a later patch will convert
most uses of reportFatalError to use it), but there is a small functional
change: we use the SourceManager to print the error message, even if we have a
null SMLoc. This means that we get a SourceManager-style message, with the file
and line information shown as <unknown>, rather than the "LLVM ERROR" style
used by report_fatal_error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253327 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][microMIPS] Implement PRECEQ.W.PHL, PRECEQ.W.PHR, PRECEQU.PH.QBL, PRECEQU.PH...
Zlatko Buljan [Tue, 17 Nov 2015 09:43:29 +0000 (09:43 +0000)]
[mips][microMIPS] Implement PRECEQ.W.PHL, PRECEQ.W.PHR, PRECEQU.PH.QBL, PRECEQU.PH.QBLA, PRECEQU.PH.QBR, PRECEQU.PH.QBRA, PRECEU.PH.QBL, PRECEU.PH.QBLA, PRECEU.PH.QBR and PRECEU.PH.QBRA instructions
Differential Revision: http://reviews.llvm.org/D14279

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253326 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix typos in comments.
Jay Foad [Tue, 17 Nov 2015 08:54:53 +0000 (08:54 +0000)]
Fix typos in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253324 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AliasAnalysis] CatchPad and CatchRet can modify escaped memory
David Majnemer [Tue, 17 Nov 2015 08:15:14 +0000 (08:15 +0000)]
[AliasAnalysis] CatchPad and CatchRet can modify escaped memory

CatchPad and CatchRet behave a lot like function calls: they can
potentially modify any memory which has been escaped.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253323 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix a typo in BasicAliasAnalysis
David Majnemer [Tue, 17 Nov 2015 08:15:08 +0000 (08:15 +0000)]
Fix a typo in BasicAliasAnalysis

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253322 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512 : regenerate the test file against trunk.
Igor Breger [Tue, 17 Nov 2015 08:03:43 +0000 (08:03 +0000)]
AVX512 : regenerate the test file against trunk.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253321 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdded microMIPSDSPr1 assembler and disassembler tests to existing microMIPSDSPr2...
Zlatko Buljan [Tue, 17 Nov 2015 07:58:27 +0000 (07:58 +0000)]
Added microMIPSDSPr1 assembler and disassembler tests to existing microMIPSDSPr2 test files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253320 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd MemoryBufferRef(MemoryBuffer&) constructor.
Rafael Espindola [Tue, 17 Nov 2015 05:11:44 +0000 (05:11 +0000)]
Add MemoryBufferRef(MemoryBuffer&) constructor.

patch by Jonathan Anderson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253311 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix unaligned memory read issue exposed by ubsan
Xinliang David Li [Tue, 17 Nov 2015 03:47:21 +0000 (03:47 +0000)]
Fix unaligned memory read issue exposed by ubsan

Indexed profile data as designed today does not guarantee
counter data to be well aligned, so reading needs to use
the slower form (with memcpy). This is less than ideal and
should be improved in the future (i.e., with fixed length
function key instead of variable length name key).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253309 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Documentation] Add guidelines for grouping tests together.
Davide Italiano [Tue, 17 Nov 2015 02:17:35 +0000 (02:17 +0000)]
[Documentation] Add guidelines for grouping tests together.

This was considered a good practice but it was not documented. Now it is.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253281 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDrop prelink support.
Rafael Espindola [Tue, 17 Nov 2015 00:51:23 +0000 (00:51 +0000)]
Drop prelink support.

The way prelink used to work was

* The compiler decides if a given section only has relocations that
are know to point to the same DSO. If so, it names it
.data.rel.ro.local<something>.
* The static linker puts all of these together.
* The prelinker program assigns addresses to each library and resolves
the local relocations.

There are many problems with this:
* It is incompatible with address space randomization.
* The information passed by the compiler is redundant. The linker
knows if a given relocation is in the same DSO or not. If could sort
by that if so desired.
* There are newer ways of speeding up DSO (gnu hash for example).
* Even if we want to implement this again in the compiler, the previous
  implementation is pretty broken. It talks about relocations that are
  "resolved by the static linker". If they are resolved, there are none
  left for the prelinker. What one needs to track is if an expression
  will require only dynamic relocations that point to the same DSO.

At this point it looks like the prelinker is an historical curiosity.
For example, fedora has retired it because it failed to build for two
releases
(http://pkgs.fedoraproject.org/cgit/prelink.git/commit/?id=eb43100a8331d91c801ee3dcdb0a0bb9babfdc1f)

This patch removes support for it. That is, it stops printing the
".local" sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253280 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAssume lane masks are always precise
Matthias Braun [Tue, 17 Nov 2015 00:50:55 +0000 (00:50 +0000)]
Assume lane masks are always precise

Allowing imprecise lane masks in case of more than 32 sub register lanes
lead to some tricky corner cases, and I need another bugfix for another
one. Instead I rather declare lane masks as precise and let tablegen
abort if we do not have enough bits.

This does not affect any in-tree target, even AMDGPU only needs 16 lanes
at the moment. If the 32 lanes turn out to be a problem in the future,
then we can easily change the LaneBitmask typedef to uint64_t.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253279 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix indentation
David Blaikie [Tue, 17 Nov 2015 00:41:02 +0000 (00:41 +0000)]
Fix indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253278 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodwarfdump: Use the index to find the right abbrev offset in DWP files
David Blaikie [Tue, 17 Nov 2015 00:39:55 +0000 (00:39 +0000)]
dwarfdump: Use the index to find the right abbrev offset in DWP files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253277 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Fix printing of global operands
Derek Schuff [Tue, 17 Nov 2015 00:20:44 +0000 (00:20 +0000)]
[WebAssembly] Fix printing of global operands

This was regressed in r252656 which wasn't quite NFC. Instead of using a
custom instruction as before, use a pattern to select CONST_I32 for the
global addrs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253276 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PRE] Preserve !invariant.load metadata
Philip Reames [Tue, 17 Nov 2015 00:15:09 +0000 (00:15 +0000)]
[PRE] Preserve !invariant.load metadata

Spoted via inspection.  Test case included.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253275 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Merged BLEND shuffle decode comments. NFC.
Simon Pilgrim [Mon, 16 Nov 2015 23:03:18 +0000 (23:03 +0000)]
[X86][SSE] Merged BLEND shuffle decode comments. NFC.

Now that we can recognise different vector sizes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253268 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDemote a single-use named function object to a lambda
David Blaikie [Mon, 16 Nov 2015 22:56:30 +0000 (22:56 +0000)]
Demote a single-use named function object to a lambda

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253267 91177308-0d34-0410-b5e6-96231b3b80d8