oota-llvm.git
12 years agoUse LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.
Craig Topper [Sat, 15 Sep 2012 16:22:27 +0000 (16:22 +0000)]
Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.

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

12 years agoDisable new sroa now that all buildbots have tested it.
Benjamin Kramer [Sat, 15 Sep 2012 15:11:10 +0000 (15:11 +0000)]
Disable new sroa now that all buildbots have tested it.

What we have so far:
- Some clang test failures (these were known already)

- Perf results are mixed, some big regressions
  http://llvm.org/perf/db_default/v4/nts/3844
  http://llvm.org/perf/db_default/v4/nts/3845

  bullet suffers a lot. matmul is interesting: slower scalar code, faster with -vectorize.

- Some dragonegg selfhost bots crash in SROA during selfhost now
  http://lab.llvm.org:8011/builders/dragonegg-x86_64-linux-gcc-4.6-self-host-checks/builds/1632
  http://lab.llvm.org:8011/builders/dragonegg-x86_64-linux-gcc-4.5-self-host/builds/1891

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

12 years agoX86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe fp math.
Benjamin Kramer [Sat, 15 Sep 2012 12:44:27 +0000 (12:44 +0000)]
X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe fp math.

This was only an issue if sse is disabled.

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

12 years agoPort the SSAUpdater-based promotion logic from the old SROA pass to the
Chandler Carruth [Sat, 15 Sep 2012 11:43:14 +0000 (11:43 +0000)]
Port the SSAUpdater-based promotion logic from the old SROA pass to the
new one, and add support for running the new pass in that mode and in
that slot of the pass manager. With this the new pass can completely
replace the old one within the pipeline.

The strategy for enabling or disabling the SSAUpdater logic is to do it
by making the requirement of the domtree analysis optional. By default,
it is required and we get the standard mem2reg approach. This is usually
the desired strategy when run in stand-alone situations. Within the
CGSCC pass manager, we disable requiring of the domtree analysis and
consequentially trigger fallback to the SSAUpdater promotion.

In theory this would allow the pass to re-use a domtree if one happened
to be available even when run in a mode that doesn't require it. In
practice, it lets us have a single pass rather than two which was
simpler for me to wrap my head around.

There is a hidden flag to force the use of the SSAUpdater code path for
the purpose of testing. The primary testing strategy is just to run the
existing tests through that path. One notable difference is that it has
custom code to handle lifetime markers, and one of the tests has been
enhanced to exercise that code.

This has survived a bootstrap and the test suite without serious
correctness issues, however my run of the test suite produced *very*
alarming performance numbers. I don't entirely understand or trust them
though, so more investigation is on-going.

To aid my understanding of the performance impact of the new SROA now
that it runs throughout the optimization pipeline, I'm enabling it by
default in this commit, and will disable it again once the LNT bots have
picked up one iteration with it. I want to get those bots (which are
much more stable) to evaluate the impact of the change before I jump to
any conclusions.

NOTE: Several Clang tests will fail because they run -O3 and check the
result's order of output. They'll go back to passing once I disable it
again.

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

12 years agoRemove aligned/unaligned load/store fragments defined in MipsInstrInfo.td and
Akira Hatanaka [Sat, 15 Sep 2012 01:52:08 +0000 (01:52 +0000)]
Remove aligned/unaligned load/store fragments defined in MipsInstrInfo.td and
use load/store fragments defined in TargetSelectionDAG.td in place of them.
Unaligned loads/stores are either expanded or lowered to target-specific nodes,
so instruction selection should see only aligned load/store nodes.

No changes in functionality.

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

12 years agoRevert r163878 as it breaks on targets with alternate register names. Such targets...
Craig Topper [Sat, 15 Sep 2012 01:22:42 +0000 (01:22 +0000)]
Revert r163878 as it breaks on targets with alternate register names. Such targets do not exist in the main tree so this was not noticed.

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

12 years agoHandled unaligned load/stores properly in Mips16
Akira Hatanaka [Sat, 15 Sep 2012 01:02:03 +0000 (01:02 +0000)]
Handled unaligned load/stores properly in Mips16

Patch by Reed Kotler.

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

12 years agoPGO: preserve branch-weight metadata when simplifying two branches with a common
Manman Ren [Sat, 15 Sep 2012 00:39:57 +0000 (00:39 +0000)]
PGO: preserve branch-weight metadata when simplifying two branches with a common
destination.

Updated previous implementation to fix a case not covered:
// PBI: br i1 %x, TrueDest, BB
// BI:  br i1 %y, TrueDest, FalseDest
The other case was handled correctly.
// PBI: br i1 %x, BB, FalseDest
// BI:  br i1 %y, TrueDest, FalseDest

