oota-llvm.git
15 years agoadd the ability for TargetData to return information about legal integer
Chris Lattner [Sat, 7 Nov 2009 09:35:34 +0000 (09:35 +0000)]
add the ability for TargetData to return information about legal integer
datatypes on a given CPU.  This is intended to allow instcombine and other
transformations to avoid converting big sequences of operations to an
inconvenient width, and will help clean up after SRoA.  See also "Adding
legal integer sizes to TargetData" on Feb 1, 2009 on llvmdev, and PR3451.

Comments welcome.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86370 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomore cleanup.
Chris Lattner [Sat, 7 Nov 2009 09:23:04 +0000 (09:23 +0000)]
more cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86369 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd some missing #includes
Chris Lattner [Sat, 7 Nov 2009 09:20:54 +0000 (09:20 +0000)]
add some missing #includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86367 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorewrite TargetData to use StringRef/raw_ostream instead of thrashing std::strings.
Chris Lattner [Sat, 7 Nov 2009 09:13:23 +0000 (09:13 +0000)]
rewrite TargetData to use StringRef/raw_ostream instead of thrashing std::strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86366 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoprune #include / layering violation
Chris Lattner [Sat, 7 Nov 2009 09:07:01 +0000 (09:07 +0000)]
prune #include / layering violation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86365 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the need-stub variables accurate and consistent. In the case of
Jeffrey Yasskin [Sat, 7 Nov 2009 08:51:52 +0000 (08:51 +0000)]
Make the need-stub variables accurate and consistent.  In the case of
MachineRelocations, "stub" always refers to a far-call stub or a
load-a-faraway-global stub, so this patch adds "Far" to the term. (Other stubs
are used for lazy compilation and dlsym address replacement.) The variable was
also inconsistent between the positive and negative sense, and the positive
sense ("NeedStub") was more demanding than is accurate (since a nearby-enough
function can be called directly even if the platform often requires a stub).
Since the negative sense causes double-negatives, I switched to
"MayNeedFarStub" globally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86363 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a couple of shuffle patterns to use movhlps instead
Eric Christopher [Sat, 7 Nov 2009 08:45:53 +0000 (08:45 +0000)]
Fix a couple of shuffle patterns to use movhlps instead
of movhps as the constraint.  Changes optimizations so
update testcases as appropriate as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86360 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach dead store elimination that certain intrinsics write to memory just like
Nick Lewycky [Sat, 7 Nov 2009 08:34:40 +0000 (08:34 +0000)]
Teach dead store elimination that certain intrinsics write to memory just like
a store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86359 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove the win32 tree, it's stale and confusing.
Chris Lattner [Sat, 7 Nov 2009 08:31:52 +0000 (08:31 +0000)]
remove the win32 tree, it's stale and confusing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86358 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreapply 86289, 86278, 86270, 86267, 86266 & 86264 plus a fix
Chris Lattner [Sat, 7 Nov 2009 08:05:03 +0000 (08:05 +0000)]
reapply 86289, 86278, 86270, 86267, 86266 & 86264 plus a fix
(making pred factoring only happen if threading is guaranteed
to be successful).

