oota-llvm.git
9 years ago[WebAssembly] Change int_wasm_memory_size from IntrNoMem to IntrReadMem.
Dan Gohman [Sat, 14 Nov 2015 23:02:31 +0000 (23:02 +0000)]
[WebAssembly] Change int_wasm_memory_size from IntrNoMem to IntrReadMem.

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

9 years ago[X86][SSE] Fixed arch/triple and regenerated results.
Simon Pilgrim [Sat, 14 Nov 2015 20:42:01 +0000 (20:42 +0000)]
[X86][SSE] Fixed arch/triple and regenerated results.

Tidyup before diffs from new patch.

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

9 years ago[llvm-ar] Use failIfError/fail helpers.
Davide Italiano [Sat, 14 Nov 2015 19:00:33 +0000 (19:00 +0000)]
[llvm-ar] Use failIfError/fail helpers.

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

9 years ago[llvm-ar] Use fail() helper to reduce duplication.
Davide Italiano [Sat, 14 Nov 2015 18:33:47 +0000 (18:33 +0000)]
[llvm-ar] Use fail() helper to reduce duplication.

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

9 years ago[llvm-ar] Simplify the code.
Davide Italiano [Sat, 14 Nov 2015 18:25:18 +0000 (18:25 +0000)]
[llvm-ar] Simplify the code.

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

9 years ago[X86][SSE] Added extra vector truncation tests
Simon Pilgrim [Sat, 14 Nov 2015 15:23:59 +0000 (15:23 +0000)]
[X86][SSE] Added extra vector truncation tests

Baseline comparison to D14588

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

9 years agoReduce the size of MCRelaxableFragment.
Akira Hatanaka [Sat, 14 Nov 2015 06:35:56 +0000 (06:35 +0000)]
Reduce the size of MCRelaxableFragment.

MCRelaxableFragment previously kept a copy of MCSubtargetInfo and
MCInst to enable re-encoding the MCInst later during relaxation. A copy
of MCSubtargetInfo (instead of a reference or pointer) was needed
because the feature bits could be modified by the parser.

This commit replaces the MCSubtargetInfo copy in MCRelaxableFragment
with a constant reference to MCSubtargetInfo. The copies of
MCSubtargetInfo are kept in MCContext, and the target parsers are now
responsible for asking MCContext to provide a copy whenever the feature
bits of MCSubtargetInfo have to be toggled.

With this patch, I saw a 4% reduction in peak memory usage when I
compiled verify-uselistorder.lto.bc using llc.

rdar://problem/21736951

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

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

9 years agoDon't recompute LCSSA after loop-unrolling when possible.
Michael Zolotukhin [Sat, 14 Nov 2015 05:51:41 +0000 (05:51 +0000)]
Don't recompute LCSSA after loop-unrolling when possible.

Summary:
Currently we always recompute LCSSA for outer loops after unrolling an
inner loop. That leads to compile time problem when we have big loop
nests, and we can solve it by avoiding unnecessary work. For instance,
if w eonly do partial unrolling, we don't break LCSSA, so we don't need
to rebuild it. Also, if all exits from the inner loop are inside the
enclosing loop, then complete unrolling won't break LCSSA either.

I replaced unconditional LCSSA recomputation with conditional recomputation +
unconditional assert and added several tests, which were failing when I
experimented with it.

Soon I plan to follow up with a similar patch for recalculation of dominators
tree.

Reviewers: hfinkel, dexonsmith, bogner, joker.eph, chandlerc

Subscribers: llvm-commits

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

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

9 years ago[MCTargetAsmParser] Move the member varialbes that reference
Akira Hatanaka [Sat, 14 Nov 2015 05:20:05 +0000 (05:20 +0000)]
[MCTargetAsmParser] Move the member varialbes that reference
MCSubtargetInfo in the subclasses into MCTargetAsmParser and define a
member function getSTI.

