oota-llvm.git
15 years agoMore Neon clean-up: avoid the need for custom-lowering vld/st-lane intrinsics
Bob Wilson [Tue, 13 Oct 2009 22:29:24 +0000 (22:29 +0000)]
More Neon clean-up: avoid the need for custom-lowering vld/st-lane intrinsics
by creating TargetConstants during instruction selection instead of during
legalization.

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

15 years agoMore bits of the ARM target assembler for llvm-mc to parse immediates.
Kevin Enderby [Tue, 13 Oct 2009 22:19:02 +0000 (22:19 +0000)]
More bits of the ARM target assembler for llvm-mc to parse immediates.
Also fixed a couple of coding style things that crept in.  And added more
to the temporary hacked up ARMAsmParser::MatchInstruction() method for testing.

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

15 years agoTeach basic AA about PHI nodes. If all operands of a phi NoAlias another value than...
Evan Cheng [Tue, 13 Oct 2009 22:02:20 +0000 (22:02 +0000)]
Teach basic AA about PHI nodes. If all operands of a phi NoAlias another value than it's safe to declare the PHI NoAlias the value. Ditto for MustAlias.

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

15 years agoDocumentation for the new msasm flag, which is no
Dale Johannesen [Tue, 13 Oct 2009 21:56:55 +0000 (21:56 +0000)]
Documentation for the new msasm flag, which is no
worse than the rest of the asm documentation.

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

15 years agoNEON VLD/VST are now fully implemented. For operations that expand to
Bob Wilson [Tue, 13 Oct 2009 21:55:24 +0000 (21:55 +0000)]
NEON VLD/VST are now fully implemented.  For operations that expand to
multiple instructions, the expansion is done during selection so there is
no need to do anything special during legalization.

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

15 years agoDo not check use_empty() before replaceAllUsesWith(). This gives ValueHandles a chanc...
Devang Patel [Tue, 13 Oct 2009 21:41:20 +0000 (21:41 +0000)]
Do not check use_empty() before replaceAllUsesWith(). This gives ValueHandles a chance to get properly updated.

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

15 years agoKeep track of stubs that are created. This fixes PR5162 and probably PR4822 and
Jeffrey Yasskin [Tue, 13 Oct 2009 21:32:57 +0000 (21:32 +0000)]
Keep track of stubs that are created. This fixes PR5162 and probably PR4822 and
4406. Patch by Nick Lewycky!

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

15 years agoAdd is_same type trait
Douglas Gregor [Tue, 13 Oct 2009 21:17:00 +0000 (21:17 +0000)]
Add is_same type trait

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

