oota-llvm.git
9 years ago[OCaml] Commit missing parts of r210395
Peter Zotov [Sat, 7 Jun 2014 15:53:28 +0000 (15:53 +0000)]
[OCaml] Commit missing parts of r210395

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

9 years ago[OCaml] Introduce an llmdkind abstract type.
Peter Zotov [Sat, 7 Jun 2014 15:15:10 +0000 (15:15 +0000)]
[OCaml] Introduce an llmdkind abstract type.

Patch by Gabriel Radanne.

While this commit technically breaks API, no code should have supplied
the integer IDs directly, and thus no code should break.

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

9 years agoRevert 209903 and 210040.
Rafael Espindola [Sat, 7 Jun 2014 04:12:35 +0000 (04:12 +0000)]
Revert 209903 and 210040.

The messages were

 "PR19753: Optimize comparisons with "ashr exact" of a constanst."
 "Added support to optimize comparisons with "lshr exact" of a constant."

They were not correctly handling signed/unsigned operation differences,
causing pr19958.

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

9 years agoFix the MachineScheduler's logic for updating ready times for in-order.
Andrew Trick [Sat, 7 Jun 2014 01:48:43 +0000 (01:48 +0000)]
Fix the MachineScheduler's logic for updating ready times for in-order.

Now the scheduler updates a node's ready time as soon as it is
scheduled, before releasing dependent nodes. There was a reason I
didn't do this initially but it no longer applies.

A53 is in-order and was running into an issue where nodes where added
to the readyQ too early. That's now fixed.

This also makes it easier for custom scheduling strategies to build
heuristics based on the actual cycles that the node was scheduled at.

The only impact on OOO (sandybridge/cyclone) is that ready times will
be slightly more accurate. I didn't measure any significant regressions.

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

9 years agoReplace the use of TargetMachine with a tiny bool variable.
Eric Christopher [Fri, 6 Jun 2014 23:26:48 +0000 (23:26 +0000)]
Replace the use of TargetMachine with a tiny bool variable.

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

9 years agoRemove all local variables from X86SelectionDAGInfo, the DAG has
Eric Christopher [Fri, 6 Jun 2014 23:26:43 +0000 (23:26 +0000)]
Remove all local variables from X86SelectionDAGInfo, the DAG has
all of the ones we were stashing away on startup.

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

9 years agoADT: introduce isWindowsItaniumEnvironment
Saleem Abdulrasool [Fri, 6 Jun 2014 22:46:18 +0000 (22:46 +0000)]
ADT: introduce isWindowsItaniumEnvironment

Add an isWindowsItaniumEnvironment function to Triple to mirror the other
Windows environments.  This is simply a utility function to check if we are
targeting windows-itanium rather than windows-msvc.

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

9 years agoDebugInfo: Use the scope of the function declaration, if any, to name a function...
David Blaikie [Fri, 6 Jun 2014 22:29:05 +0000 (22:29 +0000)]
DebugInfo: Use the scope of the function declaration, if any, to name a function in DWARF pubnames

This ensures that member functions, for example, are entered into
pubnames with their fully qualified name, rather than inside the global
namespace.

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

9 years agoDebugInfo: pubnames: include file-local (static or anonymous namespace) variables...
David Blaikie [Fri, 6 Jun 2014 22:16:56 +0000 (22:16 +0000)]
DebugInfo: pubnames: include file-local (static or anonymous namespace) variables and anonymous namespaces themselves.

Still some issues with name qualification, FIXMEs added to test cases
and fixes will come next.

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

9 years agoInstCombine: Canonicalize addrspacecast between different element types
Jingyue Wu [Fri, 6 Jun 2014 21:52:55 +0000 (21:52 +0000)]
InstCombine: Canonicalize addrspacecast between different element types

addrspacecast X addrspace(M)* to Y addrspace(N)*

-->

bitcast X addrspace(M)* to Y addrspace(M)*
addrspacecast Y addrspace(M)* to Y addrspace(N)*

Updat all affected tests and add several new tests in addrspacecast.ll.

This patch is based on http://reviews.llvm.org/D2186 (authored by Matt
Arsenault) with fixes and more tests.

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

9 years agoMC: prevent early DCE of empty sections
Saleem Abdulrasool [Fri, 6 Jun 2014 21:40:16 +0000 (21:40 +0000)]
MC: prevent early DCE of empty sections

