Commit Graph

332 Commits

Author SHA1 Message Date
Dan Gohman 453d64c9f5 Rename usesCustomDAGSchedInserter to usesCustomInserter, and update a
bunch of associated comments, because it doesn't have anything to do
with DAGs or scheduling. This is another step in decoupling MachineInstr
emitting from scheduling.

llvm-svn: 85517
2009-10-29 18:10:34 +00:00
Sanjiv Gupta a789f17ffc Remove unnecessary gotos to fall-thru successors.
llvm-svn: 85257
2009-10-27 17:40:24 +00:00
Anton Korobeynikov 0ae1b2961d Revert r85134, it breaks mingw build
llvm-svn: 85138
2009-10-26 18:40:24 +00:00
Sanjiv Gupta 752aea6513 Make PIC16 overlay a loadable pass.
llvm-svn: 85134
2009-10-26 18:22:59 +00:00
Sanjiv Gupta b18a46806b Reapply 85006 with a minor fix.
llvm-svn: 85052
2009-10-25 08:14:11 +00:00
Nick Lewycky 974e12b2d3 Remove includes of Support/Compiler.h that are no longer needed after the
VISIBILITY_HIDDEN removal.

llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky 02d5f77d26 Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.

llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Sanjiv Gupta 9e8d42f295 Revert back 85006 for now as it breaks PIC16 tests.
llvm-svn: 85008
2009-10-24 18:19:41 +00:00
Sanjiv Gupta 055c3305a1 Adding support for placing global objects in shared data memory.
llvm-svn: 85006
2009-10-24 18:02:44 +00:00
Chris Lattner 1448799377 fix warning.
llvm-svn: 84826
2009-10-22 03:42:27 +00:00
Anton Korobeynikov b45d621ab1 Revert r84764, it breaks mingw build
llvm-svn: 84783
2009-10-21 21:15:18 +00:00
Sanjiv Gupta c5804f3cb6 Build shared lib instead of an archive.
llvm-svn: 84764
2009-10-21 17:27:23 +00:00
Sanjiv Gupta 47ea743618 Add a pass to overlay pic16 data sections for function frame and automatic
variables. This pass can be invoked by llvm-ld or opt to traverse over the call graph 
to detect what function frames and their automatic variables can be overlaid.
Currently this builds an archive , but needs to be changed to a loadable module.

llvm-svn: 84753
2009-10-21 10:42:44 +00:00
Sanjiv Gupta 8296e62244 This file is replaeced by PIC16Section.h.
llvm-svn: 84628
2009-10-20 09:16:32 +00:00
Benjamin Kramer ca019e704c Update CMake file.
llvm-svn: 84252
2009-10-16 10:29:08 +00:00
Sanjiv Gupta 89259d7929 Cleaned up some code. No functionality change.
llvm-svn: 84251
2009-10-16 08:58:34 +00:00
Benjamin Kramer 74c35c126a Add files Sanjiv forgot.
llvm-svn: 84196
2009-10-15 19:46:34 +00:00
Sanjiv Gupta a07cae65e3 Re-apply 84180 with the fixed test case.
llvm-svn: 84195
2009-10-15 19:26:25 +00:00
Daniel Dunbar 3b5bdd536b Revert "Complete Rewrite of AsmPrinter, TargetObjectFile based on new
PIC16Section class", it breaks globals.ll.

llvm-svn: 84184
2009-10-15 15:02:14 +00:00
Sanjiv Gupta 917db86b42 Complete Rewrite of AsmPrinter, TargetObjectFile based on new PIC16Section class
derived from MCSection.

llvm-svn: 84180
2009-10-15 10:10:43 +00:00
Sanjiv Gupta 7357636091 Few changes to comply with new DebugInfo Metadata representation.
llvm-svn: 84179
2009-10-15 09:48:25 +00:00
Devang Patel d7ebfe3963 s/DebugLoc.CompileUnit/DebugLoc.Scope/g
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g

llvm-svn: 84054
2009-10-13 23:28:53 +00:00
Jim Grosbach fa14dd430c 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.