15 years agoIntroduce new convenience methods for sign extending or
Duncan Sands [Tue, 13 Oct 2009 21:04:12 +0000 (21:04 +0000)]
Introduce new convenience methods for sign extending or
truncating an SDValue (depending on whether the target
type is bigger or smaller than the value's type); or zero
extending or truncating it.  Use it in a few places (this
seems to be a popular operation, but I only modified cases
of it in SelectionDAGBuild).  In particular, the eh_selector
lowering was doing this wrong due to a repeated rather than
inverted test, fixed with this change.

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

15 years agoOptimizer may remove debug info. This test checks debug info for include headers.
Devang Patel [Tue, 13 Oct 2009 20:56:38 +0000 (20:56 +0000)]
Optimizer may remove debug info.  This test checks debug info for include headers.

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

15 years agoRevise ARM inline assembly memory operands to require the memory address to
Bob Wilson [Tue, 13 Oct 2009 20:50:28 +0000 (20:50 +0000)]
Revise ARM inline assembly memory operands to require the memory address to
be in a register.  The previous use of ARM address mode 2 was completely
arbitrary and inappropriate for Thumb.  Radar 7137468.

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

15 years agoAdd an "msasm" flag to inline asm as suggested in PR 5125.
Dale Johannesen [Tue, 13 Oct 2009 20:46:56 +0000 (20:46 +0000)]
Add an "msasm" flag to inline asm as suggested in PR 5125.
A little ugliness is accepted to keep the binary file format
compatible.  No functional change yet.

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

15 years agoThese tests now pass.
Devang Patel [Tue, 13 Oct 2009 20:45:18 +0000 (20:45 +0000)]
These tests now pass.

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

15 years agoFix method name in comment, per Bob Wilson.
Sandeep Patel [Tue, 13 Oct 2009 20:25:58 +0000 (20:25 +0000)]
Fix method name in comment, per Bob Wilson.

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

15 years agoUse the new CodeMetrics class to compute code size instead of
Dan Gohman [Tue, 13 Oct 2009 20:12:23 +0000 (20:12 +0000)]
Use the new CodeMetrics class to compute code size instead of
manually counting instructions.

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

15 years agoCompute a full cost value even when a setjmp call is found.
Dan Gohman [Tue, 13 Oct 2009 20:10:10 +0000 (20:10 +0000)]
Compute a full cost value even when a setjmp call is found.

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

15 years agoSplit code not specific to Function inlining out into a separate class,
Dan Gohman [Tue, 13 Oct 2009 19:58:07 +0000 (19:58 +0000)]
Split code not specific to Function inlining out into a separate class,
named CodeMetrics. Move it to be a non-nested class. Rename RegionInfo
back to FunctionInfo.

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

15 years agoAdd debugging output.
David Goodwin [Tue, 13 Oct 2009 19:16:03 +0000 (19:16 +0000)]
Add debugging output.

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

15 years agoProvide a mode for ImmutableMap/ImmutableSet to not automatically canonicalize the...
Ted Kremenek [Tue, 13 Oct 2009 19:08:10 +0000 (19:08 +0000)]
Provide a mode for ImmutableMap/ImmutableSet to not automatically canonicalize the internal functional AVL trees.  This should speedup clients that use ImmutableMap/ImmutableSet but don't require fast comparisons of maps.

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

15 years agoAdd ARMv6T2 SBFX/UBFX instructions. Approved by Anton Korobeynikov.
Sandeep Patel [Tue, 13 Oct 2009 18:59:48 +0000 (18:59 +0000)]
Add ARMv6T2 SBFX/UBFX instructions. Approved by Anton Korobeynikov.

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

15 years agoUpdate CMake file (lexically order files).
Ted Kremenek [Tue, 13 Oct 2009 18:57:27 +0000 (18:57 +0000)]
Update CMake file (lexically order files).

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

15 years agoDo not write empty METADATA_ATTACHMENT record.
Devang Patel [Tue, 13 Oct 2009 18:51:28 +0000 (18:51 +0000)]
Do not write empty METADATA_ATTACHMENT record.

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

15 years agoRemove unnecessary assert.
Devang Patel [Tue, 13 Oct 2009 18:51:03 +0000 (18:51 +0000)]
Remove unnecessary assert.

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

15 years agoUpdate the other CMake file.
Benjamin Kramer [Tue, 13 Oct 2009 18:50:54 +0000 (18:50 +0000)]
Update the other CMake file.

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

15 years agoParse GEP with attached custom metadata. This happens during libprofile_rt.bca build.
Devang Patel [Tue, 13 Oct 2009 18:49:55 +0000 (18:49 +0000)]
Parse GEP with attached custom metadata. This happens during libprofile_rt.bca build.

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

15 years agoUpdate CMake file.
Ted Kremenek [Tue, 13 Oct 2009 18:48:07 +0000 (18:48 +0000)]
Update CMake file.

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

15 years agoRefactor some code. No functionality changes.
Evan Cheng [Tue, 13 Oct 2009 18:42:04 +0000 (18:42 +0000)]
Refactor some code. No functionality changes.

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

15 years agoCommit the removal of this file, which is now moved to lib/Analysis.
Dan Gohman [Tue, 13 Oct 2009 18:37:20 +0000 (18:37 +0000)]
Commit the removal of this file, which is now moved to lib/Analysis.

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

15 years agoMove the InlineCost code from Transforms/Utils to Analysis.
Dan Gohman [Tue, 13 Oct 2009 18:30:07 +0000 (18:30 +0000)]
Move the InlineCost code from Transforms/Utils to Analysis.

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

15 years agoStart refactoring the inline cost estimation code so that it can be used
Dan Gohman [Tue, 13 Oct 2009 18:24:11 +0000 (18:24 +0000)]
Start refactoring the inline cost estimation code so that it can be used
for purposes other than inlining.

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

15 years agochange simplifycfg to not duplicate 'unwind' instructions. Hopefully
Chris Lattner [Tue, 13 Oct 2009 18:13:05 +0000 (18:13 +0000)]
change simplifycfg to not duplicate 'unwind' instructions.  Hopefully
this will increase the likelihood of common code getting sunk towards
the unwind.

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

15 years agoconvert to filecheck
Chris Lattner [Tue, 13 Oct 2009 18:10:05 +0000 (18:10 +0000)]
convert to filecheck

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

15 years agorename test
Chris Lattner [Tue, 13 Oct 2009 18:08:21 +0000 (18:08 +0000)]
rename test

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

15 years agoMake LoopUnswitch's cost estimation count Instructions, rather than
Dan Gohman [Tue, 13 Oct 2009 17:50:43 +0000 (17:50 +0000)]
Make LoopUnswitch's cost estimation count Instructions, rather than
BasicBlocks, so that it doesn't blindly procede in the presence of
large individual BasicBlocks. This addresses a class of code-size
expansion problems.

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

15 years agorename ReleaseNotes-2.6.html -> ReleaseNotes.html
Chris Lattner [Tue, 13 Oct 2009 17:48:04 +0000 (17:48 +0000)]
rename ReleaseNotes-2.6.html -> ReleaseNotes.html

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

15 years agoadd Zero
Chris Lattner [Tue, 13 Oct 2009 17:47:06 +0000 (17:47 +0000)]
add Zero

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

15 years agoMake the ExecutionEngine automatically remove global mappings on when their
Jeffrey Yasskin [Tue, 13 Oct 2009 17:42:08 +0000 (17:42 +0000)]
Make the ExecutionEngine automatically remove global mappings on when their
GlobalValue is destroyed.  Function destruction still leaks machine code and
can crash on leaked stubs, but this is some progress.

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

15 years agodon't use dead loads as tests.
Chris Lattner [Tue, 13 Oct 2009 17:39:29 +0000 (17:39 +0000)]
don't use dead loads as tests.

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

15 years ago"there is not any instruction with attached debug info in this module" does not mean...
Devang Patel [Tue, 13 Oct 2009 17:35:35 +0000 (17:35 +0000)]
"there is not any instruction with attached debug info in this module" does not mean "there is no debug info in this module". :)

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