This now survives an X86-64 bootstrap of llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86355 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR5421 by APInt'izing switch lowering.
Chris Lattner [Sat, 7 Nov 2009 07:50:34 +0000 (07:50 +0000)]
Fix PR5421 by APInt'izing switch lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86354 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOops, FunctionContainsEscapingAllocas is really used to mean two different
Nick Lewycky [Sat, 7 Nov 2009 07:42:38 +0000 (07:42 +0000)]
Oops, FunctionContainsEscapingAllocas is really used to mean two different
things. Back out part of r86349 for a moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86353 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDust off tail recursion elimination. Fix a fixme by applying CaptureTracking
Nick Lewycky [Sat, 7 Nov 2009 07:10:01 +0000 (07:10 +0000)]
Dust off tail recursion elimination. Fix a fixme by applying CaptureTracking
and add a .ll to demo the new capability.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86349 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvmc: Add a '-time' option.
Mikhail Glushenkov [Sat, 7 Nov 2009 06:33:58 +0000 (06:33 +0000)]
llvmc: Add a '-time' option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86348 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTrailing whitespace.
Mikhail Glushenkov [Sat, 7 Nov 2009 06:33:12 +0000 (06:33 +0000)]
Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86347 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago80-col violation.
Mikhail Glushenkov [Sat, 7 Nov 2009 06:33:01 +0000 (06:33 +0000)]
80-col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86346 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge cmp1 into cmp0 and filecheckize.
Chris Lattner [Sat, 7 Nov 2009 06:19:20 +0000 (06:19 +0000)]
merge cmp1 into cmp0 and filecheckize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86345 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate some globals to use ManagedStatic.
Lang Hames [Sat, 7 Nov 2009 05:50:28 +0000 (05:50 +0000)]
Update some globals to use ManagedStatic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86342 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix memoizing of CvtRndSatSDNode
Mon P Wang [Sat, 7 Nov 2009 04:46:25 +0000 (04:46 +0000)]
Fix memoizing of CvtRndSatSDNode

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86340 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed Overload table bug noticed by Jakob
Mon P Wang [Sat, 7 Nov 2009 04:07:33 +0000 (04:07 +0000)]
Fixed Overload table bug noticed by Jakob

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86332 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMissed this.
Evan Cheng [Sat, 7 Nov 2009 04:07:30 +0000 (04:07 +0000)]
Missed this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86331 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefactor code. Fix a potential missing check. Teach isIdentical() about tLDRpci_pic.
Evan Cheng [Sat, 7 Nov 2009 04:04:34 +0000 (04:04 +0000)]
Refactor code. Fix a potential missing check. Teach isIdentical() about tLDRpci_pic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86330 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical
Evan Cheng [Sat, 7 Nov 2009 03:52:02 +0000 (03:52 +0000)]
- Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical
  except it doesn't care if the definitions' virtual registers differ. This is
  used by machine LICM and other MI passes to perform CSE.
- Teach Thumb2InstrInfo::isIdentical() to check two t2LDRpci_pic are identical.
  Since pc relative constantpool entries are always different, this requires it
  it check if the values can actually the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86328 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate CMake file.
Ted Kremenek [Sat, 7 Nov 2009 03:26:59 +0000 (03:26 +0000)]
Update CMake file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86325 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd code to check at SelectionDAGISel::LowerArguments time to see if return values...
Kenneth Uildriks [Sat, 7 Nov 2009 02:11:54 +0000 (02:11 +0000)]
Add code to check at SelectionDAGISel::LowerArguments time to see if return values can be lowered to registers.  Coming soon, code to perform sret-demotion if return values cannot be lowered to registers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86324 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix inverted conflict test in -early-coalesce.
Jakob Stoklund Olesen [Sat, 7 Nov 2009 01:58:40 +0000 (01:58 +0000)]
Fix inverted conflict test in -early-coalesce.

A non-identity copy cannot be coalesced when the phi join destination register
is live at the copy site.

