Commit Graph

30 Commits

Author SHA1 Message Date
Evan Cheng 6f36a083ef Revert 95130.
llvm-svn: 95160
2010-02-02 23:55:14 +00:00
Evan Cheng c1b0116ff1 Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.
llvm-svn: 95130
2010-02-02 21:29:10 +00:00
Evan Cheng 67a69dd2ed Eliminate target hook IsEligibleForTailCallOptimization.
Target independent isel should always pass along the "tail call" property. Change
target hook LowerCall's parameter "isTailCall" into a refernce. If the target
decides it's impossible to honor the tail call request, it should set isTailCall
to false to make target independent isel happy.

llvm-svn: 94626
2010-01-27 00:07:07 +00:00
Anton Korobeynikov a6450df92a zext / truncate is free on msp430. Inform codegen about this.
llvm-svn: 93556
2010-01-15 21:19:43 +00:00
Anton Korobeynikov d8f320947f Implement variable-width shifts.
No testcase yet - it seems we're exposing generic codegen bugs.

llvm-svn: 91221
2009-12-12 18:55:37 +00:00
Anton Korobeynikov e27e028cdd Lower setcc branchless, if this is profitable.
Based on the patch by Brian Lucas!

llvm-svn: 91175
2009-12-11 23:01:29 +00:00
Anton Korobeynikov ff4ab51400 Add lowering of returnaddr and frameaddr intrinsics. Shamelessly stolen from x86 :)
llvm-svn: 90740
2009-12-07 02:28:10 +00:00
Anton Korobeynikov b4be8ce537 Initial codegen support for MSP430 ISRs
llvm-svn: 90739
2009-12-07 02:27:53 +00:00
Anton Korobeynikov d3c8319f48 Add some dummy support for post-incremented loads
llvm-svn: 86385
2009-11-07 17:15:06 +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
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
Anton Korobeynikov a0e01bec87 Add dummy inline asm handling for 'r' constraint. This fixes PR4778
llvm-svn: 80085
2009-08-26 13:44:29 +00:00
Dan Gohman f9bbcd1afd Major calling convention code refactoring.
Instead of awkwardly encoding calling-convention information with ISD::CALL,
ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering
provides three virtual functions for targets to override:
LowerFormalArguments, LowerCall, and LowerRet, which replace the custom
lowering done on the special nodes. They provide the same information, but
in a more immediately usable format.

This also reworks much of the target-independent tail call logic. The
decision of whether or not to perform a tail call is now cleanly split
between target-independent portions, and the target dependent portion
in IsEligibleForTailCallOptimization.

This also synchronizes all in-tree targets, to help enable future
refactoring and feature work.

llvm-svn: 78142
2009-08-05 01:29:28 +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
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
Anton Korobeynikov 47fcd72e24 Make handling of conditional stuff much more straightforward
llvm-svn: 70767
2009-05-03 13:19:09 +00:00
Anton Korobeynikov 29747e9c26 Custom lower SIGN_EXTEND
llvm-svn: 70763
2009-05-03 13:17:49 +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 ba0e81d4b2 Properly handle ExternalSymbol's
llvm-svn: 70752
2009-05-03 13:14:46 +00:00
Anton Korobeynikov a3f7a83ad8 Add left shift
llvm-svn: 70747
2009-05-03 13:13:17 +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 cfc97056e7 Add lowering for global address nodes. Not pretty efficient though.
llvm-svn: 70730
2009-05-03 13:08:33 +00:00
Anton Korobeynikov 5613510c81 Add CALL lowering.
llvm-svn: 70727
2009-05-03 13:07:31 +00:00
Anton Korobeynikov b638fb10f5 Add pattern for OR
llvm-svn: 70720
2009-05-03 13:05:00 +00:00
Anton Korobeynikov 15a515b1af Add dummy lowering for shifts
llvm-svn: 70715
2009-05-03 13:03:33 +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 101380015c Dummy MSP430 backend
llvm-svn: 70694
2009-05-03 12:57:15 +00:00