oota-llvm.git
14 years agofurther simplify EmitAlignment by eliminating the
Chris Lattner [Wed, 28 Apr 2010 01:08:40 +0000 (01:08 +0000)]
further simplify EmitAlignment by eliminating the
ForcedAlignBits argument, tweaking the single client of it.

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

14 years agoremove a dead argument to EmitAlignment.
Chris Lattner [Wed, 28 Apr 2010 01:06:02 +0000 (01:06 +0000)]
remove a dead argument to EmitAlignment.

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

14 years agoremove some default arguments to EmitAlignment.
Chris Lattner [Wed, 28 Apr 2010 01:05:45 +0000 (01:05 +0000)]
remove some default arguments to EmitAlignment.

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

14 years agoRefactor.
Devang Patel [Wed, 28 Apr 2010 01:03:09 +0000 (01:03 +0000)]
Refactor.

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

14 years agoRewrite the section on trap values to contain a generic description
Dan Gohman [Wed, 28 Apr 2010 00:49:41 +0000 (00:49 +0000)]
Rewrite the section on trap values to contain a generic description
of dependence and define trap values in terms of dependence, instead
of trying to cover the concept with a flurry of ad-hoc rules.

The dependence model isn't complete yet, but it's already much more
rigorous than the description it replaces.

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

14 years agoFix spelling errors.
Dan Gohman [Wed, 28 Apr 2010 00:36:01 +0000 (00:36 +0000)]
Fix spelling errors.

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

14 years agoTweak x86 INC/DEC generation to look for CopyToReg or SETCC. Radar 7866163.
Stuart Hastings [Wed, 28 Apr 2010 00:35:10 +0000 (00:35 +0000)]
Tweak x86 INC/DEC generation to look for CopyToReg or SETCC.  Radar 7866163.

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

14 years agofurther clarify alignment of globals, fix instcombine
Chris Lattner [Wed, 28 Apr 2010 00:31:12 +0000 (00:31 +0000)]
further clarify alignment of globals, fix instcombine
to not increase the alignment of globals with an assigned
alignment and section.

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

14 years agoimprove the global variable alignment description.
Chris Lattner [Wed, 28 Apr 2010 00:13:42 +0000 (00:13 +0000)]
improve the global variable alignment description.
it is not generally valid for targets to overalign
them when an alignment is specified.

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

14 years agoUse MachineOperand::is* predicates.
Devang Patel [Tue, 27 Apr 2010 22:24:37 +0000 (22:24 +0000)]
Use MachineOperand::is* predicates.

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

14 years agoUse isReg(), isImm() and isFPImm().
Devang Patel [Tue, 27 Apr 2010 22:04:41 +0000 (22:04 +0000)]
Use isReg(), isImm() and isFPImm().

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

14 years agoCheck operand type first.
Devang Patel [Tue, 27 Apr 2010 21:49:04 +0000 (21:49 +0000)]
Check operand type first.

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

14 years agoFix obvious typos.
Evan Cheng [Tue, 27 Apr 2010 21:46:03 +0000 (21:46 +0000)]
Fix obvious typos.

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

14 years agoIgnore DBG_VALUE instructions that points to undef values.
Devang Patel [Tue, 27 Apr 2010 20:54:45 +0000 (20:54 +0000)]
Ignore DBG_VALUE instructions that points to undef values.

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

14 years agoSRA promotion is also not free.
Evan Cheng [Tue, 27 Apr 2010 19:48:31 +0000 (19:48 +0000)]
SRA promotion is also not free.

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

14 years ago- When legal, promote a load to zextload rather than ext load.
Evan Cheng [Tue, 27 Apr 2010 19:48:13 +0000 (19:48 +0000)]
- When legal, promote a load to zextload rather than ext load.
- Catch more further dag combine opportunities as result of operand promotion, e.g. (i32 anyext (i16 trunc (i32 x))) -> (i32 x)

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

14 years agoIdentify when a lexical scope is split in to multiple instruction ranges. Emit such...
Devang Patel [Tue, 27 Apr 2010 19:46:33 +0000 (19:46 +0000)]
Identify when a lexical scope is split in to multiple instruction ranges. Emit such ranges using DW_AT_ranges.
This patch fixes bug (PR6894) introduced by previous version of this patch.

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