Also verify the condition that the PHI join source register is only used in
the PHI join. Otherwise the coalescing is invalid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86322 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert following patches to fix llvmgcc bootstrap.
Devang Patel [Sat, 7 Nov 2009 01:32:59 +0000 (01:32 +0000)]
Revert following patches to fix llvmgcc bootstrap.
86289, 86278, 86270, 86267, 86266 & 86264
Chris, please take a look.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86321 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMy previous patch (r84124) for setting the encoding bits 4 and 7 of DPSoRegFrm
Johnny Chen [Sat, 7 Nov 2009 00:54:36 +0000 (00:54 +0000)]
My previous patch (r84124) for setting the encoding bits 4 and 7 of DPSoRegFrm
was wrong and too aggressive in the sense that DPSoRegFrm includes both constant
shifts (with Inst{4} = 0) and register controlled shifts (with Inst{4} = 1 and
Inst{7} = 0).  The 'rr' fragment of the multiclass definitions actually means
register/register with no shift, see A8-11.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86319 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- new SROA mallocs should have the mallocs running-or'ed, not the malloc's bitcast
Victor Hernandez [Sat, 7 Nov 2009 00:41:19 +0000 (00:41 +0000)]
- new SROA mallocs should have the mallocs running-or'ed, not the malloc's bitcast
- fix ProcessInternalGlobal() debug output

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86317 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFit in 80 columns
Victor Hernandez [Sat, 7 Nov 2009 00:36:50 +0000 (00:36 +0000)]
Fit in 80 columns

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86316 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid "ambiguous 'else'" warning from gcc.
Jeffrey Yasskin [Sat, 7 Nov 2009 00:26:47 +0000 (00:26 +0000)]
Avoid "ambiguous 'else'" warning from gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86314 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRe-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.
Victor Hernandez [Sat, 7 Nov 2009 00:16:28 +0000 (00:16 +0000)]
Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.

Here is the original commit message:

This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments.

Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.

Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.

Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses.  The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.

Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses.  The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.

Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.

Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86311 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago80-columns
Jim Grosbach [Sat, 7 Nov 2009 00:13:30 +0000 (00:13 +0000)]
80-columns

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86310 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGive the JITResolver a direct pointer to its JITEmitter, and use that instead
Jeffrey Yasskin [Sat, 7 Nov 2009 00:00:10 +0000 (00:00 +0000)]
Give the JITResolver a direct pointer to its JITEmitter, and use that instead
of going through the global TheJIT variable.  This makes it easier to use
features of JITEmitter that aren't in JITCodeEmitter for fixing PR5201.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86305 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Add pseudo instructions tLDRpci_pic and t2LDRpci_pic which does a pc-relative
Evan Cheng [Fri, 6 Nov 2009 23:52:48 +0000 (23:52 +0000)]
- Add pseudo instructions tLDRpci_pic and t2LDRpci_pic which does a pc-relative
  load of a GV from constantpool and then add pc. It allows the code sequence to
  be rematerializable so it would be hoisted by machine licm.
- Add a late pass to break these pseudo instructions into a number of real
  instructions. Also move the code in Thumb2 IT pass that breaks up t2MOVi32imm
  to this pass. This is done before post regalloc scheduling to allow the
  scheduler to proper schedule these instructions. It also allow them to be
  if-converted and shrunk by later passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86304 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHonour subreg machine operands during asmprinting
