Commit Graph

53539 Commits

Author SHA1 Message Date
Devang Patel
5a1033a8ed Do not use expensive sort().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 17:09:00 +00:00
Benjamin Kramer
06d1f6ce94 Some svn:ignore tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85128 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 17:01:20 +00:00
David Goodwin
2e7be612d5 Break anti-dependence breaking out into its own class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 16:59:04 +00:00
Devang Patel
ac16d44e58 Add support to encode type info using llvm::Constant.
Patch by Talin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 16:54:35 +00:00
Dan Gohman
440e251c75 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 15:55:24 +00:00
Chris Lattner
48b59ec817 reapply r85085 with a bugfix to avoid infinite looping.
All of the 'demorgan' related xforms need to use 
dyn_castNotVal, not m_Not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 15:40:07 +00:00
Dan Gohman
a8225083ba Make LSR's OptimizeShadowIV ignore induction variables with negative
strides for now, because it doesn't handle them correctly. This fixes a
miscompile of SingleSource/Benchmarks/Misc-C++/ray.

This problem was usually hidden because indvars transforms such induction
variables into negations of canonical induction variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 15:32:57 +00:00
Evan Cheng
a5dc45e3c8 - Revert some changes from 85044, 85045, and 85047 that broke x86_64 tests and
bootstrapping. It's not safe to leave identity subreg_to_reg and insert_subreg
  around.
- Relax register scavenging to allow use of partially "not-live" registers. It's
  common for targets to operate on registers where the top bits are undef. e.g.
  s0 =
  d0 = insert_subreg d0<undef>, s0, 1
  ...
     = d0
  When the insert_subreg is eliminated by the coalescer, the scavenger used to
  complain. The previous fix was to keep to insert_subreg around. But that's
  brittle and it's overly conservative when we want to use the scavenger to 
  allocate registers. It's actually legal and desirable for other instructions
  to use the "undef" part of d0. e.g.
  s0 =
  d0 = insert_subreg d0<undef>, s0, 1
  ...
  s1 =
     = s1
     = d0
  We probably need add a "partial-undef" marker on machine operand so the
  machine verifier would not complain.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85091 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 04:56:07 +00:00
Evan Cheng
85def16079 Revert 85085. It causes infinite looping during llvm-gcc build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 03:51:32 +00:00
Edward O'Callaghan
7e43439e81 Fix gmake check for AuroraUX triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 02:37:56 +00:00
Chandler Carruth
8b67f774e9 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
2009-10-26 01:35:46 +00:00
Chris Lattner
863928fc39 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
2009-10-26 01:06:31 +00:00
Chandler Carruth
1125f58efc 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
2009-10-25 23:54:41 +00:00
Chris Lattner
f2b4854e3f 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
2009-10-25 23:47:55 +00:00
Chandler Carruth
3d5ec9f0c1 Remove stale reference to ThreadSupport.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 23:41:56 +00:00
Chris Lattner
1d871c5e54 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
2009-10-25 23:22:50 +00:00
Daniel Dunbar
22bbd9b9b8 Suppress -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85078 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 23:11:06 +00:00
Chris Lattner
46264f020a 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
2009-10-25 23:06:42 +00:00
Chandler Carruth
18ad485bf5 Remove unused includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85074 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 22:38:41 +00:00
Jim Grosbach
dd5694203b of -> or
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 19:14:48 +00:00
Jim Grosbach
f639e9f9e6 80-column cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 18:55:46 +00:00
Sanjiv Gupta
e1ef91d275 Reapply 85006 with a minor fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85052 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 08:14:11 +00:00
Evan Cheng
21a45557c6 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
2009-10-25 08:01:41 +00:00
Evan Cheng
cc7a5b91de Update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85050 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 07:53:48 +00:00
Evan Cheng
4f54c1293a 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
2009-10-25 07:53:28 +00:00
Evan Cheng
ed3ad212ec 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
2009-10-25 07:52:27 +00:00
Evan Cheng
427c3ba97a 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
2009-10-25 07:51:47 +00:00
Evan Cheng
d98e30f618 Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 07:49:57 +00:00
Evan Cheng
d66f0015ad 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
2009-10-25 07:48:51 +00:00
Evan Cheng
f5fe5e4e79 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
2009-10-25 07:47:07 +00:00
Nick Lewycky
f5a86f45e7 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
2009-10-25 06:57:41 +00:00
Nick Lewycky
6726b6d75a 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
2009-10-25 06:33:48 +00:00
Chris Lattner
a1e1446056 this is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 06:17:51 +00:00
Chris Lattner
93798daa3e 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
2009-10-25 06:15:37 +00:00
Chris Lattner
6333c3959b 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
2009-10-25 06:08:26 +00:00
Chris Lattner
ea9d57bc9a 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
2009-10-25 06:02:57 +00:00
Nick Lewycky
4a134afaef 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
2009-10-25 05:20:17 +00:00
Nick Lewycky
44df023d5f 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
2009-10-25 03:50:03 +00:00
Daniel Dunbar
edb8997821 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
2009-10-25 03:30:55 +00:00
Nick Lewycky
0d20366a86 Indent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 03:22:00 +00:00
Mikhail Glushenkov
0a018d3d8c Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 01:44:24 +00:00
Mikhail Glushenkov
3e4102e94c Document OptionPreprocessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85030 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 01:44:11 +00:00
Mikhail Glushenkov
14cb2a2327 Add a test for OptionPreprocessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 01:43:50 +00:00
Daniel Dunbar
6efba21342 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
2009-10-25 01:37:26 +00:00
Jim Grosbach
07d4964d1f 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
2009-10-25 00:45:07 +00:00
Dan Gohman
5639cb6b9e 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
2009-10-24 23:52:07 +00:00
Dan Gohman
5fa75b0fa4 MapValue doesn't needs its LLVMContext argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-24 23:37:16 +00:00
Dan Gohman
32663b719b 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
2009-10-24 23:34:26 +00:00
Dan Gohman
a7f1d72d09 Delete a spurious semicolon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-24 23:24:45 +00:00
Dan Gohman
2b110caabf 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
2009-10-24 23:23:04 +00:00