oota-llvm.git
14 years agoMove DataTypes.h to include/llvm/System, update all users. This breaks the last
Chandler Carruth [Mon, 26 Oct 2009 01:35:46 +0000 (01:35 +0000)]
Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

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

14 years agoImplement PR3266 & PR5276, folding:
Chris Lattner [Mon, 26 Oct 2009 01:06:31 +0000 (01:06 +0000)]
Implement PR3266 & PR5276, folding:
   not (or (icmp, icmp)) -> and(icmp, icmp)

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

14 years agoUpdate the 'svn:ignore' property to remove stale file references.
Chandler Carruth [Sun, 25 Oct 2009 23:54:41 +0000 (23:54 +0000)]
Update the 'svn:ignore' property to remove stale file references.

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

14 years agoconvert or.ll to filecheck and merge or2 into it.
Chris Lattner [Sun, 25 Oct 2009 23:47:55 +0000 (23:47 +0000)]
convert or.ll to filecheck and merge or2 into it.

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

14 years agoRemove stale reference to ThreadSupport.h.
Chandler Carruth [Sun, 25 Oct 2009 23:41:56 +0000 (23:41 +0000)]
Remove stale reference to ThreadSupport.h.

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

14 years agofix PR5295 where the .ll parser didn't reject a function after a global
Chris Lattner [Sun, 25 Oct 2009 23:22:50 +0000 (23:22 +0000)]
fix PR5295 where the .ll parser didn't reject a function after a global
or global after a function with conflicting names.  Update some testcases
that were accidentally depending on this behavior.

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

14 years agoSuppress -Asserts warning.
Daniel Dunbar [Sun, 25 Oct 2009 23:11:06 +0000 (23:11 +0000)]
Suppress -Asserts warning.

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

14 years agofix PR5186: the JIT shouldn't try to codegen available_externally
Chris Lattner [Sun, 25 Oct 2009 23:06:42 +0000 (23:06 +0000)]
fix PR5186: the JIT shouldn't try to codegen available_externally
functions it should just look them up like declarations.

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

14 years agoRemove unused includes.
Chandler Carruth [Sun, 25 Oct 2009 22:38:41 +0000 (22:38 +0000)]
Remove unused includes.

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

14 years agoof -> or
Jim Grosbach [Sun, 25 Oct 2009 19:14:48 +0000 (19:14 +0000)]
of -> or

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

14 years ago80-column cleanup
Jim Grosbach [Sun, 25 Oct 2009 18:55:46 +0000 (18:55 +0000)]
80-column cleanup

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

14 years agoReapply 85006 with a minor fix.
Sanjiv Gupta [Sun, 25 Oct 2009 08:14:11 +0000 (08:14 +0000)]
Reapply 85006 with a minor fix.

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

14 years agoAdd a couple of ARM cross-rc coalescing tests.
Evan Cheng [Sun, 25 Oct 2009 08:01:41 +0000 (08:01 +0000)]
Add a couple of ARM cross-rc coalescing tests.

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

14 years agoUpdate tests.
Evan Cheng [Sun, 25 Oct 2009 07:53:48 +0000 (07:53 +0000)]
Update tests.

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

14 years agoAdd ARM getMatchingSuperRegClass to handle S / D / Q cross regclass coalescing.
Evan Cheng [Sun, 25 Oct 2009 07:53:28 +0000 (07:53 +0000)]
Add ARM getMatchingSuperRegClass to handle S / D / Q cross regclass coalescing.

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

14 years agoDon't forget subreg indices when folding load / store.
Evan Cheng [Sun, 25 Oct 2009 07:52:27 +0000 (07:52 +0000)]
Don't forget subreg indices when folding load / store.

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

14 years agoUse isIdentityCopy. Fix a bozo bug (flipped condition) in InvalidateRegDef.
Evan Cheng [Sun, 25 Oct 2009 07:51:47 +0000 (07:51 +0000)]
Use isIdentityCopy. Fix a bozo bug (flipped condition) in InvalidateRegDef.

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

