summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Tighten up some checks. Fix FPOWI splitting forDuncan Sands2008-07-141-3/+3
| | | | | | non-power-of-two vectors. llvm-svn: 53558
* Reapply r53540, now with the matching header!Chris Lattner2008-07-141-1/+23
| | | | llvm-svn: 53557
* An INSERT_VECTOR_ELT can insert a larger valueDuncan Sands2008-07-141-4/+5
| | | | | | | | than the vector element type. Don't forget to handle this when the insertion index is not a constant. llvm-svn: 53556
* According to the docs, it is possible to have anDuncan Sands2008-07-141-11/+19
| | | | | | | | | | extending load of a vector. Handle this case when splitting vector loads. I'm not completely sure what is supposed to happen, but I think it means hi should be set to undef. LegalizeDAG does not consider this case. llvm-svn: 53555
* There should be no extending loads or truncatingDuncan Sands2008-07-141-4/+4
| | | | | | | | stores of one-element vectors. Also, neaten the handling of INSERT_VECTOR_ELT when the inserted type is larger than the vector element type. llvm-svn: 53554
* Ignore TargetConstant with an illegal type. TheseDuncan Sands2008-07-142-10/+23
| | | | | | | | | | are used for passing huge immediates in inline ASM from the front-end straight down to the ASM writer. Of course this is a hack, but it is simple, limited in scope, works in practice, and is what LegalizeDAG does. llvm-svn: 53553
* Added Subtarget support into RegisterInfoBruno Cardoso Lopes2008-07-149-116/+200
| | | | | | | | | | | | Added HasABICall and HasAbsoluteCall (equivalent to gcc -mabicall and -mno-shared). HasAbsoluteCall is not implemented but HasABICall is the default for o32 ABI. Now, both should help into a more accurate relocation types implementation. Added IsLinux is needed to choose between asm directives. Instruction name strings cleanup. AsmPrinter improved. llvm-svn: 53551
* Revert r53540 - it does not compile.Duncan Sands2008-07-141-23/+1
| | | | llvm-svn: 53549
* Reimplement LinkFunctionProtos in terms of GetLinkageResult. This fixesChris Lattner2008-07-141-167/+102
| | | | | | | | | | | | | | | | | the second half of link-global-to-func.ll and causes some minor changes in messages. There are two TODOs here. First, this causes a regression in 2008-07-06-AliasWeakDest.ll, which is now failing (so I xfailed it). Anton, I would really appreciate it if you could take a look at this. It should be a matter of adding proper alias support to GetLinkageResult, and was probably already a latent bug that would manifest with globals. The second todo is to reimplement LinkAlias in the same pattern as function and global linking. This should be pretty straight-forward for someone who knows aliases, but isn't a requirement for correctness. llvm-svn: 53548
* don't do any linkage, not even type resolution, of symbols that have Chris Lattner2008-07-141-6/+10
| | | | | | internal linkage. llvm-svn: 53547
* implement linking of globals to functions, in one directionChris Lattner2008-07-141-81/+75
| | | | | | | | | | | (replacing a function with a global). This is needed when building llvm itself with LTO on darwin, because of the EXPLICIT_SYMBOL hack in lib/system/DynamicLibrary.cpp. Implementation of linking the other way will need to wait for a cleanup of LinkFunctionProtos. llvm-svn: 53546
* wrap long lines, remove some code from a non-assert build.Chris Lattner2008-07-141-5/+7
| | | | llvm-svn: 53545
* Fix a bunch of bugs handling vector compare constant expressions, fixingChris Lattner2008-07-141-34/+54
| | | | | | PR2317. llvm-svn: 53544
* Document and fix Constant::getVectorElements to return an empty vectorChris Lattner2008-07-141-12/+23
| | | | | | | | | when presented with a constant expr. If ConstantExpr::getV[IF]Cmp to work when ConstantFoldCompareInstruction returns an undef or constant expr. llvm-svn: 53541
* If a function calls setjmp, never inline it into other functions. This isChris Lattner2008-07-141-1/+23
| | | | | | | a hack around the fact that we don't represent the CFG correctly for sj/lj. It fixes PR2486. llvm-svn: 53540
* simplify some code, shuffle and insertelt always return a vector.Chris Lattner2008-07-141-2/+1
| | | | llvm-svn: 53538
* Add a note.Chris Lattner2008-07-141-0/+12
| | | | llvm-svn: 53535
* Fix PR2506 by being a bit more careful about reverse fact propagation whenChris Lattner2008-07-141-64/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | disproving a condition. This actually compiles the existing testcase (udiv_select_to_select_shift) to: define i64 @test(i64 %X, i1 %Cond) { entry: %divisor1.t = lshr i64 %X, 3 ; <i64> [#uses=1] %quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1] %sum = add i64 %divisor1.t, %quotient2 ; <i64> [#uses=1] ret i64 %sum } instead of: define i64 @test(i64 %X, i1 %Cond) { entry: %quotient1.v = select i1 %Cond, i64 3, i64 4 ; <i64> [#uses=1] %quotient1 = lshr i64 %X, %quotient1.v ; <i64> [#uses=1] %quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1] %sum = add i64 %quotient1, %quotient2 ; <i64> [#uses=1] ret i64 %sum } llvm-svn: 53534
* Fix mishandling of the infinite loop case when merging two blocks. ThisChris Lattner2008-07-131-17/+26
| | | | | | fixes PR2540. llvm-svn: 53533
* more refactoring. Use early exits instead of really complex logic.Chris Lattner2008-07-131-109/+98
| | | | | | No functionality change. llvm-svn: 53532
* improve comments.Chris Lattner2008-07-131-2/+4
| | | | llvm-svn: 53531
* factor another large hunk of code out into its own function. Chris Lattner2008-07-131-155/+172
| | | | | | No functionality change. llvm-svn: 53530
* Final bit of simplification for FoldBranchToCommonDest.Chris Lattner2008-07-131-32/+34
| | | | llvm-svn: 53528
* simplify logic a bitChris Lattner2008-07-131-9/+10
| | | | llvm-svn: 53527
* Refactor some code out into its own helper function, getting rid of crazy ↵Chris Lattner2008-07-131-54/+84
| | | | | | | | | | multiline conditionals and commenting the code better. No functionality change. llvm-svn: 53526
* Stop creating extraneous smax/umax in SCEV. This removes a regression where weNick Lewycky2008-07-121-6/+79
| | | | | | started complicating many loops ('for' loops, in fact). llvm-svn: 53508
* Enhance analysis of srem.Nick Lewycky2008-07-121-15/+3
| | | | | | | Remove dead code analyzing urem. 'urem' of power-of-2 is canonicalized to an 'and' instruction. llvm-svn: 53506
* Implement llvm.atomic.cmp.swap.i32 on PPC. Patch by Gary Benson!Evan Cheng2008-07-124-220/+329
| | | | llvm-svn: 53505
* Typos.Evan Cheng2008-07-121-2/+2
| | | | llvm-svn: 53504
* Fix PR2536: a nasty spiller bug. If a two-address instruction uses a ↵Evan Cheng2008-07-121-0/+23
| | | | | | | | | | | register but the use portion of its live range is not part of its liveinterval, it must be defined by an implicit_def. In that case, do not spill the use. e.g. 8 %reg1024<def> = IMPLICIT_DEF 12 %reg1024<def> = INSERT_SUBREG %reg1024<kill>, %reg1025, 2 The live range [12, 14) are not part of the r1024 live interval since it's defined by an implicit def. It will not conflicts with live interval of r1025. Now suppose both registers are spilled, you can easily see a situation where both registers are reloaded before the INSERT_SUBREG and both target registers that would overlap. llvm-svn: 53503
* Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.Evan Cheng2008-07-125-72/+32
| | | | llvm-svn: 53502
* Add a utility function to MachineInstr for testing whether an instructionDan Gohman2008-07-121-7/+3
| | | | | | | has exactly one MachineMemOperand, and change some X86 lowering code to make use of it. llvm-svn: 53498
* Fix spelling of "hierarchy" in comments.Dan Gohman2008-07-111-1/+1
| | | | llvm-svn: 53489
* Include a frame index in the "fixed stack" pseudo source valueDan Gohman2008-07-115-43/+58
| | | | | | | instead of using the frame index for the SVOffset, which was inconsistent. llvm-svn: 53486
* Fix an obsolete top-level comment.Dan Gohman2008-07-111-3/+2
| | | | llvm-svn: 53481
* Factor out debugging code into the common base class.Dan Gohman2008-07-113-8/+5
| | | | llvm-svn: 53480
* Add support for putting NamedRegionTimers in TimerGroups, andDan Gohman2008-07-114-24/+67
| | | | | | | | use a timer group for the timers in SelectionDAGISel. Also, Split scheduling out from emitting, to give each their own timer. llvm-svn: 53476
* Use find instead of lower_bound.Dan Gohman2008-07-115-15/+14
| | | | llvm-svn: 53474
* add support for returning i128, PR2532.Chris Lattner2008-07-111-0/+14
| | | | llvm-svn: 53472
* Trim unnecessary #includes.Dan Gohman2008-07-118-6/+4
| | | | llvm-svn: 53471
* Don't call lookupNumber more than we have to.Owen Anderson2008-07-111-5/+8
| | | | llvm-svn: 53470
* Remove an apparently useless routine: there shouldDuncan Sands2008-07-112-15/+0
| | | | | | | be no need to split the result of a vector RET node, since they are always already legal. llvm-svn: 53462
* It is pointless to turn a UINT_TO_FP into anDuncan Sands2008-07-113-79/+118
| | | | | | | | | SINT_TO_FP libcall plus additional operations: it might as well be a direct UINT_TO_FP libcall. So only turn it into an SINT_TO_FP if the target has special handling for SINT_TO_FP. llvm-svn: 53461
* Add two missing SINT_TO_FP libcalls.Duncan Sands2008-07-112-11/+21
| | | | llvm-svn: 53460
* Port a shift-by-1 optimization from LegalizeDAG: itDuncan Sands2008-07-111-0/+7
| | | | | | | was presumably added after the rest of the code was copied to LegalizeTypes. llvm-svn: 53459
* Add support for 128 bit shifts and 32 bit shiftsDuncan Sands2008-07-112-6/+23
| | | | | | on 16 bit machines. llvm-svn: 53458
* Document 'mask' in this calculation.Nick Lewycky2008-07-111-0/+1
| | | | llvm-svn: 53454
* Align comments, colons and cases. Remove trailingDuncan Sands2008-07-111-17/+17
| | | | | | whitespace. llvm-svn: 53453
* Remove misleading constant from comment.Nick Lewycky2008-07-111-1/+1
| | | | llvm-svn: 53452
* Add another optimization from PR2330. Also catch some missing cases that areNick Lewycky2008-07-111-0/+39
| | | | | | similar. llvm-svn: 53451
OpenPOWER on IntegriCloud