Also tried to use 64-bit arithmetic instead of APInt with scale to simplify the
computation. Let me know if you have other opinions about this.

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

12 years agoTableGen subtarget parser. Handle new machine model.
Andrew Trick [Sat, 15 Sep 2012 00:20:02 +0000 (00:20 +0000)]
TableGen subtarget parser. Handle new machine model.

Collect processor resources from the subtarget defs.

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

12 years agoTableGen subtarget parser. Handle new machine model.
Andrew Trick [Sat, 15 Sep 2012 00:19:59 +0000 (00:19 +0000)]
TableGen subtarget parser. Handle new machine model.

Infer SchedClasses from variants defined by the target or subtarget.

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

12 years agoTableGen subtarget parser. Handle new machine model.
Andrew Trick [Sat, 15 Sep 2012 00:19:57 +0000 (00:19 +0000)]
TableGen subtarget parser. Handle new machine model.

Collect SchedClasses and SchedRW types from the subtarget defs.

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

12 years agocmake: Fix file path.
Daniel Dunbar [Fri, 14 Sep 2012 23:36:56 +0000 (23:36 +0000)]
cmake: Fix file path.

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

12 years agoformatted_raw_ostream: Fix a serious bug in tell().
Daniel Dunbar [Fri, 14 Sep 2012 23:15:56 +0000 (23:15 +0000)]
formatted_raw_ostream: Fix a serious bug in tell().
 - The current_pos function is supposed to return all the written bytes, not the
   current position of the underlying stream.
 - This caused tell() to be broken whenever the underlying stream had buffered
   content.

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

12 years agoSome small reorganization to get read for Attributes overhaul.
Bill Wendling [Fri, 14 Sep 2012 23:05:52 +0000 (23:05 +0000)]
Some small reorganization to get read for Attributes overhaul.

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

12 years agoRemove comment.
Bill Wendling [Fri, 14 Sep 2012 22:35:49 +0000 (22:35 +0000)]
Remove comment.

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

12 years agoFix up erroneous alignas usage while making this portable to GCC 4.7
David Blaikie [Fri, 14 Sep 2012 22:26:11 +0000 (22:26 +0000)]
Fix up erroneous alignas usage while making this portable to GCC 4.7

Review by Chandler Carruth.

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

12 years agoPGO: preserve branch-weight metadata when simplifying a switch with a single
Manman Ren [Fri, 14 Sep 2012 21:53:06 +0000 (21:53 +0000)]
PGO: preserve branch-weight metadata when simplifying a switch with a single
case to a conditional branch and when removing dead cases.

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

12 years agoStylistic and 80-col fixes
Evan Cheng [Fri, 14 Sep 2012 21:25:34 +0000 (21:25 +0000)]
Stylistic and 80-col fixes

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

12 years agocomment typo
Andrew Trick [Fri, 14 Sep 2012 20:27:25 +0000 (20:27 +0000)]
comment typo

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

12 years agoTargetSchedModel interface. To be implemented...
Andrew Trick [Fri, 14 Sep 2012 20:26:46 +0000 (20:26 +0000)]
TargetSchedModel interface. To be implemented...

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

12 years agoDefine MC data tables for the new scheduling machine model.
Andrew Trick [Fri, 14 Sep 2012 20:26:41 +0000 (20:26 +0000)]
Define MC data tables for the new scheduling machine model.

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

12 years agowhitespace
Andrew Trick [Fri, 14 Sep 2012 20:26:39 +0000 (20:26 +0000)]
whitespace

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

12 years agoReview feedback from Duncan Sands. Alphabetize includes and simplify
Alex Rosenberg [Fri, 14 Sep 2012 19:19:57 +0000 (19:19 +0000)]
Review feedback from Duncan Sands. Alphabetize includes and simplify
lit config.

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

12 years agoTry to fix the bots by detecting inconsistant branch-weight metadata.
Manman Ren [Fri, 14 Sep 2012 19:05:19 +0000 (19:05 +0000)]
Try to fix the bots by detecting inconsistant branch-weight metadata.

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

12 years agoImplement getNumLDMAddresses and expose through ARMBaseInstrInfo.
Andrew Trick [Fri, 14 Sep 2012 18:48:46 +0000 (18:48 +0000)]
Implement getNumLDMAddresses and expose through ARMBaseInstrInfo.

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

12 years agoCortex-A9 instruction-level scheduling machine model.
Andrew Trick [Fri, 14 Sep 2012 18:31:58 +0000 (18:31 +0000)]
Cortex-A9 instruction-level scheduling machine model.