14 years agoCode clean up.
Evan Cheng [Sun, 25 Oct 2009 07:49:57 +0000 (07:49 +0000)]
Code clean up.

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

14 years agoDo not delete identity insert_subreg even if dest is virtual. Let later passes delete...
Evan Cheng [Sun, 25 Oct 2009 07:48:51 +0000 (07:48 +0000)]
Do not delete identity insert_subreg even if dest is virtual. Let later passes delete them. This avoids register scavenger complain.

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

14 years agoAdd isIdentityCopy to check for identity copy (or extract_subreg, etc.)
Evan Cheng [Sun, 25 Oct 2009 07:47:07 +0000 (07:47 +0000)]
Add isIdentityCopy to check for identity copy (or extract_subreg, etc.)

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

14 years agoRemove includes of Support/Compiler.h that are no longer needed after the
Nick Lewycky [Sun, 25 Oct 2009 06:57:41 +0000 (06:57 +0000)]
Remove includes of Support/Compiler.h that are no longer needed after the
VISIBILITY_HIDDEN removal.

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

14 years agoRemove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Nick Lewycky [Sun, 25 Oct 2009 06:33:48 +0000 (06:33 +0000)]
Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.

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

14 years agothis is done.
Chris Lattner [Sun, 25 Oct 2009 06:17:51 +0000 (06:17 +0000)]
this is done.

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

14 years agoTeach FoldBitCast to be able to handle bitcasts from (e.g.) i128 -> <4 x float>.
Chris Lattner [Sun, 25 Oct 2009 06:15:37 +0000 (06:15 +0000)]
Teach FoldBitCast to be able to handle bitcasts from (e.g.) i128 -> <4 x float>.

This allows us to simplify this:
union vec2d {
    double e[2];
    double v __attribute__((vector_size(16)));
};
typedef union vec2d vec2d;

static vec2d a={{1,2}}, b={{3,4}};

vec2d foo () {
    return (vec2d){ .v = a.v + b.v * (vec2d){{5,5}}.v };
}

down to:

