oota-llvm.git
14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 years agoIf there's a calling convention attach it to the rewind function call.
Eric Christopher [Fri, 4 Sep 2009 01:14:14 +0000 (01:14 +0000)]
If there's a calling convention attach it to the rewind function call.

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

14 years agoConvert a test to FileCheck.
Bob Wilson [Fri, 4 Sep 2009 00:32:31 +0000 (00:32 +0000)]
Convert a test to FileCheck.

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

14 years agoFunky indentation.
Evan Cheng [Thu, 3 Sep 2009 23:54:22 +0000 (23:54 +0000)]
Funky indentation.

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

14 years agoRevert "--- Reverse-merging r80908 into '.':", I already "fixed" this.
Daniel Dunbar [Thu, 3 Sep 2009 23:40:10 +0000 (23:40 +0000)]
Revert "--- Reverse-merging r80908 into '.':", I already "fixed" this.

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

14 years agoRevert 80959. It isn't sufficient to solve the full problem. And it
Dan Gohman [Thu, 3 Sep 2009 23:34:49 +0000 (23:34 +0000)]
Revert 80959. It isn't sufficient to solve the full problem. And it
introduced regressions in the Ocaml bindings tests.

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

14 years agoReplace ocamlc tests with ocamlopt tests since they're less noisy.
Erick Tryzelaar [Thu, 3 Sep 2009 23:27:31 +0000 (23:27 +0000)]
Replace ocamlc tests with ocamlopt tests since they're less noisy.

There's a bug with ocamlc that uses "char*" instead of "const char*" for
global string variables. This causes g++ to be very noisy when linking
ocamlc programs. That's why the ocaml test used to cat to /dev/null.
ocamlopt doesn't have this problem, so we can get rid of the >/dev/null,
which may obscure some problems.

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

14 years ago--- Reverse-merging r80908 into '.':
Bill Wendling [Thu, 3 Sep 2009 23:13:46 +0000 (23:13 +0000)]
--- Reverse-merging r80908 into '.':
D    test/Analysis/Profiling

--- Reverse-merging r80907 into '.':
U    lib/Analysis/ProfileInfoLoaderPass.cpp

Attempt to remove failure in the self-hosting build bot.

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

14 years agoAdd test for PR4873, which works for me.
Daniel Dunbar [Thu, 3 Sep 2009 22:57:02 +0000 (22:57 +0000)]
Add test for PR4873, which works for me.

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

14 years agoLLVM currently represents floating-point negation as -0.0 - x. Fix
Dan Gohman [Thu, 3 Sep 2009 22:53:57 +0000 (22:53 +0000)]
LLVM currently represents floating-point negation as -0.0 - x. Fix
FastISel to recognize this pattern and emit a floating-point
negation using xor.

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

14 years agoDon't crash when target has no itineraries.
David Goodwin [Thu, 3 Sep 2009 22:48:51 +0000 (22:48 +0000)]
Don't crash when target has no itineraries.

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

14 years agoIf we've pushed registers onto the stack, but aren't adjusting the stack pointer
Bill Wendling [Thu, 3 Sep 2009 22:19:22 +0000 (22:19 +0000)]
If we've pushed registers onto the stack, but aren't adjusting the stack pointer
(i.e., there are no local variables and stuff), we still need to output FDE
information for the pushed registers.

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

14 years agoRemove the API for creating ConstantExprs with the nsw, nuw, inbounds,
Dan Gohman [Thu, 3 Sep 2009 22:17:40 +0000 (22:17 +0000)]
Remove the API for creating ConstantExprs with the nsw, nuw, inbounds,
and exact flags. Because ConstantExprs are uniqued, creating an
expression with this flag causes all expressions with the same operands
to have the same flag, which may not be safe. Add, sub, mul, and sdiv
ConstantExprs are usually folded anyway, so the main interesting flag
here is inbounds, and the constant folder already knows how to set the
inbounds flag automatically in most cases, so there isn't an urgent need
for the API support.

This can be reconsidered in the future, but for now just removing these
API bits eliminates a source of potential trouble with little downside.

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

14 years agoCreate our own block initializer for kill fixups as the scheduling one wasn't doing...
David Goodwin [Thu, 3 Sep 2009 22:15:25 +0000 (22:15 +0000)]
Create our own block initializer for kill fixups as the scheduling one wasn't doing the right thing.

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

14 years agoCalls clobber FPSCR.
David Goodwin [Thu, 3 Sep 2009 22:12:28 +0000 (22:12 +0000)]
Calls clobber FPSCR.

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

14 years agoMake ImmutableMap/ImmutableSet quicker by only canonicalizing the tree after an
Ted Kremenek [Thu, 3 Sep 2009 22:07:30 +0000 (22:07 +0000)]
Make ImmutableMap/ImmutableSet quicker by only canonicalizing the tree after an
Add or Remove operation complete, and not while building the intermediate tree.
This trades a little bit more memory usage for less accesses to the FoldingSet.  On a benchmark for the clang static analyzer, this shaves off another 13% of execution time when using field/array sensitivity.

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

