Commit Graph

9281 Commits

Author SHA1 Message Date
Dan Gohman
a257095ebb Remove getWidenVectorType, which is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98289 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 21:39:57 +00:00
Chris Lattner
3192d14076 rename getSymbolForDwarf* to getExprForDwarf* since it returns
an MCExpr and not an MCSymbol.  Change it to take an MCStreamer,
which is currently unused.

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 19:41:58 +00:00
Evan Cheng
af1871fa6d In case of tail call size of Ins and InVals may not match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98277 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 19:38:18 +00:00
Jeffrey Yasskin
d0f393d46f Avoid leaking CompileUnits in DwarfDebug.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98268 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 18:29:55 +00:00
Richard Osborne
95da605e15 Add a new jump table encoding to indicate jump tables entries
are inside the function by the target at the point of use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98255 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 14:58:16 +00:00
Evan Cheng
826cbac2a0 The check for coalescing a virtual register to a physical register, e.g.
cl = EXTRACT_SUBREG reg1024, 1, is overly conservative. It should check
for overlaps of vr's live interval with the super registers of the
physical register (ECX in this case) and let JoinIntervals() handle checking
the coalescing feasibility against the physical register (cl in this case).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98251 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 08:20:21 +00:00
Daniel Dunbar
0193c0994b Remove dead include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98225 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 02:28:48 +00:00
Dale Johannesen
e68ea060c7 Fix debug_value handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 02:10:24 +00:00
Daniel Dunbar
1f3e445184 MC: Provide MCAssembler with a TargetAsmBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 01:34:27 +00:00
Jakob Stoklund Olesen
2cb4202f07 VirtRegRewriter spring cleaning. No functional change.
Move methods out of line and M-x whitespace-cleanup.
Promote common method arguments to member variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98207 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 00:11:33 +00:00
Chris Lattner
f2f64e9063 fix PR6533 by updating the br(xor) code to remember the case
when it looked past a trunc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98203 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 23:46:44 +00:00
Dale Johannesen
e3b8533e71 Cosmetic: lengthen names and improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 23:37:24 +00:00
Bill Wendling
cebae36f57 Add a bit along with the MCSymbols stored in the MachineModuleInfo maps that
indicates that an MCSymbol is external or not. (It's true if it's external.)
This will be used to specify the correct information to add to non-lazy
pointers. That will be explained further when this bit is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98199 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 22:34:10 +00:00
Dale Johannesen
bfdf7f3852 Progress towards shepherding debug info through SelectionDAG.
No functional effect yet.  This is still evolving and should
not be viewed as final.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98195 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 22:13:47 +00:00
Dan Gohman
8f78e3c87d Fix another bitwidth calculation to handle vector types; based on a
patch by Micah Villmow for PR6572.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 21:04:53 +00:00
Dale Johannesen
2cd9ffef6e Fix another place where DEBUG_VALUE affected codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 19:57:56 +00:00
Dale Johannesen
a2f767b1a7 Fix a bug in DEBUG_VALUE handling Devang ran into.
I'll get this loop right yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 15:06:26 +00:00
Chris Lattner
09d53fecfc move three lowering hooks from MAI to TLOF and make one of them
semantic instead of syntactic.  This completes MCization of
darwin/x86[-64]!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 07:20:42 +00:00
Dale Johannesen
c5cf227f3d This survived a bootstrap, so let's try 98104 again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 05:45:47 +00:00
Evan Cheng
fac4f1f181 Enable machine cse pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98132 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 03:07:41 +00:00
Chris Lattner
974c0fb404 mcize the rest of EH emission, only one more directive missing
for darwin/x86 to be completely mcized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 02:48:06 +00:00
Chris Lattner
49f618a1e4 add missing filename!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 02:29:31 +00:00
Chris Lattner
98cdab53c3 set the temporary bit on MCSymbols correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98124 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 02:25:11 +00:00
Evan Cheng
2938a00f29 Add a couple more heuristics to neuter machine cse some more.
1. Be careful with cse "cheap" expressions. e.g. constant materialization. Only cse them when the common expression is local or in a direct predecessor. We don't want cse of cheap instruction causing other expressions to be spilled.
2. Watch out for the case where the expression doesn't itself uses a virtual register. e.g. lea of frame object. If the common expression itself is used by copies (common for passing addresses to function calls), don't perform the cse. Since these expressions do not use a register, it creates a live range but doesn't close any, we want to be very careful with increasing register pressure.

