Commit Graph

2534 Commits

Author SHA1 Message Date
Andrew Trick f9f68b816b [indvars] Revert r139579 until 401.bzip -arch i386 miscompilation is fixed. PR10920.
llvm-svn: 139583
2011-09-13 05:23:49 +00:00
Andrew Trick 061d811c51 Disable IV rewriting by default. See PR10916.
llvm-svn: 139579
2011-09-13 03:23:21 +00:00
Andrew Trick 5b28cc84f0 Generalize test case to handle multiple indvars modes.
llvm-svn: 139578
2011-09-13 03:17:25 +00:00
Andrew Trick 3de5b8e4c1 [indvars] Fix bugs in floating point IV range checks noticed by inspection.
llvm-svn: 139574
2011-09-13 01:59:32 +00:00
Andrew Trick 54a109845d Conditionalize indvars test that relies on SCEV expansion of geps,
which is only relevant with canonical IVs

llvm-svn: 139556
2011-09-12 23:13:57 +00:00
Andrew Trick a8315c3f2b indvars test only relevant for -enable-iv-rewrite.
Otherwise this case is now covered by no-iv-rewrite.ll.

llvm-svn: 139552
2011-09-12 22:59:00 +00:00
Andrew Trick d2e61e1f70 Conditionalize indvars tests that rely on SCEV expansion of geps,
which is relevant with canonical IVs. Anything else being checked by
these tests is already covered by early CSE.

llvm-svn: 139535
2011-09-12 20:26:34 +00:00
Andrew Trick 30e8db98b8 Removing indvars tests that directly test canonical IVs and nothing else.
llvm-svn: 139518
2011-09-12 18:33:08 +00:00
Andrew Trick 183013d8d4 Rename -disable-iv-rewrite to -enable-iv-rewrite=false in preparation for default change.
llvm-svn: 139517
2011-09-12 18:28:44 +00:00
Andrew Trick 8c6fb3af6e Test case for r139453, WidenIV::GetExtendedOperandRecurrence.
llvm-svn: 139504
2011-09-12 17:20:57 +00:00
Duncan Sands ba60b04148 Mark the eh.typeid.for intrinsic as being 'const', which it is inside
any given function.  As pointed out by John McCall, this is needed to
have redundant eh.typeid.for tests be eliminated in the presence of
cleanups.

llvm-svn: 139360
2011-09-09 07:50:37 +00:00
Duncan Sands 524c33a27f When inlining exception handling code into another function, ensure that
duplicate tests are eliminated (for example if the two functions both have
a catch clause catching the same type, ensure the redundant one is removed).
Note that it would probably be safe to say that eh.typeid.for is 'const',
but since two calls to it with the same argument can give different results
(but only if the calls are in different functions), it seems more correct to
mark it only 'pure'; this doesn't get in the way of the optimization.

llvm-svn: 139236
2011-09-07 16:44:14 +00:00
Duncan Sands d7430cea10 Forgot to add this trampoline testcase.
llvm-svn: 139229
2011-09-07 09:21:38 +00:00
Owen Anderson 58704ee442 Try again at r138809 (make DSE more aggressive in removing dead stores at the end of a function), now with less deleting stores before memcpy's.
llvm-svn: 139150
2011-09-06 18:14:09 +00:00
Duncan Sands a098436b32 Split the init.trampoline intrinsic, which currently combines GCC's
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC.  While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function.  To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function.  Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!).  Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC.  Patch mostly by Sanjoy Das.

llvm-svn: 139140
2011-09-06 13:37:06 +00:00
Benjamin Kramer 4b79c21ef2 InstSimplify: Don't try to replace an extractvalue/insertvalue pair with the original value if types don't match.
Fixes clang selfhost.

llvm-svn: 139120
2011-09-05 18:16:19 +00:00
Duncan Sands 29192d042e Delete trivial landing pads that just continue unwinding the caught
exception.

llvm-svn: 139117
2011-09-05 12:57:57 +00:00
Duncan Sands fd26a954a8 Add some simple insertvalue simplifications, for the purpose of cleaning
up do-nothing exception handling code produced by dragonegg.

llvm-svn: 139113
2011-09-05 06:52:48 +00:00
Bill Wendling 4aa2573748 Try to eliminate the use of the 'unwind' instruction.
llvm-svn: 139046
2011-09-02 22:41:11 +00:00
Andrew Trick 310a448cfe Test case update for unroll-scev.
llvm-svn: 139037
2011-09-02 21:21:03 +00:00
Jakub Staszak 63a3a0e010 Extra CHECK-NOT to make sure that GVN transform works properly.
llvm-svn: 139012
2011-09-02 17:40:39 +00:00
Andrew Trick 4a31ba3bae -unroll-scev flag removal
llvm-svn: 139010
2011-09-02 17:36:14 +00:00
Jakub Staszak 057d423e4b ConstantVector returns arbitrary value for the wrong index.
This fixes PR10813.