14 years agoDo not count kill, implicit_def instructions as printed instructions.
Evan Cheng [Tue, 27 Apr 2010 19:38:45 +0000 (19:38 +0000)]
Do not count kill, implicit_def instructions as printed instructions.

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

14 years agoround zero-byte .zerofill directives up to 1 byte. This
Chris Lattner [Tue, 27 Apr 2010 07:41:44 +0000 (07:41 +0000)]
round zero-byte .zerofill directives up to 1 byte.  This
should fix some "g++.dg-struct-layout-1" failures,
rdar://7886017

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

14 years agofix wordo
Chris Lattner [Tue, 27 Apr 2010 07:28:11 +0000 (07:28 +0000)]
fix wordo

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

14 years agoremove some comments.
Chris Lattner [Tue, 27 Apr 2010 06:57:10 +0000 (06:57 +0000)]
remove some comments.

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

14 years agoRevert a small part of 102372; this fixes at least one
Dale Johannesen [Tue, 27 Apr 2010 02:10:05 +0000 (02:10 +0000)]
Revert a small part of 102372; this fixes at least one
of the dbg testsuite regressions.  I don't think this is
really the right fix; this change exposed an existing problem
upstream somewhere.

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

14 years agor98363 deleted a '!' when cleaning up whitespace. This caused globals which are
Bill Wendling [Tue, 27 Apr 2010 00:55:25 +0000 (00:55 +0000)]
r98363 deleted a '!' when cleaning up whitespace. This caused globals which are
*not* declarations to *not* be placed in the "preserve" list.
<rdar://problem/7870735>

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

14 years agoUn-XFAIL this on ppc. My enabling of dbg_declare handling
Dale Johannesen [Tue, 27 Apr 2010 00:01:42 +0000 (00:01 +0000)]
Un-XFAIL this on ppc.  My enabling of dbg_declare handling
in ISel fixed it.

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

14 years agoFix a problem that lower invoke has with allocas (PR6694), and
Chris Lattner [Mon, 26 Apr 2010 23:49:32 +0000 (23:49 +0000)]
Fix a problem that lower invoke has with allocas (PR6694), and
add a version of createLowerInvokePass that allows the client
to specify whether it wants "expensive" or "cheap" lowering.

Patch by Alex Mac!

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

14 years agoadd a comment in verbose-asm mode indicating why a noop is being generated.
Chris Lattner [Mon, 26 Apr 2010 23:41:43 +0000 (23:41 +0000)]
add a comment in verbose-asm mode indicating why a noop is being generated.

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

14 years agoon darwin empty functions need to codegen into something of non-zero length,
Chris Lattner [Mon, 26 Apr 2010 23:37:21 +0000 (23:37 +0000)]
on darwin empty functions need to codegen into something of non-zero length,
otherwise labels get incorrectly merged.  We handled this by emitting a
".byte 0", but this isn't correct on thumb/arm targets where the text segment
needs to be a multiple of 2/4 bytes.  Handle this by emitting a noop.  This
is more gross than it should be because arm/ppc are not fully mc'ized yet.

This fixes rdar://7908505

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

14 years agoIntegrate Jeffery Yasskin's suggestions with respect to
Dan Gohman [Mon, 26 Apr 2010 23:36:52 +0000 (23:36 +0000)]
Integrate Jeffery Yasskin's suggestions with respect to
traps flowing through memory references, add some text to
better cover phi nodes and externally-visible side effects,
add an example of instructions being control-dependent
on a trap value, and reword some of the existing trap rules.

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

14 years agoHandle register-to-register copies within the tGPR class.
Bob Wilson [Mon, 26 Apr 2010 23:20:08 +0000 (23:20 +0000)]
Handle register-to-register copies within the tGPR class.
Radar 7896289

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

14 years agoAvoid adding a null MD node operand, which crashes with "-debug" when trying
Bob Wilson [Mon, 26 Apr 2010 22:56:56 +0000 (22:56 +0000)]
Avoid adding a null MD node operand, which crashes with "-debug" when trying
to print the operand.

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

