Daniel Dunbar
d170badffe
Remove unused variable (noticed by clang++).
...
llvm-svn: 91780
2009-12-19 18:58:49 +00:00
Sanjiv Gupta
14c9f2ed42
Emit direction operand in binary insns that stores in memory.
...
llvm-svn: 91777
2009-12-19 13:52:01 +00:00
Sanjiv Gupta
65927cebf8
1. In indirect load/store insns , the name of fsr should be emitted as INDF.
...
2. include standard asmbly headers in generated asmbly.
llvm-svn: 91768
2009-12-19 08:26:25 +00:00
Benjamin Kramer
fbac37018a
Avoid some possibly unsafe uses of StringRef::data().
...
llvm-svn: 89873
2009-11-25 18:26:09 +00:00
Devang Patel
d50fc13c19
Use StringRef (again) in DebugInfo interface.
...
llvm-svn: 89866
2009-11-25 17:36:49 +00:00
Sanjiv Gupta
b38d6287b8
revert 88761 as it fails builds.
...
llvm-svn: 88762
2009-11-14 07:22:25 +00:00
Sanjiv Gupta
3db18af363
Fix debug info crashes for PIC16.
...
llvm-svn: 88761
2009-11-14 06:19:49 +00:00
David Greene
97a1f550d1
Move DebugInfo checks into EmitComments and remove them from
...
target-specific AsmPrinters. Not all comments need DebugInfo.
Re-enable the line numbers comment test.
llvm-svn: 88697
2009-11-13 21:34:57 +00:00
David Greene
9934b1d063
Make the MachineFunction argument of getFrameRegister const.
...
This also fixes a build error.
llvm-svn: 87027
2009-11-12 21:00:03 +00:00
David Greene
58e7c6145b
Add a bool flag to StackObjects telling whether they reference spill
...
slots. The AsmPrinter will use this information to determine whether to
print a spill/reload comment.
Remove default argument values. It's too easy to pass a wrong argument
value when multiple arguments have default values. Make everything
explicit to trap bugs early.
Update all targets to adhere to the new interfaces..
llvm-svn: 87022
2009-11-12 20:49:22 +00:00
Chris Lattner
25421b6954
indicate what the native integer types for the target are.
...
Please verify.
llvm-svn: 86397
2009-11-07 19:07:32 +00:00
Dan Gohman
eec0f1c506
Remove uninteresting and confusing debug output.
...
llvm-svn: 86149
2009-11-05 18:47:09 +00:00
Dan Gohman
3393a4c997
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
c690360ed5
Remove unnecessary gotos to fall-thru successors.
...
llvm-svn: 85257
2009-10-27 17:40:24 +00:00
Anton Korobeynikov
4f40949874
Revert r85134, it breaks mingw build
...
llvm-svn: 85138
2009-10-26 18:40:24 +00:00
Sanjiv Gupta
7ea628e8db
Make PIC16 overlay a loadable pass.
...
llvm-svn: 85134
2009-10-26 18:22:59 +00:00
Sanjiv Gupta
18574b11b0
Reapply 85006 with a minor fix.
...
llvm-svn: 85052
2009-10-25 08:14:11 +00:00
Nick Lewycky
2b8400628d
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
711c726c97
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
ec0d345a46
Revert back 85006 for now as it breaks PIC16 tests.
...
llvm-svn: 85008
2009-10-24 18:19:41 +00:00
Sanjiv Gupta
1fcb847e01
Adding support for placing global objects in shared data memory.
...
llvm-svn: 85006
2009-10-24 18:02:44 +00:00
Chris Lattner
e0932e92e9
fix warning.
...
llvm-svn: 84826
2009-10-22 03:42:27 +00:00
Anton Korobeynikov
141a4a2f42
Revert r84764, it breaks mingw build
...
llvm-svn: 84783
2009-10-21 21:15:18 +00:00
Sanjiv Gupta
9e78b53be3
Build shared lib instead of an archive.
...
llvm-svn: 84764
2009-10-21 17:27:23 +00:00
Sanjiv Gupta
d6fd961c5c
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
28330ebddc
This file is replaeced by PIC16Section.h.
...
llvm-svn: 84628
2009-10-20 09:16:32 +00:00
Benjamin Kramer
9975abcc38
Update CMake file.
...
llvm-svn: 84252
2009-10-16 10:29:08 +00:00
Sanjiv Gupta
f516a9b2a4
Cleaned up some code. No functionality change.
...
llvm-svn: 84251
2009-10-16 08:58:34 +00:00
Benjamin Kramer
44c164e005
Add files Sanjiv forgot.
...
llvm-svn: 84196
2009-10-15 19:46:34 +00:00
Sanjiv Gupta
d279da3360
Re-apply 84180 with the fixed test case.
...
llvm-svn: 84195
2009-10-15 19:26:25 +00:00
Daniel Dunbar
609b7287b8
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
feff117097
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
cd427f0fbc
Few changes to comply with new DebugInfo Metadata representation.
...
llvm-svn: 84179
2009-10-15 09:48:25 +00:00
Devang Patel
72f708ec2f
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
61c5ce1bde
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
a803c712dd
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
a8f35ac640
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
e097bf49d0
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
59eb323058
Fix a comment typo.
...
llvm-svn: 83174
2009-09-30 21:44:42 +00:00
Devang Patel
e5be8e79df
Remove std::string uses from DebugInfo interface.
...
llvm-svn: 83083
2009-09-29 18:40:58 +00:00
Evan Cheng
7714c8412d
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
7cb9c456e5
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
ec805c1a5d
PIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart.
...
llvm-svn: 81755
2009-09-14 03:15:54 +00:00
Chris Lattner
334aa7a1d4
remove all but one reference to TargetRegisterDesc::AsmName.
...
llvm-svn: 81714
2009-09-13 20:31:40 +00:00
Chris Lattner
20b7392123
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
0cde5283e3
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
cbcbedf254
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
de1324146e
convert some uses of printBasicBlockLabel to use GetMBBSymbol
...
instead.
llvm-svn: 81677
2009-09-13 17:14:04 +00:00
Chris Lattner
b9aca1a178
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
9c4e094e2a
Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
...
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Sanjiv Gupta
d2e1fc4b61
Further refactoring of PIC16 Obj file code.
...
llvm-svn: 80670
2009-09-01 10:47:31 +00:00
Devang Patel
29f14e754f
Simplify isDerivedType() and other predicate interface.
...
llvm-svn: 80602
2009-08-31 18:49:10 +00:00
Benjamin Kramer
61232721d9
Normalize makefile comments and sort cmake file lists.
...
llvm-svn: 80584
2009-08-31 13:05:24 +00:00
Devang Patel
fbaeda732e
Reapply 79977.
...
Use MDNodes to encode debug info in llvm IR.
llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Dan Gohman
69c34d4217
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
10c075a316
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
...
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Sanjiv Gupta
ca75b52c11
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
7d42bfab6c
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
9be7cb663d
eliminate a #include.
...
llvm-svn: 79888
2009-08-24 04:07:51 +00:00
Benjamin Kramer
52cba58070
Forgot to update some CMakeLists.
...
llvm-svn: 79780
2009-08-22 22:20:11 +00:00
Chris Lattner
8d06945fff
rename TAI -> MAI, being careful not to make MAILJMP instructions :)
...
llvm-svn: 79777
2009-08-22 21:43:10 +00:00
Chris Lattner
665d8e92a8
revert 79764, my dependencies failed me again.
...
llvm-svn: 79767
2009-08-22 20:56:12 +00:00
Chris Lattner
7416d2bf88
remove dead member.
...
llvm-svn: 79764
2009-08-22 20:50:18 +00:00
Chris Lattner
5d8af49626
Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.
...
llvm-svn: 79763
2009-08-22 20:48:53 +00:00
Chris Lattner
807f58191d
Revert r79563
...
llvm-svn: 79691
2009-08-21 23:12:47 +00:00
Chris Lattner
d657910424
revert r79562 + r79563
...
llvm-svn: 79690
2009-08-21 23:12:15 +00:00
Chris Lattner
9d38bf92f9
revert r79631
...
llvm-svn: 79686
2009-08-21 23:08:45 +00:00
Chris Lattner
d13e92e3f5
revert 79631
...
llvm-svn: 79685
2009-08-21 23:08:09 +00:00
Duncan Sands
faf85e8111
Fix a problem noticed by gcc-4.4:
...
warning: comparison is always true due to limited range of data type.
llvm-svn: 79642
2009-08-21 17:16:10 +00:00
Daniel Dunbar
d71e292ca6
Fix -Asserts warning.
...
llvm-svn: 79636
2009-08-21 16:17:36 +00:00
Sanjiv Gupta
23e2613513
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.
llvm-svn: 79631
2009-08-21 15:22:33 +00:00
Bill Wendling
cc546992dd
Remove #include <iostream>.
...
llvm-svn: 79603
2009-08-21 06:52:44 +00:00
Sanjiv Gupta
e1f6ce48bb
part of the previous commit for PIC16 ISR implementation.
...
llvm-svn: 79563
2009-08-20 19:34:18 +00:00
Sanjiv Gupta
c5522596e7
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.
llvm-svn: 79562
2009-08-20 19:28:24 +00:00
Chris Lattner
9cbc9c2d13
eliminate AsmPrinter::SwitchToSection and just have clients
...
talk to the MCStreamer directly instead.
llvm-svn: 79405
2009-08-19 05:49:37 +00:00
Sanjiv Gupta
2399e49802
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
llvm-svn: 79097
2009-08-15 14:36:48 +00:00
Chris Lattner
aa462f6d51
update for rename.
...
llvm-svn: 79082
2009-08-15 06:14:07 +00:00
Chris Lattner
8101f115c5
rename PIC16Section.h -> MCSectionPIC16.h for consistency with
...
the class it defines.
llvm-svn: 79081
2009-08-15 06:13:40 +00:00
Daniel Dunbar
854120b114
Reapply pieces of 78914 reverted in 78916, this has been fixed.
...
llvm-svn: 78921
2009-08-13 17:08:54 +00:00
Daniel Dunbar
42cd283c34
Remove obsoleted files (from AsmPrinter move)
...
llvm-svn: 78917
2009-08-13 16:57:03 +00:00
Owen Anderson
99061befb3
Revert r78914, as it was breaking the build.
...
llvm-svn: 78916
2009-08-13 16:54:39 +00:00
Sanjiv Gupta
fd1ffc19f9
Move PIC16 AsmPrinter to PIC16/AsmPrinter directory.
...
Remove CooperTargetMachine, as currently only one is supported.
llvm-svn: 78914
2009-08-13 16:37:05 +00:00
Chris Lattner
bd02c60d9e
make PIC16 unique its own sections instead of having mcontext do it.
...
llvm-svn: 78871
2009-08-13 00:26:52 +00:00
Chris Lattner
456301c2cd
some compiler don't get string from TLOF.h implicitly or something.
...
llvm-svn: 78864
2009-08-12 23:53:59 +00:00
Dan Gohman
bc6b14ba00
This void is implicit in C++.
...
llvm-svn: 78848
2009-08-12 22:10:57 +00:00
Chris Lattner
55df534293
Change TargetAsmInfo to be constructed via TargetRegistry from a Target+Triple
...
pair instead of from a virtual method on TargetMachine. This cuts the final
ties of TargetAsmInfo to TargetMachine, meaning that MC can now use
TargetAsmInfo.
llvm-svn: 78802
2009-08-12 07:22:17 +00:00
Owen Anderson
dbf9a912fb
Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first.
...
llvm-svn: 78759
2009-08-12 00:36:31 +00:00
Owen Anderson
48f2f0ae72
Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
...
the latter is capable of representing either a primitive or an extended type.
llvm-svn: 78713
2009-08-11 20:47:22 +00:00
Chris Lattner
30d9c39337
pass the TargetTriple down from each target ctor to the
...
LLVMTargetMachine ctor. It is currently unused.
llvm-svn: 78711
2009-08-11 20:42:37 +00:00
Sanjiv Gupta
239a8992f6
Fixed more problems caused by 78142.
...
Passing of indirect arguments starts after return value on the callee's frame.
llvm-svn: 78635
2009-08-11 01:51:55 +00:00
Owen Anderson
b4bce99769
Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.
...
llvm-svn: 78610
2009-08-10 22:56:29 +00:00
Devang Patel
d56797d16f
Do not rely on magic "llvm.dbg.*" global variable name to find debug info.
...
PIC16 developers, please verify.
llvm-svn: 78603
2009-08-10 22:11:20 +00:00
Owen Anderson
dcb47bda67
Start moving TargetLowering away from using full MVTs and towards SimpleValueType, which will simplify the privatization of IntegerType in the future.
...
llvm-svn: 78584
2009-08-10 18:56:59 +00:00
Chris Lattner
7ee4b3a2c0
fix some warnings for the MSVC build, by Yonggang Luo!
...
llvm-svn: 78571
2009-08-10 17:35:42 +00:00
Chris Lattner
9e2c3aa666
sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
...
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)
llvm-svn: 78517
2009-08-08 23:39:42 +00:00
Chris Lattner
2849883bd5
1. Make MCSection an abstract class.
...
2. Move section switch printing to MCSection virtual method which takes a
TAI. This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and
TLOFELF::AtIsCommentChar.
llvm-svn: 78510
2009-08-08 22:41:53 +00:00
Chris Lattner
8329a281b2
add new PIC16Section class, this time hopefully not breaking the build :)
...
llvm-svn: 78505
2009-08-08 21:37:01 +00:00
Daniel Dunbar
e5e5b0a1bd
Revert r78501, it doesn't build.
...
--- Reverse-merging r78501 into '.':
U lib/Target/PIC16/PIC16TargetObjectFile.cpp
D lib/Target/PIC16/PIC16Section.h
llvm-svn: 78503
2009-08-08 21:12:40 +00:00
Chris Lattner
a9f2648ef6
make PIC16 create its own custom MCSection.
...
llvm-svn: 78501
2009-08-08 20:55:25 +00:00
Chris Lattner
0dabef30f5
give pic16 a target-specific section creation name too
...
llvm-svn: 78496
2009-08-08 20:23:47 +00:00