aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't take the time to CheckDAGForTailCallsAndFixThem when tail callsDan Gohman2008-09-162-4/+10
| | | | | | | | are not enabled. Instead just omit the tail call flag when calls are created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56235 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enables the new vector select in the bitcode reader, by modifying theDan Gohman2008-09-162-12/+29
| | | | | | | | | | | | | | | | | | | | | | | bitcode reader/writer as follows: - add and use new bitcode FUNC_CODE_INST_VSELECT to handle the llvm select opcode using either i1 or [N x i1] as the selector. - retain old BITCODE FUNC_CODE_INST_SELECT in the bitcode reader to handle select on i1 for backwards compatibility with existing bitcode files. - re-enable the vector-select.ll test program. Also, rename the recently added bitcode opcode FUNC_CODE_INST_VCMP to FUNC_CODE_INST_CMP2 and make the bitcode writer use it to handle fcmp/icmp on scalars or vectors. In the bitcode writer, use FUNC_CODE_INST_CMP for vfcmp/vicmp only. In the bitcode reader, have FUNC_CODE_INST_CMP handle icmp/fcmp returning bool, for backwards compatibility with existing bitcode files. Patch by Preston Gurd! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56233 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach ScalarEvolution to consider loop preheaders in the search forDan Gohman2008-09-151-8/+38
| | | | | | | | an if statement that guards a loop, to allow indvars to avoid smax operations in more situations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56232 91177308-0d34-0410-b5e6-96231b3b80d8
* Live intervals for live-in registers should begin at the beginning of a ↵Owen Anderson2008-09-151-7/+11
| | | | | | | | | | basic block, not at the first instruction. Also, their valno's should have an unknown def. This has no effect currently, but was causing issues when StrongPHIElimination was enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56231 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LSR to optimize away SMAX operations for tripcounts in commonDan Gohman2008-09-151-0/+127
| | | | | | | | | | cases. See the comment above OptimizeSMax for the full story, and the testcase for an example. This cancels out a pessimization commonly attributed to indvars, and will allow us to lift some of the artificial throttles in indvars, rather than add new ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56230 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed Bug 2751Bruno Cardoso Lopes2008-09-152-4/+4
| | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=2751 Abicall was enabled even when static code model was provided in the command line. The correct behavior is to disable abicall when static is specified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56228 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable SelectionDAG CSE for calls. It matters in the case ofDan Gohman2008-09-151-6/+20
| | | | | | | libcalls, as in this testcase on ARM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56226 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly update kill infos after extending a live range and merge 2 val#'s; ↵Evan Cheng2008-09-151-3/+8
| | | | | | fix 56165 - do not mark val# copy field if the copy does not define the val#. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56199 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix WriteAsOperand to not emit a leading space character. AdjustDan Gohman2008-09-142-34/+60
| | | | | | | | | | | | | | | | | | | its callers to emit a space character before calling it when a space is needed. This fixes several spurious whitespace issues in ScalarEvolution's debug dumps. See the test changes for examples. This also fixes odd space-after-tab indentation in the output for switch statements, and changes calls from being printed like this: call void @foo( i32 %x ) to this: call void @foo(i32 %x) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56196 91177308-0d34-0410-b5e6-96231b3b80d8
* adjust last patch per review feedbackDale Johannesen2008-09-141-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56194 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove isImm(), isReg(), and friends, in favor of Dan Gohman2008-09-1316-66/+69
| | | | | | | | | | isImmediate(), isRegister(), and friends, to avoid confusion about having two different names with the same meaning. I'm not attached to the longer names, and would be ok with changing to the shorter names if others prefer it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56189 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2792: treat volatile loads as writing memory somewhere.Duncan Sands2008-09-131-3/+11
| | | | | | | Treat stores as reading memory, just to play safe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56188 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix random abort.Evan Cheng2008-09-131-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56184 91177308-0d34-0410-b5e6-96231b3b80d8
* Define CallSDNode, an SDNode subclass for use with ISD::CALL.Dan Gohman2008-09-1314-188/+194
| | | | | | | | | | | | | | Currently it just holds the calling convention and flags for isVarArgs and isTailCall. And it has several utility methods, which eliminate magic 5+2*i and similar index computations in several places. CallSDNodes are not CSE'd. Teach UpdateNodeOperands to handle nodes that are not CSE'd gracefully. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56183 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo.Evan Cheng2008-09-131-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56182 91177308-0d34-0410-b5e6-96231b3b80d8
* Rely on instruction format to determine so_reg operand for now.Evan Cheng2008-09-131-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56181 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 56176. All those instruction formats are still needed.Evan Cheng2008-09-134-49/+84
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56180 91177308-0d34-0410-b5e6-96231b3b80d8
* Accidentially flipped the condition.Evan Cheng2008-09-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56179 91177308-0d34-0410-b5e6-96231b3b80d8
* Add debug dumps.Evan Cheng2008-09-131-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56178 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate unnecessary instruction formats.Evan Cheng2008-09-124-90/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56176 91177308-0d34-0410-b5e6-96231b3b80d8
* Addrmode 1 S bit can be dynamically set. Look for CPSR def.Evan Cheng2008-09-122-28/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56172 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite address mode 1 code emission routines.Evan Cheng2008-09-122-129/+104
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56171 91177308-0d34-0410-b5e6-96231b3b80d8
* On some targets, non-move instructions can become move instructions because ↵Evan Cheng2008-09-121-14/+28
| | | | | | | | | | | | | of coalescing. e.g. vr2 = OR vr0, vr1 => vr2 = OR vr1, vr1 // after coalescing vr0 with vr1 Update the value# of the destination register with the copy instruction if that happens. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56165 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* andDan Gohman2008-09-125-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | ConstantFP* instead of APInt and APFloat directly. This reduces the amount of time to create ConstantSDNode and ConstantFPSDNode nodes when ConstantInt* and ConstantFP* respectively are already available, as is the case in SelectionDAGBuild.cpp. Also, it reduces the amount of time to legalize constants into constant pools, and the amount of time to add ConstantFP operands to MachineInstrs, due to eliminating ConstantInt::get and ConstantFP::get calls. It increases the amount of work needed to create new constants in cases where the client doesn't already have a ConstantInt* or ConstantFP*, such as legalize expanding 64-bit integer constants to 32-bit constants. And it adds a layer of indirection for the accessor methods. But these appear to be outweight by the benefits in most cases. It will also make it easier to make ConstantSDNode and ConstantFPNode more consistent with ConstantInt and ConstantFP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56162 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass "earlyclobber" bit through to machineDale Johannesen2008-09-123-5/+20
| | | | | | | | | representation; coalescer and RA need to know about it. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56161 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ConstantSDNode::getValue to getZExtValue, for consistencyDan Gohman2008-09-1242-476/+535
| | | | | | | | with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56159 91177308-0d34-0410-b5e6-96231b3b80d8
* Rather than marking all internal globals "Ref"Duncan Sands2008-09-121-17/+11
| | | | | | | | | | | | | | | | | when a readonly declaration is called, set a flag. This is faster and uses less memory. In theory it is less accurate, because before only those internal globals that were read by someone were being marked "Ref", but now all are. But in practice, thanks to other passes, all internal globals of the kind considered here will be both read and stored to: those only read will have been turned into constants, and those only stored to will have been deleted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56143 91177308-0d34-0410-b5e6-96231b3b80d8
* The sequence for ppcf128 compares was not IEEEDale Johannesen2008-09-121-4/+6
| | | | | | | | safe in the presence of NaNs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56136 91177308-0d34-0410-b5e6-96231b3b80d8
* On 64-bit targets, change 32-bit getelementptr indices to be 64-bitDan Gohman2008-09-111-1/+12
| | | | | | | | getelementptr indices, inserting an explicit cast if necessary. This helps expose the sign-extension operation to other optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56133 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a vectorshuffle instcombine bug introduced by r55995.Dan Gohman2008-09-111-1/+4
| | | | | | | Patch by Nicolas Capens! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56129 91177308-0d34-0410-b5e6-96231b3b80d8
* udpate header comment: s/VP/VFP/Jim Grosbach2008-09-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56126 91177308-0d34-0410-b5e6-96231b3b80d8
* When tailcallopt is enabled all fastcc calls must have an aligned argument ↵Arnold Schwaighofer2008-09-111-1/+1
| | | | | | stack size. Add a test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56119 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2748. Avoid coalescing physical register with virtual register which ↵Evan Cheng2008-09-112-0/+70
| | | | | | | | | | | | would create illegal extract_subreg. e.g. vr1024 = extract_subreg vr1025, 1 ... vr1024 = mov8rr AH If vr1024 is coalesced with AH, the extract_subreg is now illegal since AH does not have a super-reg whose sub-register 1 is AH. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56118 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast ↵Owen Anderson2008-09-111-2/+7
| | | | | | isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56117 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typo.Duncan Sands2008-09-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56116 91177308-0d34-0410-b5e6-96231b3b80d8
* Intrinsics don't touch internal global variablesDuncan Sands2008-09-111-2/+4
| | | | | | | | (unless passed one via a parameter), even if they are IntrWriteMem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56115 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a copy+paste bug that Duncan spotted. For severalDan Gohman2008-09-111-1/+1
| | | | | | | | cases it was still getting lucky and detecting overflow but it was clearly incorrect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56113 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2783 - coalescer bug. Missing a TargetRegisterInfo::isVirtualRegister ↵Evan Cheng2008-09-111-1/+2
| | | | | | check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56112 91177308-0d34-0410-b5e6-96231b3b80d8
* Intrinsics don't read these kinds of globalDuncan Sands2008-09-111-5/+7
| | | | | | | variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56105 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a 80 column violation.Evan Cheng2008-09-111-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56097 91177308-0d34-0410-b5e6-96231b3b80d8
* The version of AtomicSDNode::AtomicSDNode used (only) forDale Johannesen2008-09-111-6/+6
| | | | | | | | | | | | | | | cmp-and-swap reversed the Cmp and Swap arguments; comments make it clear this is unintentional. Unfortunately, the x86 BE had a compensating reversal, which is removed here. PPC is OK. From inspection of the Alpha code I think it is OK, but if somebody has that platform please check it out. I cannot test on that platform. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56091 91177308-0d34-0410-b5e6-96231b3b80d8
* If ISD::ANY_EXTEND fails, try ISD::ZERO_EXTEND and ISD::SIGN_EXTEND before ↵Owen Anderson2008-09-111-0/+7
| | | | | | | | | giving up. This fixes 445.gobmk on X86-64 in fast isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56088 91177308-0d34-0410-b5e6-96231b3b80d8
* Succumb utterly to compatibility and implementDale Johannesen2008-09-111-4/+4
| | | | | | | | | __sync_fetch_and_nand as ANDC, even though that's not what nand means. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56087 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate subreg index when promoting a load to a copy.Evan Cheng2008-09-111-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56085 91177308-0d34-0410-b5e6-96231b3b80d8
* In my analysis for r56076 I missed the case where the originalDan Gohman2008-09-111-1/+2
| | | | | | | multiplication overflows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56082 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an icmp+sdiv optimization to check for and handle an overflowDan Gohman2008-09-101-1/+16
| | | | | | | condition. This fixes PR2740. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56076 91177308-0d34-0410-b5e6-96231b3b80d8
* X86FastISel support for double->float and float->double casts.Dan Gohman2008-09-101-0/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56070 91177308-0d34-0410-b5e6-96231b3b80d8
* FastISel support for i1 PHI nodes.Dan Gohman2008-09-101-2/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56069 91177308-0d34-0410-b5e6-96231b3b80d8
* FastISel support for i1 constants.Dan Gohman2008-09-101-2/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56068 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the coalescer where it didn't check if a live interval existed ↵Owen Anderson2008-09-101-1/+1
| | | | | | | | | before trying to manipulate it. This was exposed by fast isel's handling of shifts on X86-64. With this, FreeBench/pcompress2 passes on X86-64 in fast isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56067 91177308-0d34-0410-b5e6-96231b3b80d8