1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

3557 Commits

Author SHA1 Message Date
Chris Lattner
cc315726f7 Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.

llvm-svn: 42042
2007-09-17 18:34:04 +00:00
Dan Gohman
2de5779a99 Instcombine x-((x/y)*y) into a remainder operator.
llvm-svn: 42035
2007-09-17 17:31:57 +00:00
Duncan Sands
901cb2662d Factor the trampoline transformation into a subroutine.
llvm-svn: 42021
2007-09-17 10:26:40 +00:00
Owen Anderson
fd6ec5cf82 Be more careful when constant-folding PHI nodes.
llvm-svn: 41998
2007-09-16 08:04:16 +00:00
Owen Anderson
fe5adad9c4 Remove RLE. It is subsumed by GVN.
llvm-svn: 41968
2007-09-14 22:33:52 +00:00
Dale Johannesen
575bd6070a Remove the assumption that FP's are either float or
double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).

llvm-svn: 41967
2007-09-14 22:26:36 +00:00
Chris Lattner
601d09bf08 Fix a logic error in ValueIsOnlyUsedLocallyOrStoredToOneGlobal that caused
miscompilation of 188.ammp.  Reject select and bitcast in 
ValueIsOnlyUsedLocallyOrStoredToOneGlobal because RewriteHeapSROALoadUser can't handle it.

llvm-svn: 41950
2007-09-14 03:41:21 +00:00
Chris Lattner
9c3cd36dd0 silence a bogus gcc warning.
llvm-svn: 41949
2007-09-14 03:07:24 +00:00
Bill Wendling
843ac5aebe Temporary reverting r41817
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053370.html). It's
causing SPASS to fail.

llvm-svn: 41938
2007-09-14 01:13:55 +00:00
Chris Lattner
f3448236f8 Teach GlobalLoadUsesSimpleEnoughForHeapSRA and the SROA rewriter how to handle
a limited form of PHI nodes.  This finally fixes PR1639, speeding 179.art up
from 7.84s to 3.13s on PPC.

llvm-svn: 41933
2007-09-13 21:31:36 +00:00
Chris Lattner
c5d83b7270 be tolerant of PHI nodes when rewriting heap SROA code. This is a step
along the way of PR1639

llvm-svn: 41930
2007-09-13 18:00:31 +00:00
Chris Lattner
c9f2f2dd92 refactor some code, no functionality change. On the path to PR1639
llvm-svn: 41929
2007-09-13 17:29:05 +00:00
Chris Lattner
31d34baa89 Make ValueIsOnlyUsedLocallyOrStoredToOneGlobal smart enough to see through
bitcasts and phis.  This is a step to fixing PR1639.

llvm-svn: 41928
2007-09-13 16:37:20 +00:00
Chris Lattner
b83dee72ee Make AllUsesOfLoadedValueWillTrapIfNull strong enough to see through PHI
nodes.  This is the first step of the fix for PR1639.

llvm-svn: 41927
2007-09-13 16:30:19 +00:00
Chris Lattner
d58e0026ec Change llvm.gcroot to not init the root to null at runtime, this prevents
using it for live-in values etc.

llvm-svn: 41879
2007-09-12 17:53:10 +00:00
Duncan Sands
c63fd15cd9 Turn calls to trampolines into calls to the underlying
nested function.

llvm-svn: 41844
2007-09-11 14:35:41 +00:00
Devang Patel
8f8fe2f0da Avoid negative logic.
llvm-svn: 41829
2007-09-11 01:10:45 +00:00
Devang Patel
9bc265b94a Refactor code into a separate method.
llvm-svn: 41826
2007-09-11 00:42:56 +00:00
Devang Patel
49ffe783eb Clear split info object.
llvm-svn: 41823
2007-09-11 00:23:56 +00:00
Devang Patel
8394964f1a Split condition does not have to be ICmpInst in all cases.
llvm-svn: 41822
2007-09-11 00:12:56 +00:00
Devang Patel
82374f7476 Check all terminators inside loop.
llvm-svn: 41821
2007-09-10 23:57:58 +00:00
Chris Lattner
3ace09794b remove some dead code, this is handled by constant folding.
llvm-svn: 41819
2007-09-10 23:46:29 +00:00
Devang Patel
ce76c29be0 Swap exit condition operands if it works.
llvm-svn: 41817
2007-09-10 23:34:06 +00:00
Chris Lattner
ab8aa7d61a Prevent tailcallelim from breaking "recursive" calls to builtins.
llvm-svn: 41804
2007-09-10 20:58:55 +00:00
Devang Patel
76790c1b28 Filter exit conditions which are not yet handled.
llvm-svn: 41800
2007-09-10 18:33:42 +00:00
Devang Patel
7a759cdfd7 Require SCEV before LCSSA.
llvm-svn: 41798
2007-09-10 18:08:23 +00:00
Chris Lattner
8e6c39d961 Don't zap back to back volatile load/stores
llvm-svn: 41759
2007-09-07 05:33:03 +00:00
Dale Johannesen
86f367a6b7 Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)

