oota-llvm.git
13 years agoRemove unused tag.
Devang Patel [Fri, 18 Feb 2011 23:23:09 +0000 (23:23 +0000)]
Remove unused tag.

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

13 years agoThese tags are now covered by dwarf::TagString().
Devang Patel [Fri, 18 Feb 2011 23:13:40 +0000 (23:13 +0000)]
These tags are now covered by dwarf::TagString().

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

13 years agoProvide tag strings for llvm specific tags.
Devang Patel [Fri, 18 Feb 2011 23:06:29 +0000 (23:06 +0000)]
Provide tag strings for llvm specific tags.

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

13 years agoDo not lose debug info of an inlined function argument even if the argument is only...
Devang Patel [Fri, 18 Feb 2011 22:43:42 +0000 (22:43 +0000)]
Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
This time with a fix that avoids using invalidated DenseMap iterator.

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

13 years agoNow that -loop-idiom uses TargetLibraryInfo properly, it doesn't
Chris Lattner [Fri, 18 Feb 2011 22:36:36 +0000 (22:36 +0000)]
Now that -loop-idiom uses TargetLibraryInfo properly, it doesn't
need to be pulled out of the pass manager when the user specifies
-fno-builtin.  It can intelligently determine which libcalls to
optimize based on what is enabled in TargetLibraryInfo.  This
allows -fno-builtin-foo to work someday.

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

13 years agoUse VirtRegMap's Virt2SplitMap to keep track of the original live range before splitting.
Jakob Stoklund Olesen [Fri, 18 Feb 2011 22:35:20 +0000 (22:35 +0000)]
Use VirtRegMap's Virt2SplitMap to keep track of the original live range before splitting.

All new virtual registers created for spilling or splitting point back to their original.

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

13 years agoadd a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls...
Chris Lattner [Fri, 18 Feb 2011 22:34:03 +0000 (22:34 +0000)]
add a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls flag.

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

13 years agoMake loop-idiom use TargetLibraryInfo to determine whether it is allowed
Chris Lattner [Fri, 18 Feb 2011 22:22:15 +0000 (22:22 +0000)]
Make loop-idiom use TargetLibraryInfo to determine whether it is allowed
to hack on memset, memcpy etc.

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

13 years agoadd memset and memcpy, though they are always available for now.
Chris Lattner [Fri, 18 Feb 2011 22:21:24 +0000 (22:21 +0000)]
add memset and memcpy, though they are always available for now.

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

13 years agorearrange some comments, no functionality change.
Chris Lattner [Fri, 18 Feb 2011 22:21:07 +0000 (22:21 +0000)]
rearrange some comments, no functionality change.

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

13 years agoHave opt set up a specific TargetLibraryInfo for modules
Chris Lattner [Fri, 18 Feb 2011 22:13:01 +0000 (22:13 +0000)]
Have opt set up a specific TargetLibraryInfo for modules
with a triple.

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

13 years agoCMake: updated list of tblgen source files.
Oscar Fuentes [Fri, 18 Feb 2011 22:06:23 +0000 (22:06 +0000)]
CMake: updated list of tblgen source files.

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

13 years agoMove library stuff out of the toplevel CMakeLists.txt file.
Oscar Fuentes [Fri, 18 Feb 2011 22:06:14 +0000 (22:06 +0000)]
Move library stuff out of the toplevel CMakeLists.txt file.

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

13 years agoAdd VirtRegMap::rewrite() and use it in the new register allocators.
Jakob Stoklund Olesen [Fri, 18 Feb 2011 22:03:18 +0000 (22:03 +0000)]
Add VirtRegMap::rewrite() and use it in the new register allocators.

The rewriter works almost identically to -rewriter=trivial, except it also
eliminates any identity copies.

This makes the new register allocators independent of VirtRegRewriter.cpp which
will be going away at the same time as RegAllocLinearScan.

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