14 years agoUse DW_AT_entry_pc instead of DW_AT_low_pc/DW_AT_high_pc pair. This simplifies debug...
Devang Patel [Mon, 26 Apr 2010 22:54:28 +0000 (22:54 +0000)]
Use DW_AT_entry_pc instead of DW_AT_low_pc/DW_AT_high_pc pair. This simplifies debug range entries.

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

14 years agoWhen checking whether the special handling for an addrec increment which
Dan Gohman [Mon, 26 Apr 2010 21:46:36 +0000 (21:46 +0000)]
When checking whether the special handling for an addrec increment which
doesn't dominate the header is needed, don't check whether the increment
expression has computable loop evolution. While the operands of an
addrec are required to be loop-invariant, they're not required to
dominate any part of the loop. This fixes PR6914.

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

14 years agoAdd a comment to this test.
Dan Gohman [Mon, 26 Apr 2010 21:37:43 +0000 (21:37 +0000)]
Add a comment to this test.

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

14 years agoConsolidate the description of volatile operations, now that some of the
Jeffrey Yasskin [Mon, 26 Apr 2010 21:21:24 +0000 (21:21 +0000)]
Consolidate the description of volatile operations, now that some of the
intrinsics have volatile semantics in addition to the load and store
instructions.

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

14 years agoBranching or switching on trap transfers imminent undefined behavior
Dan Gohman [Mon, 26 Apr 2010 20:54:53 +0000 (20:54 +0000)]
Branching or switching on trap transfers imminent undefined behavior
onto control-dependent instructions.

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

14 years agoRemove crufty comments.
Dale Johannesen [Mon, 26 Apr 2010 20:48:54 +0000 (20:48 +0000)]
Remove crufty comments.

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

14 years agoadd some typewriter tags
Gabor Greif [Mon, 26 Apr 2010 20:46:03 +0000 (20:46 +0000)]
add some typewriter tags

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

14 years agoFix HTML errors that Jeffery Yasskin noticed.
Dan Gohman [Mon, 26 Apr 2010 20:21:21 +0000 (20:21 +0000)]
Fix HTML errors that Jeffery Yasskin noticed.

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

14 years agoHandle target-specific form of DBG_VALUE in AsmPrinter.
Dale Johannesen [Mon, 26 Apr 2010 20:07:31 +0000 (20:07 +0000)]
Handle target-specific form of DBG_VALUE in AsmPrinter.

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

14 years agoAdd DBG_VALUE handling for byval parameters; this
Dale Johannesen [Mon, 26 Apr 2010 20:06:49 +0000 (20:06 +0000)]
Add DBG_VALUE handling for byval parameters; this
produces a comment on targets that support it, but
the Dwarf writer is not hooked up yet.

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

14 years agoAdd PPC AsmPrinter handling for target-specific form of
Dale Johannesen [Mon, 26 Apr 2010 20:05:01 +0000 (20:05 +0000)]
Add PPC AsmPrinter handling for target-specific form of
DBG_VALUE, and a cautionary comment.

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

14 years agoInsert dbg_value instructions for function entry block liveins (i.e. function arguments).
Evan Cheng [Mon, 26 Apr 2010 19:16:00 +0000 (19:16 +0000)]
Insert dbg_value instructions for function entry block liveins (i.e. function arguments).

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

14 years agoPromoting 16-bit cmp / test aren't free. Don't do it.
Evan Cheng [Mon, 26 Apr 2010 19:06:11 +0000 (19:06 +0000)]
Promoting 16-bit cmp / test aren't free. Don't do it.

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

14 years agofix PR6921 a different way. Intead of increasing the
Chris Lattner [Mon, 26 Apr 2010 18:46:46 +0000 (18:46 +0000)]
fix PR6921 a different way.  Intead of increasing the
alignment of globals with a specified alignment, we fix
common variables to obey their alignment.  Add a comment
explaining why this behavior is important.

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