15 years agoAdd some ARM instruction encoding bits.
Bob Wilson [Tue, 13 Oct 2009 17:35:30 +0000 (17:35 +0000)]
Add some ARM instruction encoding bits.
Patch by Johnny Chen.

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

15 years agoFix regression introduced by r83894.
Bob Wilson [Tue, 13 Oct 2009 17:29:13 +0000 (17:29 +0000)]
Fix regression introduced by r83894.

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

15 years agoCopy metadata when value is RAUW'd. It is debatable whether this is the right approac...
Devang Patel [Tue, 13 Oct 2009 17:00:54 +0000 (17:00 +0000)]
Copy metadata when value is RAUW'd. It is debatable whether this is the right approach for custom metadata data in general. However, right now the only custom data user, "dbg", expects this behavior while FE is constructing llvm IR with debug info.

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

15 years agoDisable this test for now.
Devang Patel [Tue, 13 Oct 2009 16:32:09 +0000 (16:32 +0000)]
Disable this test for now.

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

15 years agoFix a tab. Thanks to Johnny Chen for pointing it out.
Bob Wilson [Tue, 13 Oct 2009 15:27:23 +0000 (15:27 +0000)]
Fix a tab.  Thanks to Johnny Chen for pointing it out.

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

15 years agoThe eh.exception intrinsic only reads from memory, it doesn't
Duncan Sands [Tue, 13 Oct 2009 09:24:02 +0000 (09:24 +0000)]
The eh.exception intrinsic only reads from memory, it doesn't
write to it.

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