Prevent the early elimination of sections in the object writer.  There may be
references to the section itself by other symbols, which may potentially not be
possible to resolve.  ML (Visual Studio's Macro Assembler) also seems to retain
empty sections.

The elimination of symbols and sections which are unused should really occur at
the link phase.  This will not cause any change in the resulting binary, simply
in the generated object files.

The adjustments to the other unit tests account for the fluctuating section
index caused by the appearance of sections which were previously discarded.

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

9 years agoX86: Don't turn shifts into ands if there's another use that may not check for equality.
Benjamin Kramer [Fri, 6 Jun 2014 21:08:55 +0000 (21:08 +0000)]
X86: Don't turn shifts into ands if there's another use that may not check for equality.

Fixes PR19964.

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

9 years agoFix a few issues with comdat handling on COFF.
Rafael Espindola [Fri, 6 Jun 2014 19:26:12 +0000 (19:26 +0000)]
Fix a few issues with comdat handling on COFF.

* Section association cannot use just the section name as many
sections can have the same name. With this patch, the comdat symbol in
an assoc section is interpreted to mean a symbol in the associated
section and the mapping is discovered from it.

* Comdat symbols were not being set correctly. Instead we were getting
whatever was output first for that section.

A consequence is that associative sections now must use .section to
set the association. Using .linkonce would not work since it is not
possible to change a sections comdat symbol (it is used to decide if
we should create a new section or reuse an existing one).

This includes r210298, which was reverted because it was asserting
on an associated section having the same comdat as the associated
section.

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

9 years agoHave TargetSelectionDAGInfo take a DataLayout initializer rather than
Eric Christopher [Fri, 6 Jun 2014 19:04:48 +0000 (19:04 +0000)]
Have TargetSelectionDAGInfo take a DataLayout initializer rather than
a TargetMachine since the only thing it wants is DataLayout.

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

9 years agoMatch the full hex offsets in test/DebugInfo/X86/gnu-public-names.ll
David Blaikie [Fri, 6 Jun 2014 18:45:14 +0000 (18:45 +0000)]
Match the full hex offsets in test/DebugInfo/X86/gnu-public-names.ll

These checks were accidentally skipping the 0x prefix in the hex
offsets, then cunningly ignoring the prefix in the use of those captured
values.

Except in the case of the unit length, where the match was only matching
the leading '0' before the x in the 0x prefix, then matching that
against the length. We can't actually express the length association
here, as the length field in the Compile Unit header does not include
the length field itself, but the length field in the pubnames section
/does/ include the size of the length field in the Compile Unit header -
so the two numbers are actually 4 bytes different. Just skip matching
that.

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

9 years agoFix a typo made in Programmer's Manual made in r210354. Spotted
Dan Liew [Fri, 6 Jun 2014 18:44:21 +0000 (18:44 +0000)]
Fix a typo made in Programmer's Manual made in r210354. Spotted
by Paul Robinson.

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

9 years agoRemove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.ll
David Blaikie [Fri, 6 Jun 2014 18:22:04 +0000 (18:22 +0000)]
Remove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.ll

This was added to test that DW_AT_GNU_pubnames used sec_offset in DWARF4
and data4 in DWARF3 and below. Since then we've updated
DW_AT_GNU_pubnames to be a flag, rather than a section offset anyway.

Granted this still differs between DWARF 3 and DWARF 4
(FORM_flag_present versun FORM_flag) but it doesn't seem worthwhile
testing that codepath again here. It's covered adequately in many other
test cases.

And while I'm here, don't hardcode the byte size of the compile unit -
it's not relevant to this test and just makes it brittle if/when
anything changes in the way this CU is emitted.

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

9 years agoFixed a bug in lowering shuffle_vectors to insertps
Filipe Cabecinhas [Fri, 6 Jun 2014 18:07:06 +0000 (18:07 +0000)]
Fixed a bug in lowering shuffle_vectors to insertps

Summary:
We were being too strict and not accounting for undefs.
Added a test case and fixed another one where we improved codegen.

Reviewers: grosbach, nadav, delena

Subscribers: llvm-commits

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

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

9 years agoMention the IRBuilder in Programmer's Manual with a few small examples.
Dan Liew [Fri, 6 Jun 2014 17:25:47 +0000 (17:25 +0000)]
Mention the IRBuilder in Programmer's Manual with a few small examples.

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

9 years agoFix typo in a test from r210342.
Michael Zolotukhin [Fri, 6 Jun 2014 15:49:47 +0000 (15:49 +0000)]
Fix typo in a test from r210342.

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

9 years ago[SLP] Enable vectorization of GEP expressions.
Michael Zolotukhin [Fri, 6 Jun 2014 15:34:24 +0000 (15:34 +0000)]
[SLP] Enable vectorization of GEP expressions.

The use cases look like the following:
    x->a = y->a + 10
    x->b = y->b + 12

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

9 years ago[PPC64LE] Fix lowering of BUILD_VECTOR and SHUFFLE_VECTOR for little endian
Bill Schmidt [Fri, 6 Jun 2014 14:06:26 +0000 (14:06 +0000)]
[PPC64LE] Fix lowering of BUILD_VECTOR and SHUFFLE_VECTOR for little endian

This patch fixes a couple of lowering issues for little endian
PowerPC.  The code for lowering BUILD_VECTOR contains a number of
optimizations that are only valid for big endian.  For now, we disable
those optimizations for correctness.  In the future, we will add
analogous optimizations that are correct for little endian.

When lowering a SHUFFLE_VECTOR to a VPERM operation, we again need to
make the now-familiar transformation of swapping the input operands
and complementing the permute control vector.  Correctness of this
transformation is tested by the accompanying test case.

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

9 years agoSlight language tweak from Jonathan Humphreys.
Pekka Jaaskelainen [Fri, 6 Jun 2014 11:21:44 +0000 (11:21 +0000)]
Slight language tweak from Jonathan Humphreys.

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

9 years agoTouch configure to force clang's config.h.in reconfiguration on the build servers
Alp Toker [Fri, 6 Jun 2014 10:36:38 +0000 (10:36 +0000)]
Touch configure to force clang's config.h.in reconfiguration on the build servers

Gutted that this is needed, folks who care about keeping the legacy build
system alive should sort this out already.

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

9 years agolld test for configure & make
Iain Sandoe [Fri, 6 Jun 2014 09:06:25 +0000 (09:06 +0000)]
lld test for configure & make

r210177 added lld Makefiles, r210245 added automatic build when the source is present.

This revision completes the set by adding the lld test and unittests to the check-all target.

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

9 years agoRevert r210298 'Correctly set the comdat symbol on COFF' as it asserts on Windows
Timur Iskhodzhanov [Fri, 6 Jun 2014 08:18:18 +0000 (08:18 +0000)]
Revert r210298 'Correctly set the comdat symbol on COFF' as it asserts on Windows

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

9 years ago[yaml2obj][obj2yaml] Support ELF symbol's visibility flags (default/hidden/protected).
Simon Atanasyan [Fri, 6 Jun 2014 07:41:57 +0000 (07:41 +0000)]
[yaml2obj][obj2yaml] Support ELF symbol's visibility flags (default/hidden/protected).

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

9 years agoAdded select flavour for ABS and NEG(ABS)
Dinesh Dwivedi [Fri, 6 Jun 2014 06:54:45 +0000 (06:54 +0000)]
Added select flavour for ABS and NEG(ABS)

This patch can identify
  ABS(X) ==> (X >s 0) ? X : -X and (X >s -1) ? X : -X
  ABS(X) ==> (X <s 0) ? -X : X and (X <s 1) ? -X : X
  NABS(X) ==> (X >s 0) ? -X : X and (X >s -1) ? -X : X
  NABS(X) ==> (X <s 0) ? X : -X and (X <s 1) ? X : -X

and can transform
  ABS(ABS(X)) -> ABS(X)
  NABS(NABS(X)) -> NABS(X)

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

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

9 years agoMake LINK_POLLY_INTO_TOOLS work with the CMake build
Alp Toker [Fri, 6 Jun 2014 06:39:00 +0000 (06:39 +0000)]
Make LINK_POLLY_INTO_TOOLS work with the CMake build

The option check was being performed after config.h/llvm-config.h substitution,
generating incorrect macro definitions.

Fixes PR19614.

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

9 years agoFix PR19657 (scalar loads not combined into vector load)
Karthik Bhat [Fri, 6 Jun 2014 06:20:08 +0000 (06:20 +0000)]
Fix PR19657 (scalar loads not combined into vector load)
If we have common uses on separate paths in the tree; process the one with greater common depth first.
This makes sure that we do not assume we need to extract a load when it is actually going to be part of a vectorized tree.

Review: http://reviews.llvm.org/D3800

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

9 years agoRemove clang-specific libxml2 check from CMake
Alp Toker [Fri, 6 Jun 2014 05:08:42 +0000 (05:08 +0000)]
Remove clang-specific libxml2 check from CMake

clang's own CMake setup handles this as of r210308.

The CMAKE_CROSSCOMPILING special-case will no longer be hard-coded. This was
clearly site-specific to someone's local configuration and should be passed in
at configure time if needed with e.g. -DLIBXML2_LIBRARIES=... (the libxml2
target I tried here doesn't even support liblzma so it's *way* off).

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

9 years agoconfig.h: remove clang-specific macro definitions
Alp Toker [Fri, 6 Jun 2014 04:50:41 +0000 (04:50 +0000)]
config.h: remove clang-specific macro definitions

These had no business in LLVM core.

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

9 years agoAllow aliases to be unnamed_addr.
Rafael Espindola [Fri, 6 Jun 2014 01:20:28 +0000 (01:20 +0000)]
Allow aliases to be unnamed_addr.

Alias with unnamed_addr were in a strange state. It is stored in GlobalValue,
the language reference talks about "unnamed_addr aliases" but the verifier
was rejecting them.

It seems natural to allow unnamed_addr in aliases:

* It is a property of how it is accessed, not of the data itself.
* It is perfectly possible to write code that depends on the address
of an alias.

This patch then makes unname_addr legal for aliases. One side effect is that
the syntax changes for a corner case: In globals, unnamed_addr is now printed
before the address space.

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

9 years agoFix markup for -debug-only option
Alexey Samsonov [Thu, 5 Jun 2014 23:12:43 +0000 (23:12 +0000)]
Fix markup for -debug-only option

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

9 years agoFix null dereference with -debug-only=dwarfdebug
Alexey Samsonov [Thu, 5 Jun 2014 23:10:19 +0000 (23:10 +0000)]
Fix null dereference with -debug-only=dwarfdebug

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

9 years agoCorrectly set the comdat symbol on COFF.
Rafael Espindola [Thu, 5 Jun 2014 23:09:25 +0000 (23:09 +0000)]
Correctly set the comdat symbol on COFF.

We extended the .section syntax to allow multiple sections with the
same name but different comdats, but currently we don't make sure that
the output section has that comdat symbol.

That happens to work with the code llc produces currently because it looks like

.section secName, "dr", one_only, "COMDATSym"
.globl COMDATSym
COMDATSym:
....

but that is not very friendly to anyone coding in assembly or even to
llc once we get comdat support in the IR.

This patch changes the coff object writer to make sure the comdat symbol is
output just after the section symbol, as required by the coff spec.

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

9 years ago[PPC64LE] Add test case for r210282 commit
Bill Schmidt [Thu, 5 Jun 2014 22:57:38 +0000 (22:57 +0000)]
[PPC64LE] Add test case for r210282 commit

Chandler correctly pointed out that I need an LLVM IR test for
r210282, which modified the vperm -> shuffle transform for little
endian PowerPC.  This patch provides that test.

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

9 years agoRemove X86Subtarget from the X86FrameLowering constructor since
Eric Christopher [Thu, 5 Jun 2014 22:10:58 +0000 (22:10 +0000)]
Remove X86Subtarget from the X86FrameLowering constructor since
we can just pass in the values we already know and we're not
caching the subtarget anymore.

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

9 years agoFixed several correctness issues in SeparateConstOffsetFromGEP
Jingyue Wu [Thu, 5 Jun 2014 22:07:33 +0000 (22:07 +0000)]
Fixed several correctness issues in SeparateConstOffsetFromGEP

Most issues are on mishandling s/zext.

Fixes:

1. When rebuilding new indices, s/zext should be distributed to
sub-expressions. e.g., sext(a +nsw (b +nsw 5)) = sext(a) + sext(b) + 5 but not
sext(a + b) + 5. This also affects the logic of recursively looking for a
constant offset, we need to include s/zext into the context of the searching.

2. Function find should return the bitwidth of the constant offset instead of
always sign-extending it to i64.

3. Stop shortcutting zext'ed GEP indices. LLVM conceptually sign-extends GEP
indices to pointer-size before computing the address. Therefore, gep base,
zext(a + b) != gep base, a + b

Improvements:

1. Add an optimization for splitting sext(a + b): if a + b is proven
non-negative (e.g., used as an index of an inbound GEP) and one of a, b is
non-negative, sext(a + b) = sext(a) + sext(b)

2. Function Distributable checks whether both sext and zext can be distributed
to operands of a binary operator. This helps us split zext(sext(a + b)) to
zext(sext(a) + zext(sext(b)) when a + b does not signed or unsigned overflow.

Refactoring:

Merge some common logic of handling add/sub/or in find.

Testing:

Add many tests in split-gep.ll and split-gep-and-gvn.ll to verify the changes
we made.

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

9 years agoRemove caching of the subtarget for X86FrameLowering.
Eric Christopher [Thu, 5 Jun 2014 22:00:31 +0000 (22:00 +0000)]
Remove caching of the subtarget for X86FrameLowering.

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

9 years agoRemove duplicate copy of InstrItineraryData from the TargetMachine,
Eric Christopher [Thu, 5 Jun 2014 21:42:54 +0000 (21:42 +0000)]
Remove duplicate copy of InstrItineraryData from the TargetMachine,
it's already on the subtarget.

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

9 years agoAdding explicit triples to the ARM jumptable tests
Tom Roeder [Thu, 5 Jun 2014 21:40:13 +0000 (21:40 +0000)]
Adding explicit triples to the ARM jumptable tests

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

9 years agoAdd a testcase where there is an overflow when combining two constants.
Rafael Espindola [Thu, 5 Jun 2014 21:29:49 +0000 (21:29 +0000)]
Add a testcase where there is an overflow when combining two constants.

I noticed that a proposed optimization would have prevented this.

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

9 years agoAdd "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.
Kevin Enderby [Thu, 5 Jun 2014 21:21:57 +0000 (21:21 +0000)]
Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.

This is a first step in seeing if it is possible to make llvm-nm produce
the same output as darwin's nm(1).  Darwin's default format is bsd but its
-m output prints the longer Mach-O specific details.  For now I added the
"-format darwin" to do this (whos name may need to change in the future).
As there are other Mach-O specific flags to nm(1) which I'm hoping to add some
how in the future.  But I wanted to see if I could get the correct output for
-m flag using llvm-nm and the libObject interfaces.

I got this working but would love to hear what others think about this approach
to getting object/format specific details printed with llvm-nm.

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

9 years ago[PPC64LE] Correct vperm -> shuffle transform for little endian
Bill Schmidt [Thu, 5 Jun 2014 19:46:04 +0000 (19:46 +0000)]
[PPC64LE] Correct vperm -> shuffle transform for little endian

As discussed in cfe commit r210279, the correct little-endian
semantics for the vec_perm Altivec interfaces are implemented by
reversing the order of the input vectors and complementing the permute
control vector.  This converts the desired permute from little endian
element order into the big endian element order that the underlying
PowerPC vperm instruction uses.  This is represented with a
ppc_altivec_vperm intrinsic function.

The instruction combining pass contains code to convert a
ppc_altivec_vperm intrinsic into a vector shuffle operation when the
intrinsic has a permute control vector (mask) that is a constant.
However, the vector shuffle operation assumes that vector elements are
in natural order for their endianness, so for little endian code we
will get the wrong result with the existing transformation.

This patch reverses the semantic change to vec_perm that was performed
in altivec.h by once again swapping the input operands and
complementing the permute control vector, returning the element
ordering to little endian.

The correctness of this code is tested by the new perm.c test added in
a previous patch, and by other tests in the test suite that fail
without this patch.

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

9 years agoRemoving spurious dependency of IPO on JumpInstrTables
Tom Roeder [Thu, 5 Jun 2014 19:43:57 +0000 (19:43 +0000)]
Removing spurious dependency of IPO on JumpInstrTables

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

9 years agoAdd a new attribute called 'jumptable' that creates jump-instruction tables for funct...
Tom Roeder [Thu, 5 Jun 2014 19:29:43 +0000 (19:29 +0000)]
Add a new attribute called 'jumptable' that creates jump-instruction tables for functions marked with this attribute.
It includes a pass that rewrites all indirect calls to jumptable functions to pass through these tables.

This also adds backend support for generating the jump-instruction tables on ARM and X86.
Note that since the jumptable attribute creates a second function pointer for a
function, any function marked with jumptable must also be marked with unnamed_addr.

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

9 years agoDocument how to select build configuration with Visual C++ IDE or command line.
Yaron Keren [Thu, 5 Jun 2014 16:42:26 +0000 (16:42 +0000)]
Document how to select build configuration with Visual C++ IDE or command line.

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

9 years ago[PPC64LE] Temporarily disable VSX support in little-endian mode
Bill Schmidt [Thu, 5 Jun 2014 16:21:13 +0000 (16:21 +0000)]
[PPC64LE] Temporarily disable VSX support in little-endian mode

This is a preliminary patch for the PowerPC64LE support.  In stage 1
of the vector support, we will support the VMX (Altivec) instruction
set, but will not yet support the VSX instructions.  This is merely a
staging issue to provide functional vector support as soon as
possible.

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

9 years ago[asancov] Fix coverage line info some more.
Evgeniy Stepanov [Thu, 5 Jun 2014 14:34:45 +0000 (14:34 +0000)]
[asancov] Fix coverage line info some more.

Now it should always point to the opening brace of the function (in
-asan-coverage=1 mode).

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

9 years agoAdd missing const specifier to a const method.
Evgeniy Stepanov [Thu, 5 Jun 2014 14:32:15 +0000 (14:32 +0000)]
Add missing const specifier to a const method.

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

9 years agoXFAIL: test/DebugInfo/missing-abstract-variable.ll on s390x as well
Ulrich Weigand [Thu, 5 Jun 2014 14:20:54 +0000 (14:20 +0000)]
XFAIL: test/DebugInfo/missing-abstract-variable.ll on s390x as well

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

9 years ago[SystemZ] Do not install IfConverter pass at -O0
Ulrich Weigand [Thu, 5 Jun 2014 14:20:10 +0000 (14:20 +0000)]
[SystemZ] Do not install IfConverter pass at -O0

When not optimizing, do not run the IfConverter pass, this makes
debugging more difficult (and causes a testsuite failure in
DebugInfo/unconditional-branch.ll).

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

9 years ago[mips] Modify long branch for NaCl:
Sasa Stankovic [Thu, 5 Jun 2014 13:52:08 +0000 (13:52 +0000)]
[mips] Modify long branch for NaCl:

  * Move the instruction that changes sp outside of the branch delay slot.
  * Bundle-align the target of indirect branch.

Differential Revision: http://llvm-reviews.chandlerc.com/D3928

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

9 years agoPrevent hoisting the instruction whose def might be clobbered by the terminator.
Sasa Stankovic [Thu, 5 Jun 2014 13:42:48 +0000 (13:42 +0000)]
Prevent hoisting the instruction whose def might be clobbered by the terminator.

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

9 years ago[mips] Fix triple.
Matheus Almeida [Thu, 5 Jun 2014 12:07:14 +0000 (12:07 +0000)]
[mips] Fix triple.

Mips2 is a 32-bit architecture.

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

9 years agolld (build with configur and make) Enable build
Iain Sandoe [Thu, 5 Jun 2014 08:49:55 +0000 (08:49 +0000)]
lld (build with configur and make) Enable build

r210177 added Makefiles to the lld project.
This revision enables the automatic build of lld when the sources are found in tools/lld.

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

9 years agoR600: Fix test. Using wrong check prefix.
Matt Arsenault [Thu, 5 Jun 2014 08:00:36 +0000 (08:00 +0000)]
R600: Fix test. Using wrong check prefix.

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

9 years agoFix coverage for files with global constructors again. Adds a testcase to the commit...
Nick Lewycky [Thu, 5 Jun 2014 04:31:43 +0000 (04:31 +0000)]
Fix coverage for files with global constructors again. Adds a testcase to the commit from r206671, as requested by David Blaikie.

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

9 years agoRevert r210221 again, due to a crash Richard Smith has provided involving self-hostin...
David Blaikie [Thu, 5 Jun 2014 02:04:59 +0000 (02:04 +0000)]
Revert r210221 again, due to a crash Richard Smith has provided involving self-hosting LLVM with libc++.

Test case coming, once I reduce it.

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

9 years agoDebugInfo: Reuse existing LexicalScope to retrieve the scope's MDNode, rather than...
David Blaikie [Thu, 5 Jun 2014 01:30:50 +0000 (01:30 +0000)]
DebugInfo: Reuse existing LexicalScope to retrieve the scope's MDNode, rather than looking it up through the DebugLoc.

No functional change intended, just streamlines the abstract variable
lookup/construction to use a common entry point.

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

9 years agoDebugInfo: Roll argument insertion into variable insertion to ensure arguments are...
David Blaikie [Thu, 5 Jun 2014 01:04:20 +0000 (01:04 +0000)]
DebugInfo: Roll argument insertion into variable insertion to ensure arguments are correctly handled in all cases.

No functional change intended.

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

9 years agoPR19388: DebugInfo: Emit dead arguments in their originally declared order.
David Blaikie [Thu, 5 Jun 2014 00:51:35 +0000 (00:51 +0000)]
PR19388: DebugInfo: Emit dead arguments in their originally declared order.

Unused arguments were not being added to the argument list, but instead
treated as arbitrary scope variables. This meant they weren't carefully
added in the original argument order.

In this particular example, though, it turns out the argument is only
/mostly/ unused (well, actually it's entirely used, but in a specific
way). It's a struct that, due to ABI reasons, is decomposed into chunks
(exactly one chunk, since it has one member) and then passed. Since only
one of those chunks is used (SROA, etc, kill the original reconstitution
code) we don't have a location to describe the whole variable.

In this particular case, since the struct consists of just the one int,
once we have partial location information, this should have a location
that describes the entire variable (since the piece is the entirety of
the object).

And at some point we'll need to describe the location of even /entirely/
unused arguments so that they can at least be printed on function entry.

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

9 years agoUse AArch64 instead of now removed ARM64 in test configs
Alexey Samsonov [Thu, 5 Jun 2014 00:25:30 +0000 (00:25 +0000)]
Use AArch64 instead of now removed ARM64 in test configs

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

9 years agoDebugInfo: Add comments/assert description to r209674 based on Eric Christopher's...
David Blaikie [Thu, 5 Jun 2014 00:25:26 +0000 (00:25 +0000)]
DebugInfo: Add comments/assert description to r209674 based on Eric Christopher's post-commit review feedback.

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

9 years agoWe've got a getSlotSize call already that we use everywhere else,
Eric Christopher [Thu, 5 Jun 2014 00:22:13 +0000 (00:22 +0000)]
We've got a getSlotSize call already that we use everywhere else,
use it here too.

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

9 years agoR600/SI: Match rsq instructions
Matt Arsenault [Thu, 5 Jun 2014 00:15:55 +0000 (00:15 +0000)]
R600/SI: Match rsq instructions

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

9 years ago80-columns.
Eric Christopher [Thu, 5 Jun 2014 00:09:08 +0000 (00:09 +0000)]
80-columns.

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

9 years agoRemove uses of the TargetMachine from X86FrameLowering.
Eric Christopher [Thu, 5 Jun 2014 00:09:05 +0000 (00:09 +0000)]
Remove uses of the TargetMachine from X86FrameLowering.

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

9 years agoUse nullptr
Matt Arsenault [Thu, 5 Jun 2014 00:01:12 +0000 (00:01 +0000)]
Use nullptr

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

9 years agoDebugInfo: Reapply r209984 (reverted in r210143), asserting that abstract DbgVariable...
David Blaikie [Wed, 4 Jun 2014 23:50:52 +0000 (23:50 +0000)]
DebugInfo: Reapply r209984 (reverted in r210143), asserting that abstract DbgVariables have DIEs.

Abstract variables within abstract scopes that are entirely optimized
away in their first inlining are omitted because their scope is not
present so the variable is never created. Instead, we should ensure the
scope is created so the variable can be added, even if it's been
optimized away in its first inlining.

This fixes the incorrect debug info in missing-abstract-variable.ll
(added in r210143) and passes an asserts self-hosting build, so
hopefully there's not more of these issues left behind... *fingers
crossed*.

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

9 years agoExplain why we skip DbgInfoIntrinsics when looking at line numbers in .gcno file...
Nick Lewycky [Wed, 4 Jun 2014 21:47:19 +0000 (21:47 +0000)]
Explain why we skip DbgInfoIntrinsics when looking at line numbers in .gcno file emission.

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

9 years agoDon't emit structors for available_externally globals (PR19933)
Hans Wennborg [Wed, 4 Jun 2014 21:04:54 +0000 (21:04 +0000)]
Don't emit structors for available_externally globals (PR19933)

We would previously assert here when trying to figure out the section
for the global.

This makes us handle the situation more gracefully since the IR isn't
malformed.

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

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

9 years agoAdd a Constant version of stripPointerCasts.
Rafael Espindola [Wed, 4 Jun 2014 19:01:48 +0000 (19:01 +0000)]
Add a Constant version of stripPointerCasts.

Thanks to rnk for the suggestion.

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

9 years agoClauses in a landingpad are always Constant. Use a stricter type.
Rafael Espindola [Wed, 4 Jun 2014 18:51:31 +0000 (18:51 +0000)]
Clauses in a landingpad are always Constant. Use a stricter type.

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

9 years agoTwo small enhancements for the JIT.
Yaron Keren [Wed, 4 Jun 2014 17:35:28 +0000 (17:35 +0000)]
Two small enhancements for the JIT.

When JITting a large project such as Boost it's quite hard to figure out the problematic inline asm without debug location. This patch provides debug location printout before the JIT aborts due to inline asm. printDebugLoc() was exposed from MachineInstr.cpp and reused here.

If the JIT run with debug info, don't bomb on DBG_VALUE but ignore them.

http://reviews.llvm.org/D3416

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

9 years agoXFAIL: test/DebugInfo/missing-abstract-variable.ll on mips and ppc64 due to an inline...
David Blaikie [Wed, 4 Jun 2014 17:05:23 +0000 (17:05 +0000)]
XFAIL: test/DebugInfo/missing-abstract-variable.ll on mips and ppc64 due to an inlined parameter that goes missing.

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

9 years agotools: fix parenthesis warning from GCC
Saleem Abdulrasool [Wed, 4 Jun 2014 16:03:20 +0000 (16:03 +0000)]
tools: fix parenthesis warning from GCC

Add parenthesis as suggested by GCC.

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

9 years agotools: fix silly typo in llvm-readobj
Saleem Abdulrasool [Wed, 4 Jun 2014 16:03:18 +0000 (16:03 +0000)]
tools: fix silly typo in llvm-readobj

Case insensitive case preserving file systems are not a good choice for
development.

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

9 years agotools: initial implementation of WoA EH decoding
Saleem Abdulrasool [Wed, 4 Jun 2014 15:47:15 +0000 (15:47 +0000)]
tools: initial implementation of WoA EH decoding

Add support to llvm-readobj to decode Windows ARM Exception Handling data.  This
uses the previously added datastructures to decode the information into a format
that can be used by tests.  This is a necessary step to add support for emitting
Windows on ARM exception handling information.

A fair amount of formatting inspiration is drawn from the Win64 EH printer as
well as the ARM EHABI printer.  This allows for a reasonably thorough look into
the encoded data.

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

9 years agotools: introduce StreamWriter::printBoolean
Saleem Abdulrasool [Wed, 4 Jun 2014 15:47:11 +0000 (15:47 +0000)]
tools: introduce StreamWriter::printBoolean

Add a helper print method to print a boolean value as "Yes" or "No".  This is
intended to be used by the Windows ARM EH printer.

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

9 years agoSupport: style/documentation cleanup for format
Saleem Abdulrasool [Wed, 4 Jun 2014 15:47:07 +0000 (15:47 +0000)]
Support: style/documentation cleanup for format

This is purely a documentation/whitespace cleanup for the format support
functions.

The current style does not duplicate the function/class names in the
documentation; conform to this style.

Additionally, there was a large amount of duplication of comments that added no
real value.  Use block comments for the related sets of functions which are used
for type deduction and parameter container classes.

No functional change.

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

9 years agoSupport: add additional comment for ARM EH structure
Saleem Abdulrasool [Wed, 4 Jun 2014 15:47:04 +0000 (15:47 +0000)]
Support: add additional comment for ARM EH structure

Replicate the fact that ARM::WinEH::RuntimeFunction purposefully does not merge
functions to accommodate raw data access use cases in tools such as readobj.
Pointed out by Renato during post-commit review.

No functional change.

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

9 years ago InstCombine: Improvement to check if signed addition overflows.
Rafael Espindola [Wed, 4 Jun 2014 15:39:14 +0000 (15:39 +0000)]
 InstCombine: Improvement to check if signed addition overflows.

This patch implements two things:

1. If we know one number is positive and another is negative, we return true as
    signed addition of two opposite signed numbers will never overflow.

2. Implemented TODO : If one of the operands only has one non-zero bit, and if
    the other operand has a known-zero bit in a more significant place than it
    (not including the sign bit) the ripple may go up to and fill the zero, but
    won't change the sign. e.x -  (x & ~4) + 1

We make sure that we are ignoring 0 at MSB.

Patch by Suyog Sarda.

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

9 years ago[AArch64] clang-format the load/store optimizer.
Tilmann Scheller [Wed, 4 Jun 2014 12:40:35 +0000 (12:40 +0000)]
[AArch64] clang-format the load/store optimizer.

No change in functionality.

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

9 years ago[AArch64] Fix some LLVM Coding Standards violations in the load/store optimizer.
Tilmann Scheller [Wed, 4 Jun 2014 12:36:28 +0000 (12:36 +0000)]
[AArch64] Fix some LLVM Coding Standards violations in the load/store optimizer.

Variable names should start with an upper case letter.

No change in functionality.

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

9 years agoFix gcc -Wparentheses warning.
Patrik Hagglund [Wed, 4 Jun 2014 11:21:11 +0000 (11:21 +0000)]
Fix gcc -Wparentheses warning.

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

9 years agoFix a use of uninitialized value. OldCC is set when IsCmpZero || IsSwapped and read...
Nick Lewycky [Wed, 4 Jun 2014 07:45:54 +0000 (07:45 +0000)]
Fix a use of uninitialized value. OldCC is set when IsCmpZero || IsSwapped and read when ShouldUpdateCC || IsSwapped, and ShouldUpdateCC is independent. Fixes PR19932, but no test since I wasn't able to get any symptoms to appear, not even with valgrind and the testcase from the PR. It's clear what happened from inspection of the code.

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

9 years agoAdd a subtarget hook: enablePostMachineScheduler.
Andrew Trick [Wed, 4 Jun 2014 07:06:27 +0000 (07:06 +0000)]
Add a subtarget hook: enablePostMachineScheduler.

As requested by AArch64 subtargets.

Note that this will have no effect until the
AArch64 target actually enables the pass like this:
substitutePass(&PostRASchedulerID, &PostMachineSchedulerID);

As soon as armv7 switches over, PostMachineScheduler will become the
default postRA scheduler, so this won't be necessary any more.
Targets using the old postRA schedule would then do:
substitutePass(&PostMachineSchedulerID, &PostRASchedulerID);

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

9 years agoMove GenericScheduler and PostGenericScheduler into a header.
Andrew Trick [Wed, 4 Jun 2014 07:06:18 +0000 (07:06 +0000)]
Move GenericScheduler and PostGenericScheduler into a header.

These were not exposed previously because I didn't want out-of-tree
targets to be too dependent on their internals. They can be reused for
a very wide variety of processors with casual scheduling needs without
exposing the classes by instead using hooks defined in
MachineSchedPolicy (we can add more if needed). When targets are more
aggressively tuned or want to provide custom heuristics, they can
define their own MachineSchedStrategy. I tend to think this is better
once you start customizing heuristics because you can copy over only
what you need. I don't think that layering heuristics generally works
well.

However, Arch64 targets now want to reuse the Generic scheduling logic
but also provide extensions. I don't see much harm in exposing the
Generic scheduling classes with a major caveat: these scheduling
strategies may change in the future without validating performance on
less mainstream processors. If you want to be immune from changes,
just define your own MachineSchedStrategy.

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

9 years agodocs: Remove documentation for legacy PGO options
Justin Bogner [Wed, 4 Jun 2014 06:29:38 +0000 (06:29 +0000)]
docs: Remove documentation for legacy PGO options

Late last year r191835 removed a largely unmaintained legacy PGO
infrastructure, but some of the docs were missed. Since these docs are
for things that don't actually exist anymore, they should be removed.

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

9 years ago[Object][ELF] Range-based loop simplification.
Simon Atanasyan [Wed, 4 Jun 2014 05:51:44 +0000 (05:51 +0000)]
[Object][ELF] Range-based loop simplification.

No functional changes.

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

9 years agoGraphWriter: try gv before xdg-open
Alp Toker [Wed, 4 Jun 2014 04:11:12 +0000 (04:11 +0000)]
GraphWriter: try gv before xdg-open

Avoid changing behaviour for everyone who's used to the traditional ghostview
UI, especially since it knows how to stay in the foreground unlike xdg-open.

Amendment to r210147.

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

9 years agoGraphWriter: support the XDG open utility
Alp Toker [Wed, 4 Jun 2014 03:57:44 +0000 (03:57 +0000)]
GraphWriter: support the XDG open utility

This runs a suitable viewer on Unix desktop environments specified by
Freedesktop.org (GNOME, KDE, Linux distributions etc.)

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

9 years agoconfig.h: fix layering and don't duplicate definitions
Alp Toker [Wed, 4 Jun 2014 03:21:38 +0000 (03:21 +0000)]
config.h: fix layering and don't duplicate definitions

Also correct the llvm-config.h header guard so it doesn't depend on 'CONFIG_H'
which is commonly defined in external projects and caused trouble for
embedders.

In future llvm/Config/llvm-config.h will be installed, but not
the private llvm/Config/config.h header.

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

9 years agoDebugInfo: Partial revert r209984 due to more cases where abstract DbgVariables do...
David Blaikie [Wed, 4 Jun 2014 01:30:59 +0000 (01:30 +0000)]
DebugInfo: Partial revert r209984 due to more cases where abstract DbgVariables do not have associated DIEs.

Along with a test case to demonstrate that due to inlining order there
are cases where abstract variable DIEs are not constructed since the
abstract subprogram was built due to a previous inlining that optimized
away those variables. This produces incorrect debug info (the 'missing'
abstract variable causes the inlined instance of that variable to be
emitted with a full description (name, line, file) rather than
referencing the abstract origin), but this commit at least ensures that
it doesn't crash...

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

9 years agoFix typos
Matt Arsenault [Tue, 3 Jun 2014 23:06:13 +0000 (23:06 +0000)]
Fix typos

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

9 years agoCalculate dead instructions when a live interval is created.
Pete Cooper [Tue, 3 Jun 2014 22:42:10 +0000 (22:42 +0000)]
Calculate dead instructions when a live interval is created.

This gets us closer to being able to remove LiveVariables entirely which is where dead instructions are currently tagged as such.

Reviewed by Jakob Olesen

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

9 years agoRevert r209381 as it isn't a local variable. Add a testcase so that
Eric Christopher [Tue, 3 Jun 2014 21:01:39 +0000 (21:01 +0000)]
Revert r209381 as it isn't a local variable. Add a testcase so that
we know next time this happens.

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

9 years agoFixup formatting in the pass.
Eric Christopher [Tue, 3 Jun 2014 21:01:35 +0000 (21:01 +0000)]
Fixup formatting in the pass.

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