Commit Graph

114349 Commits

Author SHA1 Message Date
Reid Kleckner
783f7f989e Don't sibcall between SysV and Win64 convention functions
The shadow stack space expectations won't match.

Fixes PR22709.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230667 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 19:43:20 +00:00
Lang Hames
5300f55503 [Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230664 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 19:28:37 +00:00
Hal Finkel
532af6859f [InstCombine/PowerPC] Convert aligned QPX load/store intrinsics into loads/stores
InstCombine has long had logic to convert aligned Altivec load/store intrinsics
into regular loads and stores. This mirrors that functionality for QPX vector
load/store intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230660 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 18:56:03 +00:00
Paul Robinson
b2f521b647 When the source has a series of assignments, users reasonably want to
have the debugger step through each one individually. Turn off the
combine for adjacent stores at -O0 so we get this behavior.

Possibly, DAGCombine shouldn't run at all at -O0, but that's for
another day; see PR22346.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230659 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 18:47:57 +00:00
Lang Hames
69d2539554 [Orc][Kaleidoscope] More diff-reduction between tutorial versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230658 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 18:36:34 +00:00
Petar Jovanovic
e53d9df042 Fix justify error for small structures in varargs for MIPS64BE
There was a problem when passing structures as variable arguments.
The structures smaller than 64 bit were not left justified on MIPS64
big endian. This is now fixed by shifting the value to make it left-
justified when appropriate.

This fixes the bug http://llvm.org/bugs/show_bug.cgi?id=21608

Patch by Aleksandar Beserminji.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230657 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 18:35:15 +00:00
Rafael Espindola
8d4343eb9b gold-plugin: "Upgrade" debug info and handle its warnings.
The gold plugin never calls MaterializeModule, so any old debug info
was not deleted and could cause crashes.

Now that it is being "upgraded", the plugin also has to handle warnings
and create Modules with a nice id (it shows in the warning).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230655 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 18:24:37 +00:00
Sumanth Gundapaneni
adaebc8b56 Use ".arch_extension" ARM directive to support hwdiv on krait
In case of "krait" CPU, asm printer doesn't emit any ".cpu" so the
features bits are not computed. This patch lets the asm printer
emit ".cpu cortex-a9" directive for krait and the hwdiv feature is
enabled through ".arch_extension". In short, krait is treated
as "cortex-a9" with hwdiv. We can not emit ".krait" as CPU since
it is not supported bu GNU GAS yet


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230651 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 18:08:41 +00:00
Sumanth Gundapaneni
7c0f2ab3db Use ".arch_extension" ARM directive to specify the additional CPU features
This patch is in response to r223147 where the avaiable features are
computed based on ".cpu" directive. This will work clean for the standard
variants like cortex-a9. For custom variants which rely on standard cpu names
for assembly, the additional features of a CPU should be propagated. This can be
done via ".arch_extension" as long as the assembler supports it. The
implementation for krait along with unit test will be submitted in next patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230650 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 18:07:35 +00:00
Adam Nemet
e382bb9e35 [LV/LoopAccesses] Backward dependences are not safe just because the
accesses are via different types

Noticed this while generalizing the code for loop distribution.

I confirmed with Arnold that this was indeed a bug and managed to create
a testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230647 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 17:58:48 +00:00
Tom Stellard
89e4328381 R600/SI: Remove M0 from DS assembly strings
This matches the assembly syntax for the proprietary compiler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230645 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 17:08:43 +00:00
Bruno Cardoso Lopes
bfa9a71f23 [X86][MMX] Fix a typo in a couple of tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230638 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 15:16:09 +00:00
Bruno Cardoso Lopes
dde2e4f7b9 [X86][MMX] Remove widening experimental flag from MMX tests.
Turns out that after the past MMX commits, we don't need to rely on this
flag to get better codegen for MMX. Also update the tests to become
triple neutral.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230637 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 15:10:38 +00:00
Michael Kuperstein
b2b5ffd452 [X86][Haswell][SchedModel] Fix WriteMULm latency.
The latency for the WriteMULm class was set to 4, which is actually lower than the latency for WriteMULr (5). 
A better estimate would be 4 added to WriteMULr, that is, 9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230634 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 14:30:09 +00:00
Hal Finkel
9f9a6fd453 [InstCombine] Add a test for altivec load/store intrinsic simplification
InstCombine has logic to convert aligned Altivec load/store intrinsics into
regular loads and stores. Unfortunately, there seems to be no regression test
covering this behavior. Adding one...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230632 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 14:22:41 +00:00
Vladimir Medic
d89ac8f158 Replace obsolete -mattr=n64 command line option with -target-abi=n64. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230628 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 12:29:48 +00:00
Chandler Carruth
eabb1227f6 [x86] Sink the single-input v8i16 lowering code that is actually
formulaic into the top v8i16 lowering routine.

This makes the generalized lowering a completely general and single path
lowering which will allow generalizing it in turn for multiple 128-bit
lanes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230623 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 11:00:40 +00:00
Chandler Carruth
177498a4e0 [x86] Remove a SimpleTy usage. No need for it here, we already have the
MVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230622 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 10:37:01 +00:00
Sanjoy Das
f1478ffeae IRCE: only touch loops that have been shown to have a high
backedge-taken count in profiliing data.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230619 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 08:56:04 +00:00
Sanjoy Das
21b2edfeae IRCE: generalize to handle loops with decreasing induction variables.
IRCE can now split the iteration space for loops like:

   for (i = n; i >= 0; i--)
     a[i + k] = 42; // bounds check on access



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230618 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 08:19:31 +00:00
Chandler Carruth
19c267aed1 [x86] Make the vector shuffle helpers order the SDLoc and MVT arguments.
This ordering matches that of DAG.getNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230617 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 08:19:24 +00:00
Duncan P. N. Exon Smith
47a084f42d IR: Use '= default' instead of r230609, NFC
Apparently we can use this now!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230613 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 05:00:42 +00:00
Duncan P. N. Exon Smith
9379c31520 FileCheck: Add CHECK-SAME
Add `CHECK-SAME`, which requires that the pattern matches on the *same*
line as the previous `CHECK`/`CHECK-NEXT` -- in other words, no newline
is allowed in the skipped region.  This is similar to `CHECK-NEXT`,
which requires exactly 1 newline in the skipped region.

My motivation is to simplify checking the long lines of LLVM assembly
for the new debug info hierarchy.  This allows CHECK sequences like the
following:

    CHECK:      ![[REF]] = !SomeMDNode(
    CHECK-SAME: file: ![[FILE:[0-9]+]]
    CHECK-SAME: otherField: 93{{[,)]}}

which is equivalent to:

    CHECK: ![[REF]] = !SomeMDNode({{.*}}file: ![[FILE:[0-9]+]]{{.*}}otherField: 93{{[,)]}}

While this example just has two fields, many nodes in debug info have
more than that.  `CHECK-SAME` will keep the logic easy to follow.

Morever, it enables interleaving `CHECK-NOT`s without allowing newlines.
Consider the following:

    CHECK:      ![[REF]] = !SomeMDNode(
    CHECK-SAME: file: ![[FILE:[0-9]+]]
    CHECK-NOT:  unexpectedField:
    CHECK-SAME: otherField: 93{{[,)]}}
    CHECK-NOT:  otherUnexpectedField:
    CHECK-SAME: )

