oota-llvm.git
13 years agoAvoid O(n*m) complexity in StringRef::find_first(_not)_of(StringRef).
Benjamin Kramer [Mon, 23 Aug 2010 18:16:08 +0000 (18:16 +0000)]
Avoid O(n*m) complexity in StringRef::find_first(_not)_of(StringRef).

- Cache used characters in a bitset to reduce memory overhead to just 32 bytes.
- On my core2 this code is faster except when the checked string was very short
  (smaller than the list of delimiters).

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

13 years agoRe-enable LazyValueInfo. Monitoring for failures.
Owen Anderson [Mon, 23 Aug 2010 18:12:23 +0000 (18:12 +0000)]
Re-enable LazyValueInfo.  Monitoring for failures.

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

13 years agoNow that PassInfo and Pass::ID have been separated, move the rest of the passes over...
Owen Anderson [Mon, 23 Aug 2010 17:52:01 +0000 (17:52 +0000)]
Now that PassInfo and Pass::ID have been separated, move the rest of the passes over to the new registration API.

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

13 years agoStringRef tweaks:
Benjamin Kramer [Mon, 23 Aug 2010 17:44:13 +0000 (17:44 +0000)]
StringRef tweaks:

- Respect find_first_of(char's From parameter instead of silently dropping it.
- Prefer std::string() to std::string("")

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

13 years agorandom improvement for variable shift codegen.
Chris Lattner [Mon, 23 Aug 2010 17:30:29 +0000 (17:30 +0000)]
random improvement for variable shift codegen.

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

13 years agoTry to escape the '$'s in these so they reach the underlying 'sh' invocation.
Chandler Carruth [Mon, 23 Aug 2010 08:54:19 +0000 (08:54 +0000)]
Try to escape the '$'s in these so they reach the underlying 'sh' invocation.
I have no idea how lit did the right thing here, but other test runners don't.

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

13 years agoFix some GCC warnings by providing a virtual destructor in the base of a class
Chandler Carruth [Mon, 23 Aug 2010 08:25:07 +0000 (08:25 +0000)]
Fix some GCC warnings by providing a virtual destructor in the base of a class
hierarchy with virtual methods and using llvm_unreachable to properly indicate
unreachable states which would otherwise leave variables uninitialized.

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

13 years agoRevert invalid r111792. Jump tables are not broken on x86-64 / coff,
Anton Korobeynikov [Mon, 23 Aug 2010 07:38:51 +0000 (07:38 +0000)]
Revert invalid r111792. Jump tables are not broken on x86-64 / coff,
it's COFF emitter which does not support differences of two symbols
(and needs to be fixed). GAS is pretty fine with code produced.

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

13 years agoRevert part of my last commit. the mingw32 build bot doesn't seem to like it.
Michael J. Spencer [Mon, 23 Aug 2010 05:25:23 +0000 (05:25 +0000)]
Revert part of my last commit. the mingw32 build bot doesn't seem to like it.

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

13 years agoWorkaround broken jump tables on x86-64 COFF.
Michael J. Spencer [Mon, 23 Aug 2010 04:45:37 +0000 (04:45 +0000)]
Workaround broken jump tables on x86-64 COFF.

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

13 years agoremove some dead code.
Chris Lattner [Mon, 23 Aug 2010 03:12:06 +0000 (03:12 +0000)]
remove some dead code.

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

13 years agoVerify the predicates on icmp/fcmp. Suggested by Jeff Yasskin!
Nick Lewycky [Sun, 22 Aug 2010 23:45:14 +0000 (23:45 +0000)]
Verify the predicates on icmp/fcmp. Suggested by Jeff Yasskin!

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

13 years agoDelete dead comment.
Eli Friedman [Sat, 21 Aug 2010 20:19:51 +0000 (20:19 +0000)]
Delete dead comment.

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

13 years agoUse rip-rel addressing on win64 by default. For this we just
Anton Korobeynikov [Sat, 21 Aug 2010 17:21:11 +0000 (17:21 +0000)]
Use rip-rel addressing on win64 by default. For this we just
defaults to small pic code model.

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

13 years agoUse MDNode::destroy(). Fixes a delete/free mismatch.
Benjamin Kramer [Sat, 21 Aug 2010 15:07:23 +0000 (15:07 +0000)]
Use MDNode::destroy(). Fixes a delete/free mismatch.

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

13 years agoMC: Add partial x86-64 support to COFF.
Michael J. Spencer [Sat, 21 Aug 2010 05:58:13 +0000 (05:58 +0000)]
MC: Add partial x86-64 support to COFF.

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

13 years agoAdd an assert to MDNode::deleteTemporary check that the node being deleted
Dan Gohman [Sat, 21 Aug 2010 02:52:29 +0000 (02:52 +0000)]
Add an assert to MDNode::deleteTemporary check that the node being deleted
is not non-temporary.

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

13 years agoFix x86 fast-isel's cmp+branch folding to avoid folding when the
Dan Gohman [Sat, 21 Aug 2010 02:32:36 +0000 (02:32 +0000)]
Fix x86 fast-isel's cmp+branch folding to avoid folding when the
comparison is in a different basic block from the branch. In such
cases, the comparison's operands may not have initialized virtual
registers available.

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

13 years agoPrepare LowerVECTOR_SHUFFLEv8i16 to use x86 target specific nodes directly
Bruno Cardoso Lopes [Sat, 21 Aug 2010 01:32:18 +0000 (01:32 +0000)]
Prepare LowerVECTOR_SHUFFLEv8i16 to use x86 target specific nodes directly

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

13 years agoReplace some NEON vmovl intrinsic that I missed earlier.
Bob Wilson [Fri, 20 Aug 2010 23:22:43 +0000 (23:22 +0000)]
Replace some NEON vmovl intrinsic that I missed earlier.

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

13 years agoThis is the first step towards refactoring the x86 vector shuffle code. The
Bruno Cardoso Lopes [Fri, 20 Aug 2010 22:55:05 +0000 (22:55 +0000)]
This is the first step towards refactoring the x86 vector shuffle code. The
general idea here is to have a group of x86 target specific nodes which are
going to be selected during lowering and then directly matched in isel.

The commit includes the addition of those specific nodes and a *bunch* of
patterns, and incrementally we're going to switch between them and what we
have right now. Both the patterns and target specific nodes can change as
we move forward with this work.

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

13 years agoCreateTemporaryType doesn't needs its Context argument.
Dan Gohman [Fri, 20 Aug 2010 22:39:47 +0000 (22:39 +0000)]
CreateTemporaryType doesn't needs its Context argument.

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

13 years agoCreate the new linker type "linker_private_weak_def_auto".
Bill Wendling [Fri, 20 Aug 2010 22:05:50 +0000 (22:05 +0000)]
Create the new linker type "linker_private_weak_def_auto".

It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility.  The symbols are removed by the linker from the final linked image
(executable or dynamic library).

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

13 years agoIntroduce a new temporary MDNode concept. Temporary MDNodes are
Dan Gohman [Fri, 20 Aug 2010 22:02:26 +0000 (22:02 +0000)]
Introduce a new temporary MDNode concept. Temporary MDNodes are
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.

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

13 years agoTest should pass on non-Darwin x86.
Dale Johannesen [Fri, 20 Aug 2010 21:18:55 +0000 (21:18 +0000)]
Test should pass on non-Darwin x86.

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

13 years agoFix --disable-threads build, PR7949.
Daniel Dunbar [Fri, 20 Aug 2010 20:54:37 +0000 (20:54 +0000)]
Fix --disable-threads build, PR7949.

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

13 years agoDownwards growing stack allocation order reverses relative offsets
Jim Grosbach [Fri, 20 Aug 2010 20:25:31 +0000 (20:25 +0000)]
Downwards growing stack allocation order reverses relative offsets

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

13 years agoAdd more dbg output
Jim Grosbach [Fri, 20 Aug 2010 19:04:43 +0000 (19:04 +0000)]
Add more dbg output

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

13 years agoUpdate CMake build.
Benjamin Kramer [Fri, 20 Aug 2010 18:56:46 +0000 (18:56 +0000)]
Update CMake build.

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

13 years agoDon't run test on PPC darwin.
Dale Johannesen [Fri, 20 Aug 2010 18:29:27 +0000 (18:29 +0000)]
Don't run test on PPC darwin.

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

13 years agoRe-apply r111568 with a fix for the clang self-host.
Owen Anderson [Fri, 20 Aug 2010 18:24:43 +0000 (18:24 +0000)]
Re-apply r111568 with a fix for the clang self-host.

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

13 years agoFix vmcore.ml test.
Erick Tryzelaar [Fri, 20 Aug 2010 18:24:35 +0000 (18:24 +0000)]
Fix vmcore.ml test.

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

13 years agoReword NamedMDNode's comment.
Dan Gohman [Fri, 20 Aug 2010 18:22:57 +0000 (18:22 +0000)]
Reword NamedMDNode's comment.

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

13 years agollvmc: Fix alias generation.
Mikhail Glushenkov [Fri, 20 Aug 2010 18:16:26 +0000 (18:16 +0000)]
llvmc: Fix alias generation.

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

13 years agoDelete SlowOperationInformer, which is no longer used.
Dan Gohman [Fri, 20 Aug 2010 18:07:37 +0000 (18:07 +0000)]
Delete SlowOperationInformer, which is no longer used.

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

13 years agoConvert DbgInfoPrinter to use errs() instead of outs().
Dan Gohman [Fri, 20 Aug 2010 18:03:05 +0000 (18:03 +0000)]
Convert DbgInfoPrinter to use errs() instead of outs().

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

13 years agoAdd include guards to Support/Regex.h.
Mikhail Glushenkov [Fri, 20 Aug 2010 17:38:44 +0000 (17:38 +0000)]
Add include guards to Support/Regex.h.

If the omission was intentional, please add a comment.

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

13 years agoTrailing whitespace.
Mikhail Glushenkov [Fri, 20 Aug 2010 17:38:38 +0000 (17:38 +0000)]
Trailing whitespace.

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

13 years agoAdd explicit initializer for UseLocalStackAllocationBlock in MFI constructor
Jim Grosbach [Fri, 20 Aug 2010 17:34:22 +0000 (17:34 +0000)]
Add explicit initializer for UseLocalStackAllocationBlock in MFI constructor

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

13 years agoConvert tools to use tool_output_file, and introduce error
Dan Gohman [Fri, 20 Aug 2010 16:59:15 +0000 (16:59 +0000)]
Convert tools to use tool_output_file, and introduce error
checking to places which previously lacked it.

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

13 years agoDiagnose attempts to update standard output.
Dan Gohman [Fri, 20 Aug 2010 16:56:11 +0000 (16:56 +0000)]
Diagnose attempts to update standard output.

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

13 years agoConvert FileUpdate to use tool_output_file, and to use
Dan Gohman [Fri, 20 Aug 2010 16:54:27 +0000 (16:54 +0000)]
Convert FileUpdate to use tool_output_file, and to use
errs() instead of outs() for its verbose messages.

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

13 years agoproperly check for whether base regs were inserted
Jim Grosbach [Fri, 20 Aug 2010 16:48:30 +0000 (16:48 +0000)]
properly check for whether base regs were inserted

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

13 years agoConvert tablegen to use tool_output_file.
Dan Gohman [Fri, 20 Aug 2010 16:45:58 +0000 (16:45 +0000)]
Convert tablegen to use tool_output_file.

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

13 years agoMake outs() close its file when its stream is destructed, so that
Dan Gohman [Fri, 20 Aug 2010 16:44:56 +0000 (16:44 +0000)]
Make outs() close its file when its stream is destructed, so that
pending output errors are detected.

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

13 years agoDelete raw_stdout_ostream and raw_stderr_ostream, which are unused
Dan Gohman [Fri, 20 Aug 2010 16:39:41 +0000 (16:39 +0000)]
Delete raw_stdout_ostream and raw_stderr_ostream, which are unused
outside of outs() and errs() themselves, and they don't really
need custom classes.

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

13 years agoAdd an inspirational quote.
Dan Gohman [Fri, 20 Aug 2010 16:36:19 +0000 (16:36 +0000)]
Add an inspirational quote.

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

13 years agoAdd a comment.
Dan Gohman [Fri, 20 Aug 2010 16:35:30 +0000 (16:35 +0000)]
Add a comment.

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

13 years agoMove raw_ostream's Error flag into raw_fd_ostream, as that's the only
Dan Gohman [Fri, 20 Aug 2010 16:34:20 +0000 (16:34 +0000)]
Move raw_ostream's Error flag into raw_fd_ostream, as that's the only
class which is using it.

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

13 years agoExport error-handling functions in formatted_tool_output_file.
Dan Gohman [Fri, 20 Aug 2010 16:27:38 +0000 (16:27 +0000)]
Export error-handling functions in formatted_tool_output_file.

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

13 years agoFix a typo.
Bob Wilson [Fri, 20 Aug 2010 14:54:37 +0000 (14:54 +0000)]
Fix a typo.

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

13 years agoFix the running of ocaml tests.
Erick Tryzelaar [Fri, 20 Aug 2010 14:51:26 +0000 (14:51 +0000)]
Fix the running of ocaml tests.

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

13 years agoExpose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.
Erick Tryzelaar [Fri, 20 Aug 2010 14:51:22 +0000 (14:51 +0000)]
Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.

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

13 years agoFix arguments to ocaml's llvm_params.
Erick Tryzelaar [Fri, 20 Aug 2010 14:51:16 +0000 (14:51 +0000)]
Fix arguments to ocaml's llvm_params.

Thanks to Jianzhou Zhao for finding this.

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

13 years agoFix some Ocaml tests: the %t substitution now returns an absolute path.
Bob Wilson [Fri, 20 Aug 2010 14:20:17 +0000 (14:20 +0000)]
Fix some Ocaml tests: the %t substitution now returns an absolute path.

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

13 years agoThe %ocamlopt setting has embedded quotes. Copy the entire value instead
Bob Wilson [Fri, 20 Aug 2010 14:19:38 +0000 (14:19 +0000)]
The %ocamlopt setting has embedded quotes.  Copy the entire value instead
of stopping at the first embedded quote.

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

13 years agoUpdate LLVMC tests for r111620.
Benjamin Kramer [Fri, 20 Aug 2010 13:03:33 +0000 (13:03 +0000)]
Update LLVMC tests for r111620.

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

13 years agollvmc: Do not prefix option names with AutoGenerated.
Mikhail Glushenkov [Fri, 20 Aug 2010 11:24:51 +0000 (11:24 +0000)]
llvmc: Do not prefix option names with AutoGenerated.

Since they now live in the namespace 'autogenerated'.

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

13 years agollvmc: Cut global namespace pollution.
Mikhail Glushenkov [Fri, 20 Aug 2010 11:24:44 +0000 (11:24 +0000)]
llvmc: Cut global namespace pollution.

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

13 years agoDisambiguate calls to WriteGraph() to disable ADL.
Mikhail Glushenkov [Fri, 20 Aug 2010 11:24:35 +0000 (11:24 +0000)]
Disambiguate calls to WriteGraph() to disable ADL.

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

13 years agoTrailing whitespace.
Mikhail Glushenkov [Fri, 20 Aug 2010 11:24:31 +0000 (11:24 +0000)]
Trailing whitespace.

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

13 years agoReplace the arm.neon.vmovls and vmovlu intrinsics with vector sign-extend and
Bob Wilson [Fri, 20 Aug 2010 04:54:02 +0000 (04:54 +0000)]
Replace the arm.neon.vmovls and vmovlu intrinsics with vector sign-extend and
zero-extend operations.

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

13 years agoUse tool_output_file in llvm-extract and llvm-link too.
Dan Gohman [Fri, 20 Aug 2010 01:12:13 +0000 (01:12 +0000)]
Use tool_output_file in llvm-extract and llvm-link too.

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

13 years agoUse the new tool_output_file in several tools. This fixes a variety
Dan Gohman [Fri, 20 Aug 2010 01:07:01 +0000 (01:07 +0000)]
Use the new tool_output_file in several tools. This fixes a variety
of problems with output files being left behind or output streams
being left unclosed. Fix llvm-mc to respect the -o option in all
modes, rather than hardcoding outs() in some cases.

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

13 years agoMake the SCC printing passes use errs() instead of outs(), as the
Dan Gohman [Fri, 20 Aug 2010 01:03:44 +0000 (01:03 +0000)]
Make the SCC printing passes use errs() instead of outs(), as the
other printing passes do, and update the documentation accordingly.

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

13 years agoPrint chatty verbose messages to errs() instead of outs().
Dan Gohman [Fri, 20 Aug 2010 01:02:14 +0000 (01:02 +0000)]
Print chatty verbose messages to errs() instead of outs().

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

13 years agoMinor cleanups to follow the common convention for pass
Dan Gohman [Fri, 20 Aug 2010 01:00:03 +0000 (01:00 +0000)]
Minor cleanups to follow the common convention for pass
registration variables.

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

13 years agoMinor cleanups to follow the common convention for pass
Dan Gohman [Fri, 20 Aug 2010 00:56:16 +0000 (00:56 +0000)]
Minor cleanups to follow the common convention for pass
registration variables.

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

13 years agoIntroduce a new tool_output_file class, which extends raw_ostream with
Dan Gohman [Fri, 20 Aug 2010 00:48:10 +0000 (00:48 +0000)]
Introduce a new tool_output_file class, which extends raw_ostream with
functionality that most command-line tools need: ensuring that the
output file gets deleted if the tool is interrupted or encounters an
error.

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

13 years agoFix loop conditionals (MO.isDef() asserts that it's a reg) and
Eric Christopher [Fri, 20 Aug 2010 00:36:24 +0000 (00:36 +0000)]
Fix loop conditionals (MO.isDef() asserts that it's a reg) and
move some constraints around.

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

13 years agoAdd a couple of random comments.
Eric Christopher [Fri, 20 Aug 2010 00:20:31 +0000 (00:20 +0000)]
Add a couple of random comments.

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

13 years agoIf the target says that an extending load is not legal, regardless of whether
Bob Wilson [Thu, 19 Aug 2010 23:52:39 +0000 (23:52 +0000)]
If the target says that an extending load is not legal, regardless of whether
it involves specific floating-point types, legalize should expand an
extending load to a non-extending load followed by a separate extend operation.
For example, we currently expand SEXTLOAD to EXTLOAD+SIGN_EXTEND_INREG (and
assert that EXTLOAD should always be supported).  Now we can expand that to
LOAD+SIGN_EXTEND.  This is needed to allow vector SIGN_EXTEND and ZERO_EXTEND
to be used for NEON.

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

13 years agoBetter handling of offsets on frame index references. rdar://8277890
Jim Grosbach [Thu, 19 Aug 2010 23:52:25 +0000 (23:52 +0000)]
Better handling of offsets on frame index references. rdar://8277890

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

13 years agoCrashRecovery/Darwin: On Darwin, raise sends a signal to the main thread instead
Daniel Dunbar [Thu, 19 Aug 2010 23:45:39 +0000 (23:45 +0000)]
CrashRecovery/Darwin: On Darwin, raise sends a signal to the main thread instead
of the current thread. This has the unfortunate effect that assert() and abort()
will end up bypassing our crash recovery attempts. We work around this for
anything in the same linkage unit by just defining our own versions of the
assert handler and abort.

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

13 years agoPrevious revert failed to remove this file.
Owen Anderson [Thu, 19 Aug 2010 23:45:15 +0000 (23:45 +0000)]
Previous revert failed to remove this file.

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

13 years agoUpdate comment to remove special case for vector extending loads. An
Bob Wilson [Thu, 19 Aug 2010 23:39:00 +0000 (23:39 +0000)]
Update comment to remove special case for vector extending loads.  An
extending vector load should extend each element in the same way as the
corresponding scalar extending load.

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

13 years agoUpdate debug logs.
Evan Cheng [Thu, 19 Aug 2010 23:33:02 +0000 (23:33 +0000)]
Update debug logs.

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

13 years agoProperly update MachineDominators when splitting critical edge.
Evan Cheng [Thu, 19 Aug 2010 23:32:47 +0000 (23:32 +0000)]
Properly update MachineDominators when splitting critical edge.

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

13 years agoRevert r111568 to unbreak clang self-host.
Owen Anderson [Thu, 19 Aug 2010 23:25:16 +0000 (23:25 +0000)]
Revert r111568 to unbreak clang self-host.

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

13 years agoWhen a set of bitmask operations, typically from a bitfield initialization, only...
Owen Anderson [Thu, 19 Aug 2010 22:15:40 +0000 (22:15 +0000)]
When a set of bitmask operations, typically from a bitfield initialization, only modifies the low bytes of a value,
we can narrow the store to only over-write the affected bytes.

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

13 years agollvmc: Update examples.
Mikhail Glushenkov [Thu, 19 Aug 2010 20:04:19 +0000 (20:04 +0000)]
llvmc: Update examples.

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

13 years agoTrailing whitespace.
Mikhail Glushenkov [Thu, 19 Aug 2010 20:03:53 +0000 (20:03 +0000)]
Trailing whitespace.

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

13 years agoDisable LVI while I evaluate a failure.
Owen Anderson [Thu, 19 Aug 2010 19:47:08 +0000 (19:47 +0000)]
Disable LVI while I evaluate a failure.

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

13 years agoTentatively enabled LVI by default. I'll be monitoring for any failures.
Owen Anderson [Thu, 19 Aug 2010 19:04:40 +0000 (19:04 +0000)]
Tentatively enabled LVI by default.  I'll be monitoring for any failures.

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

13 years agoCorrect header.
Bill Wendling [Thu, 19 Aug 2010 18:52:17 +0000 (18:52 +0000)]
Correct header.

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

13 years agoSilence 'unused' warning.
Bill Wendling [Thu, 19 Aug 2010 18:52:02 +0000 (18:52 +0000)]
Silence 'unused' warning.

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

13 years agoIt's possible to sink a def if its local uses are PHI's.
Evan Cheng [Thu, 19 Aug 2010 18:33:29 +0000 (18:33 +0000)]
It's possible to sink a def if its local uses are PHI's.

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

13 years agoFix the msvc 2010 build.
Michael J. Spencer [Thu, 19 Aug 2010 18:16:39 +0000 (18:16 +0000)]
Fix the msvc 2010 build.

The Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01
implements parts of C++0x based on the draft standard. An old version of
the draft had a bug that makes std::pair<T1*, T2*>(something, 0) fail to
compile. This is because the template<class U, class V> pair(U&& x, V&& y)
constructor is selected, even though it later fails to implicitly convert
U and V to frist_type and second_type.

This has been fixed in n3090, but it seems that Microsoft is not going to
update msvc.

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

13 years agoDo not assert when reading an exponent out of range.
Dale Johannesen [Thu, 19 Aug 2010 17:58:35 +0000 (17:58 +0000)]
Do not assert when reading an exponent out of range.

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

13 years agoAdd Thumb1 support for virtual frame indices.
Jim Grosbach [Thu, 19 Aug 2010 17:52:13 +0000 (17:52 +0000)]
Add Thumb1 support for virtual frame indices.

rdar://8277890

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

13 years agoRemove disabled assertion.
Evan Cheng [Thu, 19 Aug 2010 17:33:48 +0000 (17:33 +0000)]
Remove disabled assertion.

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

13 years agoTeach machine-sink to break critical edges when appropriate. Work in progress.
Evan Cheng [Thu, 19 Aug 2010 17:33:11 +0000 (17:33 +0000)]
Teach machine-sink to break critical edges when appropriate. Work in progress.

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

13 years agobuildbot/valgrind: Update RegisterPass false positive suppression for API
Daniel Dunbar [Thu, 19 Aug 2010 17:21:21 +0000 (17:21 +0000)]
buildbot/valgrind: Update RegisterPass false positive suppression for API
changes.

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

13 years agobuildbot/valgrind: Suppress warnings about leaks in /bin/grep.
Daniel Dunbar [Thu, 19 Aug 2010 17:21:17 +0000 (17:21 +0000)]
buildbot/valgrind: Suppress warnings about leaks in /bin/grep.

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

13 years agoRe-re-revert this patch. It seems to be causing performance
Eric Christopher [Thu, 19 Aug 2010 17:21:10 +0000 (17:21 +0000)]
Re-re-revert this patch.  It seems to be causing performance
and correctness regressions.

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

13 years agotests: Haste makes waste.
Daniel Dunbar [Thu, 19 Aug 2010 16:47:54 +0000 (16:47 +0000)]
tests: Haste makes waste.

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

13 years agotests: Ignore whitespace in llvm_supports_binding() and llvm_gcc_supports().
Daniel Dunbar [Thu, 19 Aug 2010 16:46:52 +0000 (16:46 +0000)]
tests: Ignore whitespace in llvm_supports_binding() and llvm_gcc_supports().

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

13 years agoSilence warning.
Eric Christopher [Thu, 19 Aug 2010 15:35:27 +0000 (15:35 +0000)]
Silence warning.

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

13 years agoMCELF: Count the section orders properly. Patch by Roman Divacky.
Benjamin Kramer [Thu, 19 Aug 2010 13:44:49 +0000 (13:44 +0000)]
MCELF: Count the section orders properly. Patch by Roman Divacky.

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

13 years agoFixed and reactivated a partial specialization test
Kenneth Uildriks [Thu, 19 Aug 2010 12:42:38 +0000 (12:42 +0000)]
Fixed and reactivated a partial specialization test

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