oota-llvm.git
14 years agoFix the noalias checking so that it doesn't worry about
Dan Gohman [Tue, 1 Jun 2010 20:51:40 +0000 (20:51 +0000)]
Fix the noalias checking so that it doesn't worry about
an argument aliasing itself. Thanks Duncan!

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

14 years agoKeep track of incoming debug value of unused argument.
Devang Patel [Tue, 1 Jun 2010 19:59:01 +0000 (19:59 +0000)]
Keep track of incoming debug value of unused argument.
Radar 7927666.

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

14 years agoFill in missing support for ISD::FEXP, ISD::FPOWI, and friends.
Dan Gohman [Tue, 1 Jun 2010 18:35:14 +0000 (18:35 +0000)]
Fill in missing support for ISD::FEXP, ISD::FPOWI, and friends.

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

14 years agoAdd a FIXME
Jim Grosbach [Tue, 1 Jun 2010 18:06:35 +0000 (18:06 +0000)]
Add a FIXME

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

14 years agomirror of r105280 changes for LowerInvoke, which uses the same basic logic here
Jim Grosbach [Tue, 1 Jun 2010 18:04:56 +0000 (18:04 +0000)]
mirror of r105280 changes for LowerInvoke, which uses the same basic logic here

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

14 years agoWhen processing function arguments when splitting live ranges across invokes,
Jim Grosbach [Tue, 1 Jun 2010 18:04:09 +0000 (18:04 +0000)]
When processing function arguments when splitting live ranges across invokes,
handle structs passed by value via an extract/insert pair, as a bitcast
won't work on a struct. rdar://7742824

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

14 years agoUse SmallVector instead of std::vector.
Jim Grosbach [Tue, 1 Jun 2010 17:56:41 +0000 (17:56 +0000)]
Use SmallVector instead of std::vector.

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

