oota-llvm.git
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

9 years agoUpdate comments to match reality.
Rafael Espindola [Tue, 3 Jun 2014 20:25:26 +0000 (20:25 +0000)]
Update comments to match reality.

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

9 years agoFix a small bug in the parsing of anonymous globals.
Rafael Espindola [Tue, 3 Jun 2014 20:07:32 +0000 (20:07 +0000)]
Fix a small bug in the parsing of anonymous globals.

It was able to parse

hidden dllexport global i32 42

but not

dllexport global i32 42

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

9 years agoSimplify the parsing of unnamed globals. No functionality changed.
Rafael Espindola [Tue, 3 Jun 2014 20:00:20 +0000 (20:00 +0000)]
Simplify the parsing of unnamed globals. No functionality changed.

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

9 years agoUpdate comment. This should have been part of r210062.
Rafael Espindola [Tue, 3 Jun 2014 19:38:37 +0000 (19:38 +0000)]
Update comment. This should have been part of r210062.

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

9 years agoRemove some redundant doc comments
Alp Toker [Tue, 3 Jun 2014 19:06:49 +0000 (19:06 +0000)]
Remove some redundant doc comments

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

9 years ago[AArch64] Fix typo in load/store optimizer.
Tilmann Scheller [Tue, 3 Jun 2014 16:33:13 +0000 (16:33 +0000)]
[AArch64] Fix typo in load/store optimizer.

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

9 years ago[AArch64] Add regression tests for the load/store optimizer which cover post-index...
Tilmann Scheller [Tue, 3 Jun 2014 16:03:00 +0000 (16:03 +0000)]
[AArch64] Add regression tests for the load/store optimizer which cover post-index update folding with sub rather than add.

The tests check that the following transform happens:

  (ldr|str) X, [x20]
   ...
  sub x20, x20, #16
   ->
  (ldr|str) X, [x20], #-16

with X being either w0, x0, s0, d0 or q0.

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

9 years agoImplement one operator== with another.
Rafael Espindola [Tue, 3 Jun 2014 15:06:22 +0000 (15:06 +0000)]
Implement one operator== with another.

Thanks for David Blaikie for the suggestion.

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

9 years ago[asan] Fix coverage instrumentation with -asan-globals=0.
Evgeniy Stepanov [Tue, 3 Jun 2014 14:16:00 +0000 (14:16 +0000)]
[asan] Fix coverage instrumentation with -asan-globals=0.

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

9 years agoAArch64: mark small types (i1, i8, i16) as promoted
Tim Northover [Tue, 3 Jun 2014 13:54:53 +0000 (13:54 +0000)]
AArch64: mark small types (i1, i8, i16) as promoted

This means the output of LowerFormalArguments returns a lowered
SDValue with the correct type (expected in SelectionDAGBuilder).
Without this, an assertion under a DEBUG macro triggers when those
types are passed on the stack.

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

9 years agoAdd operator== and operator!= to compare with nullptr.
Rafael Espindola [Tue, 3 Jun 2014 13:26:18 +0000 (13:26 +0000)]
Add operator== and operator!= to compare with nullptr.

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

9 years agoUse an enum class.
Rafael Espindola [Tue, 3 Jun 2014 05:26:12 +0000 (05:26 +0000)]
Use an enum class.

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

9 years agoUse an enum class.
Rafael Espindola [Tue, 3 Jun 2014 05:12:33 +0000 (05:12 +0000)]
Use an enum class.

Might also fix the windows build.

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

9 years agoRemove the last unspecified_bool_type from llvm.
Rafael Espindola [Tue, 3 Jun 2014 05:05:15 +0000 (05:05 +0000)]
Remove the last unspecified_bool_type from llvm.

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

9 years agoMake this operator bool() explicit to match the standard library.
Rafael Espindola [Tue, 3 Jun 2014 04:54:15 +0000 (04:54 +0000)]
Make this operator bool() explicit to match the standard library.

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

9 years agoMake this operator bool() explicit to match the standard library.
Rafael Espindola [Tue, 3 Jun 2014 04:42:24 +0000 (04:42 +0000)]
Make this operator bool() explicit to match the standard library.

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

9 years agoIgnore line numbers on debug intrinsics. Add an assert to ensure that we aren't emitt...
Nick Lewycky [Tue, 3 Jun 2014 04:25:36 +0000 (04:25 +0000)]
Ignore line numbers on debug intrinsics. Add an assert to ensure that we aren't emitting line number zero, the .gcno format uses this to indicate that the next field is a filename.

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

9 years ago[AArch64] Correctly deal with VPR stack parameter passing.
Jiangning Liu [Tue, 3 Jun 2014 03:25:09 +0000 (03:25 +0000)]
[AArch64] Correctly deal with VPR stack parameter passing.

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

9 years agoProcess::GetRandomNumber(): fix insecure RNG
Alp Toker [Tue, 3 Jun 2014 03:01:03 +0000 (03:01 +0000)]
Process::GetRandomNumber(): fix insecure RNG

This could have generated non-random output under error conditions in release
builds.

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

9 years agoAllow alias to point to an arbitrary ConstantExpr.
Rafael Espindola [Tue, 3 Jun 2014 02:41:57 +0000 (02:41 +0000)]
Allow alias to point to an arbitrary ConstantExpr.

This  patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is
up to MC (or the system assembler) to decide if that expression is valid or not.

This reduces our ability to diagnose invalid uses and how early we can spot
them, but it also lets us do things like

@test5 = alias inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32),
                                 i32 ptrtoint (i32* @bar to i32)) to i32*)

An important implication of this patch is that the notion of aliased global
doesn't exist any more. The alias has to encode the information needed to
access it in its metadata (linkage, visibility, type, etc).

Another consequence to notice is that getSection has to return a "const char *".
It could return a NullTerminatedStringRef if there was such a thing, but when
that was proposed the decision was to just uses "const char*" for that.

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

9 years agoAdd back commit r210029.
Rafael Espindola [Mon, 2 Jun 2014 22:01:04 +0000 (22:01 +0000)]
Add back commit r210029.

The code was actually correct. Sorry for the confusion. I have expanded the
comment saying why the analysis is valid to avoid me misunderstaning it
again in the future.

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

9 years agoConvert test to FileCheck.
Rafael Espindola [Mon, 2 Jun 2014 21:23:54 +0000 (21:23 +0000)]
Convert test to FileCheck.

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

9 years agoRevert "Add the nsw flag when we detect that an add will not signed overflow."
Rafael Espindola [Mon, 2 Jun 2014 21:12:19 +0000 (21:12 +0000)]
Revert "Add the nsw flag when we detect that an add will not signed overflow."

This reverts commit r210029.

It was not correctly handling cases where LHS and RHS had multiple but different
sign bits.

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

9 years agoInitLibcallNames can take a Triple instead of a TargetMachine.
Eric Christopher [Mon, 2 Jun 2014 20:51:49 +0000 (20:51 +0000)]
InitLibcallNames can take a Triple instead of a TargetMachine.

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

9 years agoAdded support to optimize comparisons with "lshr exact" of a constant.
Rafael Espindola [Mon, 2 Jun 2014 19:19:04 +0000 (19:19 +0000)]
Added support to optimize comparisons with "lshr exact" of a constant.

Patch by Rahul Jain.

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

9 years agoRemove sanitizer blacklist from ASan/TSan/MSan function passes.
Alexey Samsonov [Mon, 2 Jun 2014 18:08:27 +0000 (18:08 +0000)]
Remove sanitizer blacklist from ASan/TSan/MSan function passes.

Instrumentation passes now use attributes
address_safety/thread_safety/memory_safety which are added by Clang frontend.
Clang parses the blacklist file and adds the attributes accordingly.

Currently blacklist is still used in ASan module pass to disable instrumentation
for certain global variables. We should fix this as well by collecting the
set of globals we're going to instrument in Clang and passing it to ASan
in metadata (as we already do for dynamically-initialized globals and init-order
checking).

This change also removes -tsan-blacklist and -msan-blacklist LLVM commandline
flags in favor of -fsanitize-blacklist= Clang flag.

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

9 years agoOmit else branch after return.
Eric Christopher [Mon, 2 Jun 2014 17:29:07 +0000 (17:29 +0000)]
Omit else branch after return.

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

9 years ago[X86] Fix checked arithmetic for i8 on X86.
Andrea Di Biagio [Mon, 2 Jun 2014 16:00:27 +0000 (16:00 +0000)]
[X86] Fix checked arithmetic for i8 on X86.

When lowering a ISD::BRCOND into a test+branch, make sure that we
always use the correct condition code to emit the test operation.

This fixes PR19858: "i8 checked mul is wrong on x86".

Patch by Keno Fisher!

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

9 years agoAdd the nsw flag when we detect that an add will not signed overflow.
Rafael Espindola [Mon, 2 Jun 2014 14:32:58 +0000 (14:32 +0000)]
Add the nsw flag when we detect that an add will not signed overflow.

We already had a function for checking this, we were just using it only in
specialized cases.

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

9 years ago[msan] Remove an out-of-date comment.
Evgeniy Stepanov [Mon, 2 Jun 2014 12:58:08 +0000 (12:58 +0000)]
[msan] Remove an out-of-date comment.

MSan is no longer an "early prototype".

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

9 years agoRemove path_tclsh.m4.
Rafael Espindola [Mon, 2 Jun 2014 12:54:32 +0000 (12:54 +0000)]
Remove path_tclsh.m4.

Looks like it was only used by dejagnu and is now dead.

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

9 years ago[AArch64] Add some more regression tests for store pre-index update folding in the...
Tilmann Scheller [Mon, 2 Jun 2014 12:33:33 +0000 (12:33 +0000)]
[AArch64] Add some more regression tests for store pre-index update folding in the load/store optimizer.

Add tests for the following transform:

 add x8, x8, #16
  ...
 str X, [x8]
  ->
 str X, [x8, #16]!

with X being either w0, x0, s0, d0 or q0.

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

9 years ago[msan] Handle x86 vector pack intrinsics.
Evgeniy Stepanov [Mon, 2 Jun 2014 12:31:44 +0000 (12:31 +0000)]
[msan] Handle x86 vector pack intrinsics.

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

9 years ago[AArch64] Add some more regression tests for load pre-index update folding in the...
Tilmann Scheller [Mon, 2 Jun 2014 11:57:09 +0000 (11:57 +0000)]
[AArch64] Add some more regression tests for load pre-index update folding in the load/store optimizer.

Add tests for the following transform:

 add x8, x8, #16
  ...
 ldr X, [x8]
  ->
 ldr X, [x8, #16]!

with X being either w0, x0, s0, d0 or q0.

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

9 years agoAdded inst combine tarnsform for (1 << X) & C pattrens where C is (some PowerOf2...
Dinesh Dwivedi [Mon, 2 Jun 2014 07:57:24 +0000 (07:57 +0000)]
Added inst combine tarnsform for (1 << X) & C pattrens where C is (some PowerOf2 - 1)

This patch can handles following cases from http://nondot.org/sabre/LLVMNotes/InstCombine.txt
  "((1 << X) & 7) == 0" ==> "X > 2"
  "((1 << X) & 7) != 0" ==> "X < 3".

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

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

9 years agoAdded inst combine transforms for single bit tests from Chris's note
Dinesh Dwivedi [Mon, 2 Jun 2014 07:24:36 +0000 (07:24 +0000)]
Added inst combine transforms for single bit tests from Chris's note

if ((x & C) == 0) x |= C becomes x |= C
if ((x & C) != 0) x ^= C becomes x &= ~C
if ((x & C) == 0) x ^= C becomes x |= C
if ((x & C) != 0) x &= ~C becomes x &= ~C
if ((x & C) == 0) x &= ~C becomes nothing

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

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

9 years agoSilence -Wreturn-type warning
Alp Toker [Mon, 2 Jun 2014 04:34:10 +0000 (04:34 +0000)]
Silence -Wreturn-type warning

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

9 years agoGraphWriter: tweak the program fallback order
Alp Toker [Mon, 2 Jun 2014 04:14:23 +0000 (04:14 +0000)]
GraphWriter: tweak the program fallback order

Amend r210001 to use the classic fallback order behaviour if the requested
graphing program isn't found.

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

9 years agoGraphWriter: detect graph viewer programs at runtime
Alp Toker [Mon, 2 Jun 2014 01:40:04 +0000 (01:40 +0000)]
GraphWriter: detect graph viewer programs at runtime

Replace the crufty build-time configure checks for program paths with
equivalent runtime logic.

This lets users install graphing tools as needed without having to reconfigure
and rebuild LLVM, while eliminating a long chain of inappropriate compile
dependencies that included GUI programs and the windowing system.

Additional features:

 * Support the OS X 'open' command to view graphs generated by any of the
   Graphviz utilities. This is an alternative to the Graphviz OS X UI which is
   no longer available on Mountain Lion.

 * Produce informative log output upon failure to indicate which programs can
   be installed to view graphs.

Ping me if this doesn't work for your particular environment.

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

9 years agoInstruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance of std...
NAKAMURA Takumi [Mon, 2 Jun 2014 01:35:34 +0000 (01:35 +0000)]
Instruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance of std::equal(op) to appease MSVC Debug build.

MSVC Debug build is confused with (possibly invalid) op_begin(), if op_begin() == op_end().

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

9 years agoSupport: add 6-parameter format
Saleem Abdulrasool [Mon, 2 Jun 2014 01:17:54 +0000 (01:17 +0000)]
Support: add 6-parameter format

Since we cannot yet use variadic templates, add a specialisation for
6-parameters to format.  This is motivated by a need for the additional
parameter for formatting information for an unwind decoder for Windows on ARM.

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

9 years agoSupport: add Windows ARM EH data structures
Saleem Abdulrasool [Mon, 2 Jun 2014 01:17:49 +0000 (01:17 +0000)]
Support: add Windows ARM EH data structures

Introduce the support structures necessary to deal with the Windows ARM EH data.
These definitions are extremely aggressive about assertions to aid future use
for generation of the entries and subsequent decoding.

The names for the various fields are meant to reflect the names used by the
Visual Studio toolchain to aid communication.

Due to the complexity in reading a few of the values, there are a couple of
additional utility functions to decode the information.

In general, there are two ways to encode the unwinding information:
- packed, which places the data inline into the
  _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY structure.
- unpacked, which places the data into auxiliary structures placed into the
  .xdata section.

The set of structures allow reading of data in either encoding, with the minor
caveat that epilogue scopes need to be decoded manually by constructing the
structure from the data returned by the RuntimeFunction structure.

These definitions are meant for read-only access at the current point as the
first use of them will be to decode the exception information.

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

9 years agoARMEB: Fix function return type f64
Christian Pirker [Sun, 1 Jun 2014 09:30:52 +0000 (09:30 +0000)]
ARMEB: Fix function return type f64

Reviewed at http://reviews.llvm.org/D3968

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

9 years agoUpdates in IntelJITEventListener.cpp - by Arch Robison.
Elena Demikhovsky [Sun, 1 Jun 2014 08:45:11 +0000 (08:45 +0000)]
Updates in IntelJITEventListener.cpp - by Arch Robison.

This patch updates IntelJITEventListener.cpp to account for revision 206654, which removed some methods from DILineInfo.

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

9 years agoR600: Set all float vector expands in the same place
Matt Arsenault [Sun, 1 Jun 2014 07:38:21 +0000 (07:38 +0000)]
R600: Set all float vector expands in the same place

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

9 years agoDebugInfo: Assert that DbgVariables have associated DIEs
David Blaikie [Sun, 1 Jun 2014 03:38:13 +0000 (03:38 +0000)]
DebugInfo: Assert that DbgVariables have associated DIEs

This was previously committed in r209680 and reverted in r209683 after
it caused sanitizer builds to crash.

The issue seems to be that the DebugLoc associated with dbg.value IR
intrinsics isn't necessarily accurate. Instead, we duplicate the
DIVariables and add an InlinedAt field to them to record their
location.

We were using this InlinedAt field to compute the LexicalScope for the
variable, but not using it in the abstract DbgVariable construction and
mapping. This resulted in a formal parameter to the current concrete
function, correctly having no InlinedAt information, but incorrectly
having a DebugLoc that described an inlined location within the
function... thus an abstract DbgVariable was created for the variable,
but its DIE was never constructed (since the LexicalScope had no such
variable). This DbgVariable was silently ignored (by testing for a
non-null DIE on the abstract DbgVariable).

So, fix this by using the right scoping information when constructing
abstract DbgVariables.

In the long run, I suspect we want to undo the work that added this
second kind of location tracking and fix the places where the DebugLoc
propagation on the dbg.value intrinsic fails. This will shrink debug
info (by not duplicating DIVariables), make it more efficient (by not
having to construct new DIVariable metadata nodes to try to map back to
a single variable), and benefit all instructions.

But perhaps there are insurmountable issues with DebugLoc quality that
I'm unaware of... I just don't know how we can't /just keep the DebugLoc
from the dbg.declare to the dbg.values and never get this wrong/.

Some history context:

http://llvm.org/viewvc/llvm-project?view=revision&revision=135629
http://llvm.org/viewvc/llvm-project?view=revision&revision=137253

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

9 years agoFix typos
Alp Toker [Sat, 31 May 2014 21:26:28 +0000 (21:26 +0000)]
Fix typos

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

9 years agoExecutionEngine: avoid NDEBUG in headers
Alp Toker [Sat, 31 May 2014 21:26:17 +0000 (21:26 +0000)]
ExecutionEngine: avoid NDEBUG in headers

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

9 years agoUpdate a couple of header inclusion guards
Alp Toker [Sat, 31 May 2014 21:26:09 +0000 (21:26 +0000)]
Update a couple of header inclusion guards

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

9 years agoR600/SI: Remove redundant patterns
Matt Arsenault [Sat, 31 May 2014 19:25:17 +0000 (19:25 +0000)]
R600/SI: Remove redundant patterns

These patterns are already handled in the instruction definition.

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

9 years ago[SelectionDAG] Force cycle detection in AssignTopologicalOrder before aborting
Adam Nemet [Sat, 31 May 2014 16:23:20 +0000 (16:23 +0000)]
[SelectionDAG] Force cycle detection in AssignTopologicalOrder before aborting

DAG cycle detection is only enabled with ENABLE_EXPENSIVE_CHECKS.  However we
can run it just before we would crash in order to provide more informative
diagnostics.

Now in addition to the "Overran sorted position" message we also get the Node
printed if a cycle was detected.

Tested by building several configs: Debug+Assert, Debug+Assert+Check (this is
ENABLE_EXPENSIVE_CHECKS), Release+Assert and Release.  Also tried that the
AssignTopologicalOrder assert produces the expected results.

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