summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* More consts on TargetLowering references.Dan Gohman2009-01-151-3/+3
| | | | llvm-svn: 62262
* Use DebugInfo interface to lower dbg_* intrinsics.Devang Patel2009-01-131-2/+3
| | | | llvm-svn: 62127
* Request DwarfWriter. This will be used to handle dbg_* intrinsics.Devang Patel2009-01-091-1/+4
| | | | llvm-svn: 61999
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-051-1/+0
| | | | llvm-svn: 61715
* Reapply r60997, this time without forgetting thatDuncan Sands2008-12-141-2/+2
| | | | | | | target constants are allowed to have an illegal type. llvm-svn: 61006
* Temporarily revert r60997. It was causing this failure:Bill Wendling2008-12-131-2/+2
| | | | | | | | | | | | | | | | | | | Running /Users/void/llvm/llvm.src/test/CodeGen/Generic/dg.exp ... FAIL: /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll Failed with exit(1) at line 1 while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll | llc | /usr/bin/grep 68719476738 Assertion failed: ((TypesNeedLegalizing || getTypeAction(VT) == Legal) && "Illegal type introduced after type legalization?"), function HandleOp, file /Users/void/llvm/llvm.src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 493. 0 llc 0x0085392e char const* std::find<char const*, char>(char const*, char const*, char const&) + 98 1 llc 0x00853e63 llvm::sys::PrintStackTraceOnErrorSignal() + 593 2 libSystem.B.dylib 0x96cac09b _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1765097359 4 libSystem.B.dylib 0x96d24ec2 raise + 26 5 libSystem.B.dylib 0x96d3447f abort + 73 6 libSystem.B.dylib 0x96d26063 __assert_rtn + 101 7 llc 0x004f9018 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type llvm::cast<llvm::Sub ... llvm-svn: 61001
* LegalizeDAG is not supposed to introduce illegalDuncan Sands2008-12-131-2/+2
| | | | | | | types into the DAG if they were not already there. Check this with an assertion. llvm-svn: 60997
* If the type legalizer actually legalized anythingDuncan Sands2008-11-241-8/+29
| | | | | | | | | | | | | (this doesn't happen that often, since most code does not use illegal types) then follow it by a DAG combiner run that is allowed to generate illegal operations but not illegal types. I didn't modify the target combiner code to distinguish like this between illegal operations and illegal types, so it will not produce illegal operations as well as not producing illegal types. llvm-svn: 59960
* Remove the "fast" form of the list-burr scheduler, and use theDan Gohman2008-11-201-6/+6
| | | | | | | | | dedicated "fast" scheduler in -fast mode instead, which is faster. This speeds up llc -fast by a few percent on some testcases -- the speedup only happens for code not handled by fast-isel. llvm-svn: 59700
* Experimental post-pass scheduling support. Post-pass schedulingDan Gohman2008-11-191-1/+1
| | | | | | | | | | | | | | | | | is currently off by default, and can be enabled with -disable-post-RA-scheduler=false. This doesn't have a significant impact on most code yet because it doesn't yet do anything to address anti-dependencies and it doesn't attempt to disambiguate memory references. Also, several popular targets don't have pipeline descriptions yet. The majority of the changes here are splitting the SelectionDAG-specific code out of ScheduleDAG, so that ScheduleDAG can be moved to libLLVMCodeGen.a. The interface between ScheduleDAG-using code and the rest of the scheduling code is somewhat rough and will evolve. llvm-svn: 59676
* Move the code that inserts X87 FP_REG_KILL instructions from aDan Gohman2008-11-121-3/+0
| | | | | | | | special-purpose hook to a new pass. Also, add check to see if any x87 virtual registers are used, to avoid doing any work in the common case that no x87 code is needed. llvm-svn: 59190
* Change the scheduler accessor methods to accept an explicit TargetMachineDan Gohman2008-11-111-3/+5
| | | | | | | argument instead of taking the SelectionDAG's TargetMachine. This is needed for some upcoming scheduler changes. llvm-svn: 59055
* Take Chris' suggestion and define EnableFastISelVerbose andDan Gohman2008-10-281-8/+3
| | | | | | | EnableFastISelAbort variables for Release mode instead of using ifdefs in the code. llvm-svn: 58350
* Protect the code for fast-isel debugging with #ifndef NDEBUG.Dan Gohman2008-10-281-0/+10
| | | | llvm-svn: 58340
* Turn on LegalizeTypes, the new type legalizationDuncan Sands2008-10-271-2/+2
| | | | | | | codegen infrastructure, by default. Please report any breakage to the mailing lists. llvm-svn: 58232
* Fast-isel no longer an experiment.Dan Gohman2008-10-201-1/+1
| | | | llvm-svn: 57845
* FastISel support for exception-handling constructs.Dan Gohman2008-10-141-47/+50
| | | | | | | | | - Move the EH landing-pad code and adjust it so that it works with FastISel as well as with SDISel. - Add FastISel support for @llvm.eh.exception and @llvm.eh.selector. llvm-svn: 57539
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-141-1/+1
| | | | | | | | | instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. llvm-svn: 57521
* Fix fast-isel's handling of atomic instructions. They mayDan Gohman2008-10-041-1/+4
| | | | | | | | expand to multiple basic blocks, in which case fast-isel needs to informed of which block to use as it resumes inserting instructions. llvm-svn: 57040
* Fix FastISel to not initialize the PIC-base register multiple timesDan Gohman2008-09-291-60/+65
| | | | | | in functions with PIC references from more than one basic block. llvm-svn: 56807
OpenPOWER on IntegriCloud