14 years agoDelete unused variables (that weren't even getting expanded).
Dan Gohman [Tue, 1 Jun 2010 17:26:14 +0000 (17:26 +0000)]
Delete unused variables (that weren't even getting expanded).

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

14 years agoFreebsd's sed doesn't support \< in regexps, and GNU sed doesn't
Dan Gohman [Tue, 1 Jun 2010 17:08:56 +0000 (17:08 +0000)]
Freebsd's sed doesn't support \< in regexps, and GNU sed doesn't
support [[:<:]]. Use beginning-of-line and end-of-line anchors
instead.

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

14 years agoRefactor some SSE 2 unpack instructions
Bruno Cardoso Lopes [Tue, 1 Jun 2010 17:02:50 +0000 (17:02 +0000)]
Refactor some SSE 2 unpack instructions

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

14 years agoDon't call flush() at a library level which isn't checking for errors
Dan Gohman [Tue, 1 Jun 2010 16:31:34 +0000 (16:31 +0000)]
Don't call flush() at a library level which isn't checking for errors
and doesn't know where the output is going.

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

14 years agoFix a spello affecting platforms where the configure check fails.
Dan Gohman [Tue, 1 Jun 2010 16:22:27 +0000 (16:22 +0000)]
Fix a spello affecting platforms where the configure check fails.

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

14 years agoFix a typo in a comment.
Dan Gohman [Tue, 1 Jun 2010 16:10:08 +0000 (16:10 +0000)]
Fix a typo in a comment.

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

14 years ago-retain-symbols-file is not what it seems. Update the makefiles
Dan Gohman [Tue, 1 Jun 2010 14:56:56 +0000 (14:56 +0000)]
-retain-symbols-file is not what it seems. Update the makefiles
and configury to use --version-script.

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

14 years agoFix extra fread after EOF, non-wires-crossed version.
Dan Gohman [Tue, 1 Jun 2010 14:09:29 +0000 (14:09 +0000)]
Fix extra fread after EOF, non-wires-crossed version.

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

14 years agoFix handling of 'load' nodes.
Kalle Raiskila [Tue, 1 Jun 2010 13:34:47 +0000 (13:34 +0000)]
Fix handling of 'load' nodes.

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

14 years agoDebreak test for non-Darwin.
Bill Wendling [Mon, 31 May 2010 21:47:24 +0000 (21:47 +0000)]
Debreak test for non-Darwin.

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

14 years agoFix PR7272: when inlining through a callsite with byval arguments,
Duncan Sands [Mon, 31 May 2010 21:00:26 +0000 (21:00 +0000)]
Fix PR7272: when inlining through a callsite with byval arguments,
the newly created allocas may be used by inlined calls, so these
need to have their tail call flags cleared.  Fixes PR7272.

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

14 years agoAdd a test for the llvm-gcc commit in r90200.
Eric Christopher [Mon, 31 May 2010 20:39:10 +0000 (20:39 +0000)]
Add a test for the llvm-gcc commit in r90200.

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

14 years agofix PR6623: when optimizing for size, don't inline memcpy/memsets
Chris Lattner [Mon, 31 May 2010 17:30:14 +0000 (17:30 +0000)]
fix PR6623: when optimizing for size, don't inline memcpy/memsets
that are too large.  This causes the freebsd bootloader to be too
large apparently.

It's unclear if this should be an -Os or -Oz thing.  Thoughts welcome.

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

14 years agoupgrade and filecheckize this test.
Chris Lattner [Mon, 31 May 2010 17:27:17 +0000 (17:27 +0000)]
upgrade and filecheckize this test.

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

14 years agothe 'limit' argument to FindOptimalMemOpLowering is unsigned, not uint64_t.
Chris Lattner [Mon, 31 May 2010 17:12:23 +0000 (17:12 +0000)]
the 'limit' argument to FindOptimalMemOpLowering is unsigned, not uint64_t.

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

14 years agorevert r105223 which broke all my testing.
Chris Lattner [Mon, 31 May 2010 17:10:45 +0000 (17:10 +0000)]
revert r105223 which broke all my testing.

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

14 years agoFix count so that it doesn't make an extra fread call after
Dan Gohman [Mon, 31 May 2010 16:13:45 +0000 (16:13 +0000)]
Fix count so that it doesn't make an extra fread call after
EOF is detected.

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

14 years agoAvoid swap when a copy suffices.
Benjamin Kramer [Mon, 31 May 2010 12:50:41 +0000 (12:50 +0000)]
Avoid swap when a copy suffices.

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

14 years agoThe memcpy intrinsic only takes i8* for %src and %dst, so cast them to that
Nick Lewycky [Mon, 31 May 2010 06:16:35 +0000 (06:16 +0000)]
The memcpy intrinsic only takes i8* for %src and %dst, so cast them to that
first. Fixes PR7265.

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

14 years agoUse `llvm::next' instead of `next' to make VC++ 2010 happy.
Oscar Fuentes [Sun, 30 May 2010 13:14:21 +0000 (13:14 +0000)]
Use `llvm::next' instead of `next' to make VC++ 2010 happy.

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

14 years agoAllow for creation of clang DeclNodes tables.
Sean Hunt [Sun, 30 May 2010 07:21:42 +0000 (07:21 +0000)]
Allow for creation of clang DeclNodes tables.

The StmtNodes generator has been generalized to allow for the
creation of DeclNodes tables as well, and another emitter was
added for DeclContexts.

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

14 years agoSome A9 load/store cleanups
Anton Korobeynikov [Sat, 29 May 2010 19:25:39 +0000 (19:25 +0000)]
Some A9 load/store cleanups

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

14 years agoSome rough approximations for load/stores on A9
Anton Korobeynikov [Sat, 29 May 2010 19:25:34 +0000 (19:25 +0000)]
Some rough approximations for load/stores on A9

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

14 years agoNEON/VFP stuff can be issued only via Pipe1 on A9
Anton Korobeynikov [Sat, 29 May 2010 19:25:29 +0000 (19:25 +0000)]
NEON/VFP stuff can be issued only via Pipe1 on A9

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

14 years agoAdd some integer instruction itineraries for A9
Anton Korobeynikov [Sat, 29 May 2010 19:25:17 +0000 (19:25 +0000)]
Add some integer instruction itineraries for A9

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

14 years agoReorder some code in SelectionDAGBuilder.
Dan Gohman [Sat, 29 May 2010 17:53:24 +0000 (17:53 +0000)]
Reorder some code in SelectionDAGBuilder.

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

14 years agoSelectionDAG shouldn't have a FunctionLoweringInfo member. RegsForValue
Dan Gohman [Sat, 29 May 2010 17:03:36 +0000 (17:03 +0000)]
SelectionDAG shouldn't have a FunctionLoweringInfo member. RegsForValue
shouldn't have a TargetLoweringInfo member. And FunctionLoweringInfo::set
doesn't needs its EnableFastISel argument.

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

14 years agoRemove unused function.
Benjamin Kramer [Sat, 29 May 2010 14:03:51 +0000 (14:03 +0000)]
Remove unused function.

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

14 years agoDocument aggregate operation constant expressions.
Nick Lewycky [Sat, 29 May 2010 06:44:15 +0000 (06:44 +0000)]
Document aggregate operation constant expressions.

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

14 years agoFix typo.
Nick Lewycky [Sat, 29 May 2010 06:11:16 +0000 (06:11 +0000)]
Fix typo.

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

14 years agoRemove schedule-livein-copies. It's not being used.
Evan Cheng [Sat, 29 May 2010 02:23:39 +0000 (02:23 +0000)]
Remove schedule-livein-copies. It's not being used.

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

14 years agoFix PR7193: if sibling call address can take a register, make sure there are enough...
Evan Cheng [Sat, 29 May 2010 01:35:22 +0000 (01:35 +0000)]
Fix PR7193: if sibling call address can take a register, make sure there are enough registers available by counting inreg arguments.

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

14 years agoHandle composed subreg indices when processing REQ_SEQUENCE instructions.
Jakob Stoklund Olesen [Sat, 29 May 2010 00:14:14 +0000 (00:14 +0000)]
Handle composed subreg indices when processing REQ_SEQUENCE instructions.

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

14 years agoDoh. Machine LICM is re-initializing the CSE map over and over. Patch by Anna Zaks...
Evan Cheng [Sat, 29 May 2010 00:06:36 +0000 (00:06 +0000)]
Doh. Machine LICM is re-initializing the CSE map over and over. Patch by Anna Zaks. rdar://8037934.

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

14 years agoEmit TargetRegisterInfo::composeSubRegIndices().
Jakob Stoklund Olesen [Fri, 28 May 2010 23:48:31 +0000 (23:48 +0000)]
Emit TargetRegisterInfo::composeSubRegIndices().
Also verify that all subregister indices compose unambiguously.

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

14 years agoMerge the SystemZ subreg_even32 SubRegIndex into subreg_32bit. The SubRegIndices
Jakob Stoklund Olesen [Fri, 28 May 2010 23:48:29 +0000 (23:48 +0000)]
Merge the SystemZ subreg_even32 SubRegIndex into subreg_32bit. The SubRegIndices
were overspecified when inheriting sub-subregisters, for instance:

R0Q:subreg_even32 = R0Q:subreg_32bit = R0Q:subreg_even:subreg_32bit.

This meant that composeSubRegIndices(subreg_even, subreg_32bit) was ambiguous.

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

14 years agoFix some latency computation bugs: if the use is not a machine opcode do not just...
Evan Cheng [Fri, 28 May 2010 23:26:21 +0000 (23:26 +0000)]
Fix some latency computation bugs: if the use is not a machine opcode do not just return zero.

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

14 years agoSchedule high latency instructions for latency reduction even if they are not vfp...
Evan Cheng [Fri, 28 May 2010 23:25:23 +0000 (23:25 +0000)]
Schedule high latency instructions for latency reduction even if they are not vfp / NEON instructions.

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

14 years agoFix comment typos.
Dale Johannesen [Fri, 28 May 2010 23:24:28 +0000 (23:24 +0000)]
Fix comment typos.

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

14 years agoMore SSE 1 & 2 merge, this time with logical instructions
Bruno Cardoso Lopes [Fri, 28 May 2010 22:47:03 +0000 (22:47 +0000)]
More SSE 1 & 2 merge, this time with logical instructions

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

14 years agoFix AliasDebugger to be aware of operand values too.
Dan Gohman [Fri, 28 May 2010 22:31:51 +0000 (22:31 +0000)]
Fix AliasDebugger to be aware of operand values too.

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

14 years agoAdd lint checks for function attributes.
Dan Gohman [Fri, 28 May 2010 21:43:57 +0000 (21:43 +0000)]
Add lint checks for function attributes.

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

14 years agoSplit the logic behind CastInst::isNoopCast into a separate static function,
Dan Gohman [Fri, 28 May 2010 21:41:37 +0000 (21:41 +0000)]
Split the logic behind CastInst::isNoopCast into a separate static function,
as is done with most other cast opcode predicates.

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

14 years agoFix a comment; vectors are not a special case here.
Dan Gohman [Fri, 28 May 2010 21:22:45 +0000 (21:22 +0000)]
Fix a comment; vectors are not a special case here.

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

14 years agoMC/X86: Add alias for movzx.
Kevin Enderby [Fri, 28 May 2010 21:20:21 +0000 (21:20 +0000)]
MC/X86: Add alias for movzx.

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

14 years agoMC/X86: Add alias for fwait.
Kevin Enderby [Fri, 28 May 2010 20:59:10 +0000 (20:59 +0000)]
MC/X86: Add alias for fwait.

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

14 years agoFix the use of x86 control and debug registers so that the assertion failure in
Kevin Enderby [Fri, 28 May 2010 19:01:27 +0000 (19:01 +0000)]
Fix the use of x86 control and debug registers so that the assertion failure in
getX86RegNum() does not happen.  Patch by Shantonu Sen!

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

14 years agoFix Data Layout description of floating point.
Dale Johannesen [Fri, 28 May 2010 18:54:47 +0000 (18:54 +0000)]
Fix Data Layout description of floating point.

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

14 years agoAdd missing space; works for me.
Dale Johannesen [Fri, 28 May 2010 18:45:59 +0000 (18:45 +0000)]
Add missing space; works for me.

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

14 years agoAdd a TargetRegisterInfo::composeSubRegIndices hook with a default
Jakob Stoklund Olesen [Fri, 28 May 2010 18:18:53 +0000 (18:18 +0000)]
Add a TargetRegisterInfo::composeSubRegIndices hook with a default
implementation that is correct for most targets. Tablegen will override where
needed.

Add MachineOperand::subst{Virt,Phys}Reg methods that correctly handle existing
subreg indices when sustituting registers.

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

14 years agocorrect retattr
Jim Grosbach [Fri, 28 May 2010 18:03:48 +0000 (18:03 +0000)]
correct retattr

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

14 years agoCosmetic cleanup. No functional change.
Jim Grosbach [Fri, 28 May 2010 17:51:20 +0000 (17:51 +0000)]
Cosmetic cleanup. No functional change.

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

14 years agoFix lint's memcpy and memmove checks, and its basic block traversal.
Dan Gohman [Fri, 28 May 2010 17:44:00 +0000 (17:44 +0000)]
Fix lint's memcpy and memmove checks, and its basic block traversal.

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

14 years agomake sure accesses to set up the jmpbuf don't get moved after it by the scheduler...
Jim Grosbach [Fri, 28 May 2010 17:37:40 +0000 (17:37 +0000)]
make sure accesses to set up the jmpbuf don't get moved after it by the scheduler. Add a missing \n.

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

14 years agoFix more whitespace to be consistent with AsmPrinter.
Dan Gohman [Fri, 28 May 2010 17:13:49 +0000 (17:13 +0000)]
Fix more whitespace to be consistent with AsmPrinter.

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

14 years agoFix whitespace to be more consistent with AsmPrinter's style.
Dan Gohman [Fri, 28 May 2010 17:07:41 +0000 (17:07 +0000)]
Fix whitespace to be more consistent with AsmPrinter's style.

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

14 years agoFix more tests that depended on the default register allocator choice.
Jakob Stoklund Olesen [Fri, 28 May 2010 17:06:30 +0000 (17:06 +0000)]
Fix more tests that depended on the default register allocator choice.

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

14 years agoMinor code simplification.
Dan Gohman [Fri, 28 May 2010 16:50:23 +0000 (16:50 +0000)]
Minor code simplification.

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

14 years agoFix a redundant-return warning.
Dan Gohman [Fri, 28 May 2010 16:50:01 +0000 (16:50 +0000)]
Fix a redundant-return warning.

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

14 years agoDetect self-referential values.
Dan Gohman [Fri, 28 May 2010 16:45:33 +0000 (16:45 +0000)]
Detect self-referential values.

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

14 years agoRemove this va_arg test, which is no longer applicable.
Dan Gohman [Fri, 28 May 2010 16:44:04 +0000 (16:44 +0000)]
Remove this va_arg test, which is no longer applicable.

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

14 years agoRevert 104841, 104842, 104876 due to buildbot failures. Radar 7424645.
Stuart Hastings [Fri, 28 May 2010 16:41:07 +0000 (16:41 +0000)]
Revert 104841, 104842, 104876 due to buildbot failures.  Radar 7424645.

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

14 years agoEli pointed out that va_arg instruction result values don't
Dan Gohman [Fri, 28 May 2010 16:34:49 +0000 (16:34 +0000)]
Eli pointed out that va_arg instruction result values don't
reference the stack.

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

14 years agoTeach lint how to look through simple store+load pairs and other
Dan Gohman [Fri, 28 May 2010 16:21:24 +0000 (16:21 +0000)]
Teach lint how to look through simple store+load pairs and other
effective no-op constructs, to make it more effective on
unoptimized IR.

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

14 years agoMove FindAvailableLoadedValue isSafeToLoadUnconditionally out of
Dan Gohman [Fri, 28 May 2010 16:19:17 +0000 (16:19 +0000)]
Move FindAvailableLoadedValue isSafeToLoadUnconditionally out of
lib/Transforms/Utils and into lib/Analysis so that Analysis passes
can use them.

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

14 years agoConstantFoldConstantExpression can theoretically return null.
Dan Gohman [Fri, 28 May 2010 16:12:08 +0000 (16:12 +0000)]
ConstantFoldConstantExpression can theoretically return null.

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

14 years agoFix a comment.
Dan Gohman [Fri, 28 May 2010 16:06:09 +0000 (16:06 +0000)]
Fix a comment.

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

14 years agoTeach instcombine to promote alloca array sizes.
Dan Gohman [Fri, 28 May 2010 15:09:00 +0000 (15:09 +0000)]
Teach instcombine to promote alloca array sizes.

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

14 years agoAdd a testcase for getelementptr index promotion.
Dan Gohman [Fri, 28 May 2010 15:07:59 +0000 (15:07 +0000)]
Add a testcase for getelementptr index promotion.

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

14 years agoAdd a lint check for returning the address of stack memory.
Dan Gohman [Fri, 28 May 2010 04:33:42 +0000 (04:33 +0000)]
Add a lint check for returning the address of stack memory.

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

14 years agoFix instcombine's handling of alloca to accept non-i32 types.
Dan Gohman [Fri, 28 May 2010 04:33:04 +0000 (04:33 +0000)]
Fix instcombine's handling of alloca to accept non-i32 types.

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

14 years agoComment out some code in prep for actual .td file checkpoint.
Nate Begeman [Fri, 28 May 2010 02:19:08 +0000 (02:19 +0000)]
Comment out some code in prep for actual .td file checkpoint.

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

14 years agoBitcode support for allocas with arbitrary array size types.
Dan Gohman [Fri, 28 May 2010 01:38:28 +0000 (01:38 +0000)]
Bitcode support for allocas with arbitrary array size types.

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

14 years agoFix typo.
Devang Patel [Fri, 28 May 2010 01:29:50 +0000 (01:29 +0000)]
Fix typo.

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

14 years agoFix typo.
Devang Patel [Fri, 28 May 2010 01:17:51 +0000 (01:17 +0000)]
Fix typo.

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

14 years agoFix build breakage.
Eli Friedman [Fri, 28 May 2010 01:15:28 +0000 (01:15 +0000)]
Fix build breakage.

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

14 years agoEliminate the restriction that the array size in an alloca must be i32.
Dan Gohman [Fri, 28 May 2010 01:14:11 +0000 (01:14 +0000)]
Eliminate the restriction that the array size in an alloca must be i32.
This will help reduce the amount of casting required on 64-bit targets.

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

14 years agoAdd support to tablegen for auto-generating arm_neon.h from a tablegen description
Nate Begeman [Fri, 28 May 2010 01:08:32 +0000 (01:08 +0000)]
Add support to tablegen for auto-generating arm_neon.h from a tablegen description
of the intrinsics.  The goal is to auto-generate both support for GCC-style (vector)
and ARM-style (struct of vector) intrinsics.

This is work in progress, but will be completed soon.

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

14 years agoAdd the cc_out operand for t2RSBrs instructions. I missed this when I changed
Bob Wilson [Fri, 28 May 2010 00:27:15 +0000 (00:27 +0000)]
Add the cc_out operand for t2RSBrs instructions.  I missed this when I changed
the instruction class for t2RSB to add that operand in svn r104582.
Radar 8033757.

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

14 years agoAdd a -regalloc=default option that chooses a register allocator based on the -O
Jakob Stoklund Olesen [Thu, 27 May 2010 23:57:25 +0000 (23:57 +0000)]
Add a -regalloc=default option that chooses a register allocator based on the -O
optimization level.

This only really affects llc for now because both the llvm-gcc and clang front
ends override the default register allocator. I intend to remove that code later.

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

14 years agoRemove ancient prototype.
Jakob Stoklund Olesen [Thu, 27 May 2010 23:57:19 +0000 (23:57 +0000)]
Remove ancient prototype.

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

14 years agoUpdate the saved stack pointer in the sjlj function context following either
Jim Grosbach [Thu, 27 May 2010 23:49:24 +0000 (23:49 +0000)]
Update the saved stack pointer in the sjlj function context following either
an alloca() or an llvm.stackrestore(). rdar://8031573

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

14 years agoUse report_fatal_error, not llvm_unreachable.
Evan Cheng [Thu, 27 May 2010 23:45:31 +0000 (23:45 +0000)]
Use report_fatal_error, not llvm_unreachable.

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

14 years agoback out 104862/104869. Can reuse stacksave after all. Very cool.
Jim Grosbach [Thu, 27 May 2010 23:11:57 +0000 (23:11 +0000)]
back out 104862/104869. Can reuse stacksave after all. Very cool.

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

14 years agoFactor out the handler work from SignalHandler into a helper function,
Dan Gohman [Thu, 27 May 2010 23:11:55 +0000 (23:11 +0000)]
Factor out the handler work from SignalHandler into a helper function,
and change llvm::sys::RunInterruptHandlers to call that function directly
instead of calling SignalHandler, because the rest of SignalHandler
invokes side effects which aren't appropriate, including raising the
signal.

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

14 years agollvm can't correctly support 'H', 'Q' and 'R' modifiers. Just mark it an error.
Evan Cheng [Thu, 27 May 2010 22:08:38 +0000 (22:08 +0000)]
llvm can't correctly support 'H', 'Q' and 'R' modifiers. Just mark it an error.

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

14 years agoMC/X86: Add aliases for Jcc variants.
Kevin Enderby [Thu, 27 May 2010 21:33:19 +0000 (21:33 +0000)]
MC/X86: Add aliases for Jcc variants.

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

14 years agoEliminate some unnessary Path::exists() calls.
Dan Gohman [Thu, 27 May 2010 20:51:54 +0000 (20:51 +0000)]
Eliminate some unnessary Path::exists() calls.

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

14 years agoMake ParseIRFile and getLazyIRFileModule incoporate the underlying
Dan Gohman [Thu, 27 May 2010 20:47:38 +0000 (20:47 +0000)]
Make ParseIRFile and getLazyIRFileModule incoporate the underlying
error message string into their own error message string, so that
the information isn't lost.

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

14 years agoDon't flush the raw_ostream in llvm::WriteBitcodeToFile; it's at
Dan Gohman [Thu, 27 May 2010 20:26:51 +0000 (20:26 +0000)]
Don't flush the raw_ostream in llvm::WriteBitcodeToFile; it's at
the wrong level. Clients which need to leave the stream open but
which still require the bitcode bits to be on disk should call
flush themselves.

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

14 years agoDo not drop location info for inlined function args.
Devang Patel [Thu, 27 May 2010 20:25:04 +0000 (20:25 +0000)]
Do not drop location info for inlined function args.

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

14 years agoFix some bad fall-throughs in a switch statement. Both the 'Q' and 'R' cases
Bob Wilson [Thu, 27 May 2010 20:23:42 +0000 (20:23 +0000)]
Fix some bad fall-throughs in a switch statement.  Both the 'Q' and 'R' cases
should fall through to the 'H' case, but instead 'Q' was falling through to 'R'
so that it would do the wrong thing for a big-endian ARM target.

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

14 years agoWhen handling raw_ostream errors manually, use clear_error() so that
Dan Gohman [Thu, 27 May 2010 20:19:47 +0000 (20:19 +0000)]
When handling raw_ostream errors manually, use clear_error() so that
raw_ostream doesn't try to do its own error handling.

Also, close the raw_ostream before checking for errors so that any
errors that occur during closing are caught by the manual check.

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