14 years agoRe-enable 102323 with fix: do not update dbg_value's with incorrect frame indices...
Evan Cheng [Mon, 26 Apr 2010 18:37:21 +0000 (18:37 +0000)]
Re-enable 102323 with fix: do not update dbg_value's with incorrect frame indices when the live interval are being re-materialized.

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

14 years agoRevert r102300/102301, which serious broke objc apps.
Chris Lattner [Mon, 26 Apr 2010 18:30:45 +0000 (18:30 +0000)]
Revert r102300/102301, which serious broke objc apps.

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

14 years agofix PR6940: sitofp(undef) folds to 0.0, not undef.
Chris Lattner [Mon, 26 Apr 2010 18:21:23 +0000 (18:21 +0000)]
fix PR6940: sitofp(undef) folds to 0.0, not undef.

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

14 years agowrap some long lines.
Chris Lattner [Mon, 26 Apr 2010 17:42:18 +0000 (17:42 +0000)]
wrap some long lines.

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

14 years agoUpdate MachineSSAUpdater with the same changes I made for the IR-level
Bob Wilson [Mon, 26 Apr 2010 17:40:49 +0000 (17:40 +0000)]
Update MachineSSAUpdater with the same changes I made for the IR-level
SSAUpdater.  I'm going to try to refactor this to share most of the code
between them.

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

14 years agoadd GHC, thanks to David Terei
Chris Lattner [Mon, 26 Apr 2010 17:38:10 +0000 (17:38 +0000)]
add GHC, thanks to David Terei

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

14 years agoTemporary disable spiller modifying dbg_value. It's breaking build.
Evan Cheng [Mon, 26 Apr 2010 08:24:07 +0000 (08:24 +0000)]
Temporary disable spiller modifying dbg_value. It's breaking build.

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

14 years agoRemove a redundant comment.
Evan Cheng [Mon, 26 Apr 2010 08:16:57 +0000 (08:16 +0000)]
Remove a redundant comment.

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

14 years agoAdd PPC specific emitFrameIndexDebugValue.
Evan Cheng [Mon, 26 Apr 2010 07:39:36 +0000 (07:39 +0000)]
Add PPC specific emitFrameIndexDebugValue.

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

14 years agoAdd ARM specific emitFrameIndexDebugValue.
Evan Cheng [Mon, 26 Apr 2010 07:39:25 +0000 (07:39 +0000)]
Add ARM specific emitFrameIndexDebugValue.

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

14 years ago- Move TargetLowering::EmitTargetCodeForFrameDebugValue to TargetInstrInfo and rename...
Evan Cheng [Mon, 26 Apr 2010 07:38:55 +0000 (07:38 +0000)]
- Move TargetLowering::EmitTargetCodeForFrameDebugValue to TargetInstrInfo and rename it to emitFrameIndexDebugValue.
- Teach spiller to modify DBG_VALUE instructions to reference spill slots.

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

14 years agoStop abusing EmitInstrWithCustomInserter for target-dependent
Dale Johannesen [Sun, 25 Apr 2010 21:33:54 +0000 (21:33 +0000)]
Stop abusing EmitInstrWithCustomInserter for target-dependent
form of DEBUG_VALUE, as it doesn't have reasonable default
behavior for unsupported targets.  Add a new hook instead.
No functional change.

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

14 years agoanother typo pointed out by sajd
Gabor Greif [Sun, 25 Apr 2010 21:30:22 +0000 (21:30 +0000)]
another typo pointed out by sajd

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

14 years agofix two typos pointed out by sajd
Gabor Greif [Sun, 25 Apr 2010 21:27:54 +0000 (21:27 +0000)]
fix two typos pointed out by sajd

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

14 years agoAdd comment re byval args. Doesn't actually work this way yet.
Dale Johannesen [Sun, 25 Apr 2010 21:03:54 +0000 (21:03 +0000)]
Add comment re byval args.  Doesn't actually work this way yet.
xs

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

14 years agoAdded bullet about GNUstep Objective-C ABI support to the Clang section of the releas...
David Chisnall [Sun, 25 Apr 2010 19:13:33 +0000 (19:13 +0000)]
Added bullet about GNUstep Objective-C ABI support to the Clang section of the release notes.

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

