oota-llvm.git
14 years agoSome superficial cleanups.
Bob Wilson [Tue, 8 Dec 2009 18:27:03 +0000 (18:27 +0000)]
Some superficial cleanups.

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

14 years agoClean up dead operands left around after SROA replaces a mem intrinsic.
Bob Wilson [Tue, 8 Dec 2009 18:22:03 +0000 (18:22 +0000)]
Clean up dead operands left around after SROA replaces a mem intrinsic.
I'm not aware that this does anything significant on its own, but it's
needed for another patch that I'm working on.

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

14 years agoCleanup.
Devang Patel [Tue, 8 Dec 2009 15:31:31 +0000 (15:31 +0000)]
Cleanup.
There is no need to supply ModuleCU to addType() as a parameter.

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

14 years agoDo not try to push dead variable's debug info into namespace info.
Devang Patel [Tue, 8 Dec 2009 15:01:35 +0000 (15:01 +0000)]
Do not try to push dead variable's debug info into namespace info.

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

14 years agoRemove useless calls to c_str().
Benjamin Kramer [Tue, 8 Dec 2009 13:07:38 +0000 (13:07 +0000)]
Remove useless calls to c_str().

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

14 years agoTeach GlobalOpt to delete aliases with internal linkage (after
Duncan Sands [Tue, 8 Dec 2009 10:10:20 +0000 (10:10 +0000)]
Teach GlobalOpt to delete aliases with internal linkage (after
forwarding any uses).  GlobalDCE can also do this, but is only
run at -O3.

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

14 years agofix a typo (and -> add) and fix GetAvailablePHITranslatedSubExpr to not
Chris Lattner [Tue, 8 Dec 2009 06:06:26 +0000 (06:06 +0000)]
fix a typo (and -> add) and fix GetAvailablePHITranslatedSubExpr to not
side-effect the current object.

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

14 years agoRemove unnecessary #include "llvm/LLVMContext.h".
Nick Lewycky [Tue, 8 Dec 2009 05:45:41 +0000 (05:45 +0000)]
Remove unnecessary #include "llvm/LLVMContext.h".

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

14 years agowhitespace cleanup
Chris Lattner [Tue, 8 Dec 2009 05:31:46 +0000 (05:31 +0000)]
whitespace cleanup

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

14 years agoRemoved VC++ compatibility code from DataTypes.h.in.
Oscar Fuentes [Tue, 8 Dec 2009 02:49:54 +0000 (02:49 +0000)]
Removed VC++ compatibility code from DataTypes.h.in.

This header file is not used on VC++ builds.

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

14 years agoFor VC++, define the ?INT*_C macros only it they are not yet defined.
Oscar Fuentes [Tue, 8 Dec 2009 02:40:09 +0000 (02:40 +0000)]
For VC++, define the ?INT*_C macros only it they are not yet defined.

Some compatibility updates like the Boost TR1 compatibility headers
define them.

Patch contributed by OvermindDL1!

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

14 years agoReduce (cmp 0, and_su (foo, bar)) into (bit foo, bar). This saves extra instruction...
Anton Korobeynikov [Tue, 8 Dec 2009 01:03:04 +0000 (01:03 +0000)]
Reduce (cmp 0, and_su (foo, bar)) into (bit foo, bar). This saves extra instruction. Patch inspired by Brian Lucas!

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

14 years agoWatch out for duplicated PHI instructions.
Evan Cheng [Mon, 7 Dec 2009 23:11:03 +0000 (23:11 +0000)]
Watch out for duplicated PHI instructions.

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

14 years agoFollow up to 90488. Turn a check into an assertion.
Evan Cheng [Mon, 7 Dec 2009 23:10:34 +0000 (23:10 +0000)]
Follow up to 90488. Turn a check into an assertion.

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

14 years agoFix the OProfileJITEventListener for StringRef being returned from debug info.
Jeffrey Yasskin [Mon, 7 Dec 2009 22:32:38 +0000 (22:32 +0000)]
Fix the OProfileJITEventListener for StringRef being returned from debug info.

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

14 years agoRename DIFactory::InsertValue() as DIFactory::InsertDbgValueIntrinsic()
Victor Hernandez [Mon, 7 Dec 2009 21:54:43 +0000 (21:54 +0000)]
Rename DIFactory::InsertValue() as DIFactory::InsertDbgValueIntrinsic()

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

14 years agoAdd support to emit debug info for c++ style namespaces.
Devang Patel [Mon, 7 Dec 2009 21:41:32 +0000 (21:41 +0000)]
Add support to emit debug info for c++ style namespaces.

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

14 years agoDelete code accidentally left behind.
Evan Cheng [Mon, 7 Dec 2009 21:19:33 +0000 (21:19 +0000)]
Delete code accidentally left behind.

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

14 years agofix typo
Chris Lattner [Mon, 7 Dec 2009 19:52:57 +0000 (19:52 +0000)]
fix typo

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

14 years agoadd accessor, improve comment.
Chris Lattner [Mon, 7 Dec 2009 19:45:30 +0000 (19:45 +0000)]
add accessor, improve comment.

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

14 years agoTest case for 90787.
Evan Cheng [Mon, 7 Dec 2009 19:42:22 +0000 (19:42 +0000)]
Test case for 90787.

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

14 years agoUse FileCheck and set nounwind on calls.
David Greene [Mon, 7 Dec 2009 19:40:26 +0000 (19:40 +0000)]
Use FileCheck and set nounwind on calls.

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

14 years agoApply Pekka Jääskeläinen's patch to raise the first virtual register
Dan Gohman [Mon, 7 Dec 2009 19:38:26 +0000 (19:38 +0000)]
Apply Pekka Jääskeläinen's patch to raise the first virtual register
number in order to accomodate targets with more than 1024 registers.

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

14 years agoIntroduce the "@llvm.dbg.value" debug intrinsic.
Victor Hernandez [Mon, 7 Dec 2009 19:36:34 +0000 (19:36 +0000)]
Introduce the "@llvm.dbg.value" debug intrinsic.

The semantics of llvm.dbg.value are that starting from where it is executed, an offset into the specified user source variable is specified to get a new value.

An example:
  call void @llvm.dbg.value(metadata !{ i32 7 }, i64 0, metadata !2)
Here the user source variable associated with metadata #2 gets the value "i32 7" at offset 0.

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

14 years agoSimplify a bit.
Mikhail Glushenkov [Mon, 7 Dec 2009 19:16:13 +0000 (19:16 +0000)]
Simplify a bit.

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

14 years agoThrow 'const char*' instead of 'std::string'.
Mikhail Glushenkov [Mon, 7 Dec 2009 19:15:57 +0000 (19:15 +0000)]
Throw 'const char*' instead of 'std::string'.

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

14 years agoadd support for phi translation and incorpation of new expression.
Chris Lattner [Mon, 7 Dec 2009 19:04:49 +0000 (19:04 +0000)]
add support for phi translation and incorpation of new expression.

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

14 years agoDon't enable the post-RA scheduler on x86 except at -O3. In its
Dan Gohman [Mon, 7 Dec 2009 19:04:31 +0000 (19:04 +0000)]
Don't enable the post-RA scheduler on x86 except at -O3. In its
current form, it is too expensive in compile time.

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

14 years agocheckpoint of the new PHITransAddr code, still not done and not used by
Chris Lattner [Mon, 7 Dec 2009 18:36:53 +0000 (18:36 +0000)]
checkpoint of the new PHITransAddr code, still not done and not used by
anything.

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

14 years agoRegenerate.
Mikhail Glushenkov [Mon, 7 Dec 2009 18:26:24 +0000 (18:26 +0000)]
Regenerate.

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

14 years agoDocumentation update.
Mikhail Glushenkov [Mon, 7 Dec 2009 18:26:11 +0000 (18:26 +0000)]
Documentation update.

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

14 years agoDeprecate 'unpack_values'.
Mikhail Glushenkov [Mon, 7 Dec 2009 18:25:54 +0000 (18:25 +0000)]
Deprecate 'unpack_values'.

Use 'forward_values' + 'comma_separated' instead.

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

14 years agoPass '-msse' and friends to llc as '-mattr=+/-'.
Mikhail Glushenkov [Mon, 7 Dec 2009 17:03:21 +0000 (17:03 +0000)]
Pass '-msse' and friends to llc as '-mattr=+/-'.

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

14 years agoImplement 'forward_value' and 'forward_transformed_value'.
Mikhail Glushenkov [Mon, 7 Dec 2009 17:03:05 +0000 (17:03 +0000)]
Implement 'forward_value' and 'forward_transformed_value'.

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

14 years agoRefactoring, no functionality change.
Mikhail Glushenkov [Mon, 7 Dec 2009 10:51:55 +0000 (10:51 +0000)]
Refactoring, no functionality change.

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

14 years agoPre-regalloc tale duplication. Work in progress.
Evan Cheng [Mon, 7 Dec 2009 10:15:19 +0000 (10:15 +0000)]
Pre-regalloc tale duplication. Work in progress.

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

14 years agofixed some typos in method comments, reworded some comments for clarity
John Mosby [Mon, 7 Dec 2009 09:06:37 +0000 (09:06 +0000)]
fixed some typos in method comments, reworded some comments for clarity

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

14 years agoFixes the Atomic implementation if compiled by MSVC compiler.
Oscar Fuentes [Mon, 7 Dec 2009 05:29:59 +0000 (05:29 +0000)]
Fixes the Atomic implementation if compiled by MSVC compiler.

sys::cas_flag should be long on this platform, InterlockedAdd() is
defined only for the Itanium architecture (according to MSDN).

Patch by Michael Beck!

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

14 years agoIf BB is empty, insert PHI before end() instead of front().
Evan Cheng [Mon, 7 Dec 2009 03:07:01 +0000 (03:07 +0000)]
If BB is empty, insert PHI before end() instead of front().

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

14 years agoSome pretty-printing
Anton Korobeynikov [Mon, 7 Dec 2009 02:28:41 +0000 (02:28 +0000)]
Some pretty-printing

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

14 years agoTruncate the arguments of llvm.frameaddress / llvm.returnaddress intrinsics from...
Anton Korobeynikov [Mon, 7 Dec 2009 02:28:26 +0000 (02:28 +0000)]
Truncate the arguments of llvm.frameaddress / llvm.returnaddress intrinsics from i32 to platform's largest native type

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

14 years agoAdd lowering of returnaddr and frameaddr intrinsics. Shamelessly stolen from x86 :)
Anton Korobeynikov [Mon, 7 Dec 2009 02:28:10 +0000 (02:28 +0000)]
Add lowering of returnaddr and frameaddr intrinsics. Shamelessly stolen from x86 :)

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

