oota-llvm.git
15 years agoFix a refactoro.
Daniel Dunbar [Tue, 8 Sep 2009 05:37:51 +0000 (05:37 +0000)]
Fix a refactoro.

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

15 years agoAdd 'lit' support for llvm tests.
Daniel Dunbar [Tue, 8 Sep 2009 05:31:44 +0000 (05:31 +0000)]
Add 'lit' support for llvm tests.
 - This adds 'make check-lit' from the top-level Makefile.

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

15 years agoAdd 'lit' testing tool.
Daniel Dunbar [Tue, 8 Sep 2009 05:31:18 +0000 (05:31 +0000)]
Add 'lit' testing tool.
 - make install && man $(llvm-config --prefix)/share/man/man1/lit.1 for more
   information.

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

15 years agollvm::cerr is gone.
Chris Lattner [Tue, 8 Sep 2009 05:15:50 +0000 (05:15 +0000)]
llvm::cerr is gone.

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

15 years agoupdate this to use raw_ostream
Chris Lattner [Tue, 8 Sep 2009 05:14:44 +0000 (05:14 +0000)]
update this to use raw_ostream

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

15 years agofix PR4767, a crash because fp stackifier visited blocks in
Chris Lattner [Tue, 8 Sep 2009 04:55:44 +0000 (04:55 +0000)]
fix PR4767, a crash because fp stackifier visited blocks in
depth first order, so it wouldn't process unreachable blocks.
When compiling at -O0, late dead block elimination isn't done
and the bad instructions got to isel.

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

15 years agoremove a turd
Chris Lattner [Tue, 8 Sep 2009 03:47:41 +0000 (03:47 +0000)]
remove a turd

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

15 years agoinstcombine transforms vector loads that are only used by
Chris Lattner [Tue, 8 Sep 2009 03:44:51 +0000 (03:44 +0000)]
instcombine transforms vector loads that are only used by
extractelement operations into a bitcast of the pointer,
then a gep, then a scalar load.  Disable this when the vector
only has one element, because it leads to infinite loops in
instcombine (PR4908).

This transformation seems like a really bad idea to me, as it
will likely disable CSE of vector load/stores etc and can be
better done in the code generator when profitable.  This
goes all the way back to the first days of packed types,
r25299 specifically.

I'll let those people who care about the performance of vector
code decide what to do with this.

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

15 years agofix pasto
Chris Lattner [Tue, 8 Sep 2009 03:39:55 +0000 (03:39 +0000)]
fix pasto

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

15 years agoadd getVectorOperand/getIndexOperand accessors to ExtractElementInst.
Chris Lattner [Tue, 8 Sep 2009 03:32:53 +0000 (03:32 +0000)]
add getVectorOperand/getIndexOperand accessors to ExtractElementInst.
Fix some const correctness problems in SelectInst.

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

15 years agoSimplify from my last change. Assert1 is a macro that makes its caller return,
Nick Lewycky [Tue, 8 Sep 2009 02:02:39 +0000 (02:02 +0000)]
Simplify from my last change. Assert1 is a macro that makes its caller return,
so "Assert1(isa<>); cast<>" is a valid idiom.

Actually check the PHI node's odd-numbered operands for BasicBlock-ness, like
the comment said.

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

15 years agoFix an abort on a store of an empty struct member. getValue returns
Dan Gohman [Tue, 8 Sep 2009 01:44:02 +0000 (01:44 +0000)]
Fix an abort on a store of an empty struct member. getValue returns
null in the case of an empty struct, so don't try to call getNumValues
on it.

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

15 years agoVerify types. Invalid types can be constructed when assertions are off.
Nick Lewycky [Tue, 8 Sep 2009 01:23:52 +0000 (01:23 +0000)]
Verify types. Invalid types can be constructed when assertions are off.

Make the verifier more robust by avoiding unprotected cast<> calls. Notably,
Assert1(isa<>); cast<> is not safe as Assert1 does not terminate the program.

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