15 years agoPacify the compiler (signed with unsigned comparison) by making
Duncan Sands [Tue, 13 Oct 2009 09:23:11 +0000 (09:23 +0000)]
Pacify the compiler (signed with unsigned comparison) by making
these constants unsigned.

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

15 years agoForce memory use markers to have a ConstantInt for the size argument.
Nick Lewycky [Tue, 13 Oct 2009 07:57:33 +0000 (07:57 +0000)]
Force memory use markers to have a ConstantInt for the size argument.

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

15 years agoTeach BasicAA a little something about the atomic intrinsics: they can only
Nick Lewycky [Tue, 13 Oct 2009 07:48:38 +0000 (07:48 +0000)]
Teach BasicAA a little something about the atomic intrinsics: they can only
modify through the pointer they're given.

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

15 years agoAdd new "memory use marker" intrinsics. These indicate lifetimes and invariant
Nick Lewycky [Tue, 13 Oct 2009 07:03:23 +0000 (07:03 +0000)]
Add new "memory use marker" intrinsics. These indicate lifetimes and invariant
sections of memory objects.

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

15 years agoFix a -Asserts warning.
Daniel Dunbar [Tue, 13 Oct 2009 06:47:08 +0000 (06:47 +0000)]
Fix a -Asserts warning.

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

15 years agoremove dead header.
Chris Lattner [Tue, 13 Oct 2009 05:33:26 +0000 (05:33 +0000)]
remove dead header.

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

15 years agoremove notcast, it is now dead!
Chris Lattner [Tue, 13 Oct 2009 04:27:02 +0000 (04:27 +0000)]
remove notcast, it is now dead!

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

15 years agoremove two old and nearly useless tests.
Chris Lattner [Tue, 13 Oct 2009 04:25:24 +0000 (04:25 +0000)]
remove two old and nearly useless tests.

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

15 years agoXFAIL these tests for now.
Devang Patel [Tue, 13 Oct 2009 01:51:29 +0000 (01:51 +0000)]
XFAIL these tests for now.

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

15 years agoAdd a ceilLogBase2 function to APInt.
Dan Gohman [Tue, 13 Oct 2009 01:49:02 +0000 (01:49 +0000)]
Add a ceilLogBase2 function to APInt.

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

15 years agoMemory dependence analysis was incorrectly stopping to scan for stores to a pointer...
Victor Hernandez [Tue, 13 Oct 2009 01:42:53 +0000 (01:42 +0000)]
Memory dependence analysis was incorrectly stopping to scan for stores to a pointer at bitcast uses of a malloc call.
It should continue scanning until the malloc call, and this patch fixes that.

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

15 years agoRegenerate configure for rev. 83823 putback.
Edward O'Callaghan [Tue, 13 Oct 2009 01:01:38 +0000 (01:01 +0000)]
Regenerate configure for rev. 83823 putback.

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

15 years agoEnable "debug info attached to an instruction" mode.
Devang Patel [Mon, 12 Oct 2009 23:22:09 +0000 (23:22 +0000)]
Enable "debug info attached to an instruction" mode.

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

15 years agoFind enclosing subprogram info.
Devang Patel [Mon, 12 Oct 2009 23:11:24 +0000 (23:11 +0000)]
Find enclosing subprogram info.

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