define %0 @foo() nounwind ssp {
entry:
  %mrv5 = insertvalue %0 undef, double 1.600000e+01, 0 ; <%0> [#uses=1]
  %mrv6 = insertvalue %0 %mrv5, double 2.200000e+01, 1 ; <%0> [#uses=1]
  ret %0 %mrv6
}

instead of:

define %0 @foo() nounwind ssp {
entry:
  %mrv5 = insertvalue %0 undef, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 0), 0 ; <%0> [#uses=1]
  %mrv6 = insertvalue %0 %mrv5, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 1), 1 ; <%0> [#uses=1]
  ret %0 %mrv6
}

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

14 years agomove FoldBitCast earlier in the file, and use it instead of
Chris Lattner [Sun, 25 Oct 2009 06:08:26 +0000 (06:08 +0000)]
move FoldBitCast earlier in the file, and use it instead of
ConstantExpr::getBitCast in various places.

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

14 years agorefactor FoldBitCast to reduce nesting and to always return a constantexpr
Chris Lattner [Sun, 25 Oct 2009 06:02:57 +0000 (06:02 +0000)]
refactor FoldBitCast to reduce nesting and to always return a constantexpr
instead of returning null on failure.  No functionality change.

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

14 years agoRemove ICmpInst::isSignedPredicate which was a reimplementation
Nick Lewycky [Sun, 25 Oct 2009 05:20:17 +0000 (05:20 +0000)]
Remove ICmpInst::isSignedPredicate which was a reimplementation
CmpInst::isSigned.

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

14 years agoSink isTrueWhenEqual from ICmpInst to CmpInst. Add a matching isFalseWhenEqual
Nick Lewycky [Sun, 25 Oct 2009 03:50:03 +0000 (03:50 +0000)]
Sink isTrueWhenEqual from ICmpInst to CmpInst. Add a matching isFalseWhenEqual
which is equal to !isTrueWhenEqual for ints but not for floats.

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

14 years agolit: Add --config-prefix option, to override default config file names.
Daniel Dunbar [Sun, 25 Oct 2009 03:30:55 +0000 (03:30 +0000)]
lit: Add --config-prefix option, to override default config file names.

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

14 years agoIndent.
Nick Lewycky [Sun, 25 Oct 2009 03:22:00 +0000 (03:22 +0000)]
Indent.

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

14 years agoRegenerate.
Mikhail Glushenkov [Sun, 25 Oct 2009 01:44:24 +0000 (01:44 +0000)]
Regenerate.

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

14 years agoDocument OptionPreprocessor.
Mikhail Glushenkov [Sun, 25 Oct 2009 01:44:11 +0000 (01:44 +0000)]
Document OptionPreprocessor.

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

14 years agoAdd a test for OptionPreprocessor.
Mikhail Glushenkov [Sun, 25 Oct 2009 01:43:50 +0000 (01:43 +0000)]
Add a test for OptionPreprocessor.

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

14 years agolit: Allow use of /dev/null in redirects on Windows (replace by a temporary
Daniel Dunbar [Sun, 25 Oct 2009 01:37:26 +0000 (01:37 +0000)]
lit: Allow use of /dev/null in redirects on Windows (replace by a temporary
file).

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

14 years agoWhen the scavenger is looking for a good candidate location to restore from a
Jim Grosbach [Sun, 25 Oct 2009 00:45:07 +0000 (00:45 +0000)]
When the scavenger is looking for a good candidate location to restore from a
spill, it should avoid doing so inside the live range of a virtual register.

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

14 years agoUpdate these tests to match what Loop::print now prints.
Dan Gohman [Sat, 24 Oct 2009 23:52:07 +0000 (23:52 +0000)]
Update these tests to match what Loop::print now prints.

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

14 years agoMapValue doesn't needs its LLVMContext argument.
Dan Gohman [Sat, 24 Oct 2009 23:37:16 +0000 (23:37 +0000)]
MapValue doesn't needs its LLVMContext argument.

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

14 years agoRename isLoopExit to isLoopExiting, for consistency with the wording
Dan Gohman [Sat, 24 Oct 2009 23:34:26 +0000 (23:34 +0000)]
Rename isLoopExit to isLoopExiting, for consistency with the wording
used elsewhere - an exit block is a block outside the loop branched to
from within the loop. An exiting block is a block inside the loop that
branches out.

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

14 years agoDelete a spurious semicolon.
Dan Gohman [Sat, 24 Oct 2009 23:24:45 +0000 (23:24 +0000)]
Delete a spurious semicolon.

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

14 years agoMake these tests more interesting by using
Dan Gohman [Sat, 24 Oct 2009 23:23:04 +0000 (23:23 +0000)]
Make these tests more interesting by using
-verify-dom-info and -verify-loop-info, which enable additional
(expensive) consistency checks.

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

14 years agoRewrite LoopRotation's SSA updating code using SSAUpdater.
Dan Gohman [Sat, 24 Oct 2009 23:19:52 +0000 (23:19 +0000)]
Rewrite LoopRotation's SSA updating code using SSAUpdater.

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

14 years agolit: Support '>>' redirections when executing scripts internally.
Daniel Dunbar [Sat, 24 Oct 2009 20:32:49 +0000 (20:32 +0000)]
lit: Support '>>' redirections when executing scripts internally.

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

14 years agoUpdate CMake dependencies.
Daniel Dunbar [Sat, 24 Oct 2009 20:32:43 +0000 (20:32 +0000)]
Update CMake dependencies.

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

14 years agoTeach macho-dump to dump UUIDs.
Daniel Dunbar [Sat, 24 Oct 2009 20:32:36 +0000 (20:32 +0000)]
Teach macho-dump to dump UUIDs.

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

14 years agoMake DominanceFrontierBase::print's output prettier.
Dan Gohman [Sat, 24 Oct 2009 20:01:11 +0000 (20:01 +0000)]
Make DominanceFrontierBase::print's output prettier.

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

14 years agoMake DominanceFrontier::addBasicBlock return the iterator for the newly
Dan Gohman [Sat, 24 Oct 2009 19:57:58 +0000 (19:57 +0000)]
Make DominanceFrontier::addBasicBlock return the iterator for the newly
inserted block.

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

14 years agoAdd an explicit keyword.
Dan Gohman [Sat, 24 Oct 2009 19:56:23 +0000 (19:56 +0000)]
Add an explicit keyword.

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

14 years agoRevert back 85006 for now as it breaks PIC16 tests.
Sanjiv Gupta [Sat, 24 Oct 2009 18:19:41 +0000 (18:19 +0000)]
Revert back 85006 for now as it breaks PIC16 tests.

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

14 years agoAdding support for placing global objects in shared data memory.
Sanjiv Gupta [Sat, 24 Oct 2009 18:02:44 +0000 (18:02 +0000)]
Adding support for placing global objects in shared data memory.

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

14 years agovarious cleanups suggested by Duncan
Chris Lattner [Sat, 24 Oct 2009 05:27:19 +0000 (05:27 +0000)]
various cleanups suggested by Duncan

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

14 years agofix PR5287, a serious regression from my previous patches. Thanks to
Chris Lattner [Sat, 24 Oct 2009 05:22:15 +0000 (05:22 +0000)]
fix PR5287, a serious regression from my previous patches.  Thanks to
Duncan for the nice tiny testcase.

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

14 years agoAuto-upgrade free instructions to calls to the builtin free function.
Victor Hernandez [Sat, 24 Oct 2009 04:23:03 +0000 (04:23 +0000)]
Auto-upgrade free instructions to calls to the builtin free function.
Update all analysis passes and transforms to treat free calls just like FreeInst.
Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised.

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

14 years ago80 col violation.
Evan Cheng [Sat, 24 Oct 2009 02:07:42 +0000 (02:07 +0000)]
80 col violation.

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

14 years agoAdd some asserts to catch copyRegToReg() fails early
Anton Korobeynikov [Sat, 24 Oct 2009 00:27:00 +0000 (00:27 +0000)]
Add some asserts to catch copyRegToReg() fails early

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

14 years agoRestrict Thumb1 register allocation to low registers, even for instructions that
Jim Grosbach [Sat, 24 Oct 2009 00:19:24 +0000 (00:19 +0000)]
Restrict Thumb1 register allocation to low registers, even for instructions that
can access the hi regs. Our prologue and epilogue code doesn't know how to
properly handle save/restore of the hi regs, so things go badly when we alloc
them.

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

14 years agoIdentity copies should not contribute to spill weight.
Evan Cheng [Fri, 23 Oct 2009 23:09:19 +0000 (23:09 +0000)]
Identity copies should not contribute to spill weight.

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

14 years agoFIXME no longer applies. R12 and R3 are available for allocation
Jim Grosbach [Fri, 23 Oct 2009 23:07:42 +0000 (23:07 +0000)]
FIXME no longer applies. R12 and R3 are available for allocation

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

14 years agoFix http://llvm.org/PR4822: allow module deletion after a function has been
Jeffrey Yasskin [Fri, 23 Oct 2009 22:37:43 +0000 (22:37 +0000)]
Fix llvm.org/PR4822: allow module deletion after a function has been
compiled.

When functions are compiled, they accumulate references in the JITResolver's
stub maps. This patch removes those references when the functions are
destroyed.  It's illegal to destroy a Function when any thread may still try to
call its machine code.

This patch also updates r83987 to use ValueMap instead of explicit CallbackVHs
and fixes a couple "do stuff inside assert()" bugs from r84522.

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

14 years agoRemove AllocationInst. Since MallocInst went away, AllocaInst is the only subclass...
Victor Hernandez [Fri, 23 Oct 2009 21:09:37 +0000 (21:09 +0000)]
Remove AllocationInst.  Since MallocInst went away, AllocaInst is the only subclass of AllocationInst, so it no longer is necessary.

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

14 years agoFix stylistic and documentation problems in ValueMap found by Nick Lewycky and
Jeffrey Yasskin [Fri, 23 Oct 2009 20:54:00 +0000 (20:54 +0000)]
Fix stylistic and documentation problems in ValueMap found by Nick Lewycky and
Evan Cheng.

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

14 years agoAPInt-ify the gep scaling code, so that it correctly handles the case where
Dan Gohman [Fri, 23 Oct 2009 17:57:43 +0000 (17:57 +0000)]
APInt-ify the gep scaling code, so that it correctly handles the case where
the scale overflows pointer-sized arithmetic. This fixes PR5281.

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

14 years agoMake LoopDeletion check the maximum backedge taken count, rather than the
Dan Gohman [Fri, 23 Oct 2009 17:10:01 +0000 (17:10 +0000)]
Make LoopDeletion check the maximum backedge taken count, rather than the
exact backedge taken count, when checking for infinite loops. This allows
it to delete loops with multiple exit conditions.

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

14 years agosome stuff is done, we still have constantexpr simplification to do.
Chris Lattner [Fri, 23 Oct 2009 07:00:55 +0000 (07:00 +0000)]
some stuff is done, we still have constantexpr simplification to do.

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

14 years agoteach libanalysis to simplify vector loads with bitcast sources. This
Chris Lattner [Fri, 23 Oct 2009 06:57:37 +0000 (06:57 +0000)]
teach libanalysis to simplify vector loads with bitcast sources.  This
implements something out of Target/README.txt producing:

_foo:                                                       ## @foo
movl 4(%esp), %eax
movapd LCPI1_0, %xmm0
movapd %xmm0, (%eax)
ret $4

instead of:

_foo:                                                       ## @foo
movl 4(%esp), %eax
movapd _b, %xmm0
mulpd LCPI1_0, %xmm0
addpd _a, %xmm0
movapd %xmm0, (%eax)
ret $4

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

14 years agoenhance FoldReinterpretLoadFromConstPtr to handle loads of up to 32
Chris Lattner [Fri, 23 Oct 2009 06:50:36 +0000 (06:50 +0000)]
enhance FoldReinterpretLoadFromConstPtr to handle loads of up to 32
bytes (i256).

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

14 years agoteach libanalysis to fold int and fp loads from almost arbitrary
Chris Lattner [Fri, 23 Oct 2009 06:23:49 +0000 (06:23 +0000)]
teach libanalysis to fold int and fp loads from almost arbitrary
non-type-safe constant initializers.  This sort of thing happens
quite a bit for 4-byte loads out of string constants, unions,
bitfields, and an interesting endianness check from sqlite, which
is something like this:

const int sqlite3one = 1;
# define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)
# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)

all of these macros now constant fold away.

This implements PR3152 and is based on a patch started by Eli, but heavily
modified and extended.

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

14 years agoAdd 2.6 release note.
Tanya Lattner [Fri, 23 Oct 2009 06:20:06 +0000 (06:20 +0000)]
Add 2.6 release note.

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

14 years agoUpdate tests for 84931.
Evan Cheng [Fri, 23 Oct 2009 05:58:34 +0000 (05:58 +0000)]
Update tests for 84931.

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

14 years agoX86 needs critical path anti-dependency breaking.
Evan Cheng [Fri, 23 Oct 2009 05:57:35 +0000 (05:57 +0000)]
X86 needs critical path anti-dependency breaking.

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

14 years agoCommit fixes for half precision I noted in review, so
Dale Johannesen [Fri, 23 Oct 2009 04:02:51 +0000 (04:02 +0000)]
Commit fixes for half precision I noted in review, so
they don't get lost; I don't think the originator has
write access.

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

14 years agoThis is passing on Darwin PPC.
Bill Wendling [Fri, 23 Oct 2009 01:37:01 +0000 (01:37 +0000)]
This is passing on Darwin PPC.

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

14 years agoMinor code cleanup.
Victor Hernandez [Fri, 23 Oct 2009 00:59:10 +0000 (00:59 +0000)]
Minor code cleanup.

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

14 years agoNeuter stack protectors by only checking character arrays. This is what GCC
Bill Wendling [Fri, 23 Oct 2009 00:01:05 +0000 (00:01 +0000)]
Neuter stack protectors by only checking character arrays. This is what GCC
does.

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

14 years agoAllow the target to select the level of anti-dependence breaking that should be perfo...
David Goodwin [Thu, 22 Oct 2009 23:19:17 +0000 (23:19 +0000)]
Allow the target to select the level of anti-dependence breaking that should be performed by the post-RA scheduler. The default is none.

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

14 years agoUse 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' prevents it...
Ted Kremenek [Thu, 22 Oct 2009 22:16:17 +0000 (22:16 +0000)]
Use 'waitpid' instead of 'wait'.  Basing Program::Wait() on 'wait()' prevents it being correct within a multithreaded context.

This address: PR 5277 (Program::Wait is unsafe to call from multiple threads).

Note: If waitpid() turns out to be non-portable, we can add more autoconf magic, or look into
another solution.

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

14 years agoTry r84890 again (adding ValueMap<>), now that I've tested the compile on
Jeffrey Yasskin [Thu, 22 Oct 2009 22:11:22 +0000 (22:11 +0000)]
Try r84890 again (adding ValueMap<>), now that I've tested the compile on
gcc-4.4.

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

14 years agosize_t, not unsigned here to silence a warning.
Eric Christopher [Thu, 22 Oct 2009 22:06:50 +0000 (22:06 +0000)]
size_t, not unsigned here to silence a warning.

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

14 years agoRandom include cleanup.
Benjamin Kramer [Thu, 22 Oct 2009 21:49:41 +0000 (21:49 +0000)]
Random include cleanup.

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

14 years agoFix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.
Jeffrey Yasskin [Thu, 22 Oct 2009 20:57:35 +0000 (20:57 +0000)]
Fix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.

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

14 years agoTidying up some code and comments. No functionality change.
Bill Wendling [Thu, 22 Oct 2009 20:48:59 +0000 (20:48 +0000)]
Tidying up some code and comments. No functionality change.

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

14 years agoRevert r84890, which broke the linux build.
Jeffrey Yasskin [Thu, 22 Oct 2009 20:23:43 +0000 (20:23 +0000)]
Revert r84890, which broke the linux build.

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

14 years agoAdd a ValueMap<ValueOrSubclass*, T> type. ValueMap<Value*, T> is safe to use
Jeffrey Yasskin [Thu, 22 Oct 2009 20:10:20 +0000 (20:10 +0000)]
Add a ValueMap<ValueOrSubclass*, T> type.  ValueMap<Value*, T> is safe to use
even when keys get RAUWed and deleted during its lifetime. By default the keys
act like WeakVHs, but users can pass a third template parameter to configure
how updates work and whether to do anything beyond updating the map on each
action.

It's also possible to automatically acquire a lock around ValueMap updates
triggered by RAUWs and deletes, to support the ExecutionEngine.

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

14 years agoHide MetadataContext implementation details.
Devang Patel [Thu, 22 Oct 2009 19:36:54 +0000 (19:36 +0000)]
Hide MetadataContext implementation details.

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

14 years agoFix getMDs() interface such that it does not expose implementation details.
Devang Patel [Thu, 22 Oct 2009 18:55:16 +0000 (18:55 +0000)]
Fix getMDs() interface such that it does not expose implementation details.

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

14 years agoUsing TrackingVH instead of WeakVH or WeakMetadataVH.
Devang Patel [Thu, 22 Oct 2009 18:25:28 +0000 (18:25 +0000)]
Using TrackingVH instead of WeakVH or WeakMetadataVH.

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

14 years agoSort handler names to ensure deterministic behavior.
Devang Patel [Thu, 22 Oct 2009 17:40:37 +0000 (17:40 +0000)]
Sort handler names to ensure deterministic behavior.

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

14 years agoTrying again to tweak the top-level Makefile to facilitate an Apple-style build.
Stuart Hastings [Thu, 22 Oct 2009 17:22:37 +0000 (17:22 +0000)]
Trying again to tweak the top-level Makefile to facilitate an Apple-style build.
Now with Clang-compatibility.

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

14 years agoRevert 84843. Evan, this was breaking some of the if-conversion tests.
Bob Wilson [Thu, 22 Oct 2009 16:52:21 +0000 (16:52 +0000)]
Revert 84843.  Evan, this was breaking some of the if-conversion tests.

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

14 years agoInclude config.h in order to have HAVE_STDINT_H be defined.
Duncan Sands [Thu, 22 Oct 2009 16:03:32 +0000 (16:03 +0000)]
Include config.h in order to have HAVE_STDINT_H be defined.
In the latest binutils the plugin-api.h needs this - without
it the LLVM gold plugin fails to compile.

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

14 years agoVerify that the function and exception table have been allocated
Nicolas Geoffray [Thu, 22 Oct 2009 14:35:57 +0000 (14:35 +0000)]
Verify that the function and exception table have been allocated
before freeing them.

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

14 years agoCheck that accessing a struct field that occurs before the start
Duncan Sands [Thu, 22 Oct 2009 12:53:25 +0000 (12:53 +0000)]
Check that accessing a struct field that occurs before the start
of the struct (!) works correctly.

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

14 years agoTest handling of record fields with negative offsets.
Duncan Sands [Thu, 22 Oct 2009 10:02:10 +0000 (10:02 +0000)]
Test handling of record fields with negative offsets.

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

14 years agoShift art to the right to keep GCC from complaining about multi-line comments.
Benjamin Kramer [Thu, 22 Oct 2009 09:28:49 +0000 (09:28 +0000)]
Shift art to the right to keep GCC from complaining about multi-line comments.

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

14 years agoMove if-conversion before post-regalloc scheduling so the predicated instruction...
Evan Cheng [Thu, 22 Oct 2009 06:48:32 +0000 (06:48 +0000)]
Move if-conversion before post-regalloc scheduling so the predicated instruction get scheduled properly.

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

14 years agoLoad / store multiple was missing opportunites when the load / store bundles are...
Evan Cheng [Thu, 22 Oct 2009 06:47:35 +0000 (06:47 +0000)]
Load / store multiple was missing opportunites when the load / store bundles are at the end of the bb. Test case is already in, the bug is exposed by subsequent commit.

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

14 years agomove another load optimization from instcombine -> libanalysis.
Chris Lattner [Thu, 22 Oct 2009 06:44:07 +0000 (06:44 +0000)]
move another load optimization from instcombine -> libanalysis.

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

14 years agomove 'loading i32 from string' optimization from instcombine
Chris Lattner [Thu, 22 Oct 2009 06:38:35 +0000 (06:38 +0000)]
move 'loading i32 from string' optimization from instcombine
to libanalysis.  Instcombine shrinking... does this even
make sense???

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

14 years agoMove some constant folding logic for loads out of instcombine into
Chris Lattner [Thu, 22 Oct 2009 06:25:11 +0000 (06:25 +0000)]
Move some constant folding logic for loads out of instcombine into
Analysis/ConstantFolding.cpp.  This doesn't change the behavior of
instcombine but makes other clients of ConstantFoldInstruction
able to handle loads.  This was partially extracted from Eli's patch
in PR3152.

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

14 years agoTrim more includes.
Evan Cheng [Thu, 22 Oct 2009 05:11:00 +0000 (05:11 +0000)]
Trim more includes.

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

14 years agoTrim include.
Evan Cheng [Thu, 22 Oct 2009 05:08:49 +0000 (05:08 +0000)]
Trim include.

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