Commit Graph

312 Commits

Author SHA1 Message Date
Sanjiv Gupta
cf1e5be2a2 Few changes to comply with new DebugInfo Metadata representation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 09:48:25 +00:00
Devang Patel
1619dc3b9e s/DebugLoc.CompileUnit/DebugLoc.Scope/g
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 23:28:53 +00:00
Jim Grosbach
b58f498f75 Add register-reuse to frame-index register scavenging. When a target uses
a virtual register to eliminate a frame index, it can return that register
and the constant stored there to PEI to track. When scavenging to allocate
for those registers, PEI then tracks the last-used register and value, and
if it is still available and matches the value for the next index, reuses
the existing value rather and removes the re-materialization instructions.
Fancier tracking and adjustment of scavenger allocations to keep more
values live for longer is possible, but not yet implemented and would likely
be better done via a different, less special-purpose, approach to the
problem.

eliminateFrameIndex() is modified so the target implementations can return
the registers they wish to be tracked for reuse.

ARM Thumb1 implements and utilizes the new mechanism. All other targets are
simply modified to adjust for the changed eliminateFrameIndex() prototype.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-07 17:12:56 +00:00
Dan Gohman
e3cc3f3c84 Instead of printing unnecessary basic block labels as labels in
verbose-asm mode, print comments instead. This eliminates a non-comment
difference between verbose-asm mode and non-verbose-asm mode.

Also, factor out the relevant code out of all the targets and into
target-independent code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83392 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-06 17:38:38 +00:00
Devang Patel
af0e272683 Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-06 02:19:11 +00:00
Devang Patel
b0fdedb3fd Use MachineInstr as an processDebugLoc() argument.
This will allow processDebugLoc() to handle scopes for DWARF debug info. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 23:12:50 +00:00
Bob Wilson
c4c39faa05 Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 21:44:42 +00:00
Devang Patel
5ccdd10b1a Remove std::string uses from DebugInfo interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 18:40:58 +00:00
Evan Cheng
ce31910eae Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-19 09:51:03 +00:00
Evan Cheng
fb2e752e41 Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
Not functionality change yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 21:02:19 +00:00
Chris Lattner
662316c997 PIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 03:15:54 +00:00
Chris Lattner
762ccea600 remove all but one reference to TargetRegisterDesc::AsmName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:31:40 +00:00
Chris Lattner
d95148f073 the tblgen produced 'getRegisterName' method does not access
the object, make it static instead of const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:19:22 +00:00
Chris Lattner
05af2616d0 make tblgen produce a function that returns the name for a physreg.
Nothing is using this info yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:08:00 +00:00
Chris Lattner
70a54c07a0 replace printBasicBlockLabel with EmitBasicBlockStart,
now that printBasicBlockLabel is only used for starting
a MBB.  This allows elimination of a bunch of arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:25:37 +00:00
Chris Lattner
325d3dcfe4 convert some uses of printBasicBlockLabel to use GetMBBSymbol
instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 17:14:04 +00:00
Chris Lattner
c5ea263a23 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 23:14:36 +00:00
Sandeep Patel
65c3c8f323 Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 08:44:58 +00:00
Sanjiv Gupta
72f9ab030e Further refactoring of PIC16 Obj file code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 10:47:31 +00:00
Devang Patel
6ceea33c5e Simplify isDerivedType() and other predicate interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 18:49:10 +00:00
Benjamin Kramer
b4f770b68a Normalize makefile comments and sort cmake file lists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 13:05:24 +00:00
Devang Patel
e4b275610a Reapply 79977.
Use MDNodes to encode debug info in llvm IR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 23:24:31 +00:00
Dan Gohman
6ff5de4b1d Add comments detailing a known bug, so that people writing other
backends don't use it as an example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 16:06:11 +00:00
Devang Patel
8245988835 Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 05:01:18 +00:00
Sanjiv Gupta
b9ef7648b8 Start refactoring PIC16 TargetObjectFile code. Eventually, all the stuff from
PIC16Section will move to MCSectionPIC16.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80021 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 19:39:05 +00:00
Devang Patel
2a610c7387 Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79977 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 05:24:07 +00:00
Chris Lattner
67db6af60d eliminate a #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 04:07:51 +00:00
Benjamin Kramer
f682f3d019 Forgot to update some CMakeLists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 22:20:11 +00:00
Chris Lattner
33adcfb4d2 rename TAI -> MAI, being careful not to make MAILJMP instructions :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79777 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 21:43:10 +00:00
Chris Lattner
e4d110be70 revert 79764, my dependencies failed me again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 20:56:12 +00:00
Chris Lattner
52283486bc remove dead member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79764 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 20:50:18 +00:00
Chris Lattner
af76e592c7 Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 20:48:53 +00:00
Chris Lattner
3dfe610013 Revert r79563
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79691 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 23:12:47 +00:00
Chris Lattner
35a27c8a0d revert r79562 + r79563
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 23:12:15 +00:00
Chris Lattner
5a35fe67dd revert r79631
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 23:08:45 +00:00
Chris Lattner
ec3579ff0d revert 79631
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 23:08:09 +00:00
Duncan Sands
1c3858a06c Fix a problem noticed by gcc-4.4:
warning: comparison is always true due to limited range of data type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 17:16:10 +00:00
Daniel Dunbar
e6c94c8d3a Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 16:17:36 +00:00
Sanjiv Gupta
eaa8b1f81d Add a pass to do call graph analyis to overlay the autos and frame sections of
leaf functions. This pass will be extended to color other nodes of the call tree 
as well in future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79631 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 15:22:33 +00:00
Bill Wendling
9d7a8cc57e Remove #include <iostream>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79603 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 06:52:44 +00:00
Sanjiv Gupta
89bc0a213d part of the previous commit for PIC16 ISR implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79563 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 19:34:18 +00:00
Sanjiv Gupta
eb01abaad1 Implement support for ISRs.
Clone functions that are shared between the Main thread and Interrupt thread.
CallSites are changed in AsmPrinter currently. A better solution would have been to modify the legalizer (SoftenFloat) to allow targets to change the name of libcalls for float operations. But that currently breaks other targets.
Also, cloing of automatic variables is done AsmPrinter, a better approach would
be to use the ValueMap in CloneFunction itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79562 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 19:28:24 +00:00
Chris Lattner
6c2f9e14fd eliminate AsmPrinter::SwitchToSection and just have clients
talk to the MCStreamer directly instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79405 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 05:49:37 +00:00
Sanjiv Gupta
bfa79b8be9 Revert a few changes that were done in 78603.
PIC16DebugInfo currently rely on NameStr of composite type descriptors to uniquely
identify debug info for two aggregate type decls with same name.
This implementation will change when we have MDNodes based debug info implemenatation in place



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 14:36:48 +00:00
Chris Lattner
ad27d77fc0 update for rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 06:14:07 +00:00
Chris Lattner
c077621e13 rename PIC16Section.h -> MCSectionPIC16.h for consistency with
the class it defines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79081 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 06:13:40 +00:00
Daniel Dunbar
a8c58d572b Reapply pieces of 78914 reverted in 78916, this has been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78921 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 17:08:54 +00:00
Daniel Dunbar
95cf7e7ed6 Remove obsoleted files (from AsmPrinter move)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78917 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:57:03 +00:00
Owen Anderson
e176fc9899 Revert r78914, as it was breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:54:39 +00:00
Sanjiv Gupta
2780609a47 Move PIC16 AsmPrinter to PIC16/AsmPrinter directory.
Remove CooperTargetMachine, as currently only one is supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78914 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 16:37:05 +00:00