summaryrefslogtreecommitdiff
path: root/lib/Target/PIC16/PIC16ISelLowering.h
Commit message (Collapse)AuthorAge
* Allow targets to specify the return type of libcalls that are generated for ↵Sanjiv Gupta2009-12-28
| | | | | | floating point comparisons, rather than hard-coding them as i32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92199 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 91904.Sanjiv Gupta2009-12-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91996 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting back 91904.Sanjiv Gupta2009-12-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91993 91177308-0d34-0410-b5e6-96231b3b80d8
* While converting one of the operands to a memory operand, we need to check ↵Sanjiv Gupta2009-12-22
| | | | | | if it is Legal and does not result into a cyclic dep. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91904 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that ↵Evan Cheng2009-09-18
| | | | | | | | | sdisel will use to properly complete phi nodes. Not functionality change yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82273 91177308-0d34-0410-b5e6-96231b3b80d8
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r79562 + r79563Chris Lattner2009-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79690 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for ISRs. Sanjiv Gupta2009-08-20
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79562 91177308-0d34-0410-b5e6-96231b3b80d8
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-11
| | | | | | | | | while the latter is capable of representing either a primitive or an extended type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed more problems caused by 78142.Sanjiv Gupta2009-08-11
| | | | | | | Passing of indirect arguments starts after return value on the callee's frame. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78635 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-10
| | | | | | own struct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
* Start moving TargetLowering away from using full MVTs and towards ↵Owen Anderson2009-08-10
| | | | | | SimpleValueType, which will simplify the privatization of IntegerType in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78584 91177308-0d34-0410-b5e6-96231b3b80d8
* Major calling convention code refactoring.Dan Gohman2009-08-05
| | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78142 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate a libcall for i8 multiply.Sanjiv Gupta2009-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77179 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments to make it clear that the function alignment is the Log2 of theBill Wendling2009-07-01
| | | | | | | bytes and not bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74624 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an "alignment" field to the MachineFunction object. It makes more sense toBill Wendling2009-06-30
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74564 91177308-0d34-0410-b5e6-96231b3b80d8
* Untabification.Bill Wendling2009-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72604 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more naming issues.Sanjiv Gupta2009-05-11
| | | | | | | | | compiler libcalls start with .lib. now. fixed section names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71424 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle direct aggregate type arguments.Sanjiv Gupta2009-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69665 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle aggregate type arguments to direct and indirect calls.Sanjiv Gupta2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69022 91177308-0d34-0410-b5e6-96231b3b80d8
* Added code to handle spilling and reloading of FSRs.Sanjiv Gupta2009-04-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68783 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit .line debug directives for stoppoints. The debug location is retrieved ↵Sanjiv Gupta2009-04-08
| | | | | | by the MachineInstr itself, rather than by custom handling the DBG_STOPPOINT nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68602 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle indirect function calls.Sanjiv Gupta2009-04-08
| | | | | | | | | Every function has the address of its frame in the beginning of code section. The frame address is retrieved and used to pass arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68597 91177308-0d34-0410-b5e6-96231b3b80d8
* Map stack based frameindices for spills to zero based indices that can be ↵Sanjiv Gupta2009-04-06
| | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68442 91177308-0d34-0410-b5e6-96231b3b80d8
* To convert the StopPoint insn into an assembler directive by ISel, we need ↵Sanjiv Gupta2009-04-02
| | | | | | to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68329 91177308-0d34-0410-b5e6-96231b3b80d8
* Params are not being generated as static globals now. The caller passes them ↵Sanjiv Gupta2009-04-02
| | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68327 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformatting. Inserted code comments. Cleaned interfaces.Sanjiv Gupta2009-03-20
| | | | | | | Removed unncessary code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67371 91177308-0d34-0410-b5e6-96231b3b80d8
* Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowingDan Gohman2009-02-07
| | | | | | | ScheduleDAG's TLI member to use const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64018 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the last non-DebugLoc versions of getNode!Dale Johannesen2009-02-07
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63992 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of 3 non-DebugLoc getNode variants.Dale Johannesen2009-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63808 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LowerCallTo and LowerArguments take a DebugLocDale Johannesen2009-01-30
| | | | | | | | argument. Adjust all callers and overloaded versions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63444 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup whitespace and comments, and tweak someDuncan Sands2009-01-21
| | | | | | | | prototypes, in operand type legalization. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62680 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement LowerOperationWrapper for legalizer. Sanjiv Gupta2009-01-21
| | | | | | | Also a few signed comparison fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62665 91177308-0d34-0410-b5e6-96231b3b80d8
* Checking in conditionals, function call, arrays and libcalls implementation.Sanjiv Gupta2009-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62174 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the interface to the type legalization methodDuncan Sands2008-12-01
| | | | | | | | | | | | ReplaceNodeResults: rather than returning a node which must have the same number of results as the original node (which means mucking around with MERGE_VALUES, and which is also easy to get wrong since SelectionDAG folding may mean you don't get the node you expect), return the results in a vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60348 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit declaration for globals and externs.Sanjiv Gupta2008-11-26
| | | | | | | Custom lower AND, OR, XOR bitwise operations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60098 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a more function PIC16 backend. However to get this working a patch inSanjiv Gupta2008-11-19
| | | | | | | ExpandIntegerOperand (LegalizeIntegerTypes.cpp) is needed which is yet to be reworked and submitted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59617 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix these enums' starting values to reflect the way thatDan Gohman2008-09-23
| | | | | | | instruction opcodes are now numbered. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56497 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename SDOperand to SDValue.Dan Gohman2008-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54128 91177308-0d34-0410-b5e6-96231b3b80d8
* Detabification. Fixed indentation and spacing.Sanjiv Gupta2008-05-14
| | | | | | | | Changed cout to DOUT, and TODOs to FIXMEs. Other changes as per coding conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51105 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding files for Microchip's PIC16 target.Sanjiv Gupta2008-05-13
A brief description about PIC16: =============================== PIC16 is an 8-bit microcontroller with only one 8-bit register which is the accumulator. All arithmetic/load/store operations are 8-bit only. The architecture has two address spaces: program and data. The program memory is divided into 2K pages and the data memory is divided into banks of 128 byte, with only 80 usable bytes, resulting in an non-contiguous data memory. It supports direct data memory access (by specifying the address as part of the instruction) and indirect data and program memory access (in an unorthodox fashion which utilize a 16 bit pointer register). Two classes of registers exist: (8-bit class which is only one accumulator) (16-bit class, which contains one or more 16 bit pointer(s)) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51027 91177308-0d34-0410-b5e6-96231b3b80d8