This models the A9 processor at the level of instruction operands, as
opposed to the itinerary, which models each operation at the level of
pipeline stages.

The two primary motivations are:

1) Allow MachineScheduler to model A9 as an out-of-order processor. It
can now distinguish between hazards that force interlocking vs.
buffered resources.

2) Reduce long-term maintenance by allowing the itinerary and target
hooks to eventually be removed. Note that almost all of the complexity
in the new model exists to model instruction variants, which the
itinerary cannot handle. Instead the scheduler previously relied on
processor-specific target hooks which are incomplete and buggy.

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

12 years agoPGO: preserve branch-weight metadata when merging two switches where
Manman Ren [Fri, 14 Sep 2012 17:29:56 +0000 (17:29 +0000)]
PGO: preserve branch-weight metadata when merging two switches where
the default target of the first switch is not the basic block the second switch
is in (PredDefault != BB).

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

12 years agomisched: add a hook for custom DAG postprocessing.
Andrew Trick [Fri, 14 Sep 2012 17:22:42 +0000 (17:22 +0000)]
misched: add a hook for custom DAG postprocessing.

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

12 years agoAdd in comments that explain what the indexing and the size of the arrays is about.
Micah Villmow [Fri, 14 Sep 2012 15:36:50 +0000 (15:36 +0000)]
Add in comments that explain what the indexing and the size of the arrays is about.

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

12 years agoDAG post-process for Hexagon MI scheduler
Sergei Larin [Fri, 14 Sep 2012 15:07:59 +0000 (15:07 +0000)]
DAG post-process for Hexagon MI scheduler

This patch introduces a possibility for Hexagon MI scheduler
to perform some target specific post- processing on the scheduling
DAG prior to scheduling.

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

12 years agoFix Doxygen issues:
Dmitri Gribenko [Fri, 14 Sep 2012 14:57:36 +0000 (14:57 +0000)]
Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph);
* use \param instead of \arg to document parameters in order to be consistent
  with the rest of the codebase.

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

12 years agoSROA: Silence unused variable warnings in Release builds.
Benjamin Kramer [Fri, 14 Sep 2012 13:08:09 +0000 (13:08 +0000)]
SROA: Silence unused variable warnings in Release builds.

The NDEBUG hack is ugly, but I see no better solution.

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

12 years agoRemove redundant private field.
Benjamin Kramer [Fri, 14 Sep 2012 12:19:58 +0000 (12:19 +0000)]
Remove redundant private field.

clang warned about this being unused in Release builds.

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

12 years agoRework the computation of a sub-structure natural type. There were
Chandler Carruth [Fri, 14 Sep 2012 11:08:31 +0000 (11:08 +0000)]
Rework the computation of a sub-structure natural type. There were
pointless checks in here, bad asserts, and just confusing code. I've
also added a bit more to the comment to clarify what this function is
really trying to do as it was not obvious to Duncan when studying it.

Thanks to Duncan for helping me dig through the issue.

No real functionality changed here in practical cases, and certainly no
test case. This is just cleanup spotted by inspection.

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

12 years agoRely on the recursive check for pointer types rather than adding an
Chandler Carruth [Fri, 14 Sep 2012 10:30:44 +0000 (10:30 +0000)]
Rely on the recursive check for pointer types rather than adding an
explicit check before recursing. A simplification requested by Duncan
during review.

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

12 years agoBe a bit more aggressive in bailing out of this routine. Spotted by
Chandler Carruth [Fri, 14 Sep 2012 10:30:42 +0000 (10:30 +0000)]
Be a bit more aggressive in bailing out of this routine. Spotted by
inspection by Duncan during review. My suspicion is that we would still
have returned 0 anyways in this case, but doing it sooner is better.

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

12 years agoAdd some comments clarifying that the GEP analysis for vector GEPs is
Chandler Carruth [Fri, 14 Sep 2012 10:30:40 +0000 (10:30 +0000)]
Add some comments clarifying that the GEP analysis for vector GEPs is
deeply suspicious and likely to go away eventually. Also fix a bogus
comment about one of the checks in the vector GEP analysis. Based on
review from Duncan.

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

12 years agoMove an instance variable to a local variable based on review by Duncan.
Chandler Carruth [Fri, 14 Sep 2012 10:26:38 +0000 (10:26 +0000)]
Move an instance variable to a local variable based on review by Duncan.
Originally I had anticipated needing to thread this through more bits of
the SROA pass itself, but that ended up not happening. In the end, this
is a much simpler way to manange the variable.

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