13 years agoAdd FixedLenDecoderEmitter, the skeleton of a new disassembler emitter for fixed...
Owen Anderson [Fri, 18 Feb 2011 21:51:29 +0000 (21:51 +0000)]
Add FixedLenDecoderEmitter, the skeleton of a new disassembler emitter for fixed-length instruction encodings.
A major part of its (eventual) goal is to support a much cleaner separation between disassembly callbacks
provided by the target and the disassembler emitter itself, i.e. not requiring hardcoding of knowledge in tblgen
like the existing disassembly emitters do.

The hope is that some day this will allow us to replace the existing non-Thumb ARM disassembler and remove
some of the hacks the old one introduced to tblgen.

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

13 years agointroduce a new TargetLibraryInfo pass, which transformations can use to
Chris Lattner [Fri, 18 Feb 2011 21:50:34 +0000 (21:50 +0000)]
introduce a new TargetLibraryInfo pass, which transformations can use to
query about available library functions.  For now this just has
memset_pattern16, which exists on darwin, but it can be extended for a
bunch of other things in the future.

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

13 years agoRevert r125956, which broke the build if you _don't_ have lldb checked out.
Owen Anderson [Fri, 18 Feb 2011 21:33:23 +0000 (21:33 +0000)]
Revert r125956, which broke the build if you _don't_ have lldb checked out.

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

13 years agoReapply r114997 now that the buildbots have been updated.
Bill Wendling [Fri, 18 Feb 2011 21:12:58 +0000 (21:12 +0000)]
Reapply r114997 now that the buildbots have been updated.

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

13 years agoThis patch lets LLDB build as an LLVM subproject. LLDB is not built in
Stephen Wilson [Fri, 18 Feb 2011 20:50:33 +0000 (20:50 +0000)]
This patch lets LLDB build as an LLVM subproject.  LLDB is not built in
parallel with the rest of the tools directory as it depends on Clang.

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

13 years agoFix style and a typo
Bruno Cardoso Lopes [Fri, 18 Feb 2011 19:49:06 +0000 (19:49 +0000)]
Fix style and a typo

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

13 years agoAdd assembly parsing support for "msr" and also fix its encoding. Also add
Bruno Cardoso Lopes [Fri, 18 Feb 2011 19:45:59 +0000 (19:45 +0000)]
Add assembly parsing support for "msr" and also fix its encoding. Also add
testcases for the disassembler to make sure it still works for "msr".

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

13 years agoimprove support for OpenBSD, patch by Amit Kulkarni!
Chris Lattner [Fri, 18 Feb 2011 17:04:56 +0000 (17:04 +0000)]
improve support for OpenBSD, patch by Amit Kulkarni!

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

13 years agoExpose getTypeName to the C API. Patch by Patrick Walton.
Rafael Espindola [Fri, 18 Feb 2011 16:35:37 +0000 (16:35 +0000)]
Expose getTypeName to the C API. Patch by Patrick Walton.

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

13 years agoAdd some transforms of the kind X-Y>X -> 0>Y which are valid when there is no
Duncan Sands [Fri, 18 Feb 2011 16:25:37 +0000 (16:25 +0000)]
Add some transforms of the kind X-Y>X -> 0>Y which are valid when there is no
overflow.  These subsume some existing equality transforms, so zap those.

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

13 years agoThe objectsize intrinsic doesn't access any memory.
Benjamin Kramer [Fri, 18 Feb 2011 16:11:40 +0000 (16:11 +0000)]
The objectsize intrinsic doesn't access any memory.

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

13 years agoadd a poor division by constant case.
Chris Lattner [Fri, 18 Feb 2011 05:35:49 +0000 (05:35 +0000)]
add a poor division by constant case.

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

13 years agoadd a testcase for r125827
Chris Lattner [Fri, 18 Feb 2011 05:05:01 +0000 (05:05 +0000)]
add a testcase for r125827

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

13 years agoRoll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.
Cameron Zwarich [Fri, 18 Feb 2011 04:58:10 +0000 (04:58 +0000)]
Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.

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

13 years agoprevent jump threading from merging blocks when their address is
Chris Lattner [Fri, 18 Feb 2011 04:43:06 +0000 (04:43 +0000)]
prevent jump threading from merging blocks when their address is
taken (and used!).  This prevents merging the blocks (invalidating
the block addresses) in a case like this:

#define _THIS_IP_  ({ __label__ __here; __here: (unsigned long)&&__here; })

void foo() {
  printf("%p\n", _THIS_IP_);
  printf("%p\n", _THIS_IP_);
  printf("%p\n", _THIS_IP_);
}

which fixes PR4151.

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

13 years agohoist GlobalValue::removeDeadConstantUsers up to being a method on Constant.
Chris Lattner [Fri, 18 Feb 2011 04:41:42 +0000 (04:41 +0000)]
hoist GlobalValue::removeDeadConstantUsers up to being a method on Constant.

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

13 years agoDon't unroll loops whose header block's address is taken.
Chris Lattner [Fri, 18 Feb 2011 04:25:21 +0000 (04:25 +0000)]
Don't unroll loops whose header block's address is taken.
This is part of a futile attempt to not "break" bizzaro
code like this:

 l1:
  printf("l1: %p\n", &&l1);
  ++x;

  if( x < 3 ) goto l1;

Previously we'd fold &&l1 to 1, which is fine per our semantics
but not helpful to the user.

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

13 years agoMake -disable-simplify-libcalls work with -std-compile-opts
Peter Collingbourne [Fri, 18 Feb 2011 02:59:21 +0000 (02:59 +0000)]
Make -disable-simplify-libcalls work with -std-compile-opts

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

13 years agoRecognize monitor/mwait with explicit register arguments
Joerg Sonnenberger [Fri, 18 Feb 2011 00:48:11 +0000 (00:48 +0000)]
Recognize monitor/mwait with explicit register arguments

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

13 years agoCheck the errorcode.
Argyrios Kyrtzidis [Fri, 18 Feb 2011 00:47:07 +0000 (00:47 +0000)]
Check the errorcode.

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

13 years agoTrim debugging output.
Jakob Stoklund Olesen [Fri, 18 Feb 2011 00:32:47 +0000 (00:32 +0000)]
Trim debugging output.

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

13 years agoRecognize leavel and leaveq aliases for leave.
Joerg Sonnenberger [Thu, 17 Feb 2011 23:36:39 +0000 (23:36 +0000)]
Recognize leavel and leaveq aliases for leave.
Validate encoding of leave in 64bit mode.

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

13 years agoDo not lose debug info of an inlined function argument even if the argument is only...
Devang Patel [Thu, 17 Feb 2011 23:33:27 +0000 (23:33 +0000)]
Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.

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

13 years agoCheck that MnemonicAlias doesn't map back to the same string.
Joerg Sonnenberger [Thu, 17 Feb 2011 23:22:19 +0000 (23:22 +0000)]
Check that MnemonicAlias doesn't map back to the same string.

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

13 years agohave instcombine preserve nsw/nuw/exact when sinking
Chris Lattner [Thu, 17 Feb 2011 23:01:49 +0000 (23:01 +0000)]
have instcombine preserve nsw/nuw/exact when sinking
common operations through a phi.

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

13 years agoAdd basic register allocator statistics.
Jakob Stoklund Olesen [Thu, 17 Feb 2011 22:53:48 +0000 (22:53 +0000)]
Add basic register allocator statistics.

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

13 years agofix typo
Chris Lattner [Thu, 17 Feb 2011 22:32:54 +0000 (22:32 +0000)]
fix typo

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

13 years agoNew library: LLVMX86Utils.
Oscar Fuentes [Thu, 17 Feb 2011 22:26:11 +0000 (22:26 +0000)]
New library: LLVMX86Utils.

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

13 years agofix instcombine merging GEPs through a PHI to only make the
Chris Lattner [Thu, 17 Feb 2011 22:21:26 +0000 (22:21 +0000)]
fix instcombine merging GEPs through a PHI to only make the
result inbounds if all of the inputs are inbounds.

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

13 years agoEnhance constant folding of bitcast operations on vectors of floats.
Nadav Rotem [Thu, 17 Feb 2011 21:22:27 +0000 (21:22 +0000)]
Enhance constant folding of bitcast operations on vectors of floats.
Add getAllOnesValue of FP numbers to Constants and APFloat.
Add more tests.

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