llvm-svn: 41747
2007-09-06 18:13:44 +00:00
Nick Lewycky
79e179ff1f Use isTrueWhenEqual. Thanks Chris!
llvm-svn: 41741
2007-09-06 02:40:25 +00:00
Nick Lewycky
2f66503c0a When the two operands of an icmp are equal, there are five possible predicates
that would make the icmp true. Fixes PR1637.

llvm-svn: 41740
2007-09-06 01:10:22 +00:00
Chuck Rose III
4f602f5eba Forgot to obey 80 column rule. Fixing that.
llvm-svn: 41725
2007-09-05 20:36:41 +00:00
Chuck Rose III
a1061872a7 Added default parameters to GetElementPtrInstr constructor call. Visual Studio 2k5 was getting confused and was unable to compile it. Suspected compiler error.
llvm-svn: 41721
2007-09-05 16:54:38 +00:00
Devang Patel
2cebc6f649 Insert cloned loop basic blocks before original loop header.
llvm-svn: 41713
2007-09-04 20:46:35 +00:00
David Greene
8cda5af2e7 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.

llvm-svn: 41697
2007-09-04 15:46:09 +00:00
Anton Korobeynikov
5b49f44609 Silence warning while compiling with gcc 4.2
llvm-svn: 41676
2007-09-02 22:11:14 +00:00
Evan Cheng
9c7cff8e62 Fix a gcroot lowering bug.
llvm-svn: 41668
2007-09-01 02:00:51 +00:00
Chris Lattner
73aa3d62dc Cut off crazy computation. This helps PR1622 slightly.
llvm-svn: 41522
2007-08-28 04:23:55 +00:00
Devang Patel
c649f24384 Use simpler test to filter loops.
llvm-svn: 41516
2007-08-27 21:34:31 +00:00
David Greene
5b85021be8 Update InvokeInst to work like CallInst
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Dan Gohman
0b3fc43d5e Change comments to refer to @malloc and @free instead of %malloc and %free.
llvm-svn: 41488
2007-08-27 16:11:48 +00:00
Anton Korobeynikov
3dffac0c59 Don't promote volatile loads/stores. This is needed (for example) to handle setjmp/longjmp properly.
This fixes PR1520.

llvm-svn: 41461
2007-08-26 21:43:30 +00:00
Owen Anderson
f660f11ec4 Don't DSe volatile stores.
llvm-svn: 41456
2007-08-26 21:14:47 +00:00
Devang Patel
cbfa564c1c Move exit condition and exit branch from exiting block into loop header and dominator info. This avoid execution of dead iteration. Loop is already filter in the beginning such that this change is safe.
llvm-svn: 41394
2007-08-25 02:39:24 +00:00
Devang Patel
d961a55c5a Constant split values needs upper bound and lower bound check, just like any other split value.
llvm-svn: 41389
2007-08-25 01:09:14 +00:00
Devang Patel
027410a7aa While calculating upper loop bound for first loop and lower loop bound for second loop, take care of edge cases.
llvm-svn: 41387
2007-08-25 00:56:38 +00:00
Devang Patel
c46dc61548 Fix regression that I caused yesterday night while adding logic to select appropriate split condition branch.
llvm-svn: 41365
2007-08-24 19:32:26 +00:00
Devang Patel
0b351a64db It is not safe to execute split condition's true branch first all the time. If split
condition predicate is GT or GE then execute false branch first.

llvm-svn: 41358
2007-08-24 06:17:19 +00:00
Devang Patel
59af13f0cf Reject ICMP_NE as index split condition.
llvm-svn: 41357
2007-08-24 06:02:25 +00:00
Devang Patel
4b52632179 Tightenup loop filter.
llvm-svn: 41356
2007-08-24 05:36:56 +00:00
Devang Patel
8b1d0a1ad2 Remove incomplete cost analysis.
llvm-svn: 41354
2007-08-24 05:21:13 +00:00