1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

69951 Commits

Author SHA1 Message Date
Devang Patel
777de97e8b Provide enums to build complex address calucation expressions.
(This is infact direct copy from DIFactory, which is disappearing soon.)

llvm-svn: 125989
2011-02-18 23:28:53 +00:00
Devang Patel
918feedd44 Remove unused tag.
llvm-svn: 125988
2011-02-18 23:23:09 +00:00
Devang Patel
83b12031ab These tags are now covered by dwarf::TagString().
llvm-svn: 125987
2011-02-18 23:13:40 +00:00
Devang Patel
7bc042d9d4 Provide tag strings for llvm specific tags.
llvm-svn: 125986
2011-02-18 23:06:29 +00:00
Devang Patel
d63bce18da 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.

llvm-svn: 125984
2011-02-18 22:43:42 +00:00
Chris Lattner
9f386640da 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.

llvm-svn: 125981
2011-02-18 22:36:36 +00:00
Jakob Stoklund Olesen
0dd5f07ac0 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.

llvm-svn: 125980
2011-02-18 22:35:20 +00:00
Chris Lattner
a0dede2c21 add a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls flag.
llvm-svn: 125978
2011-02-18 22:34:03 +00:00
Chris Lattner
2b183fca87 Make loop-idiom use TargetLibraryInfo to determine whether it is allowed
to hack on memset, memcpy etc.

llvm-svn: 125974
2011-02-18 22:22:15 +00:00
Chris Lattner
3c8b2290ec add memset and memcpy, though they are always available for now.
llvm-svn: 125973
2011-02-18 22:21:24 +00:00
Chris Lattner
2d216b82ee rearrange some comments, no functionality change.
llvm-svn: 125972
2011-02-18 22:21:07 +00:00
Chris Lattner
e86dec3eb2 Have opt set up a specific TargetLibraryInfo for modules
with a triple.

llvm-svn: 125970
2011-02-18 22:13:01 +00:00
Oscar Fuentes
704198a74e CMake: updated list of tblgen source files.
llvm-svn: 125969
2011-02-18 22:06:23 +00:00
Oscar Fuentes
6e5d344a2e Move library stuff out of the toplevel CMakeLists.txt file.
llvm-svn: 125968
2011-02-18 22:06:14 +00:00
Jakob Stoklund Olesen
f86a7a2f49 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.

llvm-svn: 125967
2011-02-18 22:03:18 +00:00
Owen Anderson
a2d2de33c5 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.

llvm-svn: 125966
2011-02-18 21:51:29 +00:00
Chris Lattner
63dfb2c797 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.

llvm-svn: 125965
2011-02-18 21:50:34 +00:00
Owen Anderson
e7d107d271 Revert r125956, which broke the build if you _don't_ have lldb checked out.
llvm-svn: 125964
2011-02-18 21:33:23 +00:00
Bill Wendling
dd9b7a90a7 Reapply r114997 now that the buildbots have been updated.
llvm-svn: 125960
2011-02-18 21:12:58 +00:00
Stephen Wilson
b04947df1b 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.

llvm-svn: 125956
2011-02-18 20:50:33 +00:00
Bruno Cardoso Lopes
d97e3e6dad Fix style and a typo
llvm-svn: 125949
2011-02-18 19:49:06 +00:00
Bruno Cardoso Lopes
ad05904e0b 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".

llvm-svn: 125948
2011-02-18 19:45:59 +00:00
Chris Lattner
9c5c450c56 improve support for OpenBSD, patch by Amit Kulkarni!
llvm-svn: 125943
2011-02-18 17:04:56 +00:00
Rafael Espindola
05e2f8b789 Expose getTypeName to the C API. Patch by Patrick Walton.
llvm-svn: 125845
2011-02-18 16:35:37 +00:00
Duncan Sands
1ddd628de0 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.

