Torok Edwin
56d0659726
assert(0) -> LLVM_UNREACHABLE.
...
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Richard Pennington
9f3bd4a728
bug 4524: Add MSP430 to the cmake build.
...
llvm-svn: 75170
2009-07-09 20:27:09 +00:00
Owen Anderson
0504e0a222
Thread LLVMContext through MVT and related parts of SDISel.
...
llvm-svn: 75153
2009-07-09 17:57:24 +00:00
Torok Edwin
fb8d6d5b58
Implement changes from Chris's feedback.
...
Finish converting lib/Target.
llvm-svn: 75043
2009-07-08 20:53:28 +00:00
Torok Edwin
fa04002254
Convert more abort() calls to llvm_report_error().
...
Also remove trailing semicolon.
llvm-svn: 75027
2009-07-08 19:04:27 +00:00
Duncan Sands
075276e9ce
Silence warning when building without assertions.
...
llvm-svn: 74777
2009-07-03 16:06:07 +00:00
Bill Wendling
512ff7353e
Update comments to make it clear that the function alignment is the Log2 of the
...
bytes and not bytes.
llvm-svn: 74624
2009-07-01 18:50:55 +00:00
Daniel Dunbar
75c12e1569
Remove unused AsmPrinter OptLevel argument, and propogate.
...
- This more or less amounts to a revert of r65379. I'm curious to know what
happened that caused this variable to become unused.
llvm-svn: 74579
2009-07-01 01:48:54 +00:00
Bill Wendling
31ceb1bcba
Add an "alignment" field to the MachineFunction object. It makes more sense to
...
have the alignment be calculated up front, and have the back-ends obey whatever
alignment is decided upon.
This allows for future work that would allow for precise no-op placement and the
like.
llvm-svn: 74564
2009-06-30 22:38:32 +00:00
Bob Wilson
5a495fea07
Provide InitializeAllTargets and InitializeNativeTarget functions in the
...
C bindings. Change all the backend "Initialize" functions to have C linkage.
Change the "llvm/Config/Targets.def" header to use C-style comments to avoid
compile warnings.
llvm-svn: 74026
2009-06-23 23:59:40 +00:00
Douglas Gregor
1b731d5dbe
Introduce new headers whose inclusion forces linking and
...
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.
llvm-svn: 73543
2009-06-16 20:12:29 +00:00
Dan Gohman
d185a7a629
Add explicit keywords.
...
llvm-svn: 72969
2009-06-05 23:05:51 +00:00
Anton Korobeynikov
08bf4c0f5a
Propagate CPU string out of SubtargetFeatures
...
llvm-svn: 72335
2009-05-23 19:50:50 +00:00
Anton Korobeynikov
6de08cd093
Mark rotl/rotr as expand. This generates pretty ugly code, but this is better than nothing.
...
llvm-svn: 71976
2009-05-17 10:16:28 +00:00
Anton Korobeynikov
6b5523aec2
Typo
...
llvm-svn: 71975
2009-05-17 10:15:22 +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
Anton Korobeynikov
3c8e0c52d7
Add imm-reg and imm-mem patters for cmp on msp430
...
(imm is allowed to be source operand, not dest...)
llvm-svn: 71393
2009-05-10 14:49:00 +00:00
Anton Korobeynikov
ea618dd0ba
Allow 8 bit select in custom inserter
...
llvm-svn: 71239
2009-05-08 18:51:21 +00:00
Anton Korobeynikov
1484cfe945
Expand UREM / SREM into libcalls
...
llvm-svn: 71236
2009-05-08 18:50:41 +00:00
Anton Korobeynikov
c3e1b392ae
Add 8 bit select
...
llvm-svn: 71235
2009-05-08 18:50:26 +00:00
Dan Gohman
630f4e1eb3
Trim unnecessary #includes.
...
llvm-svn: 70880
2009-05-04 17:11:06 +00:00
Anton Korobeynikov
4ff60e0cc2
Handle implicit zext in a better way. Shamelessly stolen from x86 backend.
...
Thanks for Dan Gohman for suggestion!
llvm-svn: 70782
2009-05-03 15:50:18 +00:00
Anton Korobeynikov
1324f810d7
Update due to mainline API change
...
llvm-svn: 70769
2009-05-03 13:19:42 +00:00
Anton Korobeynikov
d089ef1003
Add TODO list :)
...
llvm-svn: 70768
2009-05-03 13:19:24 +00:00
Anton Korobeynikov
47fcd72e24
Make handling of conditional stuff much more straightforward
...
llvm-svn: 70767
2009-05-03 13:19:09 +00:00
Anton Korobeynikov
dedfa00ba1
Temporary disable imm patterns for cmp. Actually, all cmp-related stuff (select_cc, setcc, br_cc). needs to be rethought
...
llvm-svn: 70766
2009-05-03 13:18:50 +00:00
Anton Korobeynikov
eb2152f753
Expand divisions into libcalls
...
llvm-svn: 70765
2009-05-03 13:18:33 +00:00
Anton Korobeynikov
29747e9c26
Custom lower SIGN_EXTEND
...
llvm-svn: 70763
2009-05-03 13:17:49 +00:00
Anton Korobeynikov
3c48ea7dbe
Some eye-candy
...
llvm-svn: 70762
2009-05-03 13:17:31 +00:00
Anton Korobeynikov
48e21c57f1
Print function header / footer
...
llvm-svn: 70761
2009-05-03 13:17:11 +00:00
Anton Korobeynikov
8847e3e554
Fix printing: je => jeq
...
llvm-svn: 70760
2009-05-03 13:16:54 +00:00
Anton Korobeynikov
f3a6bc8562
Add 8bit shifts
...
llvm-svn: 70759
2009-05-03 13:16:37 +00:00
Anton Korobeynikov
61763b532a
Handle logical shift right (at least I hope so :) )
...
llvm-svn: 70758
2009-05-03 13:16:17 +00:00
Anton Korobeynikov
20a91130ce
Handle anyext
...
llvm-svn: 70757
2009-05-03 13:15:57 +00:00
Anton Korobeynikov
e31559576f
Expand all sorts of indirect branches
...
llvm-svn: 70755
2009-05-03 13:15:40 +00:00
Anton Korobeynikov
41917df643
Add InsertBranch() hook for tail mergeing
...
llvm-svn: 70754
2009-05-03 13:15:22 +00:00
Anton Korobeynikov
4b0a0f18fb
Implement bswap
...
llvm-svn: 70753
2009-05-03 13:15:03 +00:00
Anton Korobeynikov
ba0e81d4b2
Properly handle ExternalSymbol's
...
llvm-svn: 70752
2009-05-03 13:14:46 +00:00
Anton Korobeynikov
de60d1caef
Expand muls (all mulls!) to libcalls for now
...
llvm-svn: 70751
2009-05-03 13:14:25 +00:00
Anton Korobeynikov
0da755ee3e
Provide addc and subc
...
llvm-svn: 70748
2009-05-03 13:13:34 +00:00
Anton Korobeynikov
a3f7a83ad8
Add left shift
...
llvm-svn: 70747
2009-05-03 13:13:17 +00:00
Anton Korobeynikov
aa43d0b182
Add direct branch
...
llvm-svn: 70746
2009-05-03 13:12:58 +00:00
Anton Korobeynikov
24bfb51416
It's error-prone to maintain two separate variants of asmprinting stuff, one of which is even used. Drop second (aka 'intel') variant of operands. It can be added later, if needed.
...
llvm-svn: 70745
2009-05-03 13:12:37 +00:00
Anton Korobeynikov
b6321e15f7
Lower select with custom inserted and make condjumps generic
...
llvm-svn: 70744
2009-05-03 13:12:23 +00:00
Anton Korobeynikov
962720129d
Add first draft for conditions, conditional branches, etc
...
llvm-svn: 70743
2009-05-03 13:12:06 +00:00
Anton Korobeynikov
aa51bff808
Hanle i8 returns
...
llvm-svn: 70742
2009-05-03 13:11:48 +00:00
Anton Korobeynikov
7212c15e70
Small tweaking
...
llvm-svn: 70741
2009-05-03 13:11:35 +00:00
Anton Korobeynikov
f2b50994ca
Add prologue/epilogue emission. Fix frame pointer handling.
...
llvm-svn: 70740
2009-05-03 13:11:20 +00:00
Anton Korobeynikov
1af0b61e7c
Add code for save/restore of callee-saved registers
...
llvm-svn: 70739
2009-05-03 13:11:04 +00:00
Anton Korobeynikov
b85f4ec819
Two more hooks for RA and FP registers
...
llvm-svn: 70738
2009-05-03 13:10:40 +00:00
Anton Korobeynikov
7784ae9a6f
Proper handle loading of effective address of stack slot stuff
...
llvm-svn: 70737
2009-05-03 13:10:26 +00:00
Anton Korobeynikov
0d1234fd69
Match frame indexes
...
llvm-svn: 70736
2009-05-03 13:10:11 +00:00
Anton Korobeynikov
f6af822c76
First draft of stack slot loads / stores lowering
...
llvm-svn: 70735
2009-05-03 13:09:57 +00:00
Anton Korobeynikov
ed65671768
Reverse order of memory arguments
...
llvm-svn: 70734
2009-05-03 13:09:40 +00:00
Anton Korobeynikov
04888305f6
Remove bogus pattern
...
llvm-svn: 70733
2009-05-03 13:09:24 +00:00
Anton Korobeynikov
6399a3d628
Correct asmprinting of memory operands
...
llvm-svn: 70732
2009-05-03 13:09:10 +00:00
Anton Korobeynikov
a3bce28ae0
Match wrapper node for address
...
llvm-svn: 70731
2009-05-03 13:08:51 +00:00
Anton Korobeynikov
cfc97056e7
Add lowering for global address nodes. Not pretty efficient though.
...
llvm-svn: 70730
2009-05-03 13:08:33 +00:00
Anton Korobeynikov
b5613928f5
Some early full call lowering draft for direct calls
...
llvm-svn: 70729
2009-05-03 13:08:13 +00:00
Anton Korobeynikov
ec3f0b3f9d
Add call frame setup instruction elimination and lowerid for bunch of call-related stuff.
...
llvm-svn: 70728
2009-05-03 13:07:54 +00:00
Anton Korobeynikov
5613510c81
Add CALL lowering.
...
llvm-svn: 70727
2009-05-03 13:07:31 +00:00
Anton Korobeynikov
c995ddd017
Add bunch of mem-whatever patterns
...
llvm-svn: 70726
2009-05-03 13:07:10 +00:00
Anton Korobeynikov
f702a0085c
Add bunch of reg-mem inst patterns
...
llvm-svn: 70725
2009-05-03 13:06:46 +00:00
Anton Korobeynikov
ed1c3dfa0f
Add normal and trunc stores
...
llvm-svn: 70724
2009-05-03 13:06:26 +00:00
Anton Korobeynikov
31ecd23a9e
Basic support for mem=>reg moves
...
llvm-svn: 70723
2009-05-03 13:06:03 +00:00
Anton Korobeynikov
80a73e7d8b
Add 8-bit insts. zext behaviour is not modelled yet
...
llvm-svn: 70722
2009-05-03 13:05:42 +00:00
Anton Korobeynikov
b900245e13
Add 8-bit regclass and pattern for sext_inreg
...
llvm-svn: 70721
2009-05-03 13:05:22 +00:00
Anton Korobeynikov
b638fb10f5
Add pattern for OR
...
llvm-svn: 70720
2009-05-03 13:05:00 +00:00
Anton Korobeynikov
654cb0a761
Add reg-imm variants
...
llvm-svn: 70719
2009-05-03 13:04:41 +00:00
Anton Korobeynikov
37709c3584
Add hint to nop
...
llvm-svn: 70718
2009-05-03 13:04:23 +00:00
Anton Korobeynikov
6339db830e
Add more instructions
...
llvm-svn: 70717
2009-05-03 13:04:06 +00:00
Anton Korobeynikov
e32c817d2c
Cleanup
...
llvm-svn: 70716
2009-05-03 13:03:50 +00:00
Anton Korobeynikov
15a515b1af
Add dummy lowering for shifts
...
llvm-svn: 70715
2009-05-03 13:03:33 +00:00
Anton Korobeynikov
55a085b539
We don't have any div at all - thus mark it as expensive
...
llvm-svn: 70714
2009-05-03 13:03:14 +00:00
Anton Korobeynikov
abb51755c8
We're not going to spend 100% of time in interrupts, do we? :)
...
llvm-svn: 70713
2009-05-03 13:02:57 +00:00
Anton Korobeynikov
8a17dff7d0
Add simple reg-reg add.
...
llvm-svn: 70712
2009-05-03 13:02:39 +00:00
Anton Korobeynikov
6ff6fc95a0
gas uses lower letter for register names
...
llvm-svn: 70711
2009-05-03 13:02:22 +00:00
Anton Korobeynikov
d7afd69e3b
Add code enough for emission of reg-reg and reg-imm moves. This allows us to compile "ret i16 0" properly!
...
llvm-svn: 70710
2009-05-03 13:02:04 +00:00
Anton Korobeynikov
c942782b3b
Add function body printing routine
...
llvm-svn: 70709
2009-05-03 13:01:41 +00:00
Anton Korobeynikov
ef811d8e05
Add 'msp430' target triple recognizer
...
llvm-svn: 70708
2009-05-03 13:01:23 +00:00
Anton Korobeynikov
a9b7df98e6
Make emit{Prologue,Epilogue}() noop for now
...
llvm-svn: 70707
2009-05-03 13:01:04 +00:00
Anton Korobeynikov
69f51f0b41
Add callee-saved regs & reg classes getter hooks
...
llvm-svn: 70706
2009-05-03 13:00:46 +00:00
Anton Korobeynikov
efcd5aa381
Add simple FP indicator for given function hook
...
llvm-svn: 70705
2009-05-03 13:00:28 +00:00
Anton Korobeynikov
c10f98ace3
Provide set of reserved registers
...
llvm-svn: 70704
2009-05-03 13:00:11 +00:00
Anton Korobeynikov
7bfc3ea2ee
Add proper ISD::RET lowering
...
llvm-svn: 70703
2009-05-03 12:59:50 +00:00
Anton Korobeynikov
3849be6ca1
Add first draft of MSP430 calling convention stuff and draft of ISD::FORMAL_ARGUMENTS node lowering.
...
llvm-svn: 70702
2009-05-03 12:59:33 +00:00
Anton Korobeynikov
77e5a11ec2
Fix register names, fix register allocation order, handle frame pointer.
...
llvm-svn: 70701
2009-05-03 12:59:16 +00:00
Anton Korobeynikov
64717bbc14
Clearify the usage and add some debug stuff
...
llvm-svn: 70700
2009-05-03 12:58:58 +00:00
Anton Korobeynikov
e10f69a8a7
Cleanup
...
llvm-svn: 70699
2009-05-03 12:58:40 +00:00
Anton Korobeynikov
128e8a188f
Add cmake script. No idea whether it works or not :)
...
llvm-svn: 70698
2009-05-03 12:58:22 +00:00
Anton Korobeynikov
4130a7c1e7
Add a note
...
llvm-svn: 70697
2009-05-03 12:58:05 +00:00
Anton Korobeynikov
7c4db99df3
Typo
...
llvm-svn: 70695
2009-05-03 12:57:47 +00:00
Anton Korobeynikov
101380015c
Dummy MSP430 backend
...
llvm-svn: 70694
2009-05-03 12:57:15 +00:00