Note these are heuristics so machine cse doesn't make register allocator unhappy. Once we have proper live range splitting and re-materialization support in place, these should be evaluated again.

Now machine cse is almost always a win on llvm nightly tests on x86 and x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98121 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 02:12:03 +00:00
Chris Lattner
d85fc6e0b1 inline away a form of IsPCRelative, eliminating the
dead IsPCRel argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 01:17:49 +00:00
Chris Lattner
188a87da79 add some fixme's for MCizing. EH still has a few things that
need to be MCized, but the last debug info thing are LEB and
cygwin specific (which the MC api doesn't support yet) and
one specific form of EmitReference which I'll tackle next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98116 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 01:04:13 +00:00
Jim Grosbach
7c617b5e53 Clear up the last (famous last words) frame index value reuse issues for Thumb1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98109 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 00:13:42 +00:00
Dale Johannesen
7dda453410 Speculatively revert 98104; could be what's causing crashes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98108 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 00:11:34 +00:00
Chris Lattner
90e4af7b9d mcize uses of PrintRelDirective and eliminate it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 00:09:21 +00:00
Chris Lattner
4aeaca4053 inline the bool form of PrintRelDirective away, leaving just the unsigned form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 23:54:52 +00:00
Chris Lattner
233f52be36 eliminate EOL, adding all comments with the OutStreamer.AddComment
method.  With this, comments should end up on the same lines as the .byte
directives (for example) and we now get no output with:

$ llc CodeGen/X86/2009-02-12-DebugInfoVLA.ll -o - -filetype=null -asm-verbose

woot.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 23:52:58 +00:00
Dale Johannesen
7f876967c0 Ever more complicated DEBUG_VALUE fixes for branch folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98104 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 23:52:37 +00:00
Chris Lattner
0d9d70f013 eliminate a bunch of \n's that are being printed to O. Next up is to kill
off "EOL".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98102 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 23:38:23 +00:00
Chris Lattner
fcdae492ea convert the non-"ispcrel" case of EmitReference to MC,
significant debug info testcases are now all going through
MCStreamer, though they print a lot of extraneous newlines to "O".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98101 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 23:19:15 +00:00
Jim Grosbach
dff4b4c5a7 Change the Value argument to eliminateFrameIndex to a type-tagged value. This
is preparatory to having PEI's scavenged frame index value reuse logic
properly distinguish types of frame values (e.g., whether the value is
stack-pointer relative or frame-pointer relative).

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 21:45:49 +00:00
Evan Cheng
bfc9999563 Allow more cross-rc coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98048 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 06:38:17 +00:00
Chris Lattner
c608784dc8 reapply r98035:
Now that setStartLabel takes an MCSymbol, we can de-ID'ize
beginScope and RecordSourceLine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98047 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 04:54:43 +00:00
Chris Lattner
6c7dfc0463 add some extra checks. I'm not sure why, but this does unbreak a
failure remaining on mainline.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98046 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 04:48:35 +00:00
Evan Cheng
7ef1840d9e Revert accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98045 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 04:04:38 +00:00
Jakob Stoklund Olesen
1552cccc76 Don't do illegal cross-class coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98044 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 03:56:06 +00:00
Evan Cheng
31f94c7c22 - Make the machine cse dumb coalescer (as opposed to the more awesome simple
coalescer) handle sub-register classes.
- Add heuristics to avoid non-profitable cse. Given the current lack of live
  range splitting, avoid cse when an expression has PHI use and the would be
  new use is in a BB where the expression wasn't already being used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 03:21:12 +00:00
Eric Christopher
ee6414cf04 Speculatively revert r98035. It appears to have caused a set of buildbot
failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98039 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 02:36:31 +00:00
Dan Gohman
19b3826d0f Attempt to make this debug output meaningful, both in the case of
multibyte opcodes and in the case of multiple scopes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98036 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 02:15:05 +00:00
Chris Lattner
1e233f510c Now that setStartLabel takes an MCSymbol, we can de-ID'ize
beginScope and RecordSourceLine.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 02:08:02 +00:00
Chris Lattner
b7db733482 change DbgScope to keep track of the start/end label as MCSymbol*
now that the dependence on ID is removed from MMI.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 01:58:53 +00:00
Chris Lattner
5b9062cb3a remove a useless optimization: now that label replacement never
happens, the start/end of a scope can never be the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 01:52:43 +00:00
Chris Lattner
a34ec2290f strength reduce MMI::MappedLabel to MMI::isLabelDeleted,
and add a FIXME about how we are eventually going to zap this
lookup table once mc world domination is complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98031 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 01:51:43 +00:00
Chris Lattner
b2cc1a39f7 mcstreamerize AsmPrinter::printLabel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98025 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 01:02:30 +00:00
Jakob Stoklund Olesen
35071a0847 Disable physical register coalescing when the number of live ranges for the
physreg becomes ridiculously high.

std::upper_bound may be log(N), but for sufficiently large live intervals, it
becomes log(N)*cachemiss = a long long time.

This patch improves coalescer time by 4500x for a function with 20000
function calls. The generated code is different, but not significantly worse -
the allocator hints are almost as good as physreg coalescing anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98023 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:59:48 +00:00
Chris Lattner
6cde3e6e99 add a EmitSymbolValue convenience method to MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98017 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:39:24 +00:00
Chris Lattner
6ed0f90dac make InlineInfoLabels hold MCSymbol*'s, avoiding
recomputation of the labels.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98016 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:31:02 +00:00
Chris Lattner
b9dc5f7b58 mc'ize the last use of PrintLabelName and eliminate PrintLabelName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98015 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:26:09 +00:00
Chris Lattner
ef6b14f51c eliminate an argument from PrintRelDirective, sinking
the one special case into EmitSectionOffset.  MCize
the non-special case in EmitSectionOffset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98014 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:17:58 +00:00
Dan Gohman
8f03d75161 Print the correct index in the "match failed at index" message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98013 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:07:36 +00:00
Chris Lattner
b67d69df65 remove the suffix form of PrintLabelName, which was only
used for 'flavor'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98012 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:00:57 +00:00
Chris Lattner
c3421bb805 now that the debug and eh emitters use a common .set counter,
we can eliminate "flavor".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98011 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:00:15 +00:00
Chris Lattner
0d50c7620d move .set generation out of DwarfPrinter into AsmPrinter and
MCize it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98010 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 23:58:37 +00:00
Evan Cheng
5196018d9c Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implicit-def for obvious performance reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98009 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 23:49:12 +00:00
Evan Cheng
6c3b8ac6c9 Restrict machine cse to really trivial coalescing. Leave the heavy lifting to a real coalescer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98007 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 23:28:08 +00:00
Chris Lattner
57578766aa simplify EmitSectionOffset to always use .set if it is
available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything.  Make EmitSectionOffset call EmitDifference
instead of duplicating it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98005 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 23:23:25 +00:00
Chris Lattner
effa868d38 Remove a version of EmitDifference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98002 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 23:02:59 +00:00
Chris Lattner
dd8187a3e9 eliminate a form of PrintLabelName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97999 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 22:52:49 +00:00
Chris Lattner
326861c4c8 remove another form of EmitReference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97998 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 22:50:36 +00:00
Chris Lattner
c7249da2e9 eliminate the non-MCSymbol versions of EmitReference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97997 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 22:47:57 +00:00
Chris Lattner
f829eef8fa mc'ize EmitLabel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97996 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 22:44:40 +00:00
Chris Lattner
4faf59af82 merge DIEObjectLabel and DIEDwarfLabel into DIELabel.
Yes, DIE you fiendish labels, die all of you.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 22:31:46 +00:00
Chris Lattner
b98b1bf432 elimiante the DWLabel class, using MCSymbol instead. Start
switching some stuff over to passing around MCSymbol* instead
of stem+ID.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97993 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 22:23:36 +00:00
Devang Patel
77bf295dbb Derive DIType from DIScope. This simplifies getContext() where for members the context is a type. This also eliminates need of CompileUnitMaps maintained by dwarf writer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 22:02:50 +00:00
Devang Patel
3c91b05d2b Avoid using DIDescriptor.isNull().
This is a first step towards eliminating checks in Descriptor constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 20:52:55 +00:00
Devang Patel
0ef3fa6aab Revert r97947.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 19:20:38 +00:00
Devang Patel
d8cc5d5256 Avoid using DIDescriptor.isNull().
This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97947 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 18:25:48 +00:00
Dale Johannesen
fab4a25d46 Add Order to SDDbgValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97939 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 05:39:50 +00:00
Dale Johannesen
84839daa59 Fix dbg value handling in tail merging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97938 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 05:38:13 +00:00
Douglas Gregor
1ddcf35b68 Revert r97917, which was causing Clang Debug self-host failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 02:58:37 +00:00
Jeffrey Yasskin
9467f0e3bd Roll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97917 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-07 17:10:13 +00:00
Chris Lattner
acee647b13 Use Other as a sentinel instead of iAny.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97914 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-07 07:45:08 +00:00
Jeffrey Yasskin
8c42ca9374 _2_ gcc crashes, ah, ah, ah...
(Rolling back r97906.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-07 07:16:49 +00:00
Jeffrey Yasskin
f7399bf929 Avoid leaking CompileUnits and DbgScopes from DwarfDebug. Leaks found by Valgrind!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97906 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-07 06:55:35 +00:00
Chris Lattner
98f15d27cd tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97895 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-07 04:28:09 +00:00
Evan Cheng
6cc1aeaad2 Don't update physical register def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97861 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06 01:14:19 +00:00
Dale Johannesen
06a26637da Add some new bits of debug info handling. No
functional change yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97855 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06 00:03:23 +00:00
Dan Gohman
0fa9d1d901 Reapply r97778 and r97779, enabled only for unsigned i64 to f64
conversions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97854 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06 00:00:55 +00:00
Charles Davis
314fef6127 Don't emit global symbols into the (__TEXT,__ustring) section on Darwin. This
is a workaround for <rdar://problem/7672401/> (which I filed).

This let's us build Wine on Darwin, and it gets the Qt build there a little bit
further (so Doug says).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97845 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 22:28:45 +00:00
Jakob Stoklund Olesen
53e000bac3 Better handling of dead super registers in LiveVariables. We used to do this:
CALL ... %RAX<imp-def>
   ... [not using %RAX]
   %EAX = ..., %RAX<imp-use, kill>
   RET %EAX<imp-use,kill>

Now we do this:

   CALL ... %RAX<imp-def, dead>
   ... [not using %RAX]
   %EAX = ...
   RET %EAX<imp-use,kill>

By not artificially keeping %RAX alive, we lower register pressure a bit.

The correct number of instructions for 2008-08-05-SpillerBug.ll is obviously
55, anybody can see that. Sheesh.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97838 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 21:49:17 +00:00
Jakob Stoklund Olesen
a76e816844 We don't really care about correct register liveness information after the
post-ra scheduler has run. Disable the verifier checks that late in the game.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97837 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 21:49:13 +00:00
Jakob Stoklund Olesen
580bba2b0d Avoid creating bad PHI instructions when BR is being const-folded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97836 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 21:49:10 +00:00
Chris Lattner
18fdabadca Fix PR6497, a bug where we'd fold a load into an addc
node which has a flag.  That flag in turn was used by an
already-selected adde which turned into an ADC32ri8 which
used a selected load which was chained to the load we
folded.  This flag use caused us to form a cycle.  Fix
this by not ignoring chains in IsLegalToFold even in
cases where the isel thinks it can.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97791 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 06:19:13 +00:00
Chris Lattner
9bbcd5ee5b inline a small function with one call site.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97789 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 05:49:45 +00:00
Dan Gohman
b6b343d77a Revert r97778 and r97779. They're somehow breaking llvm-gcc builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97781 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 02:40:23 +00:00
Dan Gohman
808ab341b4 Fix these constants to be more portable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 02:13:10 +00:00
Dan Gohman
cfa7ca1997 Rewrite i64-to-f64 conversion using an algorithm which handles
rounding correctly. This implementation is a generalization of
the x86_64 code in compiler-rt.

This fixes rdar://7683708.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97778 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 02:00:46 +00:00
Dale Johannesen
b0812f114b Fix some more places where dbg_value affected codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97765 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 00:02:59 +00:00
Jeffrey Yasskin
e8cfa63e4e Fix memcheck-found leaks: one false positive from using new[], and one true
positive where pointers would be leaked on llvm_shutdown.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 22:15:01 +00:00
Jim Grosbach
b58a59b3c1 For SJLJ exception handling, make sure that all calls that are not marked
as nounwind are marked with a -1 call-site value. This is necessary to, for
example, correctly process exceptions thrown from within an "unexpected"
execption handler (see SingleSource/Regression/C++/EH/expection_spec_test.cpp).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97757 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 22:07:46 +00:00
Evan Cheng
c46e293e94 Run machine licm before machine cse to avoid messing up licm opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97752 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 21:28:09 +00:00
Evan Cheng
a5f32cb3d3 Avoid cse load instructions unless they are known to be invariant loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 21:18:08 +00:00
Chris Lattner
c19ae9d91d add a statistic for # times fastisel fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97738 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 19:46:56 +00:00
Dan Gohman
ba72b0c4e1 Fix a typo Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 19:11:28 +00:00
Evan Cheng
9763f709e2 Rename -machine-cse to -enable-machine-cse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97713 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 02:08:04 +00:00
Evan Cheng
b3958e8032 Look ahead a bit to determine if a physical register def that is not marked dead is really alive. This is necessary to catch a lot of common cse opportunities for targets like x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 01:33:55 +00:00
Chris Lattner
57bf8a483e change the new isel matcher to emit ComplexPattern matches
as the very last thing before node emission.  This should
dramatically reduce the number of times we do 'MatchAddress'
on X86, speeding up compile time.  This also improves comments
in the tables and shrinks the table a bit, now down to 
80506 bytes for x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 01:23:08 +00:00
Dan Gohman
6900a39d28 Fix more code to work properly with vector operands. Based on
a patch my Micah Villmow for PR6465.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 00:23:16 +00:00
Chris Lattner
2c4afd1d8e inline CannotYetSelectIntrinsic into CannotYetSelect and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97690 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 00:21:16 +00:00
Evan Cheng
67bda7215b Fix a logic error. An instruction that has a live physical register def cannot be CSE'ed, but it *can* be used to replace a common subexpression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 23:59:08 +00:00
Evan Cheng
a92dced4a1 Remove PHINodeTraits and use MachineInstrExpressionTrait instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 23:55:49 +00:00
Evan Cheng
67eaa08f2b Move MachineInstrExpressionTrait::getHashValue() out of line so it can skip over only virtual register defs. This matches what isEqual() is doing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97680 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 23:37:30 +00:00
Evan Cheng
05bdcbb1ae Re-apply r97667 but with a little bit of thought put into the patch. This implements a special DenseMapInfo trait for DenseMap<MachineInstr*> that compare the value of the MachineInstr rather than the pointer value. Since the hashing and equality test functions ignore defs it's useful for doing CSE kind optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97678 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 23:27:36 +00:00
Dan Gohman
319dfa3fb3 Revert 97667. It broke a bunch of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97673 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 22:40:03 +00:00
Evan Cheng
34cdf6edf5 Fix funky indentation and add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:54:14 +00:00
Evan Cheng
a054ae02fd Move DenseMapInfo for MachineInstr* to MachineInstr.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:47:16 +00:00
Dan Gohman
a72d2a210c Fix a bug in SelectionDAG's ReplaceAllUsesWith in the case where
CSE and recursive RAUW calls delete a node from the use list,
invalidating the use list iterator. There's currently no known
way to reproduce this in an unmodified LLVM, however there's no
fundamental reason why a SelectionDAG couldn't be formed which
would trigger this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:33:37 +00:00
Evan Cheng
16b48b8a05 Machine CSE work in progress. It's doing some CSE now. But implicit def of physical registers are getting in the way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:20:05 +00:00
Evan Cheng
1423c70b8f Add MachineRegisterInfo::hasOneUse and hasOneNonDBGUse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97663 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:18:38 +00:00
Bill Wendling
fec8657351 Revert...
--- Reverse-merging r97592 into '.':
U    lib/CodeGen/TargetLoweringObjectFileImpl.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97657 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 19:31:05 +00:00
Chris Lattner
da828e3c8c add some of the more obscure predicate types to the
Scope accelerator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97652 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 07:46:25 +00:00
Chris Lattner
f1b7c7d476 speed up scope node processing: if the first element of a scope
entry we're about to process is obviously going to fail, don't
bother pushing a scope only to have it immediately be popped.
This avoids a lot of scope stack traffic in common cases.

Unfortunately, this requires duplicating some of the predicate
dispatch.  To avoid duplicating the actual logic I pulled each
predicate out to its own static function which gets used in
both places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 07:31:15 +00:00
Chris Lattner
cfe2eab744 introduce a new SwitchTypeMatcher node (which is analogous to
SwitchOpcodeMatcher) and have DAGISelMatcherOpt form it.  This
speeds up selection, particularly for X86 which has lots of 
variants of instructions with only type differences.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 06:28:15 +00:00
Evan Cheng
6ba9554988 Work in progress. Finding some cse now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 02:48:20 +00:00
Bill Wendling
32f9eb2bc3 Use APInt instead of zext value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 01:58:01 +00:00
Evan Cheng
506049f29f - Change MachineInstr::isIdenticalTo to take a new option that determines whether it should skip checking defs or at least virtual register defs. This subsumes part of the TargetInstrInfo::isIdentical functionality.
- Eliminate TargetInstrInfo::isIdentical and replace it with produceSameValue. In the default case, produceSameValue just checks whether two machine instructions are identical (except for virtual register defs). But targets may override it to check for unusual cases (e.g. ARM pic loads from constant pools).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 01:44:33 +00:00
Evan Cheng
d89347cb49 Add an option to enable machine cse (it's not doing anything yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 01:38:35 +00:00
Bill Wendling
7d9f2b93a3 This test case:
long test(long x) { return (x & 123124) | 3; }

Currently compiles to:

_test:
        orl     $3, %edi
        movq    %rdi, %rax
        andq    $123127, %rax
        ret

This is because instruction and DAG combiners canonicalize

  (or (and x, C), D) -> (and (or, D), (C | D))

However, this is only profitable if (C & D) != 0. It gets in the way of the
3-addressification because the input bits are known to be zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 00:35:56 +00:00
Chris Lattner
d1b7382983 Fix some issues in WalkChainUsers dealing with
CopyToReg/CopyFromReg/INLINEASM.  These are annoying because
they have the same opcode before an after isel.  Fix this by
setting their NodeID to -1 to indicate that they are selected,
just like what automatically happens when selecting things that
end up being machine nodes.

With that done, give IsLegalToFold a new flag that causes it to
ignore chains.  This lets the HandleMergeInputChains routine be
the one place that validates chains after a match is successful,
enabling the new hotness in chain processing.  This smarter
chain processing eliminates the need for "PreprocessRMW" in the
X86 and MSP430 backends and enables MSP to start matching it's
multiple mem operand instructions more aggressively.

I currently #if out the dead code in the X86 backend and MSP 
backend, I'll remove it for real in a follow-on patch.

The testcase changes are:
  test/CodeGen/X86/sse3.ll: we generate better code
  test/CodeGen/X86/store_op_load_fold2.ll: PreprocessRMW was 
      miscompiling this before, we now generate correct code
      Convert it to filecheck while I'm at it.
  test/CodeGen/MSP430/Inst16mm.ll: Add a testcase for mem/mem
      folding to make anton happy. :)




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 22:20:06 +00:00
Bill Wendling
d556155afd Okay. One last attempt:
Place the LSDA into the TEXT section on Mach-O. This saves space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97592 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 21:50:35 +00:00
Chris Lattner
00592ec857 run HandleMergeInputChains even if we only have one input chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 19:34:59 +00:00
Evan Cheng
ac1abde05b Swap parameters of isSafeToMove and isSafeToReMat for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97578 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 19:03:01 +00:00
Evan Cheng
c5bbba1e49 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97577 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 19:02:27 +00:00
Devang Patel
1eac3e7d1e Fix grammar.
Thanks Duncan!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97572 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 17:58:15 +00:00
Chris Lattner
82dd3d38d9 Fix the xfail I added a couple of patches back. The issue
was that we weren't properly handling the case when interior
nodes of a matched pattern become dead after updating chain
and flag uses.  Now we handle this explicitly in 
UpdateChainsAndFlags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97561 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 07:50:03 +00:00
Chris Lattner
61c97f6932 I was confused about this, it turns out that MorphNodeTo
*does* delete ex-operands that become dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 07:14:49 +00:00
Chris Lattner
3ff1e4db78 factor node morphing out to its own helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 06:55:04 +00:00
Chris Lattner
7c306da505 Sink InstructionSelect() out of each target into SDISel, and rename it
DoInstructionSelection.  Inline "SelectRoot" into it from DAGISelHeader.
Sink some other stuff out of DAGISelHeader into SDISel.

Eliminate the various 'Indent' stuff from various targets, which dates
to when isel was recursive.

 17 files changed, 114 insertions(+), 430 deletions(-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97555 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 06:34:30 +00:00
Eric Christopher
7b2c9e6a30 Add file to CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97545 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 02:49:43 +00:00
Evan Cheng
c6fe333688 Add skeleton of a machine level cse pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97543 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 02:38:24 +00:00
Chris Lattner
6183fbd726 Use the right induction variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97541 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 02:37:23 +00:00
Chris Lattner
c6d7ad3c7d Rewrite chain handling validation and input TokenFactor handling
stuff now that we don't care about emulating the old broken 
behavior of the old isel.  This eliminates the 
'CheckChainCompatible' check (along with IsChainCompatible) which
did an incorrect and inefficient scan *up* the chain nodes which
happened as the pattern was being formed and does the validation
at the end in HandleMergeInputChains when it forms a structural 
pattern.  This scans "down" the graph, which means that it is
quickly bounded by nodes already selected.  This also handles
token factors that get "trapped" in the dag.

Removing the CheckChainCompatible nodes also shrinks the 
generated tables by about 6K for X86 (down to 83K).

There are two pieces remaining before I can nuke PreprocessRMW:
1. I xfailed a test because we're now producing worse code in a 
   case that has nothing to do with the change: it turns out that
   our use of MorphNodeTo will leave dead nodes in the graph
   which (depending on how the graph is walked) end up causing
   bogus uses of chains and blocking matches.  This is really 
   bad for other reasons, so I'll fix this in a follow-up patch.

2. CheckFoldableChainNode needs to be improved to handle the TF.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97539 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 02:22:10 +00:00
Dan Gohman
5b870aff81 Fix several places to handle vector operands properly.
Based on a patch by Micah Villmow for PR6438.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97538 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 02:14:38 +00:00
Bill Wendling
46ada19645 Remove dead parameter passing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 01:55:18 +00:00
Devang Patel
6b506cbce0 Constructors and operators for anonymous aggregates does not names. Do not force empty AT_name attribute in such cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97533 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 01:26:20 +00:00
Chris Lattner
319ef94030 remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97529 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 00:40:26 +00:00
Chris Lattner
6b30792d2d refactor some code out of OPC_EmitMergeInputChains into a
new helper function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97525 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 00:00:03 +00:00
Chris Lattner
df51247725 remove all but one version of SelectionDAG::MorphNodeTo
(the most general) the others are dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 22:20:05 +00:00
Jakob Stoklund Olesen
e5d90416ee Use methods to determine if a LiveInterval is spillable.
Don't accidentally produce unspillable intervals for deeply nested loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 20:59:38 +00:00
Chris Lattner
7390eebd49 Accelerate isel dispatch for tables that start with a top-level
OPC_SwitchOpcode to use a table lookup instead of having to go
through the interpreter for this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 18:47:11 +00:00
Dan Gohman
042919c0c5 Fix optimization of ISD::TRUNCATE on vector operands. Based on a patch
by Micah Villmow for PR6335.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97461 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 17:59:21 +00:00
Chris Lattner
7d892d6e6d some trivial microoptimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 07:43:08 +00:00
Chris Lattner
fa342faef9 eliminate the CheckMultiOpcodeMatcher code and have each
ComplexPattern at the root be generated multiple times, once
for each opcode they are part of.  This encourages factoring
because the opcode checks get treated just like everything
else in the matcher.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 07:17:40 +00:00
Chris Lattner
eb66921adb add a new OPC_SwitchOpcode which is semantically equivalent
to a scope where every child starts with a CheckOpcode, but
executes more efficiently.  Enhance DAGISelMatcherOpt to 
form it.

This also fixes a bug in CheckOpcode: apparently the SDNodeInfo
objects are not pointer comparable, we have to compare the
enum name.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 06:59:22 +00:00
Chris Lattner
14df8dc680 eliminate GetInt1/2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-28 22:38:43 +00:00
Chris Lattner
2a49d57d2d hoist the new isel interpreter out of DAGISelHeader.h
(which gets #included into the middle of each 
target's DAGISel class) into a .cpp file where it is
only compiled once.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-28 22:37:22 +00:00