summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-1/+2
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Switch to getNameStr().Daniel Dunbar2009-07-241-2/+2
| | | | llvm-svn: 76962
* Simplify / normalize some uses of Value::getName.Daniel Dunbar2009-07-211-1/+1
| | | | llvm-svn: 76553
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Fix assert(0) conversion, as suggested by Chris.Torok Edwin2009-07-121-5/+8
| | | | llvm-svn: 75423
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+1
| | | | | | | | | 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
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-7/+7
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* As Chris pointed out, we don't actually need to pass the context around here.Owen Anderson2009-07-091-1/+1
| | | | llvm-svn: 75161
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-1/+1
| | | | llvm-svn: 75153
* Use common code for both ARM and Thumb-2 instruction and register info.David Goodwin2009-07-081-4/+9
| | | | llvm-svn: 75067
* Add a new step to legalization to legalize vector math operations. This Eli Friedman2009-05-231-0/+30
| | | | | | | | | | | will allow simplifying LegalizeDAG to eliminate type legalization. (I have a patch to do that, but it's not quite finished; I'll commit it once it's finished and I've fixed any review comments for this patch.) See the comment at the beginning of lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp for more details on the motivation for this patch. llvm-svn: 72325
* Remove the #ifndef NDEBUG from the FastISel debugging options. ThisDan Gohman2009-05-191-5/+0
| | | | | | fixes dejagnu tests that use these options. llvm-svn: 72094
* Factor out cycle-finder code and make it generic.Anton Korobeynikov2009-05-081-0/+116
| | | | llvm-svn: 71241
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-4/+4
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Second attempt:Bill Wendling2009-04-291-18/+18
| | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. llvm-svn: 70343
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-281-18/+18
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-281-18/+18
| | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... llvm-svn: 70270
* Factor out a bit of code that appears in several places into aDan Gohman2009-04-231-5/+2
| | | | | | utility function. llvm-svn: 69937
* In -fast mode do what FastISel does.Devang Patel2009-04-161-0/+6
| | | | | | This code could use some refactoring help! llvm-svn: 69254
* If FastISel is run and it has known DebugLoc then use it.Devang Patel2009-04-161-1/+6
| | | | llvm-svn: 69253
* Fix what surely must be a copy+pasto.Dan Gohman2009-03-271-2/+2
| | | | llvm-svn: 67881
* For inline asm output operand that matches an input. Encode the input ↵Evan Cheng2009-03-201-3/+5
| | | | | | operand index in the high bits. llvm-svn: 67387
* Enable Chris' value propagation change. It make available known sign, zero, ↵Evan Cheng2009-03-121-3/+1
| | | | | | one bits information for values that are live out of basic blocks. The goal is to eliminate unnecessary sext, zext, truncate of values that are live-in to blocks. This does not handle PHI nodes yet. llvm-svn: 66777
* - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emitBill Wendling2009-02-241-2/+2
| | | | | | | | | | a DBG_LABEL or not. We want to fall back to the original way of emitting debug info when we're in -O0/-fast mode. - Add plumbing in to pass the "Fast" flag to places that need it. - XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I need to investigate still. llvm-svn: 65367
* Generate these labels when we're in "fast" mode, not simply when we're no inBill Wendling2009-02-191-1/+1
| | | | | | "optimize-for-size" mode. llvm-svn: 65064
* When scheduling a block in parts, keep track of the overallDan Gohman2009-02-111-6/+6
| | | | | | | | | | | instruction index across each part. Instruction indices are used to make live range queries, and live ranges can extend beyond scheduling region boundaries. Refactor the ScheduleDAGSDNodes class some more so that it doesn't have to worry about this additional information. llvm-svn: 64288
* Use getDebugLoc forwarder instead of getNode()->getDebugLoc.Dale Johannesen2009-02-071-2/+2
| | | | | | No functional change. llvm-svn: 64026
* Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowingDan Gohman2009-02-071-1/+1
| | | | | | ScheduleDAG's TLI member to use const. llvm-svn: 64018
* Rename SelectionDAGISel::Schedule toDan Gohman2009-02-061-11/+8
| | | | | | | | | SelectionDAGISel::CreateScheduler, and make it just create the scheduler. Leave running the scheduler to the higher-level code. This makes the higher-level code a little more explicit and easier to follow, and will help enable some future refactoring. llvm-svn: 63944
* Move ScheduleDAGSDNodes.h to be a private header. Front-endsDan Gohman2009-02-061-2/+2
| | | | | | | that previously included this header should include SchedulerRegistry.h instead. llvm-svn: 63937
* Fill in more omissions in DebugLog propagation.Dale Johannesen2009-02-041-2/+4
| | | | | | I think that's it for this directory. llvm-svn: 63690
* First initialize DAG otherwise dwarf writer is used uninitialized.Devang Patel2009-02-031-1/+1
| | | | | | Duncan spotted this. Thanks! llvm-svn: 63641
* Pass in something sensible for the debug location information when creating theBill Wendling2009-02-031-1/+1
| | | | | | initial PHI nodes of the machine function. llvm-svn: 63598
* Use SDL->getCurDebugLoc() instead of unknown loc for landing pads.Bill Wendling2009-02-031-1/+1
| | | | llvm-svn: 63594
* Explicitly pass in the "unknown" debug location. This is probably notBill Wendling2009-02-031-1/+1
| | | | | | | correct. We need more infrastructure before we can get the DebugLoc info for these instructions. llvm-svn: 63593
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-2/+2
| | | | llvm-svn: 63198
* Change TargetInstrInfo::isMoveInstr to return source and destination ↵Evan Cheng2009-01-201-2/+2
| | | | | | sub-register indices as well. llvm-svn: 62600
* Instead of adding dependence edges between terminator instructionsDan Gohman2009-01-161-1/+1
| | | | | | | | | | | | | | and every other instruction in their blocks to keep the terminator instructions at the end, teach the post-RA scheduler how to operate on ranges of instructions, and exclude terminators from the range of instructions that get scheduled. Also, exclude mid-block labels, such as EH_LABEL instructions, and schedule code before them separately from code after them. This fixes problems with the post-RA scheduler moving code past EH_LABELs. llvm-svn: 62366
* Generalize the HazardRecognizer interface so that it can be usedDan Gohman2009-01-151-2/+3
| | | | | | | to support MachineInstr-based scheduling in addition to SDNode-based scheduling. llvm-svn: 62284
* Move a few containers out of ScheduleDAGInstrs::BuildSchedGraphDan Gohman2009-01-151-25/+21
| | | | | | | | | | | and into the ScheduleDAGInstrs class, so that they don't get destructed and re-constructed for each block. This fixes a compile-time hot spot in the post-pass scheduler. To help facilitate this, tidy and do some minor reorganization in the scheduler constructor functions. llvm-svn: 62275
OpenPOWER on IntegriCloud