summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-1/+1
| | | | | | dereference the type pointer. llvm-svn: 92726
* Change errs() to dbgs().David Greene2010-01-051-19/+19
| | | | llvm-svn: 92597
* Change SelectCode's argument from SDValue to SDNode *, to make it moreDan Gohman2010-01-051-13/+13
| | | | | | | | | clear what information these functions are actually using. This is also a micro-optimization, as passing a SDNode * around is simpler than passing a { SDNode *, int } by value or reference. llvm-svn: 92564
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-291-4/+2
| | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-281-8/+7
| | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-281-28/+24
| | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
* Remove dead store.Bill Wendling2009-12-281-2/+2
| | | | llvm-svn: 92190
* Use more sensible type for flags in asms. PR 5570.Dale Johannesen2009-12-231-2/+1
| | | | | | Patch by Sylve`re Teissier (sorry, ASCII only). llvm-svn: 91988
* Fix this to properly clear the FastISel debug location. Thanks toDan Gohman2009-12-141-1/+1
| | | | | | Bill for spotting this! llvm-svn: 91355
* Remove old DBG_LABEL code.Dan Gohman2009-12-051-8/+0
| | | | llvm-svn: 90669
* Remove the unused DisableLegalizeTypes option and related code.Dan Gohman2009-12-051-50/+46
| | | | llvm-svn: 90668
* Don't blindly set the debug location for PHI node copies.Dan Gohman2009-12-051-3/+3
| | | | llvm-svn: 90637
* Make TargetSelectInstruction protected and called from FastISel.cppDan Gohman2009-12-051-6/+0
| | | | | | instead of SelectionDAGISel.cpp. llvm-svn: 90636
* The debug information for an LLVM Instruction applies to that InstructionDan Gohman2009-12-051-33/+57
| | | | | | | and that Instruction only. Implement this by setting the "current debug position" back to Unknown after processing each instruction. llvm-svn: 90632
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-031-1/+1
| | | | | | Patch by Howard Hinnant! llvm-svn: 90365
* Move CopyCatchInfo into FunctionLoweringInfo.cpp too, for consistency.Dan Gohman2009-11-231-14/+1
| | | | llvm-svn: 89683
* Rename SelectionDAGLowering to SelectionDAGBuilder, and renameDan Gohman2009-11-231-102/+102
| | | | | | SelectionDAGBuild.cpp to SelectionDAGBuilder.cpp. llvm-svn: 89681
* Move the FunctionLoweringInfo class and some related utility functions outDan Gohman2009-11-231-1/+2
| | | | | | | of SelectionDAGBuild.h/cpp into its own files, to help separate general lowering logic from SelectionDAG-specific lowering logic. llvm-svn: 89667
* Fix fast-isel to avoid selecting the return instruction if aDan Gohman2009-11-201-3/+15
| | | | | | tail call has been encountered. llvm-svn: 89444
* Implement support to debug inlined functions.Devang Patel2009-11-101-15/+17
| | | | llvm-svn: 86748
* Hide a couple of options.Evan Cheng2009-11-091-1/+1
| | | | llvm-svn: 86522
* Move some code from being emitted as boilerplate duplicated in everyDan Gohman2009-10-291-0/+52
| | | | | | *ISelDAGToDAG.cpp to being regular code in SelectionDAGISel.cpp. llvm-svn: 85530
* Rename usesCustomDAGSchedInserter to usesCustomInserter, and update aDan Gohman2009-10-291-3/+7
| | | | | | | | bunch of associated comments, because it doesn't have anything to do with DAGs or scheduling. This is another step in decoupling MachineInstr emitting from scheduling. llvm-svn: 85517
* pseudosourcevalue is also still using getGlobalContext(), so it isn'tChris Lattner2009-10-271-0/+1
| | | | | | thread safe either. llvm-svn: 85253
* Indent code.Zhongxing Xu2009-10-161-1/+1
| | | | llvm-svn: 84247
* Set default location for a function if it is not set.Devang Patel2009-10-121-0/+2
| | | | llvm-svn: 83921
* Set default location for the function if it is not already set.Devang Patel2009-10-061-0/+2
| | | | | | This code is not yet enabled. llvm-svn: 83349
* Remove unnecessary cast.Devang Patel2009-09-291-4/+2
| | | | llvm-svn: 83100
* s/class Metadata/class MetadataContext/gDevang Patel2009-09-281-2/+2
| | | | llvm-svn: 83019
* Do not use global typedef for MDKindID.Devang Patel2009-09-281-2/+2
| | | | llvm-svn: 83016
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-70/+70
| | | | llvm-svn: 82355
* Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic ↵Evan Cheng2009-09-191-6/+8
| | | | | | blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks. llvm-svn: 82311
* Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that ↵Evan Cheng2009-09-181-6/+13
| | | | | | | | sdisel will use to properly complete phi nodes. Not functionality change yet. llvm-svn: 82273
* Revert r82214. It broke 403.gcc on x86_64 / Darwin.Evan Cheng2009-09-181-12/+5
| | | | llvm-svn: 82215
* Fix a bug in sdisel switch lowering code. When it updates the phi nodes in ↵Evan Cheng2009-09-181-5/+12
| | | | | | | | switch successor blocks, it can introduce multiple phi operands of the same value from different blocks (and may not be on the predecessor list). This can be seen on CodeGen/Generic/2006-09-06-SwitchLowering.ll. But it's not known to cause any real regression (but I have added an assertion for it now). llvm-svn: 82214
* Fix typo.Devang Patel2009-09-161-1/+1
| | | | llvm-svn: 82080
* At iSel time, update DebugLoc based on debug info attached with an instruction.Devang Patel2009-09-161-1/+30
| | | | llvm-svn: 82077
* eliminate uses of cerr()Chris Lattner2009-08-231-5/+5
| | | | llvm-svn: 79834
* remove a few DOUTs here and there.Chris Lattner2009-08-231-14/+15
| | | | llvm-svn: 79832
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-1/+1
| | | | llvm-svn: 78948
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-3/+3
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-8/+8
| | | | | | own struct type. llvm-svn: 78610
* Major calling convention code refactoring.Dan Gohman2009-08-051-119/+15
| | | | | | | | | | | | | | | | | | | 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
* Delete a redundant variable.Dan Gohman2009-08-011-1/+0
| | | | llvm-svn: 77774
* Minor code simplifications.Dan Gohman2009-08-011-8/+8
| | | | llvm-svn: 77769
* SelectionDAGISel no longer needs to check hasAvailableExternallyLinkage,Dan Gohman2009-08-011-5/+0
| | | | | | | as it is now a MachineFunctionPass, and MachineFunctionPass now handles this. llvm-svn: 77760
* SelectionDAGISel does not "preserve all", since it makes lots of changesDan Gohman2009-07-311-1/+3
| | | | | | to the MachineFunction. llvm-svn: 77753
* Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsageDan Gohman2009-07-311-4/+7
| | | | | | | | shouldn't do AU.setPreservesCFG(), because even though CodeGen passes don't modify the LLVM IR CFG, they may modify the MachineFunction CFG, and passes like MachineLoop are registered with isCFGOnly set to true. llvm-svn: 77691
* Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and manyDaniel Dunbar2009-07-311-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | failures when building assorted projects with clang. --- Reverse-merging r77654 into '.': U include/llvm/CodeGen/Passes.h U include/llvm/CodeGen/MachineFunctionPass.h U include/llvm/CodeGen/MachineFunction.h U include/llvm/CodeGen/LazyLiveness.h U include/llvm/CodeGen/SelectionDAGISel.h D include/llvm/CodeGen/MachineFunctionAnalysis.h U include/llvm/Function.h U lib/Target/CellSPU/SPUISelDAGToDAG.cpp U lib/Target/PowerPC/PPCISelDAGToDAG.cpp U lib/CodeGen/LLVMTargetMachine.cpp U lib/CodeGen/MachineVerifier.cpp U lib/CodeGen/MachineFunction.cpp U lib/CodeGen/PrologEpilogInserter.cpp U lib/CodeGen/MachineLoopInfo.cpp U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp D lib/CodeGen/MachineFunctionAnalysis.cpp D lib/CodeGen/MachineFunctionPass.cpp U lib/CodeGen/LiveVariables.cpp llvm-svn: 77661
* Manage MachineFunctions with an analysis Pass instead of the AnnotableDan Gohman2009-07-311-4/+7
| | | | | | | mechanism. To support this, make MachineFunctionPass a little more complete. llvm-svn: 77654
OpenPOWER on IntegriCloud