summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Make fast-isel miss counting in -stats and -fast-isel-verbose take ↵Eli Friedman2011-05-171-3/+8
| | | | | | terminators into account; since there are many fewer isel misses with recent changes, misses caused by terminators are more significant. llvm-svn: 131502
* Delete unused variables.Dan Gohman2011-05-161-1/+1
| | | | llvm-svn: 131430
* Track how many insns fast-isel successfully selects as well as how many itJim Grosbach2011-05-161-0/+2
| | | | | | misses. llvm-svn: 131426
* Don't do tail calls in a function that call setjmp. The stack might beRafael Espindola2011-05-161-33/+1
| | | | | | corrupted when setjmp returns again. llvm-svn: 131399
* Use array_lengthof. No functional change.Eli Friedman2011-05-061-3/+1
| | | | llvm-svn: 131008
* Small syntax cleanup; we don't need to #define constants in C++. No ↵Eli Friedman2011-05-051-3/+3
| | | | | | functionality change intended. llvm-svn: 130926
* Recommit the fix for rdar://9289512 with a couple tweaks toChris Lattner2011-04-221-17/+54
| | | | | | | | | | | fix bugs exposed by the gcc dejagnu testsuite: 1. The load may actually be used by a dead instruction, which would cause an assert. 2. The load may not be used by the current chain of instructions, and we could move it past a side-effecting instruction. Change how we process uses to define the problem away. llvm-svn: 130018
* Revert r1296656, "Fix rdar://9289512 - not folding load into compare at -O0...",Daniel Dunbar2011-04-211-41/+15
| | | | | | which broke a couple GCC test suite tests at -O0. llvm-svn: 129914
* SelectBasicBlock is rather slow even when it doesn't do anything; skip theEli Friedman2011-04-191-5/+7
| | | | | | unnecessary work where possible. llvm-svn: 129763
* fix an oversight which caused us to compile the testcase (and otherChris Lattner2011-04-171-5/+3
| | | | | | | | | | | | | | | | | | | less trivial things) into a dummy lea. Before we generated: _test: ## @test movq _G@GOTPCREL(%rip), %rax leaq (%rax), %rax ret now we produce: _test: ## @test movq _G@GOTPCREL(%rip), %rax ret This is part of rdar://9289558 llvm-svn: 129662
* Fix rdar://9289512 - not folding load into compare at -O0Chris Lattner2011-04-171-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | The basic issue here is that bottom-up isel is matching the branch and compare, and was failing to fold the load into the branch/compare combo. Fixing this (by allowing folding into any instruction of a sequence that is selected) allows us to produce things like: cmpb $0, 52(%rax) je LBB4_2 instead of: movb 52(%rax), %cl cmpb $0, %cl je LBB4_2 This makes the generated -O0 code run a bit faster, but also speeds up compile time by putting less pressure on the register allocator and generating less code. This was one of the biggest classes of missing load folding. Implementing this shrinks 176.gcc's c-decl.s (as a random example) by about 4% in (verbose-asm) line count. llvm-svn: 129656
* split a complex predicate out to a helper function. Simplify two for loops,Chris Lattner2011-04-171-10/+16
| | | | | | | which don't need to check for falling off the end of a block *and* end of phi nodes, since terminators are never phis. llvm-svn: 129655
* Added block number and name to isel debug output.Andrew Trick2011-03-231-12/+25
| | | | | | | | I'm tired of doing this manually for each checkout. If anyone knows a better way debug isel for non-trivial tests feel free to revert and let me know how to do it. llvm-svn: 128132
* trailing whitespace.Jim Grosbach2011-03-011-1/+1
| | | | llvm-svn: 126733
* Generalize the register matching code in DAGISel a bit.Jim Grosbach2011-03-011-0/+12
| | | | llvm-svn: 126731
* Merge information about the number of zero, one, and sign bits of live-outCameron Zwarich2011-02-241-1/+6
| | | | | | | registers at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine phase. This fixes <rdar://problem/8760114>. llvm-svn: 126380
* Add a mechanism for invalidating the LiveOutInfo of a PHI, and use it wheneverCameron Zwarich2011-02-241-1/+18
| | | | | | a block is visited before all of its predecessors. llvm-svn: 126378
* Track blocks visited in reverse postorder.Cameron Zwarich2011-02-241-0/+4
| | | | llvm-svn: 126377
* Refactor the LiveOutInfo interface into a few methods on FunctionLoweringInfoCameron Zwarich2011-02-241-10/+1
| | | | | | and make the actual map private. llvm-svn: 126376
* Have isel visit blocks in reverse postorder rather than an undefined order. ThisCameron Zwarich2011-02-241-2/+5
| | | | | | allows for the information propagated across basic blocks to be merged at phis. llvm-svn: 126375
* Roll out r126169 and r126170 in an attempt to fix the selfhost bot.Cameron Zwarich2011-02-221-45/+7
| | | | llvm-svn: 126185
* Merge information about the number of zero, one, and sign bits of live-out ↵Cameron Zwarich2011-02-221-5/+40
| | | | | | | | | registers at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine phase. This fixes <rdar://problem/8760114>. llvm-svn: 126170
* Have isel visit blocks in reverse postorder rather than an undefined order. ThisCameron Zwarich2011-02-221-2/+5
| | | | | | allows for the information propagated across basic blocks to be merged at phis. llvm-svn: 126169
* Revert r124611 - "Keep track of incoming argument's location while emitting ↵Devang Patel2011-02-211-10/+1
| | | | | | | | | | | LiveIns." In other words, do not keep track of argument's location. The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body. This requires some coordination with debugger to get this working. - The debugger needs to be aware of prolog_end attribute attached with line table entries. - The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+) llvm-svn: 126155
* Keep track of incoming argument's location while emitting LiveIns.Devang Patel2011-01-311-1/+10
| | | | llvm-svn: 124611
* reapply my fix for PR8961 with a tweak to properly handleChris Lattner2011-01-161-6/+12
| | | | | | | multi-instruction sequences like calls. Many thanks to Jakob for finding a testcase. llvm-svn: 123559
* Delete an assignment to ThisBB which isn't needed, and tidy up someDan Gohman2011-01-141-4/+6
| | | | | | comments. llvm-svn: 123479
* Set the insertion point correctly for instructions generated by load folding:Chris Lattner2011-01-141-4/+4
| | | | | | they should go *before* the new instruction not after it. llvm-svn: 123420
* Use an IndexedMap for LiveOutRegInfo to hide its dependence on ↵Jakob Stoklund Olesen2011-01-081-3/+1
| | | | | | TargetRegisterInfo::FirstVirtualRegister. llvm-svn: 123096
* Do not model all INLINEASM instructions as having unmodelled side effects.Evan Cheng2011-01-071-5/+3
| | | | | | | | | | Instead encode llvm IR level property "HasSideEffects" in an operand (shared with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check the operand when the instruction is an INLINEASM. This allows memory instructions to be moved around INLINEASM instructions. llvm-svn: 123044
* Avoid zero extend bit test operands to pointer type if all the masks fit inEvan Cheng2011-01-061-2/+4
| | | | | | | the original type of the switch statement key. rdar://8781238 llvm-svn: 122935
* 80-cols.Eric Christopher2011-01-051-1/+2
| | | | llvm-svn: 122909
* Various bits of framework needed for precise machine-level selectionAndrew Trick2010-12-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | DAG scheduling during isel. Most new functionality is currently guarded by -enable-sched-cycles and -enable-sched-hazard. Added InstrItineraryData::IssueWidth field, currently derived from ARM itineraries, but could be initialized differently on other targets. Added ScheduleHazardRecognizer::MaxLookAhead to indicate whether it is active, and if so how many cycles of state it holds. Added SchedulingPriorityQueue::HasReadyFilter to allowing gating entry into the scheduler's available queue. ScoreboardHazardRecognizer now accesses the ScheduleDAG in order to get information about it's SUnits, provides RecedeCycle for bottom-up scheduling, correctly computes scoreboard depth, tracks IssueCount, and considers potential stall cycles when checking for hazards. ScheduleDAGRRList now models machine cycles and hazards (under flags). It tracks MinAvailableCycle, drives the hazard recognizer and priority queue's ready filter, manages a new PendingQueue, properly accounts for stall cycles, etc. llvm-svn: 122541
* whitespaceAndrew Trick2010-12-241-157/+157
| | | | llvm-svn: 122539
* flags -> glue for selectiondagChris Lattner2010-12-231-3/+3
| | | | llvm-svn: 122509
* sdisel flag -> glue.Chris Lattner2010-12-231-77/+76
| | | | llvm-svn: 122507
* rename MVT::Flag to MVT::Glue. "Flag" is a terrible name forChris Lattner2010-12-211-12/+12
| | | | | | | something that just glues two nodes together, even if it is sometimes used for flags. llvm-svn: 122310
* improve "cannot yet select" errors a trivial amount: nowChris Lattner2010-12-211-1/+1
| | | | | | they are just as useless, but at least a bit more gramatical llvm-svn: 122305
* fix PR8642: if a critical edge has a PHI value that can trap,Chris Lattner2010-12-191-0/+41
| | | | | | | isel is *required* to split the edge. PHI values get evaluated on the edge, not in their predecessor block. llvm-svn: 122170
* Check for _setjmp too, because it's also used.Bill Wendling2010-11-201-0/+1
| | | | llvm-svn: 119875
* Simplify uses of MVT and EVT. An MVT can be compared directlyDuncan Sands2010-11-031-4/+3
| | | | | | | with a SimpleValueType, while an EVT supports equality and inequality comparisons with SimpleValueType. llvm-svn: 118169
* For statistics that are only used in functions declared in !NDEBUG, wrap theNick Lewycky2010-10-261-0/+3
| | | | | | | declarations in !NDEBUG to avoid -Wunused-variable warnings. Patch by Matt Beaumont-Gay! llvm-svn: 117345
* Simplify.Devang Patel2010-10-251-9/+9
| | | | | | Do not count use of sdisel for single call instruction. llvm-svn: 117316
* Add counters to count basic blocks and machine basic blocks with out of ↵Devang Patel2010-10-251-4/+63
| | | | | | | | order line number info. Add counters to count how many basic blocks are entirely selected by fastisel. llvm-svn: 117310
* Move the remaining attribute macros to systematic names based on the attributeChandler Carruth2010-10-231-12/+12
| | | | | | name and prefixed with 'LLVM_'. llvm-svn: 117203
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-2/+4
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* When isel is emitting instructions for an x86 target without CMOV, the CFG isJakob Stoklund Olesen2010-09-301-1/+7
| | | | | | | | | | | | | | | | | edited during emission. If the basic block ends in a switch that gets lowered to a jump table, any phis at the default edge were getting updated wrong. The jump table data structure keeps a pointer to the header blocks that wasn't getting updated after the MBB is split. This bug was exposed on 32-bit Linux when disabling critical edge splitting in codegen prepare. The fix is to uipdate stale MBB pointers whenever a block is split during emission. llvm-svn: 115191
* Fix VS 2010 build.Oscar Fuentes2010-09-231-4/+4
| | | | | | Patch by Nathan Jeffords! llvm-svn: 114661
* Rework passing parent pointers into complexpatterns, I forgotChris Lattner2010-09-211-27/+35
| | | | | | | | that complex patterns are matched after the entire pattern has a structural match, therefore the NodeStack isn't in a useful state when the actual call to the matcher happens. llvm-svn: 114489
* If only user of a vreg is an copy instruction to export copy of vreg out of ↵Devang Patel2010-09-211-0/+23
| | | | | | | | | current basic block then insert DBG_VALUE so that debug value of the variable is also transfered to new vreg. Testcase is in r114476. This fixes radar 8412415. llvm-svn: 114478
OpenPOWER on IntegriCloud