14 years agotestcase for PR6913
Chris Lattner [Sun, 25 Apr 2010 05:51:14 +0000 (05:51 +0000)]
testcase for PR6913

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

14 years agothis passes now.
Chris Lattner [Sun, 25 Apr 2010 05:49:31 +0000 (05:49 +0000)]
this passes now.

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

14 years agoFix PR6921: globals were not getting correctly rounded up to their
Chris Lattner [Sun, 25 Apr 2010 05:30:43 +0000 (05:30 +0000)]
Fix PR6921: globals were not getting correctly rounded up to their
preferred alignment unless they were common or some other special
case.

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

14 years agosilence a warning, patch by "mike".
Chris Lattner [Sun, 25 Apr 2010 04:44:26 +0000 (04:44 +0000)]
silence a warning, patch by "mike".

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

14 years agoremove #if 1's.
Chris Lattner [Sun, 25 Apr 2010 04:43:02 +0000 (04:43 +0000)]
remove #if 1's.

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

14 years agoFix an autoconf bug: The second argument to AC_LANG_PROGRAM is code that
Dan Gohman [Sun, 25 Apr 2010 00:12:20 +0000 (00:12 +0000)]
Fix an autoconf bug: The second argument to AC_LANG_PROGRAM is code that
gets placed inside a main function, and should not itself be a main
function. This is silently hidden in GCC-hosted builds because the
inner main looks like a nested function declaration, which GCC supports.
In builds with compilers which do not support nested functions (by default),
this was causing an error, which caused these autoconf checks to fail,
leaving their options disabled.

This fixes test/Feature/load_module.ll on x86_64-unknown-linux-gnu
llvm-gcc selfhost builds, among other things.

This also includes a regenerated configure, as the diff is small and telling.

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

14 years agoPHI nodes also do not necessarily return trap with a trap operand.
Dan Gohman [Sat, 24 Apr 2010 22:15:58 +0000 (22:15 +0000)]
PHI nodes also do not necessarily return trap with a trap operand.

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

14 years agoFix typo.
Nick Lewycky [Sat, 24 Apr 2010 22:01:40 +0000 (22:01 +0000)]
Fix typo.

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

14 years agoUse provided llvm-defined variables instead of twisting user-controlled knobs.
Nick Lewycky [Sat, 24 Apr 2010 05:07:24 +0000 (05:07 +0000)]
Use provided llvm-defined variables instead of twisting user-controlled knobs.
No visible change.

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

14 years agoDon't touch CXXFLAGS. If it's set in the environment then sub-makes will see
Nick Lewycky [Sat, 24 Apr 2010 04:56:34 +0000 (04:56 +0000)]
Don't touch CXXFLAGS. If it's set in the environment then sub-makes will see
the variable that we set as though it came from the user. Fixes PR6835.

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

14 years agoAvoid promoting a i16 node if it would eliminate a (store (op (load))) opportunity.
Evan Cheng [Sat, 24 Apr 2010 04:44:57 +0000 (04:44 +0000)]
Avoid promoting a i16 node if it would eliminate a (store (op (load))) opportunity.

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

14 years agoWhen a load operand is promoted to an extload, replace other uses with uses of extloa...
Evan Cheng [Sat, 24 Apr 2010 04:43:44 +0000 (04:43 +0000)]
When a load operand is promoted to an extload, replace other uses with uses of extload result truncated.

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

14 years agoGeneralize LSR's OptimizeMax to handle the new kinds of max expressions
Dan Gohman [Sat, 24 Apr 2010 03:13:44 +0000 (03:13 +0000)]
Generalize LSR's OptimizeMax to handle the new kinds of max expressions
that indvars may use, now that indvars is recognizing le and ge loops.

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

14 years agoScalarEvolution support for <= and >= loops.
Dan Gohman [Sat, 24 Apr 2010 03:09:42 +0000 (03:09 +0000)]
ScalarEvolution support for <= and >= loops.

Also, generalize ScalarEvolutions's min and max recognition to handle
some new forms of min and max that this change makes more common.

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