14 years agoDisable some parts of the profiling-tool-chain test, which is currently failing
Daniel Dunbar [Thu, 3 Sep 2009 21:09:53 +0000 (21:09 +0000)]
Disable some parts of the profiling-tool-chain test, which is currently failing
on a self-hosted build (although it seems to work on non-self hosted). I'll work
with Andreas to figure this out.

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

14 years agoRemove dead greps.
Daniel Dunbar [Thu, 3 Sep 2009 20:59:02 +0000 (20:59 +0000)]
Remove dead greps.

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

14 years agoOverhaul the TwoAddressInstructionPass to simplify the logic, especially
Bob Wilson [Thu, 3 Sep 2009 20:58:42 +0000 (20:58 +0000)]
Overhaul the TwoAddressInstructionPass to simplify the logic, especially
for the complicated case where one register is tied to multiple destinations.
This avoids the extra scan of instruction operands that was introduced by
my recent change.  I also pulled some code out into a separate
TryInstructionTransform method, added more comments, and renamed some
variables.

Besides all those changes, this takes care of a FIXME in the code regarding
an assumption about there being a single tied use of a register when
converting to a 3-address form.  I'm not aware of cases where that assumption
is violated, but the code now only attempts to transform an instruction,
either by commuting its operands or by converting to a 3-address form,
for the simple case where there is a single pair of tied operands.

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

14 years agoSmallvectorize switchExitBlocks.
Dan Gohman [Thu, 3 Sep 2009 20:36:13 +0000 (20:36 +0000)]
Smallvectorize switchExitBlocks.

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

14 years agoThere is not any need to copy metadata while merging modules.
Devang Patel [Thu, 3 Sep 2009 20:35:57 +0000 (20:35 +0000)]
There is not any need to copy metadata while merging modules.

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

14 years agoRecognize more opportunities to use SSE min and max instructions,
Dan Gohman [Thu, 3 Sep 2009 20:34:31 +0000 (20:34 +0000)]
Recognize more opportunities to use SSE min and max instructions,
swapping the operands if necessary.

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

14 years agoTest cases for vector shifts changes r80935
Mon P Wang [Thu, 3 Sep 2009 19:57:35 +0000 (19:57 +0000)]
Test cases for vector shifts changes r80935
Changed the old vector shift test to use FileCheck

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

14 years agoFixed a few problems with vector shifts
Mon P Wang [Thu, 3 Sep 2009 19:56:25 +0000 (19:56 +0000)]
Fixed a few problems with vector shifts
  - when transforming a vector shift of a non-immediate scalar shift amount, zero
    extend the i32 shift amount to i64 since the vector shift reads 64 bits
  - when transforming i16 vectors to use a vector shift, zero extend i16 shift amount
  - improve the code quality in some cases when transforming vectors to use a vector shift

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

14 years agoAdd a -disable-16bit flag and associated support for experimenting with
Dan Gohman [Thu, 3 Sep 2009 17:18:51 +0000 (17:18 +0000)]
Add a -disable-16bit flag and associated support for experimenting with
disabling the use of 16-bit operations on x86. This doesn't yet work for
inline asms with 16-bit constraints, vectors with 16-bit elements,
trampoline code, and perhaps other obscurities, but it's enough to try
some experiments.

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

14 years agoRemoved the non-target independent AsmToken::Register enum constant
Kevin Enderby [Thu, 3 Sep 2009 17:15:07 +0000 (17:15 +0000)]
Removed the non-target independent AsmToken::Register enum constant
from MCAsmLexer.h in preparation of supporting other targets.  Changed the
X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking
for AsmToken::Percent when parsing in places that used AsmToken::Register.
Then changed X86ATTAsmParser::ParseRegister to parse out registers as an
AsmToken::Percent followed by an AsmToken::Identifier.

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

14 years agoUse WeakVH to hold dead mdnodes. Check use_empty() before deleting a node.
Devang Patel [Thu, 3 Sep 2009 17:03:47 +0000 (17:03 +0000)]
Use WeakVH to hold dead mdnodes. Check use_empty() before deleting a node.

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

14 years agoMake bugpoint use ParseIRFile instead of doing the same thing manually.
Dan Gohman [Thu, 3 Sep 2009 16:32:58 +0000 (16:32 +0000)]
Make bugpoint use ParseIRFile instead of doing the same thing manually.

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

14 years agoAdd a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verify
Dan Gohman [Thu, 3 Sep 2009 16:31:42 +0000 (16:31 +0000)]
Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verify
that these passes are properly preserved.

Fix several transformation passes that claimed to preserve LoopSimplify
form but weren't.

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

14 years agoRemove some unnecessary -f options.
Dan Gohman [Thu, 3 Sep 2009 16:11:53 +0000 (16:11 +0000)]
Remove some unnecessary -f options.

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

14 years agoMove getUniqueExitBlocks from LoopBase to Loop, since they depend on
Dan Gohman [Thu, 3 Sep 2009 16:10:48 +0000 (16:10 +0000)]
Move getUniqueExitBlocks from LoopBase to Loop, since they depend on
LoopSimplify form, which is currently only available on Loops (and
not MachineLoops). Also, move the code out of the header file.

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