llvm-svn: 83467
2009-10-07 17:12:56 +00:00
Dan Gohman 10d3dc569b 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.

llvm-svn: 83392
2009-10-06 17:38:38 +00:00
Devang Patel 051454a16f Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.
llvm-svn: 83363
2009-10-06 02:19:11 +00:00
Devang Patel e0709cfc92 Use MachineInstr as an processDebugLoc() argument.
This will allow processDebugLoc() to handle scopes for DWARF debug info. 

llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Bob Wilson 64c8d5a004 Fix a comment typo.
llvm-svn: 83174
2009-09-30 21:44:42 +00:00
Devang Patel b296942f6d Remove std::string uses from DebugInfo interface.
llvm-svn: 83083
2009-09-29 18:40:58 +00:00
Evan Cheng 9827ad39a7 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.
llvm-svn: 82311
2009-09-19 09:51:03 +00:00
Evan Cheng 270d0f986f Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
Not functionality change yet.

llvm-svn: 82273
2009-09-18 21:02:19 +00:00
Chris Lattner 4dc75de733 PIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart.
llvm-svn: 81755
2009-09-14 03:15:54 +00:00
Chris Lattner eb2cc68254 remove all but one reference to TargetRegisterDesc::AsmName.
llvm-svn: 81714
2009-09-13 20:31:40 +00:00
Chris Lattner ad10b3be3e the tblgen produced 'getRegisterName' method does not access
the object, make it static instead of const.

llvm-svn: 81711
2009-09-13 20:19:22 +00:00
Chris Lattner 06c5eed9e9 make tblgen produce a function that returns the name for a physreg.
Nothing is using this info yet.

llvm-svn: 81707
2009-09-13 20:08:00 +00:00
Chris Lattner 1d04aa78f3 replace printBasicBlockLabel with EmitBasicBlockStart,
now that printBasicBlockLabel is only used for starting
a MBB.  This allows elimination of a bunch of arguments.

llvm-svn: 81684
2009-09-13 18:25:37 +00:00
Chris Lattner 4cd449813a convert some uses of printBasicBlockLabel to use GetMBBSymbol
instead.

llvm-svn: 81677
2009-09-13 17:14:04 +00:00
Chris Lattner 321bc99a74 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.

llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Sandeep Patel 68c5f477fa Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Sanjiv Gupta a19e971f0c Further refactoring of PIC16 Obj file code.
llvm-svn: 80670
2009-09-01 10:47:31 +00:00
Devang Patel 9fda4bd998 Simplify isDerivedType() and other predicate interface.
llvm-svn: 80602
2009-08-31 18:49:10 +00:00
Benjamin Kramer 3c62f5095a Normalize makefile comments and sort cmake file lists.
llvm-svn: 80584
2009-08-31 13:05:24 +00:00
Devang Patel 80ae34974b Reapply 79977.
Use MDNodes to encode debug info in llvm IR.

llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Dan Gohman 45a6b06a45 Add comments detailing a known bug, so that people writing other
backends don't use it as an example.

llvm-svn: 80105
2009-08-26 16:06:11 +00:00
Devang Patel f08e35d9dc Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Sanjiv Gupta 7699191ffb Start refactoring PIC16 TargetObjectFile code. Eventually, all the stuff from
PIC16Section will move to MCSectionPIC16.

llvm-svn: 80021
2009-08-25 19:39:05 +00:00
Devang Patel 02aac922b4 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!)

llvm-svn: 79977
2009-08-25 05:24:07 +00:00
Chris Lattner 44aed5dcf1 eliminate a #include.
llvm-svn: 79888
2009-08-24 04:07:51 +00:00
Benjamin Kramer f7b571726a Forgot to update some CMakeLists.
llvm-svn: 79780
2009-08-22 22:20:11 +00:00
Chris Lattner e9a75a6654 rename TAI -> MAI, being careful not to make MAILJMP instructions :)
llvm-svn: 79777
2009-08-22 21:43:10 +00:00
Chris Lattner 757dd1cd93 revert 79764, my dependencies failed me again.
llvm-svn: 79767
2009-08-22 20:56:12 +00:00