which doesn't seem to have an equivalent `CHECK` line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230612 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 04:53:00 +00:00
Duncan P. N. Exon Smith
94a0f51a3f IR: Add default constructor for DIImportedEntity
Add a default constructor for `DIImportedEntity`, to be used in clang in
a follow-up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230609 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 04:41:10 +00:00
Adam Nemet
5a51d864b9 [LoopAccesses] Add command-line option for RuntimeMemoryCheckThreshold
Also remove the somewhat misleading initializers from
VectorizationFactor and VectorizationInterleave.  They will get
initialized with the default ctor since no cl::init is provided.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230608 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 04:39:09 +00:00
Sanjoy Das
9868473dff IRCE: print newline after printing an InductiveRangeCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230607 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 04:03:31 +00:00
Philip Reames
fda8a1817d [GC docs] Add example IR, assembly, and stackmaps to Statepoint documentation
When I originally committed the statepoint docs, I left placeholders for example IR fragments.  I'm finally getting around to filling those in.  

I also added IR fragments to illustrate the usage of the PlaceSafepoints pass while I was at it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230601 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 01:18:21 +00:00
David Majnemer
3bd9ff3f1e Replace a few instances of NULL with nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230599 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 01:10:49 +00:00
Reid Kleckner
3142798ac8 Pass /nologo to ml64 for quieter builds
It still prints "Assembling path/to/X86CompilationCallback_Win64.asm",
but linking does the same thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230596 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 00:51:33 +00:00
Ramkumar Ramachandra
e10581ac39 PlaceSafepoints: use IRBuilder helpers
Use the IRBuilder helpers for gc.statepoint and gc.result, instead of
coding the construction by hand. Note that the gc.statepoint IRBuilder
handles only CallInst, not InvokeInst; retain that part of hand-coding.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230591 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 00:35:56 +00:00
Eric Christopher
341f17d0f0 Remove a FIXME.
Explanation: This function is in TargetLowering because it uses
RegClassForVT which would need to be moved to TargetRegisterInfo
and would necessitate moving isTypeLegal over as well - a massive
change that would just require TargetLowering having a TargetRegisterInfo
class member that it would use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230585 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 00:00:35 +00:00
Eric Christopher
435571ada6 Fix a couple of depedent->dependent typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230584 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 00:00:33 +00:00
Eric Christopher
a01bc6a59f Remove an argument-less call to getSubtargetImpl from TargetLoweringBase.
This required plumbing a TargetRegisterInfo through computeRegisterProperties
and into findRepresentativeClass which uses it for register class
iteration. This required passing a subtarget into a few target specific
initializations of TargetLowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230583 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 00:00:24 +00:00
Ramkumar Ramachandra
e9a49d61ac MemDepPrinter: Fix some nits introduced in r228596
Differential Revision: http://reviews.llvm.org/D7644

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230582 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 23:55:00 +00:00
Philip Reames
14f8f06ea5 [GC docs] More minor word tweaks to make the GC bits clearer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230581 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 23:52:06 +00:00
Philip Reames
64025c5dea [GC Docs] Update LangRef to link to Statepoint docs
Add a brief section linking to the experimental statepoint intrinsics analogous to the one we have linking to patchpoint.  