14 years agoUse SimplifyICmpOperands in isKnownPredicate too.
Dan Gohman [Sat, 24 Apr 2010 01:38:36 +0000 (01:38 +0000)]
Use SimplifyICmpOperands in isKnownPredicate too.

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

14 years agoUpdate isImpliedCond to use the new SimplifyICmpOperands utility.
Dan Gohman [Sat, 24 Apr 2010 01:34:53 +0000 (01:34 +0000)]
Update isImpliedCond to use the new SimplifyICmpOperands utility.

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

14 years agoAdd a new utility function SimplifyICmpOperands. Much of this code is
Dan Gohman [Sat, 24 Apr 2010 01:28:42 +0000 (01:28 +0000)]
Add a new utility function SimplifyICmpOperands. Much of this code is
refactored out of ScalarEvolution::isImpliedCond, which will be updated
to use this new utility routine soon.

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

14 years agoApply a fix for a vector setcc dagcombine from Jan Sjodin. No
Dan Gohman [Sat, 24 Apr 2010 01:17:30 +0000 (01:17 +0000)]
Apply a fix for a vector setcc dagcombine from Jan Sjodin. No
testcase yet, as the testcase now fails downstream.

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

14 years agoFixed edis to tokenize instructions with no
Sean Callanan [Sat, 24 Apr 2010 01:00:16 +0000 (01:00 +0000)]
Fixed edis to tokenize instructions with no
operands correctly.

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

14 years agocross-build Makefile needs to unset CFLAGS/CXXFLAGS when building the build-side...
Jim Grosbach [Sat, 24 Apr 2010 00:46:14 +0000 (00:46 +0000)]
cross-build Makefile needs to unset CFLAGS/CXXFLAGS when building the build-side utilities since the flags will be for the cross-compiler.

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

14 years agono longer xfail
Chris Lattner [Fri, 23 Apr 2010 22:39:33 +0000 (22:39 +0000)]
no longer xfail

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

14 years agoFixes to edis that mark x86 call targets as
Sean Callanan [Fri, 23 Apr 2010 22:17:17 +0000 (22:17 +0000)]
Fixes to edis that mark x86 call targets as
memory operands rather than immediate operands.

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

14 years agoPer Chris, fuse four trivial tests using grep (r102199) into one that uses FileCheck.
Stuart Hastings [Fri, 23 Apr 2010 22:12:57 +0000 (22:12 +0000)]
Per Chris, fuse four trivial tests using grep (r102199) into one that uses FileCheck.

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

14 years agoenable my inliner change: add newly devirtualized call sites to
Chris Lattner [Fri, 23 Apr 2010 21:16:07 +0000 (21:16 +0000)]
enable my inliner change: add newly devirtualized call sites to
the worklist, making them inline candidates.

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

14 years agoChange TargetData's algorithm for computing defualt vector type
Dan Gohman [Fri, 23 Apr 2010 19:41:15 +0000 (19:41 +0000)]
Change TargetData's algorithm for computing defualt vector type
alignment to match what's used in clang and GCC for __alignof, rather
than trying to guess what Legalize is going to be doing.

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

14 years agoCode refactoring.
Evan Cheng [Fri, 23 Apr 2010 19:10:30 +0000 (19:10 +0000)]
Code refactoring.

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

14 years agoAdd some missing x86 patterns for movdq2q. Fixes two (LLVM-)GCC DejaGNU testcases...
Stuart Hastings [Fri, 23 Apr 2010 19:03:32 +0000 (19:03 +0000)]
Add some missing x86 patterns for movdq2q.  Fixes two (LLVM-)GCC DejaGNU testcases.  Radar 6881029.

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

14 years agofix some failures my callgraph dump format change broke.
Chris Lattner [Fri, 23 Apr 2010 18:38:40 +0000 (18:38 +0000)]
fix some failures my callgraph dump format change broke.

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