llvm-svn: 139006
2011-09-02 15:43:43 +00:00
Jakub Staszak 7470fb01d0 Compare type size instead of type _store_ size to make sure that BitCastInst
will be valid. This fixes PR10820.

llvm-svn: 139005
2011-09-02 14:57:37 +00:00
Bill Wendling 723cec7a5f Update to new EH scheme.
llvm-svn: 138989
2011-09-02 01:25:11 +00:00
Eli Friedman 4028a51c74 Fix test; sorry for any inconvenience.
llvm-svn: 138966
2011-09-01 21:25:42 +00:00
Eli Friedman 71f5c2f158 Fix an issue with the IR sink pass found by inspection. (I'm not sure anyone is actually using this, but might as well fix it since I found the issue.)
llvm-svn: 138965
2011-09-01 21:21:24 +00:00
Eli Friedman cc6e92892f Add missing newline.
llvm-svn: 138964
2011-09-01 21:20:11 +00:00
Bill Wendling 185d377597 Update to new EH scheme.
llvm-svn: 138933
2011-09-01 01:28:25 +00:00
Bill Wendling d33e3007fa Update to new EH scheme.
llvm-svn: 138928
2011-09-01 01:08:21 +00:00
Bill Wendling 3b17c1b48d Update to new EH scheme.
llvm-svn: 138927
2011-09-01 01:02:41 +00:00
Bill Wendling e88632d667 Update some tests to the new EH scheme.
llvm-svn: 138925
2011-09-01 00:58:03 +00:00
Bill Wendling 080f40a49d Reenable test.
llvm-svn: 138916
2011-08-31 23:08:05 +00:00
Bill Wendling 54b91028f0 Revert accidental commit
llvm-svn: 138915
2011-08-31 23:07:46 +00:00
Eli Friedman c472975fd9 Disable this test until Bill fixes it properly.
llvm-svn: 138914
2011-08-31 23:03:30 +00:00
Bill Wendling 5624fe0cff Update to new EH scheme.
llvm-svn: 138908
2011-08-31 21:50:07 +00:00
Bill Wendling d4e871404d Update more tests to the new EH scheme.
llvm-svn: 138903
2011-08-31 21:39:05 +00:00
Eli Friedman 293c31b81c 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 e6174a2c85 Update more tests to the new EH scheme.
llvm-svn: 138894
2011-08-31 21:04:11 +00:00
Bill Wendling b1e680fd3f Update the tests to the new EH scheme.
llvm-svn: 138891
2011-08-31 20:55:40 +00:00
Rafael Espindola a45c20b049 Remove the old tail duplication pass. It is not used and is unable to update
ssa, so it has to be run really early in the pipeline. Any replacement
should probably use the SSAUpdater.

llvm-svn: 138841
2011-08-30 23:03:45 +00:00
Owen Anderson b359367a3d Remove empty file.
llvm-svn: 138830
2011-08-30 21:17:20 +00:00
Owen Anderson e316e5b2ad Speculatively revert r138809 in an attempt to fix DragonEgg.
llvm-svn: 138829
2011-08-30 21:11:06 +00:00
Owen Anderson d708ec4c6a When walking backwards to eliminate final stores to allocas at the end of a function, encountering an unrelated store should not cause us to give up like encountering a load does.
llvm-svn: 138809
2011-08-30 18:51:55 +00:00
Bill Wendling e79ce47ad7 Update tests to new EH model. Add landingpad instructions to landing pads.
llvm-svn: 138759
2011-08-29 20:39:23 +00:00
Nadav Rotem 5fc81ffbac Fixes following the CR by Chris and Duncan:
Optimize chained bitcasts of the form A->B->A.
Undo r138722 and change isEliminableCastPair to allow this case.

llvm-svn: 138756
2011-08-29 19:58:36 +00:00
Nadav Rotem 52600ee8c3 Bitcasts are transitive. Bitcast-Bitcast-X becomes Bitcast-X.
llvm-svn: 138722
2011-08-28 11:51:08 +00:00
Bill Wendling ba198e661e Auto upgrade the old EH scheme to use the new one. This is on a trial basis. If
things to disasterously over night, this can be reverted.

llvm-svn: 138702
2011-08-27 06:11:03 +00:00
Bill Wendling eed1e8905a Don't sink landingpad instructions during ind-var simplification.
llvm-svn: 138651
2011-08-26 20:40:15 +00:00
Andrew Trick 07aeb629ec Use %% for literals in RUN lines.
llvm-svn: 138647
2011-08-26 20:09:48 +00:00