15 years agoSet default location for a function if it is not set.
Devang Patel [Mon, 12 Oct 2009 23:10:55 +0000 (23:10 +0000)]
Set default location for a function if it is not set.

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

15 years agoFix two warnings about unused variables that are only used in assert() calls.
Kevin Enderby [Mon, 12 Oct 2009 22:51:49 +0000 (22:51 +0000)]
Fix two warnings about unused variables that are only used in assert() calls.

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

15 years agoDelete a comment that makes no sense to me. The statement that moving a CPE
Bob Wilson [Mon, 12 Oct 2009 22:49:05 +0000 (22:49 +0000)]
Delete a comment that makes no sense to me.  The statement that moving a CPE
before its reference is only supported on ARM has not been true for a while.
In fact, until recently, that was only supported for Thumb.  Besides that,
CPEs are always a multiple of 4 bytes in size, so inserting a CPE should have
no effect on Thumb alignment.

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

15 years agoFix a problem in the code where ARMAsmParser::ParseShift() second argument
Kevin Enderby [Mon, 12 Oct 2009 22:39:54 +0000 (22:39 +0000)]
Fix a problem in the code where ARMAsmParser::ParseShift() second argument
should have been a pointer to a reference.

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

15 years agoMake licm debug message readable.
Evan Cheng [Mon, 12 Oct 2009 22:25:23 +0000 (22:25 +0000)]
Make licm debug message readable.

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

15 years agoChange CreateNewWater method to return NewMBB by reference.
Bob Wilson [Mon, 12 Oct 2009 21:39:43 +0000 (21:39 +0000)]
Change CreateNewWater method to return NewMBB by reference.

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

15 years agoLast week, ARMConstantIslandPass was failing to converge for the
Bob Wilson [Mon, 12 Oct 2009 21:23:15 +0000 (21:23 +0000)]
Last week, ARMConstantIslandPass was failing to converge for the
MultiSource/Benchmarks/MiBench/automotive-susan test.  The failure has
since been masked by an unrelated change (just randomly), so I don't have
a testcase for this now.  Radar 7291928.

The situation where this happened is that a constant pool entry (CPE) was
placed at a lower address than the load that referenced it.  There were in
fact 2 CPEs placed at adjacent addresses and referenced by 2 loads that were
close together in the code.  The distance from the loads to the CPEs was
right at the limit of what they could handle, so that only one of the CPEs
could be placed within range.  On every iteration, the first CPE was found
to be out of range, causing a new CPE to be inserted.  The second CPE had
been in range but the newly inserted entry pushed it too far away.  Thus the
second CPE was also replaced by a new entry, which in turn pushed the first
CPE out of range.  Etc.

Judging from some comments in the code, the initial implementation of this
pass did not support CPEs placed _before_ their references.  In the case
where the CPE is placed at a higher address, the key to making the algorithm
terminate is that new CPEs are only inserted at the end of a group of adjacent
CPEs.  This is implemented by removing a basic block from the "WaterList"
once it has been used, and then adding the newly inserted CPE block to the
list so that the next insertion will come after it.  This avoids the ping-pong
effect where CPEs are repeatedly moved to the beginning of a group of
adjacent CPEs.  This does not work when going backwards, however, because the
entries at the end of an adjacent group of CPEs are closer than the CPEs
earlier in the group.

To make this pass terminate, we need to maintain a property that changes can
only happen in some sort of monotonic fashion.  The fix used here is to require
that the CPE for a particular constant pool load can only move to lower
addresses.  This is a very simple change to the code and should not cause
any significant degradation in the results.

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

15 years agoAnother minor clean-up.
Bob Wilson [Mon, 12 Oct 2009 20:45:53 +0000 (20:45 +0000)]
Another minor clean-up.

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

15 years agoallow this testcase to pass with recent changes. The test hasn't been
Chris Lattner [Mon, 12 Oct 2009 20:42:35 +0000 (20:42 +0000)]
allow this testcase to pass with recent changes.  The test hasn't been
producing any stores at all for a long time, but ".store." was in some
IR instruction names until recently.  This removal caused the test to
start failing.  Just make it reject any stores.

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