12 years agoAdd a comment about debug intrinsics that I *really* don't want to
Chandler Carruth [Fri, 14 Sep 2012 10:26:36 +0000 (10:26 +0000)]
Add a comment about debug intrinsics that I *really* don't want to
forget from Duncan's review as a FIXME.

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

12 years agoAdd two asserts that Duncan thought would help ensure things don't rot
Chandler Carruth [Fri, 14 Sep 2012 10:26:34 +0000 (10:26 +0000)]
Add two asserts that Duncan thought would help ensure things don't rot
unexpectedly in the future. More fixes from his code review.

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

12 years agoActually keep the flag default-off for now. =/ That's what I get for
Chandler Carruth [Fri, 14 Sep 2012 10:18:54 +0000 (10:18 +0000)]
Actually keep the flag default-off for now. =/ That's what I get for
being busy testing this...

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

12 years agoRemove some dead, commented out code Duncan spotted in review.
Chandler Carruth [Fri, 14 Sep 2012 10:18:53 +0000 (10:18 +0000)]
Remove some dead, commented out code Duncan spotted in review.

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

12 years agoWrap the dumping and printing routines in NDEBUG and LLVM_ENABLE_DUMP macros.
Chandler Carruth [Fri, 14 Sep 2012 10:18:51 +0000 (10:18 +0000)]
Wrap the dumping and printing routines in NDEBUG and LLVM_ENABLE_DUMP macros.

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

12 years agoLots of comment fixes and cleanups from Duncan's review.
Chandler Carruth [Fri, 14 Sep 2012 10:18:49 +0000 (10:18 +0000)]
Lots of comment fixes and cleanups from Duncan's review.

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

12 years agoSROA.cpp: Unbreak gcc, sorry!
NAKAMURA Takumi [Fri, 14 Sep 2012 10:06:10 +0000 (10:06 +0000)]
SROA.cpp: Unbreak gcc, sorry!

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

12 years agoSROA.cpp: Appease msvc. LLVM_ATTRIBUTE(s) should come front of "const".
NAKAMURA Takumi [Fri, 14 Sep 2012 09:55:22 +0000 (09:55 +0000)]
SROA.cpp: Appease msvc. LLVM_ATTRIBUTE(s) should come front of "const".

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

12 years agoSpeculative change to try to fix older GCC versions that can't handle
Chandler Carruth [Fri, 14 Sep 2012 09:30:33 +0000 (09:30 +0000)]
Speculative change to try to fix older GCC versions that can't handle
the injected class name of a dependent base class here.

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

12 years agoIntroduce a new SROA implementation.
Chandler Carruth [Fri, 14 Sep 2012 09:22:59 +0000 (09:22 +0000)]
Introduce a new SROA implementation.

This is essentially a ground up re-think of the SROA pass in LLVM. It
was initially inspired by a few problems with the existing pass:
- It is subject to the bane of my existence in optimizations: arbitrary
  thresholds.
- It is overly conservative about which constructs can be split and
  promoted.
- The vector value replacement aspect is separated from the splitting
  logic, missing many opportunities where splitting and vector value
  formation can work together.
- The splitting is entirely based around the underlying type of the
  alloca, despite this type often having little to do with the reality
  of how that memory is used. This is especially prevelant with unions
  and base classes where we tail-pack derived members.
- When splitting fails (often due to the thresholds), the vector value
  replacement (again because it is separate) can kick in for
  preposterous cases where we simply should have split the value. This
  results in forming i1024 and i2048 integer "bit vectors" that
  tremendously slow down subsequnet IR optimizations (due to large
  APInts) and impede the backend's lowering.

The new design takes an approach that fundamentally is not susceptible
to many of these problems. It is the result of a discusison between
myself and Duncan Sands over IRC about how to premptively avoid these
types of problems and how to do SROA in a more principled way. Since
then, it has evolved and grown, but this remains an important aspect: it
fixes real world problems with the SROA process today.

First, the transform of SROA actually has little to do with replacement.
It has more to do with splitting. The goal is to take an aggregate
alloca and form a composition of scalar allocas which can replace it and
will be most suitable to the eventual replacement by scalar SSA values.
The actual replacement is performed by mem2reg (and in the future
SSAUpdater).

The splitting is divided into four phases. The first phase is an
analysis of the uses of the alloca. This phase recursively walks uses,
building up a dense datastructure representing the ranges of the
alloca's memory actually used and checking for uses which inhibit any
aspects of the transform such as the escape of a pointer.