While I'm here, cleanup some wording about what the gc "name" attribute actually means.  It's not the name of a *collector* it's the name of the *strategy* which may be compatible with multiple collectors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230576 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 23:45:20 +00:00
Philip Reames
651713e05e [GC docs] Fill in description of the statepoint-example GC strategy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230572 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 23:22:43 +00:00
Philip Reames
63694290ce [GC Docs] Minor wording clarification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230570 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 23:07:34 +00:00
Justin Bogner
a4beb9e372 Object: Handle Mach-O kext bundle files
This particular subtype of Mach-O was missing. Add it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230567 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:59:20 +00:00
Justin Bogner
4a3b80e1f9 InstrProf: Make the __llvm_profile_runtime_user symbol hidden
This symbol exists only to pull in the required pieces of the runtime,
so nothing ever needs to refer to it. Making it hidden avoids the
potential for issues with duplicate symbols when linking profiled
libraries together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230566 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:52:20 +00:00
Duncan P. N. Exon Smith
344ea29148 IR: Drop newline from AssemblyWriter::printMDNodeBody()
Remove a newline from `AssemblyWriter::printMDNodeBody()`, and add one
to `AssemblyWriter::writeMDNode()`.  NFCI for assembly output.

However, this drops an inconsistent newline from `Metadata::print()`
when `this` is an `MDNode`.  Now the newline added by `Metadata::dump()`
won't look so verbose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230565 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:46:38 +00:00
Sanjay Patel
8e3ef7f186 only propagate equality comparisons of FP values that we are certain are non-zero
This is a follow-on to r227491 which tightens the check for propagating FP
values. If a non-constant value happens to be a zero, we would hit the same
bug as before.