15 years agoRemove redundant parameter.
Bob Wilson [Mon, 12 Oct 2009 20:37:23 +0000 (20:37 +0000)]
Remove redundant parameter.

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

15 years agoUse early exit to reduce indentation.
Bob Wilson [Mon, 12 Oct 2009 19:04:03 +0000 (19:04 +0000)]
Use early exit to reduce indentation.

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

15 years agoChange to return a value by reference.
Bob Wilson [Mon, 12 Oct 2009 19:01:12 +0000 (19:01 +0000)]
Change to return a value by reference.

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

15 years agoAdd a typedef for an iterator.
Bob Wilson [Mon, 12 Oct 2009 18:52:13 +0000 (18:52 +0000)]
Add a typedef for an iterator.

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

15 years agoRevert the kludge in 76703. I got a clean
Dale Johannesen [Mon, 12 Oct 2009 18:49:00 +0000 (18:49 +0000)]
Revert the kludge in 76703.  I got a clean
bootstrap of FSF-style PPC, so there is some
reason to believe the original bug (which was
never analyzed) has been fixed, probably by
82266.

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

15 years agoFix warning.
Dale Johannesen [Mon, 12 Oct 2009 18:45:32 +0000 (18:45 +0000)]
Fix warning.

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

15 years agofix validation error pointed out by gabor (and the w3c :)
Chris Lattner [Mon, 12 Oct 2009 18:33:33 +0000 (18:33 +0000)]
fix validation error pointed out by gabor (and the w3c :)

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

15 years agoImprove bugpoint doc, patch by Timo Lindfors!
Chris Lattner [Mon, 12 Oct 2009 18:12:47 +0000 (18:12 +0000)]
Improve bugpoint doc, patch by Timo Lindfors!

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

15 years agoFix http://llvm.org/PR5160, to let CallbackVHs modify other ValueHandles on the
Jeffrey Yasskin [Mon, 12 Oct 2009 17:43:32 +0000 (17:43 +0000)]
Fix llvm.org/PR5160, to let CallbackVHs modify other ValueHandles on the
same Value without breaking things.

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

15 years agoanother bunch of <tt>s
Gabor Greif [Mon, 12 Oct 2009 16:50:25 +0000 (16:50 +0000)]
another bunch of <tt>s

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

15 years agoRemove a redundant member variable.
Dan Gohman [Mon, 12 Oct 2009 16:44:10 +0000 (16:44 +0000)]
Remove a redundant member variable.

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

15 years agoDelete some obsolete declarations.
Dan Gohman [Mon, 12 Oct 2009 16:43:44 +0000 (16:43 +0000)]
Delete some obsolete declarations.

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

15 years agoeven more <tt>s
Gabor Greif [Mon, 12 Oct 2009 16:40:25 +0000 (16:40 +0000)]
even more <tt>s

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

15 years agoDon't forget to mark RAX as live-out of the function when arranging for
Dan Gohman [Mon, 12 Oct 2009 16:36:12 +0000 (16:36 +0000)]
Don't forget to mark RAX as live-out of the function when arranging for
it to hold the address of an sret return value, for x86-64 ABI purposes.

Also, fix the test that was originally intended to test this to actually
test it, using FileCheck.

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

15 years agomore typewriter face
Gabor Greif [Mon, 12 Oct 2009 16:27:44 +0000 (16:27 +0000)]
more typewriter face

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

15 years agofix three validation errors, I leave the fourth to sabre :-)
Gabor Greif [Mon, 12 Oct 2009 16:13:36 +0000 (16:13 +0000)]
fix three validation errors, I leave the fourth to sabre :-)

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

15 years agoset some options in typewriter font
Gabor Greif [Mon, 12 Oct 2009 16:08:52 +0000 (16:08 +0000)]
set some options in typewriter font

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