13 years agoadd is always integer, thanks to Frits for noticing this.
Chris Lattner [Thu, 17 Feb 2011 20:55:29 +0000 (20:55 +0000)]
add is always integer, thanks to Frits for noticing this.

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

13 years ago[AVX] Recorganize X86ShuffleDecode into its own library
David Greene [Thu, 17 Feb 2011 19:18:59 +0000 (19:18 +0000)]
[AVX] Recorganize X86ShuffleDecode into its own library
(LLVMX86Utils.a) to break cyclic library dependencies between
LLVMX86CodeGen.a and LLVMX86AsmParser.a.  Previously this code was in
a header file and marked static but AVX requires some additional
functionality here that won't be used by all clients.  Since including
unused static functions causes a gcc compiler warning, keeping it as a
header would break builds that use -Werror.  Putting this in its own
library solves both problems at once.

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

13 years agoSplit local live ranges.
Jakob Stoklund Olesen [Thu, 17 Feb 2011 19:13:53 +0000 (19:13 +0000)]
Split local live ranges.

A local live range is live in a single basic block. If such a range fails to
allocate, try to find a sub-range that would get a larger spill weight than its
interference.

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

13 years agoThe labyrinthine X86 backend no longer appears to require
Dan Gohman [Thu, 17 Feb 2011 18:50:19 +0000 (18:50 +0000)]
The labyrinthine X86 backend no longer appears to require
these patterns.

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