14 years agoUse IRReader.h in opt, to support reading of LLVM Assembly files directly.
Dan Gohman [Thu, 3 Sep 2009 16:00:08 +0000 (16:00 +0000)]
Use IRReader.h in opt, to support reading of LLVM Assembly files directly.

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

14 years agoChange PHINode::hasConstantValue to have a DominatorTree argument
Dan Gohman [Thu, 3 Sep 2009 15:34:35 +0000 (15:34 +0000)]
Change PHINode::hasConstantValue to have a DominatorTree argument
instead of a bool argument, and to do the dominator check itself.
This makes it eaiser to use when DominatorTree information is
available.

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

14 years agoDon't try to verify a LoopPass analysis if the loop has been deleted.
Dan Gohman [Thu, 3 Sep 2009 15:09:24 +0000 (15:09 +0000)]
Don't try to verify a LoopPass analysis if the loop has been deleted.

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

14 years agoRemove references to expression "handles", which are no longer used.
Dan Gohman [Thu, 3 Sep 2009 15:00:26 +0000 (15:00 +0000)]
Remove references to expression "handles", which are no longer used.

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

14 years agoCppBackend: avoid printing unnecessary whitespace.
Benjamin Kramer [Thu, 3 Sep 2009 14:58:24 +0000 (14:58 +0000)]
CppBackend: avoid printing unnecessary whitespace.

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

14 years agoKeep track of how many memmove calls were turned into
Duncan Sands [Thu, 3 Sep 2009 13:37:16 +0000 (13:37 +0000)]
Keep track of how many memmove calls were turned into
memcpy calls.

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

14 years agoFix build warning.
Andreas Neustifter [Thu, 3 Sep 2009 09:11:10 +0000 (09:11 +0000)]
Fix build warning.

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

14 years agoCode Cleanup.
Andreas Neustifter [Thu, 3 Sep 2009 08:52:52 +0000 (08:52 +0000)]
Code Cleanup.

Removed inverted flag form MaximumSpanningTree, also do not handle so much
information to MaximumSpanningTree.

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

14 years agoFilter out -fno-rtti from CXXFLAGS as well (in an expensive checks build).
Daniel Dunbar [Thu, 3 Sep 2009 08:41:19 +0000 (08:41 +0000)]
Filter out -fno-rtti from CXXFLAGS as well (in an expensive checks build).

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

14 years agoCode Cleanup.
Andreas Neustifter [Thu, 3 Sep 2009 08:41:05 +0000 (08:41 +0000)]
Code Cleanup.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086139.html)

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

14 years agoReapply profiling tests.
Daniel Dunbar [Thu, 3 Sep 2009 07:38:00 +0000 (07:38 +0000)]
Reapply profiling tests.

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

14 years agoRemove undefined behavior when loading optimal edge profile info.
Daniel Dunbar [Thu, 3 Sep 2009 07:37:42 +0000 (07:37 +0000)]
Remove undefined behavior when loading optimal edge profile info.

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

14 years agodon't call getOffset() on jump tables, this fixes three failing olden benchmarks
Chris Lattner [Thu, 3 Sep 2009 07:36:42 +0000 (07:36 +0000)]
don't call getOffset() on jump tables, this fixes three failing olden benchmarks
with the new asmprinter.

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

14 years agoImplement support for X86II::MO_GOT_ABSOLUTE_ADDRESS. We get very
Chris Lattner [Thu, 3 Sep 2009 07:30:56 +0000 (07:30 +0000)]
Implement support for X86II::MO_GOT_ABSOLUTE_ADDRESS.  We get very
different formatting from the old asmprinter, but it should be
semantically the same.  We used to get:

popl %eax
addl $_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$6.$piclabel], %eax
...

Now we get:

popl %eax
.Lpicbaseref6:
addl $(_GLOBAL_OFFSET_TABLE_ + (.Lpicbaseref6 - .Lllvm$6.$piclabel)), %eax
...

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

14 years agoReference to hidden symbols do not have to go through non-lazy pointer in non-pic...
Evan Cheng [Thu, 3 Sep 2009 07:04:02 +0000 (07:04 +0000)]
Reference to hidden symbols do not have to go through non-lazy pointer in non-pic mode. rdar://7187172.

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

14 years agoRemove VISIBILITY_HIDDEN from this file.
Nick Lewycky [Thu, 3 Sep 2009 06:43:15 +0000 (06:43 +0000)]
Remove VISIBILITY_HIDDEN from this file.

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

14 years agomerge all the basic linux/32 pic tests together into one test.
Chris Lattner [Thu, 3 Sep 2009 06:29:23 +0000 (06:29 +0000)]
merge all the basic linux/32 pic tests together into one test.

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

14 years agorename test
Chris Lattner [Thu, 3 Sep 2009 06:16:49 +0000 (06:16 +0000)]
rename test

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