Sanjiv Gupta
0457bf4420
Banksel immediate constant will always immediately follow the GA/ES, so scan an insn from beginnin to find out the banksel operand.
...
llvm-svn: 69883
2009-04-23 10:34:58 +00:00
Sanjiv Gupta
60c6705684
Make the function begin label start after ther data pointer.
...
The address of data frame for function can be obtained by subtracting 2 from the function begin label.
llvm-svn: 69801
2009-04-22 12:02:36 +00:00
Sanjiv Gupta
30ea654901
Handle direct aggregate type arguments.
...
llvm-svn: 69665
2009-04-21 05:54:51 +00:00
Daniel Dunbar
6326c97515
Remove unused variable.
...
llvm-svn: 69624
2009-04-20 20:34:38 +00:00
Sanjiv Gupta
44b55dc966
Emit the auto variables of a function into a different section than parameters.
...
llvm-svn: 69605
2009-04-20 16:59:35 +00:00
Sanjiv Gupta
b03b007054
Handle aggregate type arguments to direct and indirect calls.
...
llvm-svn: 69022
2009-04-14 02:49:52 +00:00
Sanjiv Gupta
04a7716d62
While passing arg of types larger than char only one byte at lower end was getting passed. We couldn't catch this as we did not have tests that were passing an int value larger than 256.
...
llvm-svn: 68946
2009-04-13 09:38:38 +00:00
Sanjiv Gupta
6962a75641
Added code to handle spilling and reloading of FSRs.
...
llvm-svn: 68783
2009-04-10 15:10:14 +00:00
Sanjiv Gupta
14c26ced49
The way we are trying to figure out banksel immediate operand may yield different results for different type of insns. This will eventually need to be changed but currently let us prevent the crash in cases of incorrect detection of banksel operand.
...
llvm-svn: 68713
2009-04-09 17:06:24 +00:00
Sanjiv Gupta
daa922501d
Arguments to indirect calls were being passed incorrectly. They are not fixed to start after return value.
...
llvm-svn: 68705
2009-04-09 10:29:32 +00:00
Sanjiv Gupta
3baf157321
r68576 unconverd a bug in PIC16 port (Thanks to Dan Gohman) where we were custom lowering an ADD to ADDC.
...
llvm-svn: 68671
2009-04-09 04:03:43 +00:00
Sanjiv Gupta
8830b56cba
Emit .line debug directives for stoppoints. The debug location is retrieved by the MachineInstr itself, rather than by custom handling the DBG_STOPPOINT nodes.
...
llvm-svn: 68602
2009-04-08 06:24:04 +00:00
Sanjiv Gupta
bbb78a0034
Handle indirect function calls.
...
Every function has the address of its frame in the beginning of code section.
The frame address is retrieved and used to pass arguments.
llvm-svn: 68597
2009-04-08 05:38:48 +00:00
Sanjiv Gupta
14d86f7755
Map stack based frameindices for spills to zero based indices that can be accessed based on an external symbol defining the location of temporary data for a function. For example: we have spill slots addressed as foo.tmp + 0, foo.tmp + 1 etc.
...
llvm-svn: 68442
2009-04-06 10:54:50 +00:00
Sanjiv Gupta
7ec088a3de
Fixed build warnings.
...
llvm-svn: 68333
2009-04-02 18:33:12 +00:00
Sanjiv Gupta
01fb90085c
To convert the StopPoint insn into an assembler directive by ISel, we need to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize.
...
llvm-svn: 68329
2009-04-02 18:03:10 +00:00
Sanjiv Gupta
1555a0a503
Params are not being generated as static globals now. The caller passes them onto the callee's stack directly and the callee loads the argvals from its own stack. Clang generated frameindexes validatd by recalculating the stack as if all frameindexes represent 1-byte slots.
...
llvm-svn: 68327
2009-04-02 17:42:00 +00:00
Evan Cheng
3a7489a4cc
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
...
llvm-svn: 67668
2009-03-25 01:47:28 +00:00
Sanjiv Gupta
d5c51dc50c
Fixed comment for libcalls.
...
llvm-svn: 67373
2009-03-20 14:10:20 +00:00
Sanjiv Gupta
19dc27b7cf
Reformatting. Inserted code comments. Cleaned interfaces.
...
Removed unncessary code. No functionality change.
llvm-svn: 67371
2009-03-20 13:42:20 +00:00
Sanjiv Gupta
09e6929cc5
Forgot to check-in this as part of 7761.
...
llvm-svn: 66763
2009-03-12 03:20:07 +00:00
Sanjiv Gupta
85826620f1
Banksel optimization is now based on the section names of symbols, since the symbols in one section will always be put into one bank.
...
llvm-svn: 66761
2009-03-12 02:10:45 +00:00
Sanjiv Gupta
766590cde2
Mark the Defs and Uses of STATUS register correctly, plus some reformatting.
...
llvm-svn: 66540
2009-03-10 10:35:34 +00:00
Bill Wendling
9d4eb136da
Overhaul my earlier submission due to feedback. It's a large patch, but most of
...
them are generic changes.
- Use the "fast" flag that's already being passed into the asm printers instead
of shoving it into the DwarfWriter.
- Instead of calling "MI->getParent()->getParent()" for every MI, set the
machine function when calling "runOnMachineFunction" in the asm printers.
llvm-svn: 65379
2009-02-24 08:30:20 +00:00
Bill Wendling
306b992133
Put code that generates debug labels into TableGen so that it can be used by
...
everyone.
llvm-svn: 64978
2009-02-18 23:12:06 +00:00
Dale Johannesen
9c596981ed
Remove refs to non-DebugLoc version of BuildMI from XCore, PIC16.
...
llvm-svn: 64432
2009-02-13 02:29:03 +00:00
Bill Wendling
d31cb3d5aa
Move debug loc info along when the spiller creates new instructions.
...
llvm-svn: 64342
2009-02-12 00:02:55 +00:00
Sanjiv Gupta
abf1d4e9db
Function temporaries can not overlap with retval or args.See the comment in source code to know the reason. Anything having .auto. in its name is local to a function in nature irrespective of the linkage specified. print static local variables in module level IDATA section.
...
llvm-svn: 64199
2009-02-10 04:20:26 +00:00
Dan Gohman
4105a38248
Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowing
...
ScheduleDAG's TLI member to use const.
llvm-svn: 64018
2009-02-07 16:15:20 +00:00
Dale Johannesen
a259483aae
Get rid of the last non-DebugLoc versions of getNode!
...
Many targets build placeholder nodes for special operands, e.g.
GlobalBaseReg on X86 and PPC for the PIC base. There's no
sensible way to associate debug info with these. I've left
them built with getNode calls with explicit DebugLoc::getUnknownLoc operands.
I'm not too happy about this but don't see a good improvement;
I considered adding a getPseudoOperand or something, but it
seems to me that'll just make it harder to read.
llvm-svn: 63992
2009-02-07 00:55:49 +00:00
Dale Johannesen
1580ab6b7f
Remove more non-DebugLoc getNode variants. Use
...
getCALLSEQ_{END,START} to permit passing no DebugLoc
there. UNDEF doesn't logically have DebugLoc; add
getUNDEF to encapsulate this.
llvm-svn: 63978
2009-02-06 23:05:02 +00:00
Dale Johannesen
c405486235
Remove more non-DebugLoc versions of getNode.
...
llvm-svn: 63969
2009-02-06 21:50:26 +00:00
Sanjiv Gupta
90fd43f44d
Print globl directive for variables with external linkage (global variables).
...
llvm-svn: 63943
2009-02-06 18:24:59 +00:00
Dale Johannesen
e95c76b65e
Get rid of one more non-DebugLoc getNode and
...
its corresponding getTargetNode. Lots of
caller changes.
llvm-svn: 63904
2009-02-06 01:31:28 +00:00
Dale Johannesen
c901d013fb
Get rid of 3 non-DebugLoc getNode variants.
...
llvm-svn: 63808
2009-02-05 01:01:16 +00:00
Dale Johannesen
c2896f9310
Remove non-DebugLoc versions of getMergeValues, ZeroExtendInReg.
...
llvm-svn: 63800
2009-02-05 00:20:09 +00:00
Dale Johannesen
2c4af04551
Remove a few non-DebugLoc versions of node creation
...
functions.
llvm-svn: 63703
2009-02-04 01:17:06 +00:00
Sanjiv Gupta
c47a19b23e
Made the common case of default address space directive as non-virtual for performance reasons. Provide a single virtual interface for directives of all sizes in non-default address spaces.
...
llvm-svn: 63521
2009-02-02 16:53:06 +00:00
Dale Johannesen
39738b1ff8
Make LowerCallTo and LowerArguments take a DebugLoc
...
argument. Adjust all callers and overloaded versions.
llvm-svn: 63444
2009-01-30 23:10:59 +00:00
Sanjiv Gupta
11d082d56e
Fixed the comment. No functionality change.
...
llvm-svn: 63387
2009-01-30 09:01:44 +00:00
Sanjiv Gupta
b4cf873468
Use sublw for comparison with literals instead of subwf.
...
llvm-svn: 63382
2009-01-30 07:55:25 +00:00
Sanjiv Gupta
e442452ade
Enable emitting of constant values in non-default address space as well. The APIs emitting constants now take an additional parameter signifying the address space in which to emit. The APIs like getData8BitsDirective() etc are made virtual enabling targets to be able to define appropirate directivers for various sizes and address spaces.
...
llvm-svn: 63377
2009-01-30 04:25:10 +00:00
Sanjiv Gupta
ebef67f13c
Fixed build warnings. Restoring changes done in 62600, they were lost in 62655.
...
llvm-svn: 62681
2009-01-21 09:02:46 +00:00
Duncan Sands
392dc77fc6
Cleanup whitespace and comments, and tweak some
...
prototypes, in operand type legalization. No
functionality change.
llvm-svn: 62680
2009-01-21 09:00:29 +00:00
Sanjiv Gupta
37fdb5ca11
Implement LowerOperationWrapper for legalizer.
...
Also a few signed comparison fixes.
llvm-svn: 62665
2009-01-21 05:44:05 +00:00
Evan Cheng
b3c82db63d
Change TargetInstrInfo::isMoveInstr to return source and destination sub-register indices as well.
...
llvm-svn: 62600
2009-01-20 19:12:24 +00:00
Dan Gohman
6fcee67989
Move a few containers out of ScheduleDAGInstrs::BuildSchedGraph
...
and into the ScheduleDAGInstrs class, so that they don't get
destructed and re-constructed for each block. This fixes a
compile-time hot spot in the post-pass scheduler.
To help facilitate this, tidy and do some minor reorganization
in the scheduler constructor functions.
llvm-svn: 62275
2009-01-15 19:20:50 +00:00
Sanjiv Gupta
b712a41535
Checking in conditionals, function call, arrays and libcalls implementation.
...
llvm-svn: 62174
2009-01-13 19:18:47 +00:00
Duncan Sands
bcdbfb63dc
Rename getABITypeSize to getTypePaddedSize, as
...
suggested by Chris.
llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Misha Brukman
71c7e40966
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00