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
NAKAMURA Takumi
00228d0c2c
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.
llvm-svn: 125747
2011-02-17 12:24:17 +00:00
NAKAMURA Takumi
8d39c3a632
Fix whitespace.
...
llvm-svn: 125746
2011-02-17 12:23:50 +00:00
Duncan Sands
e0ece264ba
This has been implemented.
...
llvm-svn: 125738
2011-02-17 08:16:56 +00:00
Duncan Sands
00610dbf64
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.
llvm-svn: 125734
2011-02-17 07:46:37 +00:00
Cameron Zwarich
443d4193ef
Switch to SmallVector in SimpleRegisterCoalescing for a 3.5% speedup on 403.gcc.
...
llvm-svn: 125728
2011-02-17 06:52:07 +00:00
Cameron Zwarich
ebcd35fd5a
Adjust indenting of arguments.
...
llvm-svn: 125727
2011-02-17 06:13:46 +00:00
Cameron Zwarich
5ea289952e
Return Changed from SplitPHIEdges rather than always returning true.
...
llvm-svn: 125726
2011-02-17 06:13:43 +00:00
NAKAMURA Takumi
f9affc1dc9
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.
llvm-svn: 125725
2011-02-17 05:56:41 +00:00
Alexis Hunt
be0782975d
Add serialization for Expr* arguments for attributes to clang tablegen files.
...
Patch thanks to Zach Anderson.
llvm-svn: 125721
2011-02-17 03:30:09 +00:00
Chris Lattner
6e936c247f
preserve NUW/NSW when transforming add x,x
...
llvm-svn: 125711
2011-02-17 02:23:02 +00:00
Chris Lattner
79947d56ea
filecheckize
...
llvm-svn: 125710
2011-02-17 02:21:03 +00:00
Nick Lewycky
4e7ec00a1d
Fix thinko, basic blocks are SESE. The exits may have many edges though.
...
llvm-svn: 125709
2011-02-17 02:19:22 +00:00
Chris Lattner
035876162f
add some notes on compares + binops. Remove redundant entries.
...
llvm-svn: 125702
2011-02-17 01:43:46 +00:00
Chris Lattner
828b97cdc2
fix PR9215, preventing -reassociate from clearing nsw/nuw when
...
it swaps the LHS/RHS of a single binop.
llvm-svn: 125700
2011-02-17 01:29:24 +00:00
Chris Lattner
9f4e529571
Add a few missed xforms from GCC PR14753
...
llvm-svn: 125681
2011-02-16 19:16:34 +00:00
Stuart Hastings
47e45a32a8
Swap VT and DebugLoc operands of getExtLoad() for consistency with
...
other getNode() methods. Radar 9002173.
llvm-svn: 125665
2011-02-16 16:23:55 +00:00
Rafael Espindola
3c40b1fab0
Add a debug obj-path option to make it easy to keep the .o produce by LTO.
...
llvm-svn: 125663
2011-02-16 11:19:44 +00:00
Eli Friedman
b409f8da64
Remove outdated README entry.
...
llvm-svn: 125660
2011-02-16 07:41:19 +00:00
Eli Friedman
5f848d70fa
Remove outdated README entry.
...
llvm-svn: 125659
2011-02-16 07:18:18 +00:00
Eli Friedman
30a64ae1b9
Update README entry.
...
llvm-svn: 125658
2011-02-16 07:17:44 +00:00
Eric Christopher
25956e0c47
Refactor zero folding slightly. Clean up todo.
...
llvm-svn: 125651
2011-02-16 04:50:12 +00:00
Rafael Espindola
4ef1268b39
Gas is very inconsistent about when a relaxation/relocation is needed. Do
...
the right thing and stop trying to copy it. Fixes PR8944.
llvm-svn: 125648
2011-02-16 03:25:55 +00:00
Eric Christopher
8965ba39fb
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
llvm-svn: 125631
2011-02-16 01:10:03 +00:00