Once we have a mapping of the ranges of the alloca used by individual
operations, we compute a partitioning of the used ranges. Some uses are
inherently splittable (such as memcpy and memset), while scalar uses are
not splittable. The goal is to build a partitioning that has the minimum
number of splits while placing each unsplittable use in its own
partition. Overlapping unsplittable uses belong to the same partition.
This is the target split of the aggregate alloca, and it maximizes the
number of scalar accesses which become accesses to their own alloca and
candidates for promotion.

Third, we re-walk the uses of the alloca and assign each specific memory
access to all the partitions touched so that we have dense use-lists for
each partition.

Finally, we build a new, smaller alloca for each partition and rewrite
each use of that partition to use the new alloca. During this phase the
pass will also work very hard to transform uses of an alloca into a form
suitable for promotion, including forming vector operations, speculating
loads throguh PHI nodes and selects, etc.

After splitting is complete, each newly refined alloca that is
a candidate for promotion to a scalar SSA value is run through mem2reg.

There are lots of reasonably detailed comments in the source code about
the design and algorithms, and I'm going to be trying to improve them in
subsequent commits to ensure this is well documented, as the new pass is
in many ways more complex than the old one.

Some of this is still a WIP, but the current state is reasonbly stable.
It has passed bootstrap, the nightly test suite, and Duncan has run it
successfully through the ACATS and DragonEgg test suites. That said, it
remains behind a default-off flag until the last few pieces are in
place, and full testing can be done.

Specific areas I'm looking at next:
- Improved comments and some code cleanup from reviews.
- SSAUpdater and enabling this pass inside the CGSCC pass manager.
- Some datastructure tuning and compile-time measurements.
- More aggressive FCA splitting and vector formation.

Many thanks to Duncan Sands for the thorough final review, as well as
Benjamin Kramer for lots of review during the process of writing this
pass, and Daniel Berlin for reviewing the data structures and algorithms
and general theory of the pass. Also, several other people on IRC, over
lunch tables, etc for lots of feedback and advice.

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

12 years agoRemove silly dead store. Patch by Ettl Martin.
Duncan Sands [Fri, 14 Sep 2012 09:00:11 +0000 (09:00 +0000)]
Remove silly dead store.  Patch by Ettl Martin.

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

12 years agoAllow the second opcode info table to be 8, 16, or 32-bits as needed to represent...
Craig Topper [Fri, 14 Sep 2012 08:33:11 +0000 (08:33 +0000)]
Allow the second opcode info table to be 8, 16, or 32-bits as needed to represent additional fragments. This recovers some space on ATT X86 syntax and PowerPC which only need 40-bits instead of 48-bits. This also increases ARM to 64-bits to fully encode all of its operands.

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

12 years agoReduce size of register name index tables by using uint16_t for all in tree targets...
Craig Topper [Fri, 14 Sep 2012 06:37:49 +0000 (06:37 +0000)]
Reduce size of register name index tables by using uint16_t for all in tree targets. If more than 16-bits are needed for any out of tree targets, code will detect and use uint32_t instead.

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

12 years agomisched: Generic tablegen classes for the new machine model.
Andrew Trick [Fri, 14 Sep 2012 06:18:55 +0000 (06:18 +0000)]
misched: Generic tablegen classes for the new machine model.

This is mostly documentation for the new machine model. It is designed
to be flexible, easy to incrementally refine for a subtarget, and
provide all the information that MachineScheduler will need.

If all goes well, I will follow up with an example of the new model in
use for ARM.

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

12 years agocomment
Andrew Trick [Fri, 14 Sep 2012 06:18:52 +0000 (06:18 +0000)]
comment

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

12 years agocomment
Andrew Trick [Fri, 14 Sep 2012 06:18:50 +0000 (06:18 +0000)]
comment

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

12 years agomips16 fixes.
Akira Hatanaka [Fri, 14 Sep 2012 03:21:56 +0000 (03:21 +0000)]
mips16 fixes.

1. Add MoveR3216
2. Correct spelling for Move32R16

Patch by Reed Kotler.

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

12 years agoPatch by Sean Silva!
Galina Kistanova [Thu, 13 Sep 2012 23:51:08 +0000 (23:51 +0000)]
Patch by Sean Silva!
The patch converts the "How to add a builder" document over to reStructuredText..

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

12 years agoFix both the test for zero and what we do if we have a zero for
Eric Christopher [Thu, 13 Sep 2012 23:24:02 +0000 (23:24 +0000)]
Fix both the test for zero and what we do if we have a zero for
umulo legalization.

Fixes PR13839

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