14 years agoInitial codegen support for MSP430 ISRs
Anton Korobeynikov [Mon, 7 Dec 2009 02:27:53 +0000 (02:27 +0000)]
Initial codegen support for MSP430 ISRs

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

14 years agoAdd MSP430 interrupt calling conv. No functionality change yet.
Anton Korobeynikov [Mon, 7 Dec 2009 02:27:35 +0000 (02:27 +0000)]
Add MSP430 interrupt calling conv. No functionality change yet.

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

14 years agoAdd ability to select hw multiplier mode and select appropriate libcalls.
Anton Korobeynikov [Mon, 7 Dec 2009 02:27:08 +0000 (02:27 +0000)]
Add ability to select hw multiplier mode and select appropriate libcalls.

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

14 years agoFix typos. Thanks to John Tytgat for noticing it!
Rafael Espindola [Mon, 7 Dec 2009 00:27:35 +0000 (00:27 +0000)]
Fix typos. Thanks to John Tytgat for noticing it!

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

14 years agoDynamic stack realignment use of sp register as source/dest register
Anton Korobeynikov [Sun, 6 Dec 2009 22:39:50 +0000 (22:39 +0000)]
Dynamic stack realignment use of sp register as source/dest register
in "bic sp, sp, #15" leads to unpredicatble behaviour in Thumb2 mode.
Emit the following code instead:
mov r4, sp
bic r4, r4, #15
mov sp, r4

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