This is done in preparation for making changes to shrink the size of
MCRelaxableFragment. (see http://reviews.llvm.org/D14346).

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

9 years agoAdd MMX to the 3dnow enum and propagate changes around. This makes
Eric Christopher [Sat, 14 Nov 2015 03:04:00 +0000 (03:04 +0000)]
Add MMX to the 3dnow enum and propagate changes around. This makes
it somewhat more consistent with how the feature is used.

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

9 years ago[ShrinkWrapping] Disable the optimization for functions with sanitize like
Quentin Colombet [Sat, 14 Nov 2015 01:55:17 +0000 (01:55 +0000)]
[ShrinkWrapping] Disable the optimization for functions with sanitize like
attribute.

Even if the target supports shrink-wrapping, the prologue and epilogue
must not move because a crash can happen anywhere and sanitizers need
to be able to unwind from the PC of the crash.

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

9 years agoRemove some unused includes
David Blaikie [Sat, 14 Nov 2015 01:32:27 +0000 (01:32 +0000)]
Remove some unused includes

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

9 years ago[RuntimeDyld] Fix indentation and whitespace; NFC
Sanjoy Das [Sat, 14 Nov 2015 00:16:15 +0000 (00:16 +0000)]
[RuntimeDyld] Fix indentation and whitespace; NFC

Whitespace-only change.

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

9 years agoAArch64: Default AArch64Subtarget::ReserveX18 to true on darwin
Justin Bogner [Fri, 13 Nov 2015 23:05:46 +0000 (23:05 +0000)]
AArch64: Default AArch64Subtarget::ReserveX18 to true on darwin

Darwin reserves x18, so it's never ABI compliant to generate code that
uses it. Set the default value based on the OS part of the triple
rather than forcing front-ends to set the +reserve-x18 target feature
in order to build correct code for Darwin.

This will make r243310 redundant, so I'll revert that shortly.

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

9 years agoMachineScheduler: Print initial pressure in debug dump
Matthias Braun [Fri, 13 Nov 2015 22:30:31 +0000 (22:30 +0000)]
MachineScheduler: Print initial pressure in debug dump

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

9 years agoMachineScheduler: Improve debug output for "only one node in readyset"
Matthias Braun [Fri, 13 Nov 2015 22:30:29 +0000 (22:30 +0000)]
MachineScheduler: Improve debug output for "only one node in readyset"

When there is only 1 node left in the ready queue and it is picked call
the reason "ONLY1" instead of "NOCAND".

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

9 years agotablegen: Add a simple heuristic to get better names for pressure sets
Matthias Braun [Fri, 13 Nov 2015 22:30:27 +0000 (22:30 +0000)]
tablegen: Add a simple heuristic to get better names for pressure sets

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

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

9 years ago[LIR] Add support for creating memcpys from loops with a negative stride.
Chad Rosier [Fri, 13 Nov 2015 21:51:02 +0000 (21:51 +0000)]
[LIR] Add support for creating memcpys from loops with a negative stride.

This allows us to transform the below loop into a memcpy.

void test(unsigned *__restrict__ a, unsigned *__restrict__ b) {
  for (int i = 2047; i >= 0; --i) {
    a[i] = b[i];
  }
}

This is the memcpy version of r251518, which added support for memset with
negative strided loops.

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

9 years ago[Hexagon] Fixing memory leak during relaxation by allocating MCInst in MCContext.
Colin LeMahieu [Fri, 13 Nov 2015 21:45:50 +0000 (21:45 +0000)]
[Hexagon] Fixing memory leak during relaxation by allocating MCInst in MCContext.

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

9 years ago[WinEH] Fix ESP management with 32-bit __CxxFrameHandler3
Reid Kleckner [Fri, 13 Nov 2015 21:27:00 +0000 (21:27 +0000)]
[WinEH] Fix ESP management with 32-bit __CxxFrameHandler3

The C++ EH personality automatically restores ESP from the C++ EH
registration node after a catchret. I mistakenly thought it was like
SEH, which does not restore ESP.

It makes sense for C++ EH to differ from SEH here because SEH does not
use funclets for catches, and does not allow catching inside of finally.
C++ EH may need to unwind through multiple catch funclets and eventually
catchret to some outer funclet. Therefore, the runtime has to keep track
of which ESP to use with catchret, rather than having the compiler
reload it manually.

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

9 years ago[safestack] Rewrite isAllocaSafe using SCEV.
Evgeniy Stepanov [Fri, 13 Nov 2015 21:21:42 +0000 (21:21 +0000)]
[safestack] Rewrite isAllocaSafe using SCEV.

Use ScalarEvolution to calculate memory access bounds.
Handle function calls based on readnone/nocapture attributes.
Handle memory intrinsics with constant size.

This change improves both recall and precision of IsAllocaSafe.
See the new tests (ex. BitCastWide) for the kind of code that was wrongly
classified as safe.

SCEV efficiency seems to be limited by the fact the SafeStack runs late
(in CodeGenPrepare), and many loops are unrolled or otherwise not in LCSSA.

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

9 years ago[Docs] Fix warning "Title underline too short."
Akira Hatanaka [Fri, 13 Nov 2015 21:09:57 +0000 (21:09 +0000)]
[Docs] Fix warning "Title underline too short."

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

9 years ago[WebAssembly] Rename the Const instructions to be upper-case too.
Dan Gohman [Fri, 13 Nov 2015 20:27:45 +0000 (20:27 +0000)]
[WebAssembly] Rename the Const instructions to be upper-case too.

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

9 years agoSamplePGO - Add dump routines for LineLocation, SampleRecord and FunctionSamples
Diego Novillo [Fri, 13 Nov 2015 20:24:28 +0000 (20:24 +0000)]
SamplePGO - Add dump routines for LineLocation, SampleRecord and FunctionSamples

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

9 years ago[WebAssembly] Rename memory intrinsics to be upper-case, following convention. NFC.
Dan Gohman [Fri, 13 Nov 2015 20:19:11 +0000 (20:19 +0000)]
[WebAssembly] Rename memory intrinsics to be upper-case, following convention. NFC.

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

9 years ago[X86][SSE] Combine UNPCKL with vector_shuffle into UNPCKH to save one instruction...
Cong Hou [Fri, 13 Nov 2015 19:47:43 +0000 (19:47 +0000)]
[X86][SSE] Combine UNPCKL with vector_shuffle into UNPCKH to save one instruction for sext from v16i8 to v16i16 and v8i16 to v8i32.

This patch is enabling combining UNPCKL with vector_shuffle that moves the upper
half of a vector into the lower half, into a UNPCKH instruction. For example:

t2: v16i8 = vector_shuffle<8,9,10,11,12,13,14,15,u,u,u,u,u,u,u,u> t1, undef:v16i8
t3: v16i8 = X86ISD::UNPCKL undef:v16i8, t2

will be combined to:

t3: v16i8 = X86ISD::UNPCKH undef:v16i8, t1

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

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

9 years agodwarfdump: Add support for dumping the table contents of DWP indexes
David Blaikie [Fri, 13 Nov 2015 19:18:49 +0000 (19:18 +0000)]
dwarfdump: Add support for dumping the table contents of DWP indexes

This is a recommit of 252842 which was reverted in 252859. The issue was
using %s format specifier for a StringRef - used Format's
left_justify(StringRef, int) instead.

It'd be nice to have __attribute__((format(..))) on llvm::format, but
apparently it's only implemented for c-style variadics, not C++ variadic
templates. Perhaps we could fix that & conditionalize the attribute on
such...

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

9 years agoAdd a comment that should have made my last commit.
Chad Rosier [Fri, 13 Nov 2015 19:13:40 +0000 (19:13 +0000)]
Add a comment that should have made my last commit.

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

9 years agoAdd missing triple to WinEH test case
Reid Kleckner [Fri, 13 Nov 2015 19:11:12 +0000 (19:11 +0000)]
Add missing triple to WinEH test case

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

9 years ago[LIR] Factor out the code to compute base ptr for negative strided loops.
Chad Rosier [Fri, 13 Nov 2015 19:11:07 +0000 (19:11 +0000)]
[LIR] Factor out the code to compute base ptr for negative strided loops.

This will allow for the code to be reused in the memcpy optimization.

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

9 years ago[WinEH] Make UnwindHelp a fixed stack object allocated after XMM CSRs
Reid Kleckner [Fri, 13 Nov 2015 19:06:01 +0000 (19:06 +0000)]
[WinEH] Make UnwindHelp a fixed stack object allocated after XMM CSRs

Now the offset of UnwindHelp in our EH tables and the offset that we
store to in the prologue agree.

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

9 years ago[Hexagon] Factoring bundle creation in to a utility function.
Colin LeMahieu [Fri, 13 Nov 2015 17:42:46 +0000 (17:42 +0000)]
[Hexagon] Factoring bundle creation in to a utility function.

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

9 years agoAMDGPU: Add stony support
Tom Stellard [Fri, 13 Nov 2015 17:06:32 +0000 (17:06 +0000)]
AMDGPU: Add stony support

Patch by: Alex Deucher

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

9 years agoELFYAML: Add support for parsing AMDGPU section attribute flags
Tom Stellard [Fri, 13 Nov 2015 17:06:29 +0000 (17:06 +0000)]
ELFYAML: Add support for parsing AMDGPU section attribute flags

Reviewers: silvas

Subscribers: llvm-commits

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

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

9 years ago[Symbolizer] Don't use PE symbol tables to override PDB symbols
Reid Kleckner [Fri, 13 Nov 2015 17:00:36 +0000 (17:00 +0000)]
[Symbolizer] Don't use PE symbol tables to override PDB symbols

Summary:
PE files are stripped by default, and only contain the names of exported
symbols.

The actual reason that we bother to do this override by default is
actually due to a quirk of the way -gline-tables-only is implemented, so
I phrased the check as "if we are symbolizing from dwarf, do the symtab
override".

This fixes lots of Windows ASan tests that I broke in r250582.

Reviewers: samsonov

Subscribers: llvm-commits

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

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

9 years agouse range-based for loop; NFCI
Sanjay Patel [Fri, 13 Nov 2015 16:21:23 +0000 (16:21 +0000)]
use range-based for loop; NFCI

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

9 years ago[ARM] Replace ARMISD::RBIT with ISD::BITREVERSE
James Molloy [Fri, 13 Nov 2015 16:05:22 +0000 (16:05 +0000)]
[ARM] Replace ARMISD::RBIT with ISD::BITREVERSE

ISD::BITREVERSE matches "rbit" completely, so remove ARMISD::RBIT and mark ISD::BITREVERSE as legal, adding a test for lowering.

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

9 years agoFixing a typo in docs/CodeGenerator.rst
Artyom Skrobov [Fri, 13 Nov 2015 15:14:04 +0000 (15:14 +0000)]
Fixing a typo in docs/CodeGenerator.rst

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

9 years ago[mips][microMIPS] Implement SHRA[_R].PH, SHRAV[_R].PH, SHRAV[_R].QB, SHRAV_R.W, SHRA_...
Zlatko Buljan [Fri, 13 Nov 2015 13:14:25 +0000 (13:14 +0000)]
[mips][microMIPS] Implement SHRA[_R].PH, SHRAV[_R].PH, SHRAV[_R].QB, SHRAV_R.W, SHRA_R.W, SHRL.PH, SHRL.QB, SHRLV.PH and SHRLV.QB instructions
Differential Revision: http://reviews.llvm.org/D14010

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

9 years ago[mips][ias] Explicitly disable IAS on asm-large-immediate.ll.
Daniel Sanders [Fri, 13 Nov 2015 13:02:31 +0000 (13:02 +0000)]
[mips][ias] Explicitly disable IAS on asm-large-immediate.ll.

NFC at the moment but it will prevent a failure when IAS is enabled by default.

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

9 years ago[SystemZ] Simplify boolean conditional return statements
Ulrich Weigand [Fri, 13 Nov 2015 13:00:27 +0000 (13:00 +0000)]
[SystemZ] Simplify boolean conditional return statements

Use clang-tidy to simplify conditonal return statements.

Author: LegalizeAdulthood
Differential Revision: http://reviews.llvm.org/D9986

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

9 years ago[mips][ias] Replace invalid assembly insn in test since IAS parses inline assembly.
Daniel Sanders [Fri, 13 Nov 2015 11:44:00 +0000 (11:44 +0000)]
[mips][ias] Replace invalid assembly insn in test since IAS parses inline assembly.

This is NFC at the moment but will prevent this test from failing when
IAS is the default.

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

9 years ago[lit] Improve error message when lit fails to executable a command by
Dan Liew [Fri, 13 Nov 2015 11:38:07 +0000 (11:38 +0000)]
[lit] Improve error message when lit fails to executable a command by
showing the executable it tried to use.

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

9 years ago[lit] Fix bug where ``lit.util.which()`` would return a directory
Dan Liew [Fri, 13 Nov 2015 11:37:25 +0000 (11:37 +0000)]
[lit] Fix bug where ``lit.util.which()`` would return a directory
instead of executable if the argument was found inside a directory
contained in PATH.

An example where this could cause a problem is if there was a RUN line
that ran the ``test`` command and if the user had a directory in their
PATH that contained a directory called ``test/`` (that occured before
``/usr/bin/``). Lit would try to use the directory as the executable
which would fail with the rather cryptic message.

```
Could not create process due to [Errno 13] Permission denied
```

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

9 years ago[GlobalOpt] Make sure all debug lines end with '\n'
James Molloy [Fri, 13 Nov 2015 11:05:13 +0000 (11:05 +0000)]
[GlobalOpt] Make sure all debug lines end with '\n'

GlobalVariable::print() used to emit a newline. It hasn't for a while now, but these debug lines weren't updated.

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

9 years ago[GlobalOpt] Coding style - remove function names from doxygen comments
James Molloy [Fri, 13 Nov 2015 11:05:07 +0000 (11:05 +0000)]
[GlobalOpt] Coding style - remove function names from doxygen comments

Suggested by Mehdi in the review of D14148.

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

9 years ago[AArch64] Check the expansion of BITREVERSE in regression test
James Molloy [Fri, 13 Nov 2015 10:05:31 +0000 (10:05 +0000)]
[AArch64] Check the expansion of BITREVERSE in regression test

Something I missed from Hal's review, rightly pointed out by Ben Kramer - we should make sure the expansion is properly checked as it can be easy for bugs to creep in.

I've checked the scalar i8 expansion here and the vector i8 expansion in a previous commit.

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

9 years ago[SDAG] Fix expansion of BITREVERSE
James Molloy [Fri, 13 Nov 2015 10:02:36 +0000 (10:02 +0000)]
[SDAG] Fix expansion of BITREVERSE

Richard Trieu noted that UBSan detected an overflowing shift, and the obvious fix caused a crash.

What was happening was that the shiftee (1U) was indeed too small for the possible range of shifts it had to handle, but also we were using "VT.getSizeInBits()" to get the maximum type bitwidth, but we wanted "VT.getScalarSizeInBits()" to get the vector lane size instead of the entire vector size.

Use an APInt for the shift and VT.getScalarSizeInBits().

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

9 years ago[ImplicitNulls] Add some clarifying comments; NFC
Sanjoy Das [Fri, 13 Nov 2015 08:14:00 +0000 (08:14 +0000)]
[ImplicitNulls] Add some clarifying comments; NFC

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

9 years ago[Hexagon] Fixing leak in padEndloop by allocating in MCContext.
Colin LeMahieu [Fri, 13 Nov 2015 07:58:06 +0000 (07:58 +0000)]
[Hexagon] Fixing leak in padEndloop by allocating in MCContext.

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

9 years agollvm/test/tools/llvm-profdata/text-format-errors.test: Use prepared version of the...
NAKAMURA Takumi [Fri, 13 Nov 2015 06:06:58 +0000 (06:06 +0000)]
llvm/test/tools/llvm-profdata/text-format-errors.test: Use prepared version of the input file, instead of using echo.

...and s/\C9/\xC9/

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

9 years ago[llvm-profdata] Add check for text profile formats and improve error reporting (2nd...
Nathan Slingerland [Fri, 13 Nov 2015 03:47:58 +0000 (03:47 +0000)]
[llvm-profdata] Add check for text profile formats and improve error reporting (2nd try)

Summary:
This change addresses two possible instances of user error / confusion when
merging sampled profile data.

Previously any input that didn't match the raw or processed instrumented format
would automatically be interpreted as instrumented profile text format data.
No error would be reported during the merge.

Example:
If foo-sampled.profdata and bar-sampled.profdata are binary sampled profiles:

Old behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -output foobar-sampled.profdata
$ llvm-profdata show -sample foobar-sampled.profdata
error: foobar-sampled.profdata:1: Expected 'mangled_name:NUM:NUM', found  lprofi

This change adds basic checks for valid input data when assuming text input.
It also makes error messages related to file format validity more specific about
the assumbed profile data type.

New behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -o foobar-sampled.profdata
error: foo.profdata: Unrecognized instrumentation profile encoding format
Perhaps you forgot to use the -sample option?

Reviewers: bogner, davidxl, dnovillo

Subscribers: davidxl, llvm-commits

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

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

9 years ago[libFuzzer] more trophies
Kostya Serebryany [Fri, 13 Nov 2015 02:44:16 +0000 (02:44 +0000)]
[libFuzzer] more trophies

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

9 years ago[lib/Linker] Convert assert(false) to llvm_unreachable().
Davide Italiano [Fri, 13 Nov 2015 02:16:51 +0000 (02:16 +0000)]
[lib/Linker] Convert assert(false) to llvm_unreachable().

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

9 years ago[libFuzzer] make libFuzzer build even with a compiler that does not have sanitizer...
Kostya Serebryany [Fri, 13 Nov 2015 01:54:40 +0000 (01:54 +0000)]
[libFuzzer] make libFuzzer build even with a compiler that does not have sanitizer headers

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

9 years ago[Hexagon] NFC. Adding a number of packet correctness tests.
Colin LeMahieu [Fri, 13 Nov 2015 01:46:06 +0000 (01:46 +0000)]
[Hexagon] NFC. Adding a number of packet correctness tests.

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

9 years agoRevert r252990.
Akira Hatanaka [Fri, 13 Nov 2015 01:44:32 +0000 (01:44 +0000)]
Revert r252990.

Some of the buildbots are still failing.

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

9 years ago[WebAssembly] Inline asm support.
Dan Gohman [Fri, 13 Nov 2015 01:42:29 +0000 (01:42 +0000)]
[WebAssembly] Inline asm support.

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

9 years agoLLVM_ENABLE_MODULES: No need to set -fcxx-modules in trunk, just -fmodules.
NAKAMURA Takumi [Fri, 13 Nov 2015 01:26:31 +0000 (01:26 +0000)]
LLVM_ENABLE_MODULES: No need to set -fcxx-modules in trunk, just -fmodules.

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

9 years agoProvide a way to specify inliner's attribute compatibility and merging.
Akira Hatanaka [Fri, 13 Nov 2015 01:23:11 +0000 (01:23 +0000)]
Provide a way to specify inliner's attribute compatibility and merging.

This reapplies r252949. I've changed the type of FuncName to be
std::string instead of StringRef in emitFnAttrCompatCheck.

Original commit message for r252949:

Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.

This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.

rdar://problem/19836465

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

9 years ago[Hexagon] Adding relaxation functionality to backend and test.
Colin LeMahieu [Fri, 13 Nov 2015 01:12:25 +0000 (01:12 +0000)]
[Hexagon] Adding relaxation functionality to backend and test.

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

9 years ago[WebAssembly] Un-mangle the conversion instruction names.
Dan Gohman [Fri, 13 Nov 2015 00:50:04 +0000 (00:50 +0000)]
[WebAssembly] Un-mangle the conversion instruction names.

This arranges the types in the LLVM instruction names in the same order that
they appear in the WebAssembly opcode names, and eliminates
double-underscores.

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

9 years ago[WebAssembly] Rename BR_IF_ to BR_IF
Dan Gohman [Fri, 13 Nov 2015 00:46:31 +0000 (00:46 +0000)]
[WebAssembly] Rename BR_IF_ to BR_IF

With MC-based instruction printing, we no longer need instruction names to
mangle in hints about how they should be printed.

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

9 years ago[WebAssembly] Remove unneeded TODO items. NFC.
Dan Gohman [Fri, 13 Nov 2015 00:41:25 +0000 (00:41 +0000)]
[WebAssembly] Remove unneeded TODO items. NFC.

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

9 years ago[WebAssembly] Tidy up and update a TODO item. NFC.
Dan Gohman [Fri, 13 Nov 2015 00:40:37 +0000 (00:40 +0000)]
[WebAssembly] Tidy up and update a TODO item. NFC.

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

9 years ago[WinEH] Find root frame correctly in CLR funclets
Joseph Tremoulet [Fri, 13 Nov 2015 00:39:23 +0000 (00:39 +0000)]
[WinEH] Find root frame correctly in CLR funclets

Summary:
The value that the CoreCLR personality passes to a funclet for the
establisher frame may be the root function's frame or may be the parent
funclet's (mostly empty) frame in the case of nested funclets.  Each
funclet stores a pointer to the root frame in its own (mostly empty)
frame, as does the root function itself.  All frames allocate this slot at
the same offset, measured from the post-prolog stack pointer, so that the
same sequence can accept any ancestor as an establisher frame parameter
value, and so that a single offset can be reported to the GC, which also
looks at this slot.

This change allocate the slot when processing function entry, and records
its frame index on the WinEHFuncInfo object, then inserts the code to
set/copy it during prolog emission.

Reviewers: majnemer, AndyAyers, pgavlin, rnk

Subscribers: llvm-commits

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

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

9 years ago[WebAssembly] Introduce a new pseudo-operand for unused expression results.
Dan Gohman [Fri, 13 Nov 2015 00:21:05 +0000 (00:21 +0000)]
[WebAssembly] Introduce a new pseudo-operand for unused expression results.

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

9 years agoX86-FMA3: Implemented commute transformations FMA*_Int instructions.
Vyacheslav Klochkov [Fri, 13 Nov 2015 00:07:35 +0000 (00:07 +0000)]
X86-FMA3: Implemented commute transformations FMA*_Int instructions.
It made it possible to apply the memory folding optimization for the 2nd
operand of FMA*_Int instructions.

Reviewer: Quentin Colombet
Differential Revision: http://reviews.llvm.org/D14550

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

9 years ago[SimplifyLibCalls] Make a function shorter. NFC.
Davide Italiano [Thu, 12 Nov 2015 23:39:00 +0000 (23:39 +0000)]
[SimplifyLibCalls] Make a function shorter. NFC.

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

9 years ago[Hexagon] Adding checks for values out of operand range and correct new-value produce...
Colin LeMahieu [Thu, 12 Nov 2015 23:28:01 +0000 (23:28 +0000)]
[Hexagon] Adding checks for values out of operand range and correct new-value producer usage.

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

9 years ago[Hexagon] Adding test to make sure labels and register pairs are correctly parsed.
Colin LeMahieu [Thu, 12 Nov 2015 22:54:14 +0000 (22:54 +0000)]
[Hexagon] Adding test to make sure labels and register pairs are correctly parsed.

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

9 years agospecify triple and tighten checks using update_llc_test_checks.py
Sanjay Patel [Thu, 12 Nov 2015 22:27:38 +0000 (22:27 +0000)]
specify triple and tighten checks using update_llc_test_checks.py

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

9 years agoRevert "Remove unnecessary call to getAllocatableRegClass"
Tom Stellard [Thu, 12 Nov 2015 21:43:25 +0000 (21:43 +0000)]
Revert "Remove unnecessary call to getAllocatableRegClass"

This reverts commit r252565.

This also includes the revert of the commit mentioned below in order to
avoid breaking tests in AMDGPU:

Revert "AMDGPU: Set isAllocatable = 0 on VS_32/VS_64"

This reverts commit r252674.

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

9 years agoRevert r252949.
Akira Hatanaka [Thu, 12 Nov 2015 21:19:18 +0000 (21:19 +0000)]
Revert r252949.

It broke some of the bots including clang-x64-ninja-win7.

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

9 years agoProvide a way to specify inliner's attribute compatibility and merging
Akira Hatanaka [Thu, 12 Nov 2015 20:59:43 +0000 (20:59 +0000)]
Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.

This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.

rdar://problem/19836465

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

9 years agoRevert r243347 "Add TargetTransformInfo::isZExtFree."
Sanjoy Das [Thu, 12 Nov 2015 20:51:52 +0000 (20:51 +0000)]
Revert r243347 "Add TargetTransformInfo::isZExtFree."

r243347 was intended to support a change to LSR (r243348).  That change
to LSR has since had to be reverted (r243939) because it was buggy, and
now the code added in r243347 is untested and unexercised.  Given that,
I think it is appropriate to revert r243347 for now, with the intent of
adding it back in later if I get around to checking in a fixed version
of r243348.

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

9 years ago[ImplicitNulls] Fix wrapping by breaking up a condition, NFC
Sanjoy Das [Thu, 12 Nov 2015 20:51:49 +0000 (20:51 +0000)]
[ImplicitNulls] Fix wrapping by breaking up a condition, NFC

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

9 years ago[ImplicitNull] Extract out a HazardDetector class, NFC
Sanjoy Das [Thu, 12 Nov 2015 20:51:44 +0000 (20:51 +0000)]
[ImplicitNull] Extract out a HazardDetector class, NFC

This will make later functional changes easier to follow.

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

9 years agodisabling sancov tests: too many failures on different platforms.
Mike Aizatsky [Thu, 12 Nov 2015 20:47:12 +0000 (20:47 +0000)]
disabling sancov tests: too many failures on different platforms.

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

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

9 years agosancov tests - platform independent separators
Mike Aizatsky [Thu, 12 Nov 2015 20:17:49 +0000 (20:17 +0000)]
sancov tests - platform independent separators

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

9 years agoMy first/test commit. Removed a trailing whitespace.
Vyacheslav Klochkov [Thu, 12 Nov 2015 20:11:57 +0000 (20:11 +0000)]
My first/test commit. Removed a trailing whitespace.

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

9 years agoRevert "Fix bug 25440: GVN assertion after coercing loads"
Tobias Grosser [Thu, 12 Nov 2015 20:04:21 +0000 (20:04 +0000)]
Revert "Fix bug 25440: GVN assertion after coercing loads"

This reverts 252919 which broke LNT: MultiSource/Applications/SPASS

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

9 years agosancov test suite
Mike Aizatsky [Thu, 12 Nov 2015 19:34:21 +0000 (19:34 +0000)]
sancov test suite

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

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

9 years ago[ThinLTO] Update test to be more tolerant of ordering changes
Teresa Johnson [Thu, 12 Nov 2015 19:31:46 +0000 (19:31 +0000)]
[ThinLTO] Update test to be more tolerant of ordering changes

Update the ThinLTO function importing test to use DAG forms of checks so
that it is more tolerant of changes to relative ordering between
imported decls/defs. This reduces the number of changes required by the
comdat importing patch I am sending for review shortly.

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

9 years ago[Hexagon] Allocate MCInst in the MCContext to avoid leaking it.
Benjamin Kramer [Thu, 12 Nov 2015 19:30:40 +0000 (19:30 +0000)]
[Hexagon] Allocate MCInst in the MCContext to avoid leaking it.

Found by leaksanitizer.

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

9 years ago[LIR] Minor refactoring. NFCI.
Chad Rosier [Thu, 12 Nov 2015 19:09:16 +0000 (19:09 +0000)]
[LIR] Minor refactoring. NFCI.

This change prevents uninteresting stores from being inserted into the list of
candidate stores for memset/memcpy conversion.

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

9 years agoRoll an expression into an assert to fix -Wunused-variable in a -Asserts build
David Blaikie [Thu, 12 Nov 2015 19:07:43 +0000 (19:07 +0000)]
Roll an expression into an assert to fix -Wunused-variable in a -Asserts build

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

9 years agoreverting r252916 to investigate test failure
Nathan Slingerland [Thu, 12 Nov 2015 18:39:26 +0000 (18:39 +0000)]
reverting r252916 to investigate test failure

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

9 years agoFix bug 25440: GVN assertion after coercing loads
Weiming Zhao [Thu, 12 Nov 2015 18:19:59 +0000 (18:19 +0000)]
Fix bug 25440: GVN assertion after coercing loads

Summary:
when coercing loads, it inserts some instructions, which have no GV assigned.

https://llvm.org/bugs/show_bug.cgi?id=25440

Reviewers: hfinkel, dberlin

Subscribers: dberlin, llvm-commits

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

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

9 years ago[ShrinkWrap] Fix a typo in a comment.
Quentin Colombet [Thu, 12 Nov 2015 18:16:27 +0000 (18:16 +0000)]
[ShrinkWrap] Fix a typo in a comment.

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

9 years ago[ShrinkWrap] Make sure we do not mess up with EH funclet lowering.
Quentin Colombet [Thu, 12 Nov 2015 18:13:42 +0000 (18:13 +0000)]
[ShrinkWrap] Make sure we do not mess up with EH funclet lowering.
ShrinkWrapping does not understand exception handling constraints for now, so
make sure we do not mess with them by aborting on functions that use EH
funclets.

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

9 years ago[llvm-profdata] Add check for text profile formats and improve error reporting
Nathan Slingerland [Thu, 12 Nov 2015 18:06:18 +0000 (18:06 +0000)]
[llvm-profdata] Add check for text profile formats and improve error reporting

Summary:
This change addresses two possible instances of user error / confusion when
merging sampled profile data.

Previously any input that didn't match the raw or processed instrumented format
would automatically be interpreted as instrumented profile text format data.
No error would be reported during the merge.

Example:
If foo-sampled.profdata and bar-sampled.profdata are binary sampled profiles:

Old behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -output foobar-sampled.profdata
$ llvm-profdata show -sample foobar-sampled.profdata
error: foobar-sampled.profdata:1: Expected 'mangled_name:NUM:NUM', found  lprofi

This change adds basic checks for valid input data when assuming text input.
It also makes error messages related to file format validity more specific about
the assumbed profile data type.

New behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -o foobar-sampled.profdata
error: foo.profdata: Unrecognized instrumentation profile encoding format
Perhaps you forgot to use the -sample option?

Reviewers: bogner, davidxl, dnovillo

Subscribers: davidxl, llvm-commits

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

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

9 years agoSamplePGO - Move FunctionSamples::print() to a better location. NFC.
Diego Novillo [Thu, 12 Nov 2015 17:58:14 +0000 (17:58 +0000)]
SamplePGO - Move FunctionSamples::print() to a better location. NFC.

The class is declared in SampleProf.h, so a better home for this is
SampleProf.cpp.

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

9 years ago[WinEH] Fix problem with removing an element from a SetVector while iterating.
Andrew Kaylor [Thu, 12 Nov 2015 17:36:03 +0000 (17:36 +0000)]
[WinEH] Fix problem with removing an element from a SetVector while iterating.

Patch provided by Yaron Keren. (Thanks!)

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

9 years agoComment update. NFC.
Rafael Espindola [Thu, 12 Nov 2015 17:13:45 +0000 (17:13 +0000)]
Comment update. NFC.

Fix the library name.
Don't duplicate the comment in the .cpp file.
Don't repeat the name in the comment.

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

9 years ago[WebAssembly] Reapply r252858, with svn add for the new file.
Dan Gohman [Thu, 12 Nov 2015 17:04:33 +0000 (17:04 +0000)]
[WebAssembly] Reapply r252858, with svn add for the new file.

Switch to MC for instruction printing.

This encompasses several changes which are all interconnected:
 - Use the MC framework for printing almost all instructions.
 - AsmStrings are now live.
 - This introduces an indirection between LLVM vregs and WebAssembly registers,
   and a new pass, WebAssemblyRegNumbering, for computing a basic the mapping.
   This addresses some basic issues with argument registers and unused registers.
 - The way ARGUMENT instructions are handled no longer generates redundant
   get_local+set_local for every argument.

This also changes the assembly syntax somewhat; most notably, MC's printing
does not use sigils on label names, so those are no longer present, and
push/pop now have a sigil to keep them unambiguous.

The usage of set_local/get_local/$push/$pop will continue to evolve
significantly. This patch is just one step of a larger change.

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

9 years ago[x86] translating "fp" (floating point) instructions from {fadd,fdiv,fmul,fsub,fsubr...
Michael Zuckerman [Thu, 12 Nov 2015 16:58:51 +0000 (16:58 +0000)]
[x86] translating "fp" (floating point) instructions from {fadd,fdiv,fmul,fsub,fsubr,fdivr} to {faddp,fdivp,fmulp,fsubp,fsubrp,fdivrp}

LLVM Missing the following instructions: fadd\fdiv\fmul\fsub\fsubr\fdivr.
GAS and MS supporting this instruction and lowering them in to a faddp\fdivp\fmulp\fsubp\fsubrp\fdivrp instructions.

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

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

9 years agoCull non-standard variants of ARM architectures (NFC)
Artyom Skrobov [Thu, 12 Nov 2015 15:51:41 +0000 (15:51 +0000)]
Cull non-standard variants of ARM architectures (NFC)

Summary:
This patch changes ARMV5, ARMV5E, ARMV6SM, ARMV6HL, ARMV7, ARMV7L,
ARMV7HL, ARMV7EM to be treated as aliases for the corresponding
standard architectures, instead of as actual architectures.

Reviewers: rengolin

Subscribers: aemerson, llvm-commits, rengolin

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

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

9 years agoRevert r252858: "[WebAssembly] Switch to MC for instruction printing."
Hans Wennborg [Thu, 12 Nov 2015 14:37:56 +0000 (14:37 +0000)]
Revert r252858: "[WebAssembly] Switch to MC for instruction printing."

It broke the CMake build:

"Cannot find source file: WebAssemblyRegNumbering.cpp"

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

9 years agoRe-apply "[mips] Use correct frame register for DWARF info when dynamically realignin...
Vasileios Kalintiris [Thu, 12 Nov 2015 14:11:43 +0000 (14:11 +0000)]
Re-apply "[mips] Use correct frame register for DWARF info when dynamically realigning the stack.""

r252219 reversed the direction of subprogram -> function edge. Fixed the
IR to account for this.

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