12 years agoReformat, remove a couple unused variables and move some variables
Eric Christopher [Thu, 13 Sep 2012 23:23:58 +0000 (23:23 +0000)]
Reformat, remove a couple unused variables and move some variables
closer to where they're needed.

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

12 years agoAssembler: Darwin variables defined via .set are no-dead-strip.
Jim Grosbach [Thu, 13 Sep 2012 23:11:31 +0000 (23:11 +0000)]
Assembler: Darwin variables defined via .set are no-dead-strip.

For gas compatibility.

rdar://12219394

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

12 years agoMachO: Correctly mark symbol-difference variables as N_ABS.
Jim Grosbach [Thu, 13 Sep 2012 23:11:25 +0000 (23:11 +0000)]
MachO: Correctly mark symbol-difference variables as N_ABS.

.set a, b - c + CONSTANT
d = b - c + CONSTANT

Both 'a' and 'd' should be marked as absolute symbols (N_ABS).

rdar://12219394

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

12 years agoHandle the new !tbaa.struct metadata tags when converting a memcpy into scalar
Dan Gohman [Thu, 13 Sep 2012 21:51:01 +0000 (21:51 +0000)]
Handle the new !tbaa.struct metadata tags when converting a memcpy into scalar
loads and stores.

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

12 years agoBetter const handling for RuntimeDyld and MCJIT.
Jim Grosbach [Thu, 13 Sep 2012 21:50:06 +0000 (21:50 +0000)]
Better const handling for RuntimeDyld and MCJIT.

mapSectionAddress() wasn't consistent.

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

12 years agoFix some code which is invalid in C++11: an expression of enumeration type
Richard Smith [Thu, 13 Sep 2012 21:18:18 +0000 (21:18 +0000)]
Fix some code which is invalid in C++11: an expression of enumeration type
can't be used as a non-type template argument of type bool.

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

12 years agoAsmWriterEmitter: OpInfo2 should be unsigned 16-bit.
Manman Ren [Thu, 13 Sep 2012 20:47:48 +0000 (20:47 +0000)]
AsmWriterEmitter: OpInfo2 should be unsigned 16-bit.

Fix an issue in r163814.

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

12 years agoFix comment
Michael Liao [Thu, 13 Sep 2012 20:30:16 +0000 (20:30 +0000)]
Fix comment

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

12 years agoFix documentation: parameter being documented was removed in r98220.
Dmitri Gribenko [Thu, 13 Sep 2012 20:28:31 +0000 (20:28 +0000)]
Fix documentation: parameter being documented was removed in r98220.

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

12 years agoAdd wider vector/integer support for PR12312
Michael Liao [Thu, 13 Sep 2012 20:24:54 +0000 (20:24 +0000)]
Add wider vector/integer support for PR12312

- Enhance the fix to PR12312 to support wider integer, such as 256-bit
  integer. If more than 1 fully evaluated vectors are found, POR them
  first followed by the final PTEST.

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

12 years agoEnhance type legalization on bitcast from vector to integer
Michael Liao [Thu, 13 Sep 2012 19:58:21 +0000 (19:58 +0000)]
Enhance type legalization on bitcast from vector to integer

- Find a legal vector type before casting and extracting element from it.
- As the new vector type may have more than 2 elements, build the final
  hi/lo pair by BFS pairing them from bottom to top.

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

12 years agoFix test case to avoid PIC magic.
Jakob Stoklund Olesen [Thu, 13 Sep 2012 19:47:45 +0000 (19:47 +0000)]
Fix test case to avoid PIC magic.

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

12 years agoFix the TCRETURNmi64 bug differently.
Jakob Stoklund Olesen [Thu, 13 Sep 2012 18:31:27 +0000 (18:31 +0000)]
Fix the TCRETURNmi64 bug differently.

Add a PatFrag to match X86tcret using 6 fixed registers or less. This
avoids folding loads into TCRETURNmi64 using 7 or more volatile
registers.

<rdar://problem/12282281>

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

12 years agoExtract code for reducing a type to a single value type into a helper function.
Dan Gohman [Thu, 13 Sep 2012 18:19:06 +0000 (18:19 +0000)]
Extract code for reducing a type to a single value type into a helper function.

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

12 years agoDefine an official slot for the new !tbaa.struct metadata tag.
Dan Gohman [Thu, 13 Sep 2012 17:56:17 +0000 (17:56 +0000)]
Define an official slot for the new !tbaa.struct metadata tag.

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

12 years agoAsmWriterEmitter: increase the number of bits for OpcodeInfo from 32-bit to
Manman Ren [Thu, 13 Sep 2012 17:43:46 +0000 (17:43 +0000)]
AsmWriterEmitter: increase the number of bits for OpcodeInfo from 32-bit to
48-bit if necessary, in order to reduce the generated code size.

