llvm-6502/lib
Chandler Carruth 32d75bec4b Fix a somewhat nasty crasher in PR13378. This crashes inside of
LiveIntervals due to the two-addr pass generating bogus MI code.

The crux of the issue was a loop nesting problem. The intent of the code
which attempts to transform instructions before converting them to
two-addr form is to defer and reprocess any transformed instructions as
the second processing is likely to have more opportunities to coalesce
copies, etc. Unfortunately, there was one section of processing that was
not deferred -- the INSERT_SUBREG rewriting. Due to quirks of how this
rewriting proceeded, not only did it occur early, it removed the bits of
information needed for the deferred processing to correctly generate the
necessary two address form (specifically inserting a copy), but didn't
trigger any immediate assertions and produced what appeared to be
already valid two-address from code. Thus, the assertion only fired much
later in the pipeline.

The fix is to hoist the transformation logic up layer to where it can
more firmly defer all further processing, and to teach the normal
processing to handle an edge case previously handled as part of the
transformation logic. This edge case (already matched tied register
operands) needs to *not* defer any steps.

As has been brought up repeatedly in the process: wow does this code
need refactoring. I *may* squeeze in some time to at least bring sanity
to this loop... but wow... =]

Thanks to Jakob for helpful hints on the way here, and the review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160443 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-18 18:58:22 +00:00
..
Analysis Move llvm/Support/TypeBuilder.h -> llvm/TypeBuilder.h. This completes 2012-07-15 23:45:24 +00:00
Archive
AsmParser
Bitcode
CodeGen Fix a somewhat nasty crasher in PR13378. This crashes inside of 2012-07-18 18:58:22 +00:00
DebugInfo Improve behavior of DebugInfoEntryMinimal::getSubprogramName() introduced in r159512. 2012-07-17 15:28:35 +00:00
ExecutionEngine
Linker
MC I'm introducing a new machine model to simultaneously allow simple 2012-07-07 04:00:00 +00:00
Object Fixed few warnings. 2012-07-18 04:06:49 +00:00
Support simplify getSetSize() per Duncan's comments 2012-07-17 15:43:59 +00:00
TableGen TableGen: Location information for diagnostic. 2012-07-12 00:53:31 +00:00
Target Fix ARMTargetLowering::isLegalAddImmediate to consider thumb encodings. 2012-07-18 18:34:27 +00:00
Transforms indvars: drive by heuristics fix. 2012-07-18 04:35:13 +00:00
VMCore More replacing of target-dependent intrinsics with target-indepdent 2012-07-18 00:02:16 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile