Mike Stump
25bbcc67fa
Make the buildbot see green (to make it easier to spot the next person
...
that puts a new warning in).
llvm-svn: 72797
2009-06-03 19:07:46 +00:00
Sanjiv Gupta
215921ef94
Emit file directives correctly in case of a .bc is generated by llvm-ld after linking in several .bc files.
...
llvm-svn: 72781
2009-06-03 16:27:49 +00:00
Sanjiv Gupta
b011aa3a5e
FrameIndex could be used as a value (addressof (arg)) or as an address.
...
Expand it exactly like GlobalAddress.
Fix some more crashes (InsertBranch() not being implemented) for compiling hitec libs.
llvm-svn: 72776
2009-06-03 15:31:12 +00:00
Sanjiv Gupta
a53241a880
Fixed a bug in which signed comparisons were being used instead of unsigned comparisons.
...
llvm-svn: 72771
2009-06-03 13:36:44 +00:00
Dale Johannesen
ff10450680
Comment grammaro/clarification.
...
llvm-svn: 72706
2009-06-01 23:13:42 +00:00
Bill Wendling
09f17a8479
Untabification.
...
llvm-svn: 72604
2009-05-30 01:09:53 +00:00
Sanjiv Gupta
ae028d48be
Emit debug info for locals with proper scope.
...
llvm-svn: 72531
2009-05-28 18:24:11 +00:00
Sanjiv Gupta
fc4707a331
Mark the branch insns correctly.
...
llvm-svn: 72529
2009-05-28 17:32:56 +00:00
Sanjiv Gupta
335311c67a
Fixing problems that got exposed after the refactoring of LegalizeDAG done in 72447.
...
llvm-svn: 72521
2009-05-28 06:59:57 +00:00
Anton Korobeynikov
08bf4c0f5a
Propagate CPU string out of SubtargetFeatures
...
llvm-svn: 72335
2009-05-23 19:50:50 +00:00
Oscar Fuentes
770c8e7927
CMake: Use libpthread in tblgen when needed. Updated list of source
...
files for PIC16 target.
llvm-svn: 72277
2009-05-22 20:55:15 +00:00
Sanjiv Gupta
43becc23c2
Emit debug information for globals (which include automatic variables as well because on PIC16 they are emitted as globals by the frontend).
...
llvm-svn: 72262
2009-05-22 13:58:45 +00:00
Bill Wendling
f7b83c7ae7
Change MachineInstrBuilder::addReg() to take a flag instead of a list of
...
booleans. This gives a better indication of what the "addReg()" is
doing. Remembering what all of those booleans mean isn't easy, especially if you
aren't spending all of your time in that code.
I took Jakob's suggestion and made it illegal to pass in "true" for the
flag. This should hopefully prevent any unintended misuse of this (by reverting
to the old way of using addReg()).
llvm-svn: 71722
2009-05-13 21:33:08 +00:00
Sanjiv Gupta
4a71ae268b
Run through the list of globals once and sectionize all types of globlas includeing declarations. Later emit them from their section lists.
...
llvm-svn: 71661
2009-05-13 15:13:17 +00:00
Sanjiv Gupta
83adfb4a9f
Iterate over globals once and sectionize them into appropriate sections.
...
Later in asmprinter, go over thsese sections and print them.
Do not print empty sections.
llvm-svn: 71560
2009-05-12 17:07:27 +00:00
Sanjiv Gupta
679e578c65
We do not need to create a label for external defs and decls,
...
just emit a comment for readability.
llvm-svn: 71544
2009-05-12 06:52:41 +00:00
Sanjiv Gupta
63f5f68024
Mark mayLoad, mayStore for insns correctly and use them
...
to check if an insn is accessing memory during mem sel optimization.
llvm-svn: 71537
2009-05-12 04:30:38 +00:00
Sanjiv Gupta
ea5a8d8808
Fix more naming issues.
...
compiler libcalls start with .lib. now.
fixed section names.
llvm-svn: 71424
2009-05-11 08:52:04 +00:00
Sanjiv Gupta
9d175c15e7
Detect calls to compiler intrinsics and emit an extern declarations
...
only for those. These extern declarations to intrinsics are currently
being emitted at the bottom of generated .s file, which works fine with
gpasm(not sure about MPSAM though).
PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any
extern declarations (even if no intrinsics are being used), but that
needs to be fixed in the linker itself.
llvm-svn: 71423
2009-05-11 06:01:38 +00:00
Sanjiv Gupta
004192bde3
Module iterator contains list of filescope functions as well, we don't need to emit and global declarations for them. This was working earlier and was broken during one of the recent commit for PIC16 naming.
...
llvm-svn: 71394
2009-05-10 16:18:39 +00:00
Sanjiv Gupta
258f851629
Changed lowering and asmprinter to use ABI Names class called PAN.
...
llvm-svn: 71386
2009-05-10 05:23:47 +00:00
Duncan Sands
af9eaa830a
Rename PaddedSize to AllocSize, in the hope that this
...
will make it more obvious what it represents, and stop
it being confused with the StoreSize.
llvm-svn: 71349
2009-05-09 07:06:46 +00:00
Sanjiv Gupta
3033816c80
Use 16 bit arithmetic while retrieving the address of callee's frame during indirect function calls, and set pclath before every call to retrieve the frame address.
...
llvm-svn: 71323
2009-05-09 05:11:19 +00:00
Nick Lewycky
2f6bddd2b1
Add missing #include for "strlen" which is used inline in this header. Fixes
...
build under gcc 4.3.
llvm-svn: 71208
2009-05-08 06:22:25 +00:00
Sanjiv Gupta
89e72b9c4a
Moved pic16 naming functions to correct place.
...
No functionality change.
llvm-svn: 71207
2009-05-08 04:50:14 +00:00
Evan Cheng
a55d46100e
Eliminate compiler warnings.
...
llvm-svn: 71149
2009-05-07 05:31:56 +00:00
Oscar Fuentes
364f3efa53
CMake: Updated lib/Target/PIC16/CMakeLists.txt.
...
llvm-svn: 71115
2009-05-06 20:40:05 +00:00
Sanjiv Gupta
960ae0660b
Emit banksel and movlp instructions.
...
Split large global data (both initialized and un-initialized) into multiple sections of <= 80 bytes.
Provide routines to manage PIC16 ABI naming conventions.
llvm-svn: 71073
2009-05-06 08:02:01 +00:00
Bill Wendling
026e5d7667
Instead of passing in an unsigned value for the optimization level, use an enum,
...
which better identifies what the optimization is doing. And is more flexible for
future uses.
llvm-svn: 70440
2009-04-29 23:29:43 +00:00
Sanjiv Gupta
ccd30945f9
Add a public method called getAddressSpace() to the GlobalAddressSDNode.
...
llvm-svn: 70366
2009-04-29 04:43:24 +00:00
Bill Wendling
084669a1c9
Second attempt:
...
Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.
Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'll change the JIT with a follow-up patch.
llvm-svn: 70343
2009-04-29 00:15:41 +00:00
Sanjiv Gupta
7bfed8a9f4
GlobalValue is always pointer type, so an assert isn't required.
...
llvm-svn: 70300
2009-04-28 16:39:45 +00:00
Bill Wendling
56f2987a87
r70270 isn't ready yet. Back this out. Sorry for the noise.
...
llvm-svn: 70275
2009-04-28 01:04:53 +00:00
Bill Wendling
d0ae15946c
Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
...
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.
Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...
llvm-svn: 70270
2009-04-28 00:21:31 +00:00
Sanjiv Gupta
5058f240d9
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
107b2818ce
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
3e3ef7c4d9
Handle direct aggregate type arguments.
...
llvm-svn: 69665
2009-04-21 05:54:51 +00:00
Daniel Dunbar
2c441c6afe
Remove unused variable.
...
llvm-svn: 69624
2009-04-20 20:34:38 +00:00
Sanjiv Gupta
0fcc019d36
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
92bb846e2b
Handle aggregate type arguments to direct and indirect calls.
...
llvm-svn: 69022
2009-04-14 02:49:52 +00:00
Sanjiv Gupta
0368bc4703
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
638f400a3c
Added code to handle spilling and reloading of FSRs.
...
llvm-svn: 68783
2009-04-10 15:10:14 +00:00
Sanjiv Gupta
38533d48dd
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
60fd2cd503
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
cdfdc79b70
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
44ea053a49
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
4b489c75c2
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
0b08df8c09
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
e9cff3328f
Fixed build warnings.
...
llvm-svn: 68333
2009-04-02 18:33:12 +00:00
Sanjiv Gupta
cc841a3810
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