We have 900 cases not covered by OpcodeInfo in ATT AsmWriter and more in Intel
AsmWriter and ARM AsmWriter.

This patch reduced the clang Release build size by 50k, running on a Mac Pro.

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

12 years agomips16: When copying operands in a conditional branch instruction, allow for
Akira Hatanaka [Thu, 13 Sep 2012 17:12:37 +0000 (17:12 +0000)]
mips16: When copying operands in a conditional branch instruction, allow for
immediate operands to be copied.

Patch by Reed Kotler.

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

12 years agoRevert r163761 "Don't fold indexed loads into TCRETURNmi64."
Jakob Stoklund Olesen [Thu, 13 Sep 2012 16:52:17 +0000 (16:52 +0000)]
Revert r163761 "Don't fold indexed loads into TCRETURNmi64."

The patch caused "Wrong topological sorting" assertions.

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

12 years agoMemCpyOpt: When forming a memset from stores also take GEP constexprs into account.
Benjamin Kramer [Thu, 13 Sep 2012 16:29:49 +0000 (16:29 +0000)]
MemCpyOpt: When forming a memset from stores also take GEP constexprs into account.

This is common when storing to global variables.

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

12 years agoFix an 80 char line limit.
Nadav Rotem [Thu, 13 Sep 2012 16:27:32 +0000 (16:27 +0000)]
Fix an 80 char line limit.

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

12 years agoRename the flag which protects from escaped allocas, which may come from bugs in...
Nadav Rotem [Thu, 13 Sep 2012 15:46:30 +0000 (15:46 +0000)]
Rename the flag which protects from escaped allocas, which may come from bugs in user code or in the compiler. Also, dont assert if the protection is not enabled.

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

12 years agoThe current implementation does not allow more than 32 types to be properly handled...
Micah Villmow [Thu, 13 Sep 2012 15:24:43 +0000 (15:24 +0000)]
The current implementation does not allow more than 32 types to be properly handled with target lowering. This doubles the size to 64bit types and easily allows extension to more types.

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

12 years agoUnify the emission of the calling conventions into a single function to reduce code...
Micah Villmow [Thu, 13 Sep 2012 15:11:12 +0000 (15:11 +0000)]
Unify the emission of the calling conventions into a single function to reduce code duplication.

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

12 years agoThis patch introduces A15 as a target in LLVM.
Silviu Baranga [Thu, 13 Sep 2012 15:05:10 +0000 (15:05 +0000)]
This patch introduces A15 as a target in LLVM.

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

12 years agoFix a dagcombine optimization. The optimization attempts to optimize a bitcast of...
Nadav Rotem [Thu, 13 Sep 2012 14:54:28 +0000 (14:54 +0000)]
Fix a dagcombine optimization. The optimization attempts to optimize a bitcast of fneg to integers
by xoring the high-bit. This fails if the source operand is a vector because we need to negate
each of the elements in the vector.

Fix rdar://12281066 PR13813.

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

12 years agoFix a typo.
Nadav Rotem [Thu, 13 Sep 2012 14:51:00 +0000 (14:51 +0000)]
Fix a typo.

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

12 years agoUse Nick's suggestion of storing a large NULL into the GV instead of memset, which...
Bill Wendling [Thu, 13 Sep 2012 14:32:30 +0000 (14:32 +0000)]
Use Nick's suggestion of storing a large NULL into the GV instead of memset, which requires TargetData.

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

12 years agoStack Coloring: We have code that checks that all of the uses of allocas
Nadav Rotem [Thu, 13 Sep 2012 12:38:37 +0000 (12:38 +0000)]
Stack Coloring: We have code that checks that all of the uses of allocas
are within the lifetime zone. Sometime legitimate usages of allocas are
hoisted outside of the lifetime zone. For example, GEPS may calculate the
address of a member of an allocated struct. This commit makes sure that
we only check (abort regions or assert) for instructions that read and write
memory using stack frames directly. Notice that by allowing legitimate
usages outside the lifetime zone we also stop checking for instructions
which use derivatives of allocas. We will catch less bugs in user code
and in the compiler itself.

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

12 years agoFix Doxygen issues:
Dmitri Gribenko [Thu, 13 Sep 2012 12:34:29 +0000 (12:34 +0000)]
Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph).

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

12 years agoFix a doxygen issue: these examples are supposed to be displayed preformatted.
Dmitri Gribenko [Thu, 13 Sep 2012 11:42:30 +0000 (11:42 +0000)]
Fix a doxygen issue: these examples are supposed to be displayed preformatted.

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

