1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

60 Commits

Author SHA1 Message Date
Eli Friedman
a154929048 Add missing newline.
llvm-svn: 138964
2011-09-01 21:20:11 +00:00
Eli Friedman
da555beef1 Add tests for the transformations SCCP can do on atomic loads and stores (which are safe without any modifications).
llvm-svn: 138902
2011-08-31 21:37:06 +00:00
Bill Wendling
7014c485f5 Update the tests to the new EH scheme.
llvm-svn: 138891
2011-08-31 20:55:40 +00:00
Eli Friedman
e1655eebc3 Silly mistake from r137777; restore significant isStructTy() checks. While here, be a bit more defensive
with unknown instructions.

Fixes PR10687.

llvm-svn: 137836
2011-08-17 18:10:43 +00:00
Eli Friedman
b4733f623f A bunch of misc fixes to SCCPSolver::ResolvedUndefsIn, including a fix to stop
making random bad assumptions about instructions which are not explicitly listed.  

Includes fix for rdar://9956541, a version of "undef ^ undef should return
0 because it's easier than arguing with users".

llvm-svn: 137777
2011-08-16 22:06:31 +00:00
Eli Friedman
e0095e4339 Minor bug in SCCP found by inspection. (I don't think it's possible to hit this with a normal pass pipeline, but fixing for completeness.)
llvm-svn: 137755
2011-08-16 21:12:35 +00:00
Chris Lattner
a106725fc5 Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM.  One way to look at it
is through diffstat:
 109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing.  Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
   union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
   uniques them.  This means that the compiler doesn't merge them structurally
   which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
   struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
   in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead 
   "const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.  
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.

llvm-svn: 134829
2011-07-09 17:41:24 +00:00
Chris Lattner
385977c252 remove asmparser support for the old getresult instruction, which has been subsumed by extractvalue.
llvm-svn: 133247
2011-06-17 06:57:15 +00:00
Chris Lattner
9ec82f54d4 manually upgrade a bunch of tests to modern syntax, and remove some that
are either unreduced or only test old syntax.

llvm-svn: 133228
2011-06-17 03:14:27 +00:00
Chris Lattner
0304b82f80 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Chris Lattner
fd40059e71 fix PR7876: If ipsccp decides that a function's address is taken
before it rewrites the code, we need to use that in the post-rewrite pass.

llvm-svn: 110962
2010-08-12 22:25:23 +00:00
Chris Lattner
9065710fcf fix PR6940: sitofp(undef) folds to 0.0, not undef.
llvm-svn: 102358
2010-04-26 18:21:23 +00:00
Chris Lattner
08fed5e338 fix a SCCP miscompilation that could happen when a
forced constant is changed to a constant, we would end
up adding the instruction to the wrong worklist, 
preventing it from being properly revisited.  This fixes
rdar://7832370

llvm-svn: 100837
2010-04-09 01:14:31 +00:00
Dan Gohman
5bf62639ed Print empty structs as {} rather than { }.
llvm-svn: 100787
2010-04-08 18:03:05 +00:00
Chris Lattner
93fd3ddf24 fix PR6414, a nondeterminism issue in IPSCCP which was because
of a subtle interation in a loop operating in densemap order.

llvm-svn: 97288
2010-02-27 00:07:42 +00:00
Chris Lattner
a163be92fc fix a crash in SCCP handling extractvalue of an array, pointed out and
tracked down by Stephan Reiter!

llvm-svn: 86726
2009-11-10 22:02:09 +00:00
Chris Lattner
b634c6cdb5 reimplement multiple return value handling in IPSCCP, making it
more aggressive an correct.  This survives building llvm in 64-bit
mode with optimizations and the built llvm passes make check.

llvm-svn: 85973
2009-11-03 23:40:48 +00:00
Chris Lattner
036e15ff97 fix test
llvm-svn: 85946
2009-11-03 21:26:26 +00:00
Chris Lattner
11eafaadc3 merge a test into ipsccp-basic. running llvm-ld to get one pass is... bad.
llvm-svn: 85945
2009-11-03 21:25:50 +00:00
Chris Lattner
2aa5962af6 fix an IPSCCP bug I introduced when I changed IPSCCP to start working on
functions that don't have local linkage.  Basically, we need to be more
careful about propagating argument information to functions whose results
we aren't tracking.  This fixes a miscompilation of 
LLVMCConfigurationEmitter.cpp when built with an llvm-gcc that has ipsccp
enabled.

llvm-svn: 85923
2009-11-03 19:24:51 +00:00
Chris Lattner
15ceb6e7f7 testcase for r85903
llvm-svn: 85906
2009-11-03 17:03:02 +00:00
Chris Lattner
fc4e63b285 merge 2008-03-10-sret.ll into ipsccp-basic.ll, and upgrade its syntax.
llvm-svn: 85811
2009-11-02 18:27:22 +00:00
Chris Lattner
a1776913ab disable IPSCCP support for multiple return values, it is buggy, so just
disable it until I can fix it.