15 years agoDocumentation: Perform automated correction of common typos.
Benjamin Kramer [Mon, 12 Oct 2009 14:46:08 +0000 (14:46 +0000)]
Documentation: Perform automated correction of common typos.

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

15 years agoFix typo, patch from Timo Juhani Lindfors.
Torok Edwin [Mon, 12 Oct 2009 13:37:29 +0000 (13:37 +0000)]
Fix typo, patch from Timo Juhani Lindfors.

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

15 years agoEliminate some redundant llvm-as calls.
Benjamin Kramer [Mon, 12 Oct 2009 09:31:55 +0000 (09:31 +0000)]
Eliminate some redundant llvm-as calls.

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

15 years agoMissing CHECK: lines makes test exit abnormally.
Edward O'Callaghan [Mon, 12 Oct 2009 09:01:26 +0000 (09:01 +0000)]
Missing CHECK: lines makes test exit abnormally.

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

15 years agoFileCheck not CheckFile, oops.
Edward O'Callaghan [Mon, 12 Oct 2009 08:51:28 +0000 (08:51 +0000)]
FileCheck not CheckFile, oops.

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

15 years agoConvert InstCombine/call.ll to CheckFile.
Edward O'Callaghan [Mon, 12 Oct 2009 08:46:47 +0000 (08:46 +0000)]
Convert InstCombine/call.ll to CheckFile.

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

15 years agoConvert the rest of the InstCombine tests from notcast to FileCheck.
Edward O'Callaghan [Mon, 12 Oct 2009 07:18:14 +0000 (07:18 +0000)]
Convert the rest of the InstCombine tests from notcast to FileCheck.

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

15 years agoRemove this part of the test, it never actually tested anything anyways. This
Nick Lewycky [Mon, 12 Oct 2009 06:32:42 +0000 (06:32 +0000)]
Remove this part of the test, it never actually tested anything anyways. This
unbreaks make check after evocallaghan's changes.

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

15 years agoFix syntax error missed in converting zext.ll test. Convert 2003-11-13-ConstExprCastC...
Edward O'Callaghan [Mon, 12 Oct 2009 06:23:56 +0000 (06:23 +0000)]
Fix syntax error missed in converting zext.ll test. Convert 2003-11-13-ConstExprCastCall.ll to FileCheck from notcast.

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

15 years agoConvert InstCombine tests from notcast to FileCheck.
Edward O'Callaghan [Mon, 12 Oct 2009 06:14:06 +0000 (06:14 +0000)]
Convert InstCombine tests from notcast to FileCheck.

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

15 years agoMore heuristics for Combiner-AA. Still catches all important cases, but
Nate Begeman [Mon, 12 Oct 2009 05:53:58 +0000 (05:53 +0000)]
More heuristics for Combiner-AA.  Still catches all important cases, but
compile time penalty on gnugo, the worst case in MultiSource, is down to
about 2.5% from 30%

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

15 years agoHaiku porting patches, Credit to Paul Davey.
Edward O'Callaghan [Mon, 12 Oct 2009 04:57:20 +0000 (04:57 +0000)]
Haiku porting patches, Credit to Paul Davey.

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

15 years agoFix PR5087, patch by Jakub Staszak!
Chris Lattner [Mon, 12 Oct 2009 04:22:44 +0000 (04:22 +0000)]
Fix PR5087, patch by Jakub Staszak!

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

15 years agoadd some more hooks to the C bindings, patch by Kenneth Uildriks!
Chris Lattner [Mon, 12 Oct 2009 04:01:02 +0000 (04:01 +0000)]
add some more hooks to the C bindings, patch by Kenneth Uildriks!

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

15 years agoMake ParallelJIT pthreads linking with CMake slightly less broken
Douglas Gregor [Mon, 12 Oct 2009 04:00:13 +0000 (04:00 +0000)]
Make ParallelJIT pthreads linking with CMake slightly less broken

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