14 years agofix PR5698
Chris Lattner [Sun, 6 Dec 2009 17:17:23 +0000 (17:17 +0000)]
fix PR5698

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

14 years agoremove extraneous comma clang warns about
Chris Lattner [Sun, 6 Dec 2009 16:58:41 +0000 (16:58 +0000)]
remove extraneous comma clang warns about

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

14 years agoconstant fold loads from memcpy's from global constants. This is important
Chris Lattner [Sun, 6 Dec 2009 05:29:56 +0000 (05:29 +0000)]
constant fold loads from memcpy's from global constants.  This is important
because clang lowers nontrivial automatic struct/array inits to memcpy from
a global array.

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

14 years agoadd support for forwarding mem intrinsic values to non-local loads.
Chris Lattner [Sun, 6 Dec 2009 04:54:31 +0000 (04:54 +0000)]
add support for forwarding mem intrinsic values to non-local loads.

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

14 years agogvn is optimizing this better now.
Chris Lattner [Sun, 6 Dec 2009 04:16:05 +0000 (04:16 +0000)]
gvn is optimizing this better now.

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

14 years agoHandle forwarding local memsets to loads. For example, we optimize this:
Chris Lattner [Sun, 6 Dec 2009 01:57:02 +0000 (01:57 +0000)]
Handle forwarding local memsets to loads.  For example, we optimize this:

short x(short *A) {
  memset(A, 1, sizeof(*A)*100);
  return A[42];
}

to 'return 257' instead of doing the load.

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

14 years agoAdd helper methods for forming shift operations with a constant
Chris Lattner [Sun, 6 Dec 2009 01:56:22 +0000 (01:56 +0000)]
Add helper methods for forming shift operations with a constant
shift amount.

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

14 years agomerge two tests.
Chris Lattner [Sun, 6 Dec 2009 01:47:24 +0000 (01:47 +0000)]
merge two tests.

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

14 years agoCheckAtomic.cmake: Put all C++ code inside CHECK_CXX_SOURCE_COMPILES.
Oscar Fuentes [Sun, 6 Dec 2009 00:06:33 +0000 (00:06 +0000)]
CheckAtomic.cmake: Put all C++ code inside CHECK_CXX_SOURCE_COMPILES.

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

14 years agoFix for atomic intrinsics detection when using MSVC.
Oscar Fuentes [Sat, 5 Dec 2009 23:19:33 +0000 (23:19 +0000)]
Fix for atomic intrinsics detection when using MSVC.

Patch by Michael Beck!

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

14 years agoRemove old DBG_LABEL code.
Dan Gohman [Sat, 5 Dec 2009 17:56:26 +0000 (17:56 +0000)]
Remove old DBG_LABEL code.

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

14 years agoRemove the unused DisableLegalizeTypes option and related code.
Dan Gohman [Sat, 5 Dec 2009 17:51:33 +0000 (17:51 +0000)]
Remove the unused DisableLegalizeTypes option and related code.

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

14 years agoCalling InvalidateEntry during the refinement was breaking the bootstrap.
Bill Wendling [Sat, 5 Dec 2009 07:59:04 +0000 (07:59 +0000)]
Calling InvalidateEntry during the refinement was breaking the bootstrap.

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

14 years agoFinal cleanups:
Bill Wendling [Sat, 5 Dec 2009 07:46:49 +0000 (07:46 +0000)]
Final cleanups:

- Privatize a typedef.
- Call the InvalidateEntry when refining a type.

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

14 years agoTemporarily revert r90502. It was causing the llvm-gcc bootstrap on PPC to fail.
Bill Wendling [Sat, 5 Dec 2009 07:30:23 +0000 (07:30 +0000)]
Temporarily revert r90502. It was causing the llvm-gcc bootstrap on PPC to fail.

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

14 years agoDocument that memory use intrinsics may also return Def results.
Nick Lewycky [Sat, 5 Dec 2009 06:37:52 +0000 (06:37 +0000)]
Document that memory use intrinsics may also return Def results.

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

14 years agoFix indentation in switch statement.
Nick Lewycky [Sat, 5 Dec 2009 06:37:24 +0000 (06:37 +0000)]
Fix indentation in switch statement.

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

14 years agoGeneralize this optimization to work on equality comparisons between any two
Nick Lewycky [Sat, 5 Dec 2009 05:00:00 +0000 (05:00 +0000)]
Generalize this optimization to work on equality comparisons between any two
integers that are constant except for a single bit (the same n-th bit in each).

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