14 years agoswitch InlineInfo.DevirtualizedCalls's list to be of WeakVH.
Chris Lattner [Fri, 23 Apr 2010 18:37:01 +0000 (18:37 +0000)]
switch InlineInfo.DevirtualizedCalls's list to be of WeakVH.
This fixes a bug where calls inlined into an invoke would get
changed into an invoke but the array would keep pointing to
the (now dead) call.  The improved inliner behavior is still
disabled for now.

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

14 years agotestcase for the bug that required a patch to be reverted.
Chris Lattner [Fri, 23 Apr 2010 18:31:01 +0000 (18:31 +0000)]
testcase for the bug that required a patch to be reverted.

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

14 years agofix callgraph dump to not print 0x0x1234 for nodes.
Chris Lattner [Fri, 23 Apr 2010 18:23:40 +0000 (18:23 +0000)]
fix callgraph dump to not print 0x0x1234 for nodes.
Add the instruction pointer value for debuggability.
We now get dump output that looks like this:

Call graph node for function: 'f1'<<0x1017086b0>>  #uses=1
  CS<0x1017046f8> calls external node

Call graph node for function: '_ZNSt6vectorIdSaIdEEC1EmRKdRKS0_'<<0x1017086f0>>  #uses=1
  CS<0x0> calls external node

Call graph node for function: 'f4'<<0x1017087a0>>  #uses=1
  CS<0x101708c88> calls function 'f3'

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

14 years agoFix X86ISD::CMP i16 to i32 promotion.
Evan Cheng [Fri, 23 Apr 2010 18:21:16 +0000 (18:21 +0000)]
Fix X86ISD::CMP i16 to i32 promotion.

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

14 years agoMove FastISel's HandlePHINodesInSuccessorBlocks call down into FastISel
Dan Gohman [Fri, 23 Apr 2010 15:29:50 +0000 (15:29 +0000)]
Move FastISel's HandlePHINodesInSuccessorBlocks call down into FastISel
itself too.

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

14 years agoSwitch getelementptr inbounds and sdiv exact from undef to trap.
Dan Gohman [Fri, 23 Apr 2010 15:23:32 +0000 (15:23 +0000)]
Switch getelementptr inbounds and sdiv exact from undef to trap.

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

14 years agoFixed EDOperand to use the operand type, not the
Sean Callanan [Fri, 23 Apr 2010 01:56:36 +0000 (01:56 +0000)]
Fixed EDOperand to use the operand type, not the
flags, to determine whether or not the operand is
a memory operand.

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

14 years agoFix LSR to tolerate cases where ScalarEvolution initially
Dan Gohman [Fri, 23 Apr 2010 01:55:05 +0000 (01:55 +0000)]
Fix LSR to tolerate cases where ScalarEvolution initially
misses an opportunity to fold add operands, but folds them
after LSR has separated them out. This fixes rdar://7886751.

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

14 years agoWhen it doesn't matter whether zero or sign extension is used,
Dan Gohman [Fri, 23 Apr 2010 01:51:29 +0000 (01:51 +0000)]
When it doesn't matter whether zero or sign extension is used,
use ScalarEvolutions "any" extend function.

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

14 years agoRevert 102135, 102129, 102127, 102106, 102104, 102102, 102012, 102004,
Dan Gohman [Fri, 23 Apr 2010 01:18:53 +0000 (01:18 +0000)]
Revert 102135, 102129, 102127, 102106, 102104, 102102, 102012, 102004,
because 102004 causes codegen to emit invalid assembly on at least
x86_64-unknown-gnu-linux.

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

14 years agoreject invalid comma stuff with a message. We reject the case in
Chris Lattner [Fri, 23 Apr 2010 00:50:50 +0000 (00:50 +0000)]
reject invalid comma stuff with a message.  We reject the case in
PR6888 with:

$ llvm-as t.ll
llvm-as: t.ll:2:29: error: expected metadata or 'align'
 store <3 x i32> %x, i32 1, i32 1>, <3 x i32>* %p
                            ^

instead of:

$ llvm-as t.ll
llvm-as:

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

14 years agodisable my previous inliner patch, it appears to be busting self-host.
Chris Lattner [Fri, 23 Apr 2010 00:41:03 +0000 (00:41 +0000)]
disable my previous inliner patch, it appears to be busting self-host.

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