15 years agofix PR4915, a crash in -debug mode.
Chris Lattner [Tue, 8 Sep 2009 01:22:54 +0000 (01:22 +0000)]
fix PR4915, a crash in -debug mode.

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

15 years agoFix PR4882, by making MemCpyOpt not dereference removed stores to get the
Chris Lattner [Tue, 8 Sep 2009 00:27:14 +0000 (00:27 +0000)]
Fix PR4882, by making MemCpyOpt not dereference removed stores to get the
context for the newly created operations.

Patch by Jakub Staszak!

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

15 years agofix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.
Chris Lattner [Tue, 8 Sep 2009 00:13:52 +0000 (00:13 +0000)]
fix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.
This fixes PR4905

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

15 years agoadd some comments to describe the invariants.
Chris Lattner [Tue, 8 Sep 2009 00:06:16 +0000 (00:06 +0000)]
add some comments to describe the invariants.

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

15 years agoReappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.
Dan Gohman [Mon, 7 Sep 2009 23:54:19 +0000 (23:54 +0000)]
Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.

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

15 years agoFix a thinko: When lowering fneg with xor, bitcast the operands
Dan Gohman [Mon, 7 Sep 2009 23:47:14 +0000 (23:47 +0000)]
Fix a thinko: When lowering fneg with xor, bitcast the operands
from floating-point to integer first, and bitcast the result
back to floating-point. Previously, this test was passing by
falling back to SelectionDAG lowering. The resulting code isn't
as nice, but it's correct and CodeGen now stays on the fast path.

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

15 years agoadd some more notes.
Chris Lattner [Mon, 7 Sep 2009 23:33:52 +0000 (23:33 +0000)]
add some more notes.

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

15 years agoAdd a testcase for the GlobalOpt inbounds fix.
Dan Gohman [Mon, 7 Sep 2009 23:04:59 +0000 (23:04 +0000)]
Add a testcase for the GlobalOpt inbounds fix.

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

15 years agodescribe undef semantics in some more detail.
Chris Lattner [Mon, 7 Sep 2009 22:52:39 +0000 (22:52 +0000)]
describe undef semantics in some more detail.

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

15 years agoAdd inbounds to these getelementptrs, now that GlobalOpt requires this,
Dan Gohman [Mon, 7 Sep 2009 22:45:41 +0000 (22:45 +0000)]
Add inbounds to these getelementptrs, now that GlobalOpt requires this,
to preserve the meaning of these tests.

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

15 years agoDon't commit stores with addresses that have indices that are not
Dan Gohman [Mon, 7 Sep 2009 22:44:55 +0000 (22:44 +0000)]
Don't commit stores with addresses that have indices that are not
compile-time constant integers or that are out of bounds for their
corresponding static array types. These can cause aliasing that
GlobalOpt assumes won't happen.

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

15 years agoDon't commit addresses of aggregate values. This avoids problems with
Dan Gohman [Mon, 7 Sep 2009 22:42:05 +0000 (22:42 +0000)]
Don't commit addresses of aggregate values. This avoids problems with
an aggregate store overlapping a different aggregate store, despite
the stores having distinct addresses.

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

15 years agoFix GlobalOpt to avoid committing a store if the address getelementptr
Dan Gohman [Mon, 7 Sep 2009 22:40:13 +0000 (22:40 +0000)]
Fix GlobalOpt to avoid committing a store if the address getelementptr
is missing the inbounds flag. This is slightly conservative, but it
avoids problems with two constants pointing to the same address but
getting distinct entries in the Memory DenseMap.

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

15 years agoPreserve the InBounds flag when evaluating a getelementptr instruction
Dan Gohman [Mon, 7 Sep 2009 22:34:43 +0000 (22:34 +0000)]
Preserve the InBounds flag when evaluating a getelementptr instruction
into a getelementptr ConstantExpr.

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