llvm-svn: 85810
2009-11-02 18:22:51 +00:00
Chris Lattner
f1afb57935 improve IPSCCP to be able to propagate the result of "!mayBeOverridden"
function to calls of that function, regardless of whether it has local
linkage or has its address taken.  Not escaping should only affect 
whether we make an aggressive assumption about the arguments to a 
function, not whether we can track the result of it.

llvm-svn: 85795
2009-11-02 07:33:59 +00:00
Chris Lattner
16b825e51f Use the libanalysis 'ConstantFoldLoadFromConstPtr' function
instead of reinventing SCCP-specific logic.  This gives us
new powers.

llvm-svn: 85789
2009-11-02 06:06:14 +00:00
Chris Lattner
882034fdaf add a real testcase for PR4313
llvm-svn: 84676
2009-10-20 21:04:26 +00:00
Chris Lattner
0737ccf048 add a test similar to that needed for PR4313, but that doesn't
fail without the patch.

llvm-svn: 84675
2009-10-20 21:00:47 +00:00
Chris Lattner
ccbe8ab252 the date on this testcase is wrong, it is unreduced, and it passes without the fix for PR4313.
llvm-svn: 84674
2009-10-20 20:57:58 +00:00
Chris Lattner
f3be536c0a merge and filecheckize
llvm-svn: 84672
2009-10-20 20:39:43 +00:00
Chris Lattner
827cc8fa02 merge two tests and convert to filecheck.
llvm-svn: 84671
2009-10-20 20:33:46 +00:00
Torok Edwin
3801e755cc Fix PR4313: IPSCCP was not setting the lattice value for the invoke instruction
when the invoke had multiple return values: it set the lattice value only on the
extractvalue.
This caused the invoke's lattice value to remain the default (undefined), and
later propagated to extractvalue's operand, which incorrectly introduces
undefined behavior.

llvm-svn: 84637
2009-10-20 15:15:09 +00:00
Dan Gohman
c9307490ce Eliminate more redundant llvm-as calls.
llvm-svn: 81540
2009-09-11 18:17:12 +00:00
Dan Gohman
205b641954 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.

llvm-svn: 81537
2009-09-11 18:01:28 +00:00
Chris Lattner
e8f2153059 fix a bunch of spurious failures for people whose home directory
is sabre.

llvm-svn: 81528
2009-09-11 17:02:12 +00:00
Dan Gohman
cd0fb89725 Use "opt < %s" instead of "opt %s" so that opt doesn't print the test
filename in the output, which interferes with the tests' grep lines.

llvm-svn: 81263
2009-09-08 22:57:49 +00:00
Dan Gohman
c95df8b6d8 Use opt -S instead of piping bitcode output through llvm-dis.
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman
8d84372836 Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this.

llvm-svn: 81226
2009-09-08 16:50:01 +00:00
Dan Gohman
5f6f8101d5 Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt

llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Nick Lewycky
3dd0d690f3 Use Operands.data() instead of &Operands[0] where Operands is a potentially
empty SmallVector.

llvm-svn: 72512
2009-05-28 04:08:10 +00:00
Chris Lattner
f8c9dfe644 adjust for asmprinter change.
llvm-svn: 65740
2009-03-01 00:25:46 +00:00
Chris Lattner
fa0c0e19f6 Fix PR3325, a miscompilation of invokes by IPSCCP. Patch by Jay Foad!
llvm-svn: 62244
2009-01-14 21:01:16 +00:00
Dan Gohman
374d9328b7 Fix SCCP's handling of struct value loads and stores. SCCP doesn't
track individual leaf values in such cases, so it needs to treat
struct values as normal values in this case.

llvm-svn: 54760
2008-08-13 21:22:48 +00:00
Dan Gohman
6564581be0 Enable first-class aggregates support.
Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.

The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.

llvm-svn: 53941
2008-07-23 00:34:11 +00:00
Chris Lattner
bde5fd685d Fix PR2358 by resolving calls with undef arguments to overdefined.
llvm-svn: 51535
2008-05-24 03:59:33 +00:00
Gabor Greif
807c2df887 sabre brings to my attention that the 'tr' suffix is also obsolete
llvm-svn: 51349
2008-05-20 21:00:03 +00:00
Gabor Greif
d8a4dbb5da Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.
llvm-svn: 51328
2008-05-20 19:52:04 +00:00
Owen Anderson
79a25ff8ec Use loop deletion instead of ADCE in these tests.
llvm-svn: 51180
2008-05-16 04:33:37 +00:00
Chris Lattner
721ea7ca10 Rewrite multiple return value handling in SCCP. Before, the -sccp pass
would turn every getresult instruction into undef.  This helps with
rdar://5778210

llvm-svn: 50140
2008-04-23 05:38:20 +00:00
Chris Lattner
be858fc296 make this test more interesting.
llvm-svn: 50128
2008-04-23 03:49:32 +00:00
Tanya Lattner
88c66b1027 Upgrade tests to not use llvm-upgrade.
llvm-svn: 48529
2008-03-19 04:14:49 +00:00