summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix an issue where restores could be inserted after a terminator instruction,Owen Anderson2009-01-291-4/+12
| | | | | | | | and an iterator invalidation issue. FreeBench/pifft no longer miscompiles with these fixes! llvm-svn: 63293
* Comments are good. :-)Owen Anderson2009-01-291-3/+30
| | | | llvm-svn: 63276
* Add support for aggressive load-use-store folding. This takes care of the Owen Anderson2009-01-291-19/+85
| | | | | | vast majority of code size regressions introduced by pre-alloc-splitting. llvm-svn: 63274
* - Add DebugLoc to getTargetNode(). Bill Wendling2009-01-291-101/+72
| | | | | | | | | - Modify TableGen to add the DebugLoc when calling getTargetNode. (The light-weight wrappers are only temporary. The non-DebugLoc version will be removed once the whole debug info stuff is finished with.) llvm-svn: 63273
* Exit with nice warnings when register allocator run out of registers.Evan Cheng2009-01-293-41/+88
| | | | llvm-svn: 63267
* Make x86's BT instruction matching more thorough, and add someDan Gohman2009-01-292-20/+73
| | | | | | | | | dagcombines that help it match in several more cases. Add several more cases to test/CodeGen/X86/bt.ll. This doesn't yet include matching for BT with an immediate operand, it just covers more register+register cases. llvm-svn: 63266
* A slight compile time optimization. If the caller knows there isn't a free ↵Evan Cheng2009-01-291-6/+6
| | | | | | register getReg() should not call getFreeReg(). llvm-svn: 63263
* Add DebugLoc-sensitive versions of many node creationDale Johannesen2009-01-291-0/+458
| | | | | | functions. Currently omitted: memcpy, memmove, memset. llvm-svn: 63259
* Fix comment about removeRange.Evan Cheng2009-01-291-1/+1
| | | | llvm-svn: 63255
* Add DebugLoc to the getNode() methods.Bill Wendling2009-01-281-41/+134
| | | | llvm-svn: 63245
* Add DebugLoc-aware constructors for SDNode derivedDale Johannesen2009-01-281-0/+23
| | | | | | | classes (those that reasonably have a DebugLoc associated with them). llvm-svn: 63236
* Do not forget to derived type while constructing an array type.Devang Patel2009-01-281-0/+2
| | | | llvm-svn: 63233
* Fixed extract element when the result needs to be promoted and the input ↵Mon P Wang2009-01-281-0/+2
| | | | | | widened. llvm-svn: 63217
* Make isOperationLegal do what its name suggests, and introduce aDan Gohman2009-01-285-55/+62
| | | | | | | | | | | | | | | new isOperationLegalOrCustom, which does what isOperationLegal previously did. Update a bunch of callers to use isOperationLegalOrCustom instead of isOperationLegal. In some case it wasn't obvious which behavior is desired; when in doubt I changed then to isOperationLegalOrCustom as that preserves their previous behavior. This is for the second half of PR3376. llvm-svn: 63212
* Formatting.Duncan Sands2009-01-281-8/+5
| | | | llvm-svn: 63199
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-2810-14/+14
| | | | llvm-svn: 63198
* Use ValueType::bitsLT to simplify some code.Dan Gohman2009-01-282-2/+2
| | | | llvm-svn: 63170
* Use ZERO_EXTEND instead of ANY_EXTEND when promotingDan Gohman2009-01-282-2/+2
| | | | | | | shift amounts, to avoid implicitly assuming that target architectures will ignore the high bits. llvm-svn: 63169
* Add type DIE into appropriate context DIE.Devang Patel2009-01-271-3/+17
| | | | llvm-svn: 63154
* Add a DebugLoc field and some simple accessors.Dale Johannesen2009-01-271-7/+46
| | | | llvm-svn: 63152
* Refine DebugLoc per review comments.Evan Cheng2009-01-271-6/+7
| | | | llvm-svn: 63132
* Add an assertion to the form of SelectionDAG::getConstant that takesDan Gohman2009-01-273-7/+13
| | | | | | | | a uint64_t to verify that the value is in range for the given type, to help catch accidental overflow. Fix a few places that relied on getConstant implicitly truncating the value. llvm-svn: 63128
* Delete redundant return statements.Dan Gohman2009-01-271-7/+0
| | | | llvm-svn: 63120
* Make the pre-split-limit option more useful by using a per-function counter.Owen Anderson2009-01-271-1/+7
| | | | llvm-svn: 63091
* Assorted debug info fixes.Devang Patel2009-01-271-17/+19
| | | | | | | | - DW_AT_bit_size is only suitable for bitfields. - Encode source location info for derived types. - Source location and type size info is not useful for subroutine_type (info is included in respective DISubprogram) and array_type. llvm-svn: 63077
* No need to keep size of DebugLocations vector separately.Evan Cheng2009-01-261-2/+3
| | | | llvm-svn: 63070
* Make the Dwarf macro information section optional; CellSPU's assemblerScott Michel2009-01-261-5/+9
| | | | | | | doesn't support it. The default is set to 'true', so this should not impact any other target backends. llvm-svn: 63058
* Reapply r63025 and r63026, with fixes for the failing testcases.Owen Anderson2009-01-261-356/+13
| | | | llvm-svn: 63049
* Fix PR3393, which amounts to a bug in the expensiveDuncan Sands2009-01-262-16/+37
| | | | | | | | | checking logic. Rather than make the checking more complicated, I've tweaked some logic to make things conform to how the checking thought things ought to be, since this results in a simpler "mental model". llvm-svn: 63048
* Also revert r63206Bill Wendling2009-01-261-0/+321
| | | | llvm-svn: 63041
* Temporarily revert r63025 until the testsuite failures can be fixed.Bill Wendling2009-01-261-12/+34
| | | | llvm-svn: 63040
* During bittest switch lowering emit shift in the test block, which should ↵Anton Korobeynikov2009-01-261-11/+9
| | | | | | | | (theoretically) allow us to generate more efficient code. We don't do this now though :) llvm-svn: 63027
* Get rid of a bunch of dead code now that interval reconstruction is enabled.Owen Anderson2009-01-261-321/+0
| | | | llvm-svn: 63026
* Fix an issue where LiveIntervals was trying to be smart about removing killOwen Anderson2009-01-261-34/+12
| | | | | | | | | markers, and ended up foiling the interval reconstruction. This allows us to turn on reconstruction in the pre alloc splitter, which fixes a number of miscompilations. llvm-svn: 63025
* Silence a bogus compiler warning.Evan Cheng2009-01-261-1/+1
| | | | llvm-svn: 63021
* Actually source file has already been uniquified into an id during isel. ↵Evan Cheng2009-01-261-15/+3
| | | | | | Eliminate the StringMap. llvm-svn: 63009
* Add data structure to define and track debug location during codegen.Evan Cheng2009-01-261-0/+27
| | | | llvm-svn: 63008
* Take the next steps in making SDUse more consistent with LLVM Use, andDan Gohman2009-01-263-82/+65
| | | | | | | | | | | | | | | | | tidy up SDUse and related code. - Replace the operator= member functions with a set method, like LLVM Use has, and variants setInitial and setNode, which take care up updating use lists, like LLVM Use's does. This simplifies code that calls these functions. - getSDValue() is renamed to get(), as in LLVM Use, though most places can either use the implicit conversion to SDValue or the convenience functions instead. - Fix some more node vs. value terminology issues. Also, eliminate the one remaining use of SDOperandPtr, and SDOperandPtr itself. llvm-svn: 62995
* Eliminate the loop that searches through each of the operandsDan Gohman2009-01-251-195/+178
| | | | | | | | | | | of each use in the SelectionDAG ReplaceAllUses* functions. Thanks to Chris for spotting this opportunity. Also, factor out code from all 5 of the ReplaceAllUses* functions into AddNonLeafNodeToCSEMaps, which is now renamed AddModifiedNodeToCSEMaps to more accurately reflect its purpose. llvm-svn: 62964
* Whitespace tidiments.Dan Gohman2009-01-251-2/+1
| | | | llvm-svn: 62963
* Move the N->use_empty() assert from DeleteNode toDan Gohman2009-01-251-3/+2
| | | | | | | DeleteNodeNotInCSEMaps, since DeleteNode just calls DeleteNodeNotInCSEMaps. llvm-svn: 62962
* Teach 2addr pass to be do more commuting. If both uses of a two-address ↵Evan Cheng2009-01-251-6/+104
| | | | | | | | | | | | | | | | | | | | | instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue. %reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1 %reg1029<def> = MOV8rr %reg1028 %reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead> insert => %reg1030<def> = MOV8rr %reg1028 %reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead> In this case, it might not be possible to coalesce the second MOV8rr instruction if the first one is coalesced. So it would be profitable to commute it: %reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1 %reg1029<def> = MOV8rr %reg1028 %reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead> insert => %reg1030<def> = MOV8rr %reg1029 %reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead> llvm-svn: 62954
* Fix an indent and a typo.Nate Begeman2009-01-241-1/+1
| | | | llvm-svn: 62940
* Some cleanups. No functional changes.Owen Anderson2009-01-241-26/+34
| | | | llvm-svn: 62917
* Refactor code. No functionality change.Evan Cheng2009-01-231-20/+38
| | | | llvm-svn: 62893
* Introduce two DWARF attribute extentions DW_AT_APPLE_optimized, ↵Devang Patel2009-01-231-0/+5
| | | | | | | | | | | | DW_AT_APPLE_flags. DW_AT_APPLE_optimized flag is set when a compile_unit is optimized. The debugger takes advantage of this information some way. DW_AT_APPLE_flags encodes command line options when certain env. variable is set. This is used by build engineers to track various gcc command lines used by by a project, irrespective of whether the project used makefile, Xcode or something else. llvm-gcc patch is next. llvm-svn: 62888
* Empty DIType represents void. In this case no need to construct any type DIE.Devang Patel2009-01-231-3/+1
| | | | llvm-svn: 62861
* Fold x-0 to x in unsafe-fp-math mode. This comes up in theDan Gohman2009-01-232-9/+19
| | | | | | | | | | | | | | testcase from PR3376, and in fact is sufficient to completely avoid the problem in that testcase. There's an underlying problem though; TLI.isOperationLegal considers Custom to be Legal, which might be ok in some cases, but that's what DAGCombiner is using in many places to test if something is legal when LegalOperations is true. When DAGCombiner is running after legalize, this isn't sufficient. I'll address this in a separate commit. llvm-svn: 62860
* Only check if coalescing is worthwhile when the result is targeting a more ↵Evan Cheng2009-01-231-1/+6
| | | | | | restrictive register class. llvm-svn: 62837
* Stage two of fixing pre-alloc-splitting's code size issues: filter out ↵Owen Anderson2009-01-231-9/+37
| | | | | | | | | | restores that are just going to be re-spilled again. This also helps performance. Pre-alloc-splitting now seems to be an overall win on SPEC. llvm-svn: 62834
OpenPOWER on IntegriCloud