15 years agoSimplify this code by using hasDefinitiveInitializer().
Dan Gohman [Mon, 7 Sep 2009 22:31:26 +0000 (22:31 +0000)]
Simplify this code by using hasDefinitiveInitializer().

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

15 years agotighten test.
Chris Lattner [Mon, 7 Sep 2009 22:15:23 +0000 (22:15 +0000)]
tighten test.

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

15 years agotweak test, add PR#
Chris Lattner [Mon, 7 Sep 2009 22:14:41 +0000 (22:14 +0000)]
tweak test, add PR#

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

15 years agoExpress this in the canonical way.
Nick Lewycky [Mon, 7 Sep 2009 21:50:24 +0000 (21:50 +0000)]
Express this in the canonical way.

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

15 years agoHomogenize whitespace.
Nick Lewycky [Mon, 7 Sep 2009 20:44:51 +0000 (20:44 +0000)]
Homogenize whitespace.

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

15 years agoUse -output-prefix in bugpoint tests so that outputs go in temp directory (and
Daniel Dunbar [Mon, 7 Sep 2009 19:26:18 +0000 (19:26 +0000)]
Use -output-prefix in bugpoint tests so that outputs go in temp directory (and
we don't race on them).

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

15 years agoAdd -output-prefix option to bugpoint (to change the default output name).
Daniel Dunbar [Mon, 7 Sep 2009 19:26:11 +0000 (19:26 +0000)]
Add -output-prefix option to bugpoint (to change the default output name).

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

15 years agoDon't depend on Tcl behavior of redirecting stderr for all commands in a
Daniel Dunbar [Mon, 7 Sep 2009 19:26:02 +0000 (19:26 +0000)]
Don't depend on Tcl behavior of redirecting stderr for all commands in a
pipeline.

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

15 years agoAvoid Tcl substitution, introduced %llvmgcc_only for this one little test
Daniel Dunbar [Mon, 7 Sep 2009 19:25:54 +0000 (19:25 +0000)]
Avoid Tcl substitution, introduced %llvmgcc_only for this one little test
(%llvmgcc includes a '-w' argument, and this test looks for warnings).

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

15 years agoUsing a signal handler that does nothing should be
Duncan Sands [Mon, 7 Sep 2009 05:58:25 +0000 (05:58 +0000)]
Using a signal handler that does nothing should be
equivalent to SIG_IGN.

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

15 years agoUpdate unittests for MDNode uniquing disable.
Daniel Dunbar [Mon, 7 Sep 2009 04:19:02 +0000 (04:19 +0000)]
Update unittests for MDNode uniquing disable.

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

15 years agoDisable MDNode uniquing.
Daniel Dunbar [Mon, 7 Sep 2009 04:05:49 +0000 (04:05 +0000)]
Disable MDNode uniquing.
 - Hopefully this unbreaks some llvm-gcc bootstraps.

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

15 years agoDocument opt -S argument.
Daniel Dunbar [Mon, 7 Sep 2009 04:03:44 +0000 (04:03 +0000)]
Document opt -S argument.

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

15 years agoFix comment.
Eric Christopher [Sun, 6 Sep 2009 22:20:54 +0000 (22:20 +0000)]
Fix comment.

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

15 years agoDo not create calls via PLT in compilation callback - this is higly platform
Anton Korobeynikov [Sun, 6 Sep 2009 20:21:48 +0000 (20:21 +0000)]
Do not create calls via PLT in compilation callback - this is higly platform
dependent. Hopefully, this will fix PR3801.

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

15 years agoDo not try to override non-virtual methods, especially
Duncan Sands [Sun, 6 Sep 2009 20:02:00 +0000 (20:02 +0000)]
Do not try to override non-virtual methods, especially
when the new method gives the same result as the original
(as far as I can see).  This will hopefully pacify icc.

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

15 years agoRemove a left over bit of code with no effect.
Duncan Sands [Sun, 6 Sep 2009 19:29:07 +0000 (19:29 +0000)]
Remove a left over bit of code with no effect.

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

15 years agoAvoid warnings if assertions are off.
Duncan Sands [Sun, 6 Sep 2009 19:28:38 +0000 (19:28 +0000)]
Avoid warnings if assertions are off.

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

15 years agoRemove unreachable code.
Duncan Sands [Sun, 6 Sep 2009 19:27:53 +0000 (19:27 +0000)]
Remove unreachable code.

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

15 years agoSimplify. Testing shows that this is not equivalent to BBI = CR.CaseBB + 1.
Duncan Sands [Sun, 6 Sep 2009 18:03:32 +0000 (18:03 +0000)]
Simplify.  Testing shows that this is not equivalent to BBI = CR.CaseBB + 1.

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

15 years agoAvoid an unused variable warning when assertions are
Duncan Sands [Sun, 6 Sep 2009 16:27:34 +0000 (16:27 +0000)]
Avoid an unused variable warning when assertions are
disabled.

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

15 years agoChange "const static" to "static const", as warned about
Duncan Sands [Sun, 6 Sep 2009 13:10:36 +0000 (13:10 +0000)]
Change "const static" to "static const", as warned about
by icc (#82).  Patch by Erick Tryzelaar.

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

15 years agoMark more constants unsigned, as warned about by icc (#68).
Duncan Sands [Sun, 6 Sep 2009 12:56:52 +0000 (12:56 +0000)]
Mark more constants unsigned, as warned about by icc (#68).
Patch by Erick Tryzelaar.

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

15 years agoRemove some not-really-used variables, as warned
Duncan Sands [Sun, 6 Sep 2009 12:41:19 +0000 (12:41 +0000)]
Remove some not-really-used variables, as warned
about by icc (#593, partial).  Patch by Erick Tryzelaar.

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

15 years agoMore MSVC warning fixes:
Benjamin Kramer [Sun, 6 Sep 2009 12:26:28 +0000 (12:26 +0000)]
More MSVC warning fixes:
1. DUPMAX is defined in regcomp.c, no need to redefine it in regutils.
2. MSVC doesn't like snprintf, use _snprintf instead.

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

15 years agoRemove strange 'const' qualifiers, as warned about by icc
Duncan Sands [Sun, 6 Sep 2009 12:16:26 +0000 (12:16 +0000)]
Remove strange 'const' qualifiers, as warned about by icc
(#411).  Patch by Erick Tryzelaar.

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

15 years agoIt's a bool, so treat it like one. Fixes a MSVC warning.
Benjamin Kramer [Sun, 6 Sep 2009 12:10:17 +0000 (12:10 +0000)]
It's a bool, so treat it like one. Fixes a MSVC warning.

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

15 years agoMark constants as unsigned, as pointed out by icc
Duncan Sands [Sun, 6 Sep 2009 11:45:14 +0000 (11:45 +0000)]
Mark constants as unsigned, as pointed out by icc
warnings (#174).  Patch by Erick Tryzelaar.

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

15 years agoTweak code into an equivalent form for which icc
Duncan Sands [Sun, 6 Sep 2009 10:53:22 +0000 (10:53 +0000)]
Tweak code into an equivalent form for which icc
doesn't warn about unreachable instructions.  Patch
by Erick Tryzelaar (#111).

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

15 years agoFix an integer truncation noticed by MSVC.
Benjamin Kramer [Sun, 6 Sep 2009 09:35:10 +0000 (09:35 +0000)]
Fix an integer truncation noticed by MSVC.

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

15 years agoRemove splint hints to silence warnings from ICC and MSVC.
Benjamin Kramer [Sun, 6 Sep 2009 09:29:39 +0000 (09:29 +0000)]
Remove splint hints to silence warnings from ICC and MSVC.

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

15 years agoPublic and private corrections, warned about by icc (#304).
Duncan Sands [Sun, 6 Sep 2009 08:55:57 +0000 (08:55 +0000)]
Public and private corrections, warned about by icc (#304).
Patch by Erick Tryzelaar.

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

15 years agoRemove some unused variables and methods warned about by
Duncan Sands [Sun, 6 Sep 2009 08:33:48 +0000 (08:33 +0000)]
Remove some unused variables and methods warned about by
icc (#177, partial).  Patch by Erick Tryzelaar.

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

15 years agoRemove unneeded declaration, as warned about by
Duncan Sands [Sun, 6 Sep 2009 07:23:28 +0000 (07:23 +0000)]
Remove unneeded declaration, as warned about by
icc (#1170).  Patch by Erick Tryzelaar.

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

15 years agoFix a possible crash call setIsInBounds.
Daniel Dunbar [Sun, 6 Sep 2009 02:31:36 +0000 (02:31 +0000)]
Fix a possible crash call setIsInBounds.
 - I think there are more instances of this, but I think they are fixed in Dan's
   incoming patch. This one was preventing me from doing a bugpoint reduction
   though.

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

15 years agoSimplify, now that gtest supports raw_ostream directly.
Daniel Dunbar [Sun, 6 Sep 2009 02:31:26 +0000 (02:31 +0000)]
Simplify, now that gtest supports raw_ostream directly.

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

15 years agoRevert r80926. It causes loop unswitch assertion and slow down some JIT tests signifi...
Evan Cheng [Sun, 6 Sep 2009 02:26:10 +0000 (02:26 +0000)]
Revert r80926. It causes loop unswitch assertion and slow down some JIT tests significantly.

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

15 years agoRevert "Include optional subclass flags, such as inbounds, nsw, etc., ...", this
Daniel Dunbar [Sun, 6 Sep 2009 00:11:24 +0000 (00:11 +0000)]
Revert "Include optional subclass flags, such as inbounds, nsw, etc., ...", this
breaks MiniSAT on x86_64.

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

15 years agoFix spacing.
Daniel Dunbar [Sun, 6 Sep 2009 00:00:13 +0000 (00:00 +0000)]
Fix spacing.

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

15 years agoNow that googletest can print ConstantRange, use EXPECT_EQ when testing for
Nick Lewycky [Sat, 5 Sep 2009 18:27:40 +0000 (18:27 +0000)]
Now that googletest can print ConstantRange, use EXPECT_EQ when testing for
equality. Prefer EXPECT_EQ(foo, Full) over EXPECT_TRUE(foo.isFullSet()) because
the former will print out the contents of the constant range that failed.

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

15 years agoTeach googletest to use raw_ostream instead of just std::ostream.
Jeffrey Yasskin [Sat, 5 Sep 2009 18:16:17 +0000 (18:16 +0000)]
Teach googletest to use raw_ostream instead of just std::ostream.
This can break when there are implicit conversions from types raw_ostream
understands but std::ostream doesn't, but it increases the number of cases that
Just Work.

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

15 years agoQuote another '%S' in a test.
Daniel Dunbar [Sat, 5 Sep 2009 12:38:44 +0000 (12:38 +0000)]
Quote another '%S' in a test.

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

15 years agoRename %S metavar to %M (clang uses %S for the basename of the test file).
Daniel Dunbar [Sat, 5 Sep 2009 12:38:35 +0000 (12:38 +0000)]
Rename %S metavar to %M (clang uses %S for the basename of the test file).

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

15 years agoTemporary test files should use %t.
Daniel Dunbar [Sat, 5 Sep 2009 12:38:26 +0000 (12:38 +0000)]
Temporary test files should use %t.

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

15 years agoDon't depend on arch specific global prefix.
Daniel Dunbar [Sat, 5 Sep 2009 11:53:06 +0000 (11:53 +0000)]
Don't depend on arch specific global prefix.

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

15 years agoEliminate uses of %prcontext.
Daniel Dunbar [Sat, 5 Sep 2009 11:35:16 +0000 (11:35 +0000)]
Eliminate uses of %prcontext.
 - I'd appreciate it if someone else eyeballs my changes to make sure I captured
   the intent of the test.

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

15 years agoopt: Add -S option to print output as LLVM assembly.
Daniel Dunbar [Sat, 5 Sep 2009 11:34:53 +0000 (11:34 +0000)]
opt: Add -S option to print output as LLVM assembly.

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

15 years agoEliminate some Tclisms.
Daniel Dunbar [Sat, 5 Sep 2009 11:34:46 +0000 (11:34 +0000)]
Eliminate some Tclisms.

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

15 years agoDelete unused #include.
Benjamin Kramer [Sat, 5 Sep 2009 08:50:14 +0000 (08:50 +0000)]
Delete unused #include.

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

15 years agoStabilize the order of live intervals in the priority_queue used by the
Bob Wilson [Sat, 5 Sep 2009 01:19:16 +0000 (01:19 +0000)]
Stabilize the order of live intervals in the priority_queue used by the
linear scan reg alloc.  This fixes a problem I ran into where extracting
a function from a larger file caused the generated code to change (masking
the problem I was trying to debug) because the allocator behaved differently.

This changes the results for two X86 regression checks.  stack-color-with-reg
is improved, with one less instruction, but pr3495 is worse, with one more
copy.  As far as I can tell, these tests were just getting lucky or unlucky,
so I've changed the expected results.

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

15 years agoDetect VLAs.
Devang Patel [Sat, 5 Sep 2009 00:34:14 +0000 (00:34 +0000)]
Detect VLAs.
Do not use DenseMap operator[] because it inserts new entry if lookup fails. Use find() to check an entry in a DenseMap first.

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

15 years agoIgnore malformed global variable debug info.
Devang Patel [Fri, 4 Sep 2009 23:59:07 +0000 (23:59 +0000)]
Ignore malformed global variable debug info.

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

15 years agoPrune #includes.
Benjamin Kramer [Fri, 4 Sep 2009 22:45:23 +0000 (22:45 +0000)]
Prune #includes.

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

15 years agoRemove an unneeded call to c_str().
Benjamin Kramer [Fri, 4 Sep 2009 22:44:03 +0000 (22:44 +0000)]
Remove an unneeded call to c_str().

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

15 years agoAdded AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' in
Kevin Enderby [Fri, 4 Sep 2009 22:40:31 +0000 (22:40 +0000)]
Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' in
preparation of supporting other targets. Then changed the lexer to parse these
as tokens.

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

15 years agoAdded the AsmToken::Hash enum constant to MCAsmLexer.h in preparation of
Kevin Enderby [Fri, 4 Sep 2009 21:45:34 +0000 (21:45 +0000)]
Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation of
supporting other targets.  Changed the code to pass MCAsmInfo to the parser
and the lexer.  Then changed the lexer to use CommentString from MCAsmInfo
instead of a literal '#' character.

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

15 years agoWhile replacing an MDNode elment, properly update MDNode's operand list.
Devang Patel [Fri, 4 Sep 2009 21:32:05 +0000 (21:32 +0000)]
While replacing an MDNode elment, properly update MDNode's operand list.
MDNode's operand list does not include all elements.

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

15 years agoPrevent warnings on compilers for which its not clear that assert won't return.
Andreas Neustifter [Fri, 4 Sep 2009 21:22:04 +0000 (21:22 +0000)]
Prevent warnings on compilers for which its not clear that assert won't return.

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

15 years agoRemoved yet another std::ostream reference.
Lang Hames [Fri, 4 Sep 2009 21:03:07 +0000 (21:03 +0000)]
Removed yet another std::ostream reference.

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

15 years agoRemoved some junk and a std::ostream operator that was hanging around.
Lang Hames [Fri, 4 Sep 2009 20:54:51 +0000 (20:54 +0000)]
Removed some junk and a std::ostream operator that was hanging around.

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

15 years agoReplaces uses of unsigned for indexes in LiveInterval and VNInfo with
Lang Hames [Fri, 4 Sep 2009 20:41:11 +0000 (20:41 +0000)]
Replaces uses of unsigned for indexes in LiveInterval and VNInfo with
a new class, MachineInstrIndex, which hides arithmetic details from
most clients. This is a step towards allowing the register allocator
to update/insert code during allocation.

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

15 years agoTest for llvm-gcc commit 81037.
Dale Johannesen [Fri, 4 Sep 2009 20:19:09 +0000 (20:19 +0000)]
Test for llvm-gcc commit 81037.

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

15 years agoUpdated tests to use ProfileVerifer to test ProfileLoader and ProfileEstimator.
Andreas Neustifter [Fri, 4 Sep 2009 17:21:59 +0000 (17:21 +0000)]
Updated tests to use ProfileVerifer to test ProfileLoader and ProfileEstimator.
(Keep disabled test disabled until selfhosted build issue is resolved.)

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

15 years agoCleaned up ProfileVerifierPass.
Andreas Neustifter [Fri, 4 Sep 2009 17:15:10 +0000 (17:15 +0000)]
Cleaned up ProfileVerifierPass.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086219.html)

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

15 years agoConverted MaximumSpanningTree algorithm to a generic template, this could go
Andreas Neustifter [Fri, 4 Sep 2009 12:34:44 +0000 (12:34 +0000)]
Converted MaximumSpanningTree algorithm to a generic template, this could go
into llvm/ADT.

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

15 years agoInclude optional subclass flags, such as inbounds, nsw, etc., in the
Dan Gohman [Fri, 4 Sep 2009 12:08:11 +0000 (12:08 +0000)]
Include optional subclass flags, such as inbounds, nsw, etc., in the
Constant uniquing tables. This allows distinct ConstantExpr objects
with the same operation and different flags.

Even though a ConstantExpr "a + b" is either always overflowing or
never overflowing (due to being a ConstantExpr), it's still necessary
to be able to represent it both with and without overflow flags at
the same time within the IR, because the safety of the flag may
depend on the context of the use. If the constant really does overflow,
it wouldn't ever be safe to use with the flag set, however the use
may be in code that is never actually executed.

This also makes it possible to merge all the flags tests into a single test.

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

15 years agoUse delete[] to match new[] (found by valgrind).
Duncan Sands [Fri, 4 Sep 2009 11:59:43 +0000 (11:59 +0000)]
Use delete[] to match new[] (found by valgrind).

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

15 years agoRun branch folding if if-converter make some transformations.
Evan Cheng [Fri, 4 Sep 2009 07:47:40 +0000 (07:47 +0000)]
Run branch folding if if-converter make some transformations.

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

15 years agoFix comment for consistency sake.
Evan Cheng [Fri, 4 Sep 2009 07:46:30 +0000 (07:46 +0000)]
Fix comment for consistency sake.

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

15 years agoRemove stale greps.
Daniel Dunbar [Fri, 4 Sep 2009 05:07:52 +0000 (05:07 +0000)]
Remove stale greps.

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

15 years agoUpdate lib deps.
Daniel Dunbar [Fri, 4 Sep 2009 05:07:44 +0000 (05:07 +0000)]
Update lib deps.

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

15 years agoConvert tests to FileCheck.
Bob Wilson [Fri, 4 Sep 2009 04:07:19 +0000 (04:07 +0000)]
Convert tests to FileCheck.

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

15 years agoWhitespace cleanup
Jim Grosbach [Fri, 4 Sep 2009 01:38:51 +0000 (01:38 +0000)]
Whitespace cleanup

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