llvm-svn: 125843
2011-02-18 16:25:37 +00:00
Benjamin Kramer
c52c7162d7 The objectsize intrinsic doesn't access any memory.
llvm-svn: 125842
2011-02-18 16:11:40 +00:00
Chris Lattner
2aebf9f4ad add a poor division by constant case.
llvm-svn: 125832
2011-02-18 05:35:49 +00:00
Chris Lattner
6bf82a073a add a testcase for r125827
llvm-svn: 125831
2011-02-18 05:05:01 +00:00
Cameron Zwarich
f6fa19a03f Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.
llvm-svn: 125830
2011-02-18 04:58:10 +00:00
Chris Lattner
eccec47f5c 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.

llvm-svn: 125829
2011-02-18 04:43:06 +00:00
Chris Lattner
87de1d1bb8 hoist GlobalValue::removeDeadConstantUsers up to being a method on Constant.
llvm-svn: 125828
2011-02-18 04:41:42 +00:00
Chris Lattner
cd170f7cf6 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.

llvm-svn: 125827
2011-02-18 04:25:21 +00:00
Peter Collingbourne
77a70485d9 Make -disable-simplify-libcalls work with -std-compile-opts
llvm-svn: 125824
2011-02-18 02:59:21 +00:00
Joerg Sonnenberger
efa8090e2a Recognize monitor/mwait with explicit register arguments
llvm-svn: 125805
2011-02-18 00:48:11 +00:00
Argyrios Kyrtzidis
7f4a6afc42 Check the errorcode.
llvm-svn: 125804
2011-02-18 00:47:07 +00:00
Jakob Stoklund Olesen
9af1f4da20 Trim debugging output.
llvm-svn: 125802
2011-02-18 00:32:47 +00:00
Joerg Sonnenberger
9f8f3a2c59 Recognize leavel and leaveq aliases for leave.
Validate encoding of leave in 64bit mode.

llvm-svn: 125795
2011-02-17 23:36:39 +00:00
Devang Patel
b6f55191b3 Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
llvm-svn: 125794
2011-02-17 23:33:27 +00:00
Joerg Sonnenberger
adef15e109 Check that MnemonicAlias doesn't map back to the same string.
llvm-svn: 125792
2011-02-17 23:22:19 +00:00
Chris Lattner
f9501b79f9 have instcombine preserve nsw/nuw/exact when sinking
common operations through a phi. 

llvm-svn: 125790
2011-02-17 23:01:49 +00:00
Jakob Stoklund Olesen
c710f55d9d Add basic register allocator statistics.
llvm-svn: 125789
2011-02-17 22:53:48 +00:00
Chris Lattner
fd397180f3 fix typo
llvm-svn: 125787
2011-02-17 22:32:54 +00:00
Oscar Fuentes
5b5316fae9 New library: LLVMX86Utils.
llvm-svn: 125786
2011-02-17 22:26:11 +00:00
Chris Lattner
fc8ee641a2 fix instcombine merging GEPs through a PHI to only make the
result inbounds if all of the inputs are inbounds.

llvm-svn: 125785
2011-02-17 22:21:26 +00:00
Nadav Rotem
ad2fd4eada Enhance constant folding of bitcast operations on vectors of floats.
Add getAllOnesValue of FP numbers to Constants and APFloat.
Add more tests.

llvm-svn: 125776
2011-02-17 21:22:27 +00:00
Chris Lattner
e797a8c29f add is always integer, thanks to Frits for noticing this.
llvm-svn: 125774
2011-02-17 20:55:29 +00:00
David Greene
244920d662 [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.

llvm-svn: 125765
2011-02-17 19:18:59 +00:00
Jakob Stoklund Olesen
65f52c387c 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.

llvm-svn: 125764
2011-02-17 19:13:53 +00:00
Dan Gohman
71117af2db The labyrinthine X86 backend no longer appears to require
these patterns.

llvm-svn: 125759
2011-02-17 18:50:19 +00:00
Duncan Sands
9b4a2b4fe0 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. 

llvm-svn: 125748
2011-02-17 12:42:48 +00:00