13 years agoFix wrong logic in promotion of signed mul-with-overflow (I pointed this out at
Duncan Sands [Thu, 17 Feb 2011 12:42:48 +0000 (12:42 +0000)]
Fix wrong logic in promotion of signed mul-with-overflow (I pointed this out at
the time but presumably my email got lost).  Examples where the previous logic
got it wrong: (1) a signed i8 multiply of 64 by 2 overflows, but the high part is
zero; (2) a signed i8 multiple of -128 by 2 overflows, but the high part is all
ones.

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

13 years agoTriple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 generally.
NAKAMURA Takumi [Thu, 17 Feb 2011 12:24:17 +0000 (12:24 +0000)]
Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 generally.

No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32. In llvm side, i686 and x64 can be treated as similar way.

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

13 years agoFix whitespace.
NAKAMURA Takumi [Thu, 17 Feb 2011 12:23:50 +0000 (12:23 +0000)]
Fix whitespace.

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

13 years agoThis has been implemented.
Duncan Sands [Thu, 17 Feb 2011 08:16:56 +0000 (08:16 +0000)]
This has been implemented.

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

13 years agoTransform "A + B >= A + C" into "B >= C" if the adds do not wrap. Likewise for some
Duncan Sands [Thu, 17 Feb 2011 07:46:37 +0000 (07:46 +0000)]
Transform "A + B >= A + C" into "B >= C" if the adds do not wrap.  Likewise for some
variations (some of these were already present so I unified the code).  Spotted by my
auto-simplifier as occurring a lot.

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

13 years agoSwitch to SmallVector in SimpleRegisterCoalescing for a 3.5% speedup on 403.gcc.
Cameron Zwarich [Thu, 17 Feb 2011 06:52:07 +0000 (06:52 +0000)]
Switch to SmallVector in SimpleRegisterCoalescing for a 3.5% speedup on 403.gcc.

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

13 years agoAdjust indenting of arguments.
Cameron Zwarich [Thu, 17 Feb 2011 06:13:46 +0000 (06:13 +0000)]
Adjust indenting of arguments.

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

13 years agoReturn Changed from SplitPHIEdges rather than always returning true.
Cameron Zwarich [Thu, 17 Feb 2011 06:13:43 +0000 (06:13 +0000)]
Return Changed from SplitPHIEdges rather than always returning true.

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

13 years agolit/TestingConfig.py: Add the environment variable PRINTF_EXPONENT_DIGITS as workarou...
NAKAMURA Takumi [Thu, 17 Feb 2011 05:56:41 +0000 (05:56 +0000)]
lit/TestingConfig.py: Add the environment variable PRINTF_EXPONENT_DIGITS as workaround [PR6745] for mingw's tests. Danil Malyshev suggested this.

FIXME: It does not improve MSVC's issue.

[Danil Malyshev] Defining PRINTF_EXPONENT_DIGITS env is the suggested way to make MinGW ANSI/POSIX compatible. This is not only about the case we are discussing, but in general, I'd like to have explicitly defined compatibility mode for all the tests running on MinGW.

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

13 years agoAdd serialization for Expr* arguments for attributes to clang tablegen files.
Sean Hunt [Thu, 17 Feb 2011 03:30:09 +0000 (03:30 +0000)]
Add serialization for Expr* arguments for attributes to clang tablegen files.

Patch thanks to Zach Anderson.

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

13 years agopreserve NUW/NSW when transforming add x,x
Chris Lattner [Thu, 17 Feb 2011 02:23:02 +0000 (02:23 +0000)]
preserve NUW/NSW when transforming add x,x

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

13 years agofilecheckize
Chris Lattner [Thu, 17 Feb 2011 02:21:03 +0000 (02:21 +0000)]
filecheckize

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

13 years agoFix thinko, basic blocks are SESE. The exits may have many edges though.
Nick Lewycky [Thu, 17 Feb 2011 02:19:22 +0000 (02:19 +0000)]
Fix thinko, basic blocks are SESE. The exits may have many edges though.

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

13 years agoadd some notes on compares + binops. Remove redundant entries.
Chris Lattner [Thu, 17 Feb 2011 01:43:46 +0000 (01:43 +0000)]
add some notes on compares + binops.  Remove redundant entries.

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

13 years agofix PR9215, preventing -reassociate from clearing nsw/nuw when
Chris Lattner [Thu, 17 Feb 2011 01:29:24 +0000 (01:29 +0000)]
fix PR9215, preventing -reassociate from clearing nsw/nuw when
it swaps the LHS/RHS of a single binop.

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

13 years agoAdd a few missed xforms from GCC PR14753
Chris Lattner [Wed, 16 Feb 2011 19:16:34 +0000 (19:16 +0000)]
Add a few missed xforms from GCC PR14753

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

13 years agoSwap VT and DebugLoc operands of getExtLoad() for consistency with
Stuart Hastings [Wed, 16 Feb 2011 16:23:55 +0000 (16:23 +0000)]
Swap VT and DebugLoc operands of getExtLoad() for consistency with
other getNode() methods.  Radar 9002173.

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

13 years agoAdd a debug obj-path option to make it easy to keep the .o produce by LTO.
Rafael Espindola [Wed, 16 Feb 2011 11:19:44 +0000 (11:19 +0000)]
Add a debug obj-path option to make it easy to keep the .o produce by LTO.

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

13 years agoRemove outdated README entry.
Eli Friedman [Wed, 16 Feb 2011 07:41:19 +0000 (07:41 +0000)]
Remove outdated README entry.

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

13 years agoRemove outdated README entry.
Eli Friedman [Wed, 16 Feb 2011 07:18:18 +0000 (07:18 +0000)]
Remove outdated README entry.

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

13 years agoUpdate README entry.
Eli Friedman [Wed, 16 Feb 2011 07:17:44 +0000 (07:17 +0000)]
Update README entry.

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

13 years agoRefactor zero folding slightly. Clean up todo.
Eric Christopher [Wed, 16 Feb 2011 04:50:12 +0000 (04:50 +0000)]
Refactor zero folding slightly. Clean up todo.

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

13 years agoGas is very inconsistent about when a relaxation/relocation is needed. Do
Rafael Espindola [Wed, 16 Feb 2011 03:25:55 +0000 (03:25 +0000)]
Gas is very inconsistent about when a relaxation/relocation is needed. Do
the right thing and stop trying to copy it. Fixes PR8944.

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

13 years agoThe change for PR9190 wasn't quite right. We need to avoid making the
Eric Christopher [Wed, 16 Feb 2011 01:10:03 +0000 (01:10 +0000)]
The change for PR9190 wasn't quite right. We need to avoid making the
transformation if we can't legally create a build vector of the correct
type. Check that we can make the transformation first, and add a TODO to
refactor this code with similar cases.

Fixes: PR9223 and rdar://9000350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125631 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd testcase for PR9190.
Eric Christopher [Wed, 16 Feb 2011 01:08:31 +0000 (01:08 +0000)]
Add testcase for PR9190.

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

13 years agoAdd support for pushsection and popsection. Patch by Joerg Sonnenberger.
Rafael Espindola [Wed, 16 Feb 2011 01:08:29 +0000 (01:08 +0000)]
Add support for pushsection and popsection. Patch by Joerg Sonnenberger.

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

13 years agoRemove a duplicated check.
Evan Cheng [Wed, 16 Feb 2011 00:37:02 +0000 (00:37 +0000)]
Remove a duplicated check.

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

13 years agoSome single precision VFP instructions may be executed on NEON pipeline, but not...
Evan Cheng [Wed, 16 Feb 2011 00:35:02 +0000 (00:35 +0000)]
Some single precision VFP instructions may be executed on NEON pipeline, but not double precision ones.

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

13 years agoTeach PatternMatch that splat vectors could be floating point as well as
Nick Lewycky [Tue, 15 Feb 2011 23:13:23 +0000 (23:13 +0000)]
Teach PatternMatch that splat vectors could be floating point as well as
integer. Fixes PR9228!

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

13 years agoAdd support for parsing [expr].
Roman Divacky [Tue, 15 Feb 2011 20:43:39 +0000 (20:43 +0000)]
Add support for parsing [expr].

This is submitted by Joerg Sonnenberger and fixes his PR8685.

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

13 years agoTeach ARMLoadStoreOptimizer to remove kill flags from merged instructions as well.
Jakob Stoklund Olesen [Tue, 15 Feb 2011 19:51:58 +0000 (19:51 +0000)]
Teach ARMLoadStoreOptimizer to remove kill flags from merged instructions as well.

This is necessary to avoid a crash in certain tangled situations where a kill
flag is first correctly moved to a merged instruction, and then needs to be
moved again:

  STR %R0, a...
  STR %R0<kill>, b...

First becomes:

  STR %R0, b...
  STM a, %R0<kill>, ...

and then:

  STM a, %R0, ...
  STM b, %R0<kill>, ...

We can now remove the kill flag from the merged STM when needed. 8960050.

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

13 years agoIgnore DBG_VALUE machine instructions while constructing instruction ranges based...
Devang Patel [Tue, 15 Feb 2011 17:56:09 +0000 (17:56 +0000)]
Ignore DBG_VALUE machine instructions while constructing instruction ranges based on location info.
Machine instruction range consisting of only DBG_VALUE MIs only contributes consecutive labels in assembly output, which is harmless, and empty scope entry in DebugInfo, which confuses debugger tools.

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

13 years agoImplement a function from PathV2 whose definition is missing.
Argyrios Kyrtzidis [Tue, 15 Feb 2011 17:51:19 +0000 (17:51 +0000)]
Implement a function from PathV2 whose definition is missing.

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

13 years agoMove DbgInfoPrinter specific utlities inside DbgInfoPrinter.cpp
Devang Patel [Tue, 15 Feb 2011 17:36:11 +0000 (17:36 +0000)]
Move DbgInfoPrinter specific utlities inside DbgInfoPrinter.cpp

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

13 years agoPrint function info. Patch by Minjang Kim.
Devang Patel [Tue, 15 Feb 2011 17:24:56 +0000 (17:24 +0000)]
Print function info. Patch by Minjang Kim.

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

13 years agoSpelling fix: consequtive -> consecutive.
Duncan Sands [Tue, 15 Feb 2011 09:23:02 +0000 (09:23 +0000)]
Spelling fix: consequtive -> consecutive.

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

13 years agoWhen tablegen'ing the clang analyzer checkers:
Argyrios Kyrtzidis [Tue, 15 Feb 2011 07:42:16 +0000 (07:42 +0000)]
When tablegen'ing the clang analyzer checkers:

-Use the tablegen class name for the checker class name.
-Mark checker packages as hidden/not hidden.

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

13 years agoFix 9216 - Endless loop in InstCombine pass.
Nadav Rotem [Tue, 15 Feb 2011 07:13:48 +0000 (07:13 +0000)]
Fix 9216 - Endless loop in InstCombine pass.
The pattern "A&(A^B) -> A & ~B" recreated itself because ~B is
actually a xor -1.

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

13 years agoFix thinko. Cmp can be the first instruction in a MBB.
Evan Cheng [Tue, 15 Feb 2011 05:00:24 +0000 (05:00 +0000)]
Fix thinko. Cmp can be the first instruction in a MBB.

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

13 years agoDo not forget DebugLoc!
Devang Patel [Tue, 15 Feb 2011 02:02:30 +0000 (02:02 +0000)]
Do not forget DebugLoc!

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

13 years agotidy up a bit.
Chris Lattner [Tue, 15 Feb 2011 01:56:08 +0000 (01:56 +0000)]
tidy up a bit.

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

13 years agoMinor fixes to tutorial, patch by Benjamin Meyer!
Chris Lattner [Tue, 15 Feb 2011 00:24:32 +0000 (00:24 +0000)]
Minor fixes to tutorial, patch by Benjamin Meyer!

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

13 years agofix comments
Chris Lattner [Tue, 15 Feb 2011 00:23:53 +0000 (00:23 +0000)]
fix comments

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

13 years agoconvert ConstantVector::get to use ArrayRef.
Chris Lattner [Tue, 15 Feb 2011 00:14:00 +0000 (00:14 +0000)]
convert ConstantVector::get to use ArrayRef.

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

13 years agofix some typos.
Chris Lattner [Tue, 15 Feb 2011 00:06:37 +0000 (00:06 +0000)]
fix some typos.

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

13 years agoRemove unused bitvectors that record ARM callee-saved registers.
Bob Wilson [Mon, 14 Feb 2011 23:40:38 +0000 (23:40 +0000)]
Remove unused bitvectors that record ARM callee-saved registers.

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

13 years agoMove more fragments of spill weight calculation into CalcSpillWeights.h
Jakob Stoklund Olesen [Mon, 14 Feb 2011 23:15:38 +0000 (23:15 +0000)]
Move more fragments of spill weight calculation into CalcSpillWeights.h

Simplify the spill weight calculation a bit by bypassing
getApproximateInstructionCount() and using LiveInterval::getSize() directly.
This changes the computed spill weights, but only by a constant factor in each
function. It should not affect how spill weights compare against each other, and
so it shouldn't affect code generation.

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

13 years agoDo not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is...
Devang Patel [Mon, 14 Feb 2011 23:03:23 +0000 (23:03 +0000)]
Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.

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

13 years agoSwitch llvm to using comdats. For now always use groups with a single
Rafael Espindola [Mon, 14 Feb 2011 22:23:49 +0000 (22:23 +0000)]
Switch llvm to using comdats. For now always use groups with a single
section.

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

13 years agoPR9139: Specify ARM/Darwin triple for vector-DAGCombine.ll test.
Bob Wilson [Mon, 14 Feb 2011 22:12:50 +0000 (22:12 +0000)]
PR9139: Specify ARM/Darwin triple for vector-DAGCombine.ll test.

The i64_buildvector test in this file relies on the alignment of i64 and
f64 types being the same, which is true for Darwin but not AAPCS.

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

13 years agoFix PR8854. Track inserted copies to avoid read before write. Sorry, it's hard to...
Evan Cheng [Mon, 14 Feb 2011 21:50:37 +0000 (21:50 +0000)]
Fix PR8854. Track inserted copies to avoid read before write. Sorry, it's hard to reduce a sensible small test case.

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

13 years agoA fail to match coprocessor number and register number must fail instead of assert.
Bruno Cardoso Lopes [Mon, 14 Feb 2011 21:10:33 +0000 (21:10 +0000)]
A fail to match coprocessor number and register number must fail instead of assert.

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