14 years agoMore updates to objectsize intrinsic docs.
Eric Christopher [Sat, 5 Dec 2009 02:46:03 +0000 (02:46 +0000)]
More updates to objectsize intrinsic docs.

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

14 years agoDon't print a space before the : between the file name and line number.
Dan Gohman [Sat, 5 Dec 2009 02:00:34 +0000 (02:00 +0000)]
Don't print a space before the : between the file name and line number.
And separate the directory and file name with a '/'.

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

14 years agoInline methods which are called only once.
Bill Wendling [Sat, 5 Dec 2009 01:46:01 +0000 (01:46 +0000)]
Inline methods which are called only once.

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

14 years agoRefactor some code. No functionality change.
Bill Wendling [Sat, 5 Dec 2009 01:43:33 +0000 (01:43 +0000)]
Refactor some code. No functionality change.

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

14 years agoPrint newlines after printing labels for debug info, so that the output
Dan Gohman [Sat, 5 Dec 2009 01:42:34 +0000 (01:42 +0000)]
Print newlines after printing labels for debug info, so that the output
isn't cluttered with things like "Llabel47:Llabel48:  movq  (%rsi), %xmm3"

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

14 years agoDon't blindly set the debug location for PHI node copies.
Dan Gohman [Sat, 5 Dec 2009 01:29:04 +0000 (01:29 +0000)]
Don't blindly set the debug location for PHI node copies.

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

14 years agoMake TargetSelectInstruction protected and called from FastISel.cpp
Dan Gohman [Sat, 5 Dec 2009 01:27:58 +0000 (01:27 +0000)]
Make TargetSelectInstruction protected and called from FastISel.cpp
instead of SelectionDAGISel.cpp.

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

14 years agoRemove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
Dan Gohman [Sat, 5 Dec 2009 00:44:40 +0000 (00:44 +0000)]
Remove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
MachineBasicBlock::canFallThrough(), which is target-independent and more
thorough.

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

14 years agoSimplify this code: don't call AnalyzeBranch before doing simpler checks.
Dan Gohman [Sat, 5 Dec 2009 00:32:59 +0000 (00:32 +0000)]
Simplify this code: don't call AnalyzeBranch before doing simpler checks.

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

14 years agoThe debug information for an LLVM Instruction applies to that Instruction
Dan Gohman [Sat, 5 Dec 2009 00:27:08 +0000 (00:27 +0000)]
The debug information for an LLVM Instruction applies to that Instruction
and that Instruction only. Implement this by setting the "current debug position"
back to Unknown after processing each instruction.

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

14 years agoFix this code to use DIScope instead of DICompileUnit, as in r90181.
Dan Gohman [Sat, 5 Dec 2009 00:23:29 +0000 (00:23 +0000)]
Fix this code to use DIScope instead of DICompileUnit, as in r90181.
Don't print "SrcLine"; just print the filename and line number, which
is obvious enough and more informative.

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

14 years agoDon't print the debug directory; it's often long and uninteresting. Omit
Dan Gohman [Sat, 5 Dec 2009 00:20:51 +0000 (00:20 +0000)]
Don't print the debug directory; it's often long and uninteresting. Omit
the column number if it is not known. Handle the case of a missing filename
better.

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

14 years agoMinor code simplification.
Dan Gohman [Sat, 5 Dec 2009 00:05:43 +0000 (00:05 +0000)]
Minor code simplification.

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

14 years agoRemove an unneeded include.
David Greene [Sat, 5 Dec 2009 00:03:24 +0000 (00:03 +0000)]
Remove an unneeded include.

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

14 years agoRemove now-redundant llvm-as invocations.
Dan Gohman [Sat, 5 Dec 2009 00:02:37 +0000 (00:02 +0000)]
Remove now-redundant llvm-as invocations.

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

14 years agoRemove an unneeded include.
David Greene [Fri, 4 Dec 2009 23:55:07 +0000 (23:55 +0000)]
Remove an unneeded include.

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

14 years agoAdd testcase for PR4262.
Bill Wendling [Fri, 4 Dec 2009 23:29:57 +0000 (23:29 +0000)]
Add testcase for PR4262.

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

