Commit Graph

9217 Commits

Author SHA1 Message Date
Chris Lattner
25b68c6770 change SrcLineInfo to contain a label instead of a label ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98483 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 08:15:55 +00:00
Chris Lattner
2e9919a5e5 Now that DBG_LABEL is updated, we can finally make MachineMove
contain an MCSymbol instead of a label index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 08:12:40 +00:00
Chris Lattner
6ffcccab51 change the DBG_LABEL MachineInstr to always be created
with an MCSymbol instead of an immediate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 07:56:48 +00:00
Chris Lattner
9a38e67590 unbreak the build, grr symlinks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98477 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 07:36:49 +00:00
Chris Lattner
90f172aa80 Change this code to allocate temporary labels from mccontext,
not from MMI.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 07:29:45 +00:00
Chris Lattner
aba9bcb9b6 switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 07:27:07 +00:00
Chris Lattner
f14645cc64 Fix some EH failures on NNT I introduced in r98461
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 07:02:50 +00:00
Chris Lattner
21f9c8de53 fix a bug I introduced in r98459, causing some NNT failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 06:50:56 +00:00
Chris Lattner
7561d48095 change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol.  Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID.  Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 02:33:54 +00:00
Chris Lattner
18589de9b1 eliminate InvalidateLabel and LabelIDList from MMI and replace
them with a counter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 02:24:55 +00:00
Chris Lattner
b91306053d use Label->isDefined() instead of isLabelDeleted() now that we
consistently use MCSymbol and only call this predicate after
they should have been emitted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98461 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 02:20:58 +00:00
Chris Lattner
1611273351 change EH related stuff (other than EH_LABEL) to use MCSymbol
instead of label ID's.  This cleans up and regularizes a bunch 
of code and makes way for future progress.

Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places.  This is very sad and disturbing. :(

One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction.  There should not be any 
functionality change from doing this, but I'm not an EH expert.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 01:41:15 +00:00
Chris Lattner
1b2eb0e8a6 eliminate the now-unneeded context argument of MBB::getSymbol()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 21:04:28 +00:00
Chris Lattner
11d53c129f rearrange MCContext ownership. Before LLVMTargetMachine created it
and passing off ownership to AsmPrinter.  Now MachineModuleInfo
creates it and owns it by value.  This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code.  This also allows MachineFunction to 
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 20:55:24 +00:00
Chris Lattner
72aaa3c798 add support for MCSymbols as operands to MachineInstrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 08:14:18 +00:00
Chris Lattner
5e6cbe0eff simplify EmitFrameMoves to take BaseLabel in as a symbol
instead of as a stem+idx pair, simplify the "is a new 
location" check to use symbol comparison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 08:05:25 +00:00
Chris Lattner
fb65807c34 factor some labels, simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98429 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 07:40:56 +00:00
Chris Lattner
206d61e62f various cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 07:26:18 +00:00
Chris Lattner
bc733f54c0 reimplement the string pool used for inlined function
entries to not thrash std::strings and MCSymbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98415 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 02:17:42 +00:00
Chris Lattner
528a126d32 remove gone method, grr symlinks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98392 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 21:30:49 +00:00
Chris Lattner
deb0cba1ba inline the now-trivial implementation of GetGlobalValueSymbol into
some of its callers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 21:09:07 +00:00
Chris Lattner
b87c305fa7 give Mangler access to TargetData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 20:47:28 +00:00
Chris Lattner
73ff564d65 finally give Mangler a getSymbol method, which returns an MCSymbol
for a global instead of messing around with string buffers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98366 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 18:55:20 +00:00
Chris Lattner
0d941c15c0 remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 18:49:32 +00:00
Chris Lattner
5ef31a039d make the mangler take an MCContext instead of an MAI.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 18:44:54 +00:00
Chris Lattner
fdab14b105 remove MAI argument from createAsmStreamer since it
can get it from the context now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 18:28:53 +00:00
Chris Lattner
20e3280f3f fix a bug emitting .secrel32 that I introduced, PR6587, patch
by A.Mazur!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98360 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 18:10:35 +00:00
Jeffrey Yasskin
5c213dc78c Free DbgScopes in DwarfDebug::endFunction(). Also increased the const-ness of
several fields to make it easier to figure out where bugs might be creeping in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98358 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 17:45:06 +00:00
Duncan Sands
0ac5d2d7ff Revert turning copysignl into a COPYSIGN node for the moment:
ppc calls copysignl with a 128 bit ppc long double, resulting
in a node that the type legalizer doesn't know how to expand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98357 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 17:41:34 +00:00
Duncan Sands
bb2f0c541c Now that it's supported, turn copysignl into a COPYSIGN node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 12:13:59 +00:00
Duncan Sands
5d54b4112d Fix PR6522: implement copysign expansion for x86 long double
(it seems that FreeBSD doesn't have copysignl).  Done by
removing a bunch of assumptions from the code.  This may also
help with sparc 128 bit floats.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98346 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 11:45:06 +00:00
Chris Lattner
b3e87b2262 fix PR6577, a bug in sdbuilder lowering select instructions
whose true value was not Val#0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98336 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 07:15:36 +00:00
Devang Patel
1b596e399b There is no need to create specification DIE for definitions at DIFile level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 23:44:52 +00:00
Jakob Stoklund Olesen
56698803d9 Extract methods from LocalRewriter::RewriteMBB bringing it down to 666 lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98295 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 23:04:34 +00:00
Chris Lattner
c18409aed8 change MCContext to always have an MCAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 22:53:35 +00:00
Chris Lattner
42263e2e40 fix a fixme in TargetLoweringObjectFile::getExprForDwarfReference
where we used ot create an MCSymbol for ".".  Now emit an assembler
temporary label and reference it instead of "." textually.

rdar://7739457


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 21:55:20 +00:00
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