Bug noted and patch suggested by Eli Friedman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230564 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:46:08 +00:00
Justin Bogner
5674975c5e InstrProf: Remove dead code in CoverageMappingReader
Remove a default argument that's never passed and a constructor that's
never called.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230563 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:44:50 +00:00
Eric Christopher
b97b892db1 Move TargetLoweringBase::getTypeConversion to the .cpp file from
the .h file. It's used in only one place (other than recursively)
and there's no need to include it everywhere.

Saves almost 900k from total llvm object file size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230561 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:41:30 +00:00
JF Bastien
6fec24744f InstCombine: extract instead of shuffle when performing vector/array type punning
Summary: SROA generates code that isn't quite as easy to optimize and contains unusual-sized shuffles, but that code is generally correct. As discussed in D7487 the right place to clean things up is InstCombine, which will pick up the type-punning pattern and transform it into a more obvious bitcast+extractelement, while leaving the other patterns SROA encounters as-is.

Test Plan: make check

Reviewers: jvoung, chandlerc

Subscribers: llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230560 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:30:51 +00:00
Frederic Riss
463734499e [dwarfdump] Fix frame info register number dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230559 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:30:09 +00:00
Duncan P. N. Exon Smith
3a955f3e68 IR: Annotate dump methods with LLVM_DUMP_METHOD
It turns out we have a macro to ensure that debuggers can access
`dump()` methods.  Use it.  Hopefully this will prevent me (and others)
from committing crimes like in r223802 (search for /10000/, or just see
the fix in r224407).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230555 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:08:21 +00:00
Frederic Riss
c0f0498636 Try to appease buildbots.
It seems ArrayRefs to multi-dimensional arrays confuse some compilers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230554 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:07:43 +00:00
Hal Finkel
7840990de8 [PowerPC] Make LDtocL and friends invariant loads
LDtocL, and other loads that roughly correspond to the TOC_ENTRY SDAG node,
represent loads from the TOC, which is invariant. As a result, these loads can
be hoisted out of loops, etc. In order to do this, we need to generate
GOT-style MMOs for TOC_ENTRY, which requires treating it as a legitimate memory
intrinsic node type. Once this is done, the MMO transfer is automatically
handled for TableGen-driven instruction selection, and for nodes generated
directly in PPCISelDAGToDAG, we need to transfer the MMOs manually.

Also, we were not transferring MMOs associated with pre-increment loads, so do
that too.

Lastly, this fixes an exposed bug where R30 was not added as a defined operand of
UpdateGBR.

This problem was highlighted by an example (used to generate the test case)
posted to llvmdev by Francois Pichet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230553 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 21:36:59 +00:00
Frederic Riss
e9e16aa4a5 [dwarfdump] Make debug_frame dump actually useful.
This adds support for pretty-printing instruction operands. The new
output looks like:

00000000 00000010 ffffffff CIE
  Version:               1
  Augmentation:
  Code alignment factor: 1
  Data alignment factor: -4
  Return address column: 8

  DW_CFA_def_cfa:  reg4 +4
  DW_CFA_offset:  reg8 -4
  DW_CFA_nop:
  DW_CFA_nop:

00000014 00000010 00000000 FDE cie=00000000 pc=00000000...00000022
  DW_CFA_advance_loc:  3
  DW_CFA_def_cfa_offset:  +12
  DW_CFA_nop:

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230551 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 21:30:22 +00:00