summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce new convenience methods for sign extending orDuncan Sands2009-10-131-0/+12
| | | | | | | | | | | | truncating an SDValue (depending on whether the target type is bigger or smaller than the value's type); or zero extending or truncating it. Use it in a few places (this seems to be a popular operation, but I only modified cases of it in SelectionDAGBuild). In particular, the eh_selector lowering was doing this wrong due to a repeated rather than inverted test, fixed with this change. llvm-svn: 84027
* Make getMachineNode return a MachineSDNode* instead of a generic SDNode*Dan Gohman2009-10-101-42/+53
| | | | | | | since it won't do any folding. This will help avoid some inconvenient casting. llvm-svn: 83698
* Add a SelectionDAG getTargetInsertSubreg convenience function,Bob Wilson2009-10-081-0/+11
| | | | | | similar to getTargetExtractSubreg. llvm-svn: 83564
* Improve MachineMemOperand handling.Dan Gohman2009-09-251-204/+309
| | | | | | | | | | | | | | | | | | | | | - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions. This eliminates MachineInstr's std::list member and allows the data to be created by isel and live for the remainder of codegen, avoiding a lot of copying and unnecessary translation. This also shrinks MemSDNode. - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated fields for MachineMemOperands. - Change MemSDNode to have a MachineMemOperand member instead of its own fields with the same information. This introduces some redundancy, but it's more consistent with what MachineInstr will eventually want. - Ignore alignment when searching for redundant loads for CSE, but remember the greatest alignment. Target-specific code which previously used MemOperandSDNodes with generic SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range so that the SelectionDAG framework knows that MachineMemOperand information is available. llvm-svn: 82794
* Rename getTargetNode to getMachineNode, for consistency with theDan Gohman2009-09-251-44/+44
| | | | | | | | naming scheme used in SelectionDAG, where there are multiple kinds of "target" nodes, but "machine" nodes are nodes which represent a MachineInstr. llvm-svn: 82790
* Add a version of dumpr() that has a SelectionDAG* argument.Dan Gohman2009-09-251-0/+5
| | | | llvm-svn: 82742
* Use getStoreSize() instead of getStoreSizeInBits()/8.Dan Gohman2009-09-231-1/+1
| | | | llvm-svn: 82656
* Rename several variables from EVT to more descriptive names, now that EVTDan Gohman2009-09-231-10/+10
| | | | | | | is also the name of their type, as declarations like "EVT EVT" look really odd. llvm-svn: 82654
* Give MachineMemOperand an operator<<, factoring out code fromDan Gohman2009-09-231-4/+1
| | | | | | | | | | | | two different places for printing MachineMemOperands. Drop the virtual from Value::dump and instead give Value a protected virtual hook that can be overridden by subclasses to implement custom printing. This lets printing be more consistent, and simplifies printing of PseudoSourceValue values. llvm-svn: 82599
* Change MachineMemOperand's alignment value to be the alignment ofDan Gohman2009-09-211-2/+2
| | | | | | | the base pointer, without the offset. This matches MemSDNode's new alignment behavior, and holds more interesting information. llvm-svn: 82473
* tidy upChris Lattner2009-09-201-3/+3
| | | | llvm-svn: 82397
* Do not add the SVOffset to the Node CSE ID. The same pointer argument ↵Nate Begeman2009-09-151-5/+0
| | | | | | | | cannot have different SVOffsets. llvm-svn: 81937
* Better solution for tracking both the original alignment of the access, and ↵Nate Begeman2009-09-151-22/+19
| | | | | | | | the current alignment based on the source value offset. This avoids increasing the size of mem nodes. llvm-svn: 81897
* Remove incorrect CSE code from r81813.Nate Begeman2009-09-151-2/+0
| | | | llvm-svn: 81819
* Add an "original alignment" field to load and store nodes. This enables theNate Begeman2009-09-151-13/+23
| | | | | | | DAG Combiner to disambiguate chains for loads and stores of types which are broken up by the Legalizer into smaller pieces. llvm-svn: 81813
* Recognize more opportunities to use SSE min and max instructions,Dan Gohman2009-09-031-0/+13
| | | | | | swapping the operands if necessary. llvm-svn: 80940
* Reapply 79977.Devang Patel2009-08-281-1/+1
| | | | | | Use MDNodes to encode debug info in llvm IR. llvm-svn: 80406
* Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.Devang Patel2009-08-261-1/+1
| | | | llvm-svn: 80073
* Get rid of this horrible "benign race" by exploiting ManagedStatic to initializeOwen Anderson2009-08-251-7/+14
| | | | | | the array on its first access. llvm-svn: 80040
* Update DebugInfo interface to use metadata, instead of special named ↵Devang Patel2009-08-251-1/+1
| | | | | | | | llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well. This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!) llvm-svn: 79977
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-231-6/+7
| | | | | | update all code that this affects. llvm-svn: 79830
* Record variable debug info at ISel time directly.Devang Patel2009-08-221-2/+0
| | | | llvm-svn: 79742
* Reapply r79708 with the appropriate fix for the case that still requires ↵Owen Anderson2009-08-221-2/+6
| | | | | | locking. llvm-svn: 79731
* revert r79708 + r79711Chris Lattner2009-08-221-5/+3
| | | | llvm-svn: 79720
* Actually remove unused static. Previous commit removed trailingEric Christopher2009-08-221-1/+0
| | | | | | whitespace. llvm-svn: 79711
* Remove unused static.Eric Christopher2009-08-221-20/+20
| | | | llvm-svn: 79710
* Ease contention on this lock by noticing that all writes to the VTs array willOwen Anderson2009-08-221-2/+5
| | | | | | | | | be of (dynamically) constant values, so races on it are immaterial. We just need to ensure that at least one write has completed before return the pointer into it. With this change, parllc exhibits essentially no overhead on 403.gcc. llvm-svn: 79708
* Add an x86 peep that narrows TEST instructions to forms that useDan Gohman2009-08-191-0/+11
| | | | | | | a smaller encoding. These kinds of patterns are very frequent in sqlite3, for example. llvm-svn: 79439
* Needs to check whether unaligned load / store of i64 is legal here.Evan Cheng2009-08-151-4/+3
| | | | llvm-svn: 79150
* Unbreak build. Evan, please make sure my changes are correct.Benjamin Kramer2009-08-151-1/+1
| | | | llvm-svn: 79133
* Allow targets to specify their choice of calling conventions perAnton Korobeynikov2009-08-141-3/+6
| | | | | | | | | | libcall. Take advantage of this in the ARM backend to rectify broken choice of CC when hard float is in effect. PIC16 may want to see if it could be of use in MakePIC16Libcall, which works unchanged. Patch by Sandeep! llvm-svn: 79033
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-9/+13
| | | | llvm-svn: 78948
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-121-7/+9
| | | | | | infrastructure work needed to get the contexts to where they need to be first. llvm-svn: 78759
* Fix warnings.Owen Anderson2009-08-111-4/+4
| | | | llvm-svn: 78725
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-77/+78
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Tidy #includes.Dan Gohman2009-08-111-0/+1
| | | | llvm-svn: 78677
* SjLj based exception handling unwinding support. This patch is nasty, brutishJim Grosbach2009-08-111-0/+1
| | | | | | | | | | | | | and short. Well, it's kinda short. Definitely nasty and brutish. The front-end generates the register/unregister calls into the SjLj runtime, call-site indices and landing pad dispatch. The back end fills in the LSDA with the call-site information provided by the front end. Catch blocks are not yet implemented. Built on Darwin and verified no llvm-core "make check" regressions. llvm-svn: 78625
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-238/+238
| | | | | | own struct type. llvm-svn: 78610
* Start moving TargetLowering away from using full MVTs and towards ↵Owen Anderson2009-08-101-1/+2
| | | | | | SimpleValueType, which will simplify the privatization of IntegerType in the future. llvm-svn: 78584
* Major calling convention code refactoring.Dan Gohman2009-08-051-55/+26
| | | | | | | | | | | | | | | | | | | 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
* Propogate the Depth argument when callingDan Gohman2009-08-041-1/+2
| | | | | | | | | TLI.computeMaskedBitsForTargetNode from ComputeMaskedBits, since the former may call back into the latter. This fixes a major compile time problem on a testcase that happnened to hit this in a particularly bad way, PR4643. llvm-svn: 78023
* Print the target flags as an int instead of a char, as they aren'tDan Gohman2009-08-011-4/+4
| | | | | | actually characters. llvm-svn: 77794
* Allow targets to define libcall names for mem(cpy,set,move) intrinsics, ↵Sanjiv Gupta2009-07-301-3/+6
| | | | | | rather than hardcoding them in DAG lowering. llvm-svn: 77586
* Move types back to the 2.5 API.Owen Anderson2009-07-291-6/+5
| | | | llvm-svn: 77516
* Move ConstantFP construction back to the 2.5-ish API.Owen Anderson2009-07-271-1/+1
| | | | llvm-svn: 77247
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-1/+1
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-1/+1
| | | | llvm-svn: 76702
* Fix some minor MSVC compiler warnings.Daniel Dunbar2009-07-191-2/+2
| | | | llvm-svn: 76356
* Privatize the ConstantFP table. I'm on a roll!Owen Anderson2009-07-161-1/+1
| | | | llvm-svn: 76097
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-1/+1
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
OpenPOWER on IntegriCloud