Anton Korobeynikov [Fri, 6 Nov 2009 23:45:15 +0000 (23:45 +0000)]
Honour subreg machine operands during asmprinting

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86303 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrint VMOV (immediate) operands as hexadecimal values. Apple's assembler
Bob Wilson [Fri, 6 Nov 2009 23:33:28 +0000 (23:33 +0000)]
Print VMOV (immediate) operands as hexadecimal values.  Apple's assembler
will not accept negative values for these.  LLVM's default operand printing
sign extends values, so that valid unsigned values appear as negative
immediates.  Print all VMOV immediate operands as hex values to resolve this.
Radar 7372576.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86301 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a bug where we'd call SplitBlockPredecessors with a pred in the
Chris Lattner [Fri, 6 Nov 2009 23:19:58 +0000 (23:19 +0000)]
Fix a bug where we'd call SplitBlockPredecessors with a pred in the
set only once even if it has multiple edges to BB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86299 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a broken test.
Bob Wilson [Fri, 6 Nov 2009 23:06:42 +0000 (23:06 +0000)]
Fix a broken test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86298 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix comment typos.
Bob Wilson [Fri, 6 Nov 2009 22:38:38 +0000 (22:38 +0000)]
Fix comment typos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86295 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove ARMPCLabelIndex from ARMISelLowering. Use ARMFunctionInfo::createConstPoolEntr...
Evan Cheng [Fri, 6 Nov 2009 22:24:13 +0000 (22:24 +0000)]
Remove ARMPCLabelIndex from ARMISelLowering. Use ARMFunctionInfo::createConstPoolEntryUId() instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86294 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCallInst::CreateMalloc() and CallInst::CreateFree() need to create calls with correct...
Victor Hernandez [Fri, 6 Nov 2009 21:43:21 +0000 (21:43 +0000)]
CallInst::CreateMalloc() and CallInst::CreateFree() need to create calls with correct calling convention

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86290 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove function left over from other jump threading cleanup.
Eli Friedman [Fri, 6 Nov 2009 21:24:57 +0000 (21:24 +0000)]
Remove function left over from other jump threading cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86289 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix typo
Gabor Greif [Fri, 6 Nov 2009 20:10:46 +0000 (20:10 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86281 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a problem discovered on self host.
Chris Lattner [Fri, 6 Nov 2009 19:21:48 +0000 (19:21 +0000)]
Fix a problem discovered on self host.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86278 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove more code subsumed by r86264
Chris Lattner [Fri, 6 Nov 2009 18:24:32 +0000 (18:24 +0000)]
remove more code subsumed by r86264

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86270 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTolerate invalid derived type.
Devang Patel [Fri, 6 Nov 2009 18:24:05 +0000 (18:24 +0000)]
Tolerate invalid derived type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86269 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoeliminate some more code subsumed by r86264
Chris Lattner [Fri, 6 Nov 2009 18:22:54 +0000 (18:22 +0000)]
eliminate some more code subsumed by r86264

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86267 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove now redundant code, r86264 handles this case.
Chris Lattner [Fri, 6 Nov 2009 18:20:58 +0000 (18:20 +0000)]
remove now redundant code, r86264 handles this case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86266 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtend jump threading to support much more general threading
Chris Lattner [Fri, 6 Nov 2009 18:15:14 +0000 (18:15 +0000)]
Extend jump threading to support much more general threading
predicates.  This allows us to jump thread things like:

_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit119:
  %tmp1.i24166 = phi i8 [ 1, %bb5.i117 ], [ %tmp1.i24165, %_Z....exit ], [ %tmp1.i24165, %bb4.i114 ]
  %toBoolnot.i87 = icmp eq i8 %tmp1.i24166, 0     ; <i1> [#uses=1]
  %tmp4.i90 = icmp eq i32 %tmp2.i, 6              ; <i1> [#uses=1]
  %or.cond173 = and i1 %toBoolnot.i87, %tmp4.i90  ; <i1> [#uses=1]
  br i1 %or.cond173, label %bb4.i96, label %_ZN12...

Where it is "obvious" that when coming from %bb5.i117 that the 'and' is always
false.  This triggers a surprisingly high number of times in the testsuite,
and gets us closer to generating good code for doug's strswitch testcase.

This also make a bunch of other code in jump threading redundant, I'll rip
out in the next patch.  This survived an enable-checking llvm-gcc bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86264 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse WriteAsOperand to print GlobalAddress MachineOperands. This
Dan Gohman [Fri, 6 Nov 2009 18:03:10 +0000 (18:03 +0000)]
Use WriteAsOperand to print GlobalAddress MachineOperands. This
prints them with the leading '@'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86261 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not bother to emit debug info for nameless global variable.
Devang Patel [Fri, 6 Nov 2009 17:58:12 +0000 (17:58 +0000)]
Do not bother to emit debug info for nameless global variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86259 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPass StringRef by value.
Daniel Dunbar [Fri, 6 Nov 2009 10:58:06 +0000 (10:58 +0000)]
Pass StringRef by value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclang++ points out that this is pointless.
Chris Lattner [Fri, 6 Nov 2009 06:33:01 +0000 (06:33 +0000)]
clang++ points out that this is pointless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86239 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove some more Context arguments.
Chris Lattner [Fri, 6 Nov 2009 05:59:53 +0000 (05:59 +0000)]
remove some more Context arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86235 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a bunch of extraneous LLVMContext arguments
Chris Lattner [Fri, 6 Nov 2009 04:27:31 +0000 (04:27 +0000)]
remove a bunch of extraneous LLVMContext arguments
from various APIs, addressing PR5325.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86231 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNewNighlytTest: Fix timestamp format to actually make sense (it was missing the hour).
Daniel Dunbar [Fri, 6 Nov 2009 04:12:13 +0000 (04:12 +0000)]
NewNighlytTest: Fix timestamp format to actually make sense (it was missing the hour).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86229 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNewNightlyTest: Add -noclean option, which doesn't run 'make clean' before building...
Daniel Dunbar [Fri, 6 Nov 2009 04:12:07 +0000 (04:12 +0000)]
NewNightlyTest: Add -noclean option, which doesn't run 'make clean' before building LLVM (for testing).

Also, switch to always running 'make clean' in the test-suite directories.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86228 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNewNightlyTest: Unbreak passing the build directory via a positional argument.
Daniel Dunbar [Fri, 6 Nov 2009 04:12:02 +0000 (04:12 +0000)]
NewNightlyTest: Unbreak passing the build directory via a positional argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86227 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNewNightlyTest: Add -llvmgccdir as alternative to environment variable.
Daniel Dunbar [Fri, 6 Nov 2009 04:11:29 +0000 (04:11 +0000)]
NewNightlyTest: Add -llvmgccdir as alternative to environment variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86226 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r86077 because it caused crashes in 179.art and 175.vpr on ARM
Victor Hernandez [Fri, 6 Nov 2009 01:33:24 +0000 (01:33 +0000)]
Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86213 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not try to emit debug info entry for dead global variable.
Devang Patel [Fri, 6 Nov 2009 01:30:04 +0000 (01:30 +0000)]
Do not try to emit debug info entry for dead global variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86212 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't print a redundant tab for inline asm, and do use the new printKill.
Dan Gohman [Fri, 6 Nov 2009 00:19:43 +0000 (00:19 +0000)]
Don't print a redundant tab for inline asm, and do use the new printKill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86206 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a bunch of missing "template" keywords to disambiguate dependent template names...
Douglas Gregor [Fri, 6 Nov 2009 00:12:53 +0000 (00:12 +0000)]
Add a bunch of missing "template" keywords to disambiguate dependent template names. GCC eats this ill-formed code, Clang does not. I already filed PR5404 to improve recovery in this case

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86204 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR5315, original patch by Nicolas Capens!
Eric Christopher [Fri, 6 Nov 2009 00:11:57 +0000 (00:11 +0000)]
Fix PR5315, original patch by Nicolas Capens!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86203 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out the printing of the leading tab into printInlineAsm.
Dan Gohman [Fri, 6 Nov 2009 00:04:54 +0000 (00:04 +0000)]
Factor out the printing of the leading tab into printInlineAsm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86199 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake printImplicitDef and printKill non-virtual, since they don't
Dan Gohman [Fri, 6 Nov 2009 00:04:05 +0000 (00:04 +0000)]
Make printImplicitDef and printKill non-virtual, since they don't
need to be overridden.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse SUBREG_TO_REG instead of INSERT_SUBREG to model x86-64's
Dan Gohman [Thu, 5 Nov 2009 23:53:08 +0000 (23:53 +0000)]
Use SUBREG_TO_REG instead of INSERT_SUBREG to model x86-64's
implicit zero-extend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86196 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.
Dan Gohman [Thu, 5 Nov 2009 23:34:59 +0000 (23:34 +0000)]
Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate these tests for the new label names.
Dan Gohman [Thu, 5 Nov 2009 23:31:40 +0000 (23:31 +0000)]
Update these tests for the new label names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86192 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the label name generation for address-taken labels to avoid potential
Dan Gohman [Thu, 5 Nov 2009 23:14:35 +0000 (23:14 +0000)]
Fix the label name generation for address-taken labels to avoid potential
problems with name collisions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86189 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake a few more LLVM headers parsable as standalone headers.
Douglas Gregor [Thu, 5 Nov 2009 23:01:30 +0000 (23:01 +0000)]
Make a few more LLVM headers parsable as standalone headers.

Fix some problems with the hidden copy constructors for
ImmutableMap/ImmutableSet found by Clang++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86186 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach lit's SyntaxCheckTest two new tricks:
Douglas Gregor [Thu, 5 Nov 2009 22:58:04 +0000 (22:58 +0000)]
Teach lit's SyntaxCheckTest two new tricks:
  - skip .svn directories
  - add a set of excluded filenames so we can easily skip tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86185 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded support for renumbering existing index list elements. Removed some junk from...
Lang Hames [Thu, 5 Nov 2009 22:20:57 +0000 (22:20 +0000)]
Added support for renumbering existing index list elements. Removed some junk from the initial numbering code in runOnMachineFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86184 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid calling getUniqueExitBlocks from within LoopSimplify, as it depends
Dan Gohman [Thu, 5 Nov 2009 21:48:32 +0000 (21:48 +0000)]
Avoid calling getUniqueExitBlocks from within LoopSimplify, as it depends
on loops having dedicated exits, which LoopSimplify can no longer always
guarantee.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86181 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLoopDeletion depends on loops having dedicated exits.
Dan Gohman [Thu, 5 Nov 2009 21:47:04 +0000 (21:47 +0000)]
LoopDeletion depends on loops having dedicated exits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86180 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe introduction of indirectbr meant the introduction of
Dan Gohman [Thu, 5 Nov 2009 21:14:46 +0000 (21:14 +0000)]
The introduction of indirectbr meant the introduction of
unsplittable critical edges, which means the introduction of
loops which cannot be transformed to LoopSimplify form. Fix
LoopSimplify to avoid transforming such loops into invalid
code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86176 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate various Loop optimization passes to cope with the possibility that
Dan Gohman [Thu, 5 Nov 2009 21:11:53 +0000 (21:11 +0000)]
Update various Loop optimization passes to cope with the possibility that
LoopSimplify form may not be available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86175 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix bug in aggressive antidep breaking; liveness was not updated correctly for region...
David Goodwin [Thu, 5 Nov 2009 21:06:09 +0000 (21:06 +0000)]
Fix bug in aggressive antidep breaking; liveness was not updated correctly for regions that do not have antidep candidates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86172 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach LoopUnroll how to bail if LoopSimplify can't give it what it needs.
Dan Gohman [Thu, 5 Nov 2009 19:44:06 +0000 (19:44 +0000)]
Teach LoopUnroll how to bail if LoopSimplify can't give it what it needs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86164 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCall getAnalysis<LoopInfo> the normal way, instead of asking passed-in
Dan Gohman [Thu, 5 Nov 2009 19:43:25 +0000 (19:43 +0000)]
Call getAnalysis<LoopInfo> the normal way, instead of asking passed-in
LoopPassManager for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86163 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInstrTypes.h includes Instruction.h, so it's not necessary to include both.
Dan Gohman [Thu, 5 Nov 2009 19:42:20 +0000 (19:42 +0000)]
InstrTypes.h includes Instruction.h, so it's not necessary to include both.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86162 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix IVUsers to avoid assuming that the loop has a unique backedge.
Dan Gohman [Thu, 5 Nov 2009 19:41:37 +0000 (19:41 +0000)]
Fix IVUsers to avoid assuming that the loop has a unique backedge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86161 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete an unused member variable.
Dan Gohman [Thu, 5 Nov 2009 19:33:15 +0000 (19:33 +0000)]
Delete an unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86160 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out the predicate code for loopsimplify form exit blocks into
Dan Gohman [Thu, 5 Nov 2009 19:21:41 +0000 (19:21 +0000)]
Factor out the predicate code for loopsimplify form exit blocks into
a separate helper function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86159 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCMake: Detect dotty.
Oscar Fuentes [Thu, 5 Nov 2009 19:03:26 +0000 (19:03 +0000)]
CMake: Detect dotty.

Patch by Arnaud Allard de Grandmaison!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86153 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCMake: do not test for pthread and dl libraries on Windows (except
Oscar Fuentes [Thu, 5 Nov 2009 18:57:56 +0000 (18:57 +0000)]
CMake: do not test for pthread and dl libraries on Windows (except
Cygwin). Fixes PR 5368.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86152 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid printing a redundant space in SDNode->dump().
Dan Gohman [Thu, 5 Nov 2009 18:49:11 +0000 (18:49 +0000)]
Avoid printing a redundant space in SDNode->dump().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86151 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove uninteresting and confusing debug output.
Dan Gohman [Thu, 5 Nov 2009 18:47:09 +0000 (18:47 +0000)]
Remove uninteresting and confusing debug output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86149 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove llvm::cl::opt's conversion function into the base classes that
Douglas Gregor [Thu, 5 Nov 2009 18:30:50 +0000 (18:30 +0000)]
Move llvm::cl::opt's conversion function into the base classes that
actually need that conversion function. Silences a Clang++ warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86148 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an assertion to catch indirectbr in SplitBlockPredecessors. This
Dan Gohman [Thu, 5 Nov 2009 18:25:44 +0000 (18:25 +0000)]
Add an assertion to catch indirectbr in SplitBlockPredecessors. This
makes several optimization passes abort in cases where they're currently
silently miscompiling code.

Remove the indirectbr assertion from SplitEdge. Indirectbr is only
a problem for critical edges, and SplitEdge defers to SplitCriticalEdge
to handle those, and SplitCriticalEdge has its own assertion for
indirectbr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86147 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a note from PR5313
Chris Lattner [Thu, 5 Nov 2009 18:19:19 +0000 (18:19 +0000)]
add a note from PR5313

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86146 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDeclare classes with matched tags, pointed out by a clang++ warning.
Chris Lattner [Thu, 5 Nov 2009 17:51:44 +0000 (17:51 +0000)]
Declare classes with matched tags, pointed out by a clang++ warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86144 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach SimplifyLibCalls to fold memcmp calls with constant arguments.
Benjamin Kramer [Thu, 5 Nov 2009 17:44:22 +0000 (17:44 +0000)]
Teach SimplifyLibCalls to fold memcmp calls with constant arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86141 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolit: Add --param NAME=VALUE option, for test suite specific use (to communicate
Daniel Dunbar [Thu, 5 Nov 2009 16:27:33 +0000 (16:27 +0000)]
lit: Add --param NAME=VALUE option, for test suite specific use (to communicate
arbitrary command line arguments to the test suite).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86137 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo map insert+find in one step. TODO -= 2.
Benjamin Kramer [Thu, 5 Nov 2009 14:33:27 +0000 (14:33 +0000)]
Do map insert+find in one step. TODO -= 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86133 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPath::createDirectoryOnDisk should ignore existing directories on win32 too.
Benjamin Kramer [Thu, 5 Nov 2009 14:32:40 +0000 (14:32 +0000)]
Path::createDirectoryOnDisk should ignore existing directories on win32 too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86132 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake two more LLVM headers standalone
Douglas Gregor [Thu, 5 Nov 2009 13:39:23 +0000 (13:39 +0000)]
Make two more LLVM headers standalone

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86131 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake a few headers standalone. Plus, add a missing "template" keyword
Douglas Gregor [Thu, 5 Nov 2009 13:30:28 +0000 (13:30 +0000)]
Make a few headers standalone. Plus, add a missing "template" keyword
that Clang diagnoses but GCC does not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86130 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge a few crash tests into crash.ll
Chris Lattner [Thu, 5 Nov 2009 05:57:34 +0000 (05:57 +0000)]
merge a few crash tests into crash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86119 91177308-0d34-0410-b5e6-96231b3b80d8