14 years agoPrint a space between the comment character and the text.
Dan Gohman [Fri, 4 Dec 2009 23:19:55 +0000 (23:19 +0000)]
Print a space between the comment character and the text.

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

14 years agoTemporarily revert r72620 because r72619 was reverted.
Bill Wendling [Fri, 4 Dec 2009 23:16:56 +0000 (23:16 +0000)]
Temporarily revert r72620 because r72619 was reverted.

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

14 years agoIn TAG_subrange_type, uppder bound is zero indexed.
Devang Patel [Fri, 4 Dec 2009 23:10:24 +0000 (23:10 +0000)]
In TAG_subrange_type, uppder bound is zero indexed.

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

14 years agoFix a bad merge.
David Greene [Fri, 4 Dec 2009 23:08:02 +0000 (23:08 +0000)]
Fix a bad merge.

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

14 years agoUpdate the TargetInstrInfo interfaces so hasLoad/StoreFrom/ToStackSlot
David Greene [Fri, 4 Dec 2009 23:00:50 +0000 (23:00 +0000)]
Update the TargetInstrInfo interfaces so hasLoad/StoreFrom/ToStackSlot
can return a MachineMemOperand.

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

14 years agoFix indentation.
Bob Wilson [Fri, 4 Dec 2009 22:46:47 +0000 (22:46 +0000)]
Fix indentation.

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

14 years agoUse new interfaces to print spill size.
David Greene [Fri, 4 Dec 2009 22:46:04 +0000 (22:46 +0000)]
Use new interfaces to print spill size.

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

14 years agoHave hasLoad/StoreFrom/ToStackSlot return the relevant MachineMemOperand.
David Greene [Fri, 4 Dec 2009 22:38:46 +0000 (22:38 +0000)]
Have hasLoad/StoreFrom/ToStackSlot return the relevant MachineMemOperand.

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

14 years agoFix up some comments.
Bob Wilson [Fri, 4 Dec 2009 21:57:37 +0000 (21:57 +0000)]
Fix up some comments.

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

14 years agoFix 80-column violations.
Bob Wilson [Fri, 4 Dec 2009 21:51:35 +0000 (21:51 +0000)]
Fix 80-column violations.

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

14 years agoOptParser: Emit HelpText field for option groups.
Daniel Dunbar [Fri, 4 Dec 2009 21:41:24 +0000 (21:41 +0000)]
OptParser: Emit HelpText field for option groups.

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

14 years agoSome code cleanup. No functionality change.
Bill Wendling [Fri, 4 Dec 2009 21:03:02 +0000 (21:03 +0000)]
Some code cleanup. No functionality change.

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

14 years agoAvoid creating a metadata slot for all metadata that contains an instruction
Victor Hernandez [Fri, 4 Dec 2009 20:07:10 +0000 (20:07 +0000)]
Avoid creating a metadata slot for all metadata that contains an instruction

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

14 years agoHandle recursive PHI's.
Evan Cheng [Fri, 4 Dec 2009 19:09:10 +0000 (19:09 +0000)]
Handle recursive PHI's.

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

14 years agoFix crasher when N->getElement(n) is NULL
Victor Hernandez [Fri, 4 Dec 2009 18:29:23 +0000 (18:29 +0000)]
Fix crasher when N->getElement(n) is NULL

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

14 years agoAdd a pre-regalloc tail duplication pass.
Evan Cheng [Fri, 4 Dec 2009 09:42:45 +0000 (09:42 +0000)]
Add a pre-regalloc tail duplication pass.

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

14 years agoDon't try to be cute with undef optimization here. Let ProcessImplicitDefs handle it.
Evan Cheng [Fri, 4 Dec 2009 09:23:37 +0000 (09:23 +0000)]
Don't try to be cute with undef optimization here. Let ProcessImplicitDefs handle it.

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

14 years agoAdd note about a subtle bug in this code. Does not effect the main
Duncan Sands [Fri, 4 Dec 2009 08:42:17 +0000 (08:42 +0000)]
Add note about a subtle bug in this code.  Does not effect the main
architectures that LLVM targets, because they don't use this code.

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