12 years agoFix function name in comment.
Craig Topper [Thu, 13 Sep 2012 07:26:59 +0000 (07:26 +0000)]
Fix function name in comment.

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

12 years agoFix typo in comment.
Nick Lewycky [Thu, 13 Sep 2012 07:01:25 +0000 (07:01 +0000)]
Fix typo in comment.

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

12 years agoAdd a new compression type to ModRM table that detects when the memory modRM byte...
Craig Topper [Thu, 13 Sep 2012 05:45:42 +0000 (05:45 +0000)]
Add a new compression type to ModRM table that detects when the memory modRM byte represent 8 instructions and the reg modRM byte represents up to 64 instructions. Reduces modRM table from 43k entreis to 25k entries. Based on a patch from Manman Ren.

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

12 years agoMCJIT: relocation addends encoded in the target aren't quite so easy.
Jim Grosbach [Thu, 13 Sep 2012 01:24:37 +0000 (01:24 +0000)]
MCJIT: relocation addends encoded in the target aren't quite so easy.

The assumption that the target address for the relocation will always be
sizeof(intptr_t) and will always contain an addend for the relocation
value is very wrong. Default to no addend for now.

rdar://12157052

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

12 years agoMCJIT: Make sure to mask off non-type-field bits.
Jim Grosbach [Thu, 13 Sep 2012 01:24:35 +0000 (01:24 +0000)]
MCJIT: Make sure to mask off non-type-field bits.

When comparing to the macho relocation type enum value, make sure we're only
comparing against the bits in the RelType that correspond.

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

12 years agoMCJIT: Pass the i386 MachO relocation type properly.
Jim Grosbach [Thu, 13 Sep 2012 01:24:32 +0000 (01:24 +0000)]
MCJIT: Pass the i386 MachO relocation type properly.

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

12 years agoDon't fold indexed loads into TCRETURNmi64.
Jakob Stoklund Olesen [Thu, 13 Sep 2012 00:25:00 +0000 (00:25 +0000)]
Don't fold indexed loads into TCRETURNmi64.

We don't have enough GR64_TC registers when calling a varargs function
with 6 arguments. Since %al holds the number of vector registers used,
only %r11 is available as a scratch register.

This means that addressing modes using both base and index registers
can't be folded into TCRETURNmi64.

<rdar://problem/12282281>

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

12 years agoIntroduce the __llvm_gcov_flush function.
Bill Wendling [Thu, 13 Sep 2012 00:09:55 +0000 (00:09 +0000)]
Introduce the __llvm_gcov_flush function.

This function writes out the current values of the counters and then resets
them. This can be used similarly to the __gcov_flush function to sync the
counters when need be. For instance, in a situation where the application
doesn't exit.
<rdar://problem/12185886>

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

12 years agoRecommit, with fixes:
Eric Christopher [Wed, 12 Sep 2012 23:36:19 +0000 (23:36 +0000)]
Recommit, with fixes:

    Add some support for dealing with an object pointer on arguments.

    Part of rdar://9797999

which now supports adding the object pointer attribute to the
subprogram as it should.

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

12 years agoMisc.
Akira Hatanaka [Wed, 12 Sep 2012 23:27:55 +0000 (23:27 +0000)]
Misc.
1. Remove RA from list of allocatable registers
2. Enable d,y,r constraint inline assembly instructions

Patch by Reed Kotler.

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

12 years agoFix PR11985
Michael Liao [Wed, 12 Sep 2012 21:43:09 +0000 (21:43 +0000)]
Fix PR11985

- BlockAddress has no support of BA + offset form and there is no way to
  propagate that offset into machine operand;
- Add BA + offset support and a new interface 'getTargetBlockAddress' to
  simplify target block address forming;
- All targets are modified to use new interface and X86 backend is enhanced to
  support BA + offset addressing.

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

12 years agoDetect overflow in the path count computation. rdar://12277446.
Dan Gohman [Wed, 12 Sep 2012 20:45:17 +0000 (20:45 +0000)]
Detect overflow in the path count computation. rdar://12277446.

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

12 years agoRemove an overly-aggressive assertion. The code following this assertion already...
Owen Anderson [Wed, 12 Sep 2012 20:09:19 +0000 (20:09 +0000)]
Remove an overly-aggressive assertion.  The code following this assertion already knows how to handle the case where DstRC was NULL, so it's not actually protecting us from anything, and this pattern can come up when using unknown_class operands in the SelectionDAG.

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