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

6809 Commits

Author SHA1 Message Date
Gabor Greif
6bf330181d employ CallInst::ArgOffset (for now)
llvm-svn: 107015
2010-06-28 16:43:57 +00:00
Gabor Greif
2d08791c84 use setArgOperand
llvm-svn: 107004
2010-06-28 12:31:35 +00:00
Gabor Greif
98947dcd6d use CallInst::ArgOffset
llvm-svn: 107003
2010-06-28 12:30:07 +00:00
Gabor Greif
1c2bae559b use ArgOperand API and CallInst::ArgOffset
llvm-svn: 107002
2010-06-28 12:29:20 +00:00
Gabor Greif
e57b886f3d use cached value
llvm-svn: 107000
2010-06-28 11:20:42 +00:00
Chris Lattner
d3a1ef7fea minor cleanup to SROA: when lowering type unsafe accesses to
large integers, the first inserted value would always create
an 'or X, 0'.  Even though this is trivially zapped by
instcombine, don't bother creating this pointless instruction.

llvm-svn: 106979
2010-06-27 07:58:26 +00:00
Duncan Sands
68f39e00a4 Fix PR7328: when turning a tail recursion into a loop, need to preserve
the returned value after the tail call if it differs from other return
values.  The optimal thing to do would be to introduce a phi node for
the return value, but for the moment just fix the miscompile.

llvm-svn: 106947
2010-06-26 12:53:31 +00:00
Dan Gohman
bf52a2b872 In GenerateReassociations, don't bother thinking about individual
SCEVUnknown values which are loop-variant, as LSR can't do anything
interesting with these values in any case. This fixes very slow compile
times on loops which have large numbers of such values.

llvm-svn: 106897
2010-06-25 22:32:18 +00:00
Dale Johannesen
b1fc776fca The hasMemory argument is irrelevant to how the argument
for an "i" constraint should get lowered; PR 6309.  While
this argument was passed around a lot, this is the only
place it was used, so it goes away from a lot of other
places.

llvm-svn: 106893
2010-06-25 21:55:36 +00:00
Gabor Greif
42cbeeeb2e use ArgOperand API (one more hunk I could split)
llvm-svn: 106825
2010-06-25 07:58:41 +00:00
Gabor Greif
d2559bceee use ArgOperand API (some hunks I could split)
llvm-svn: 106824
2010-06-25 07:57:14 +00:00
Gabor Greif
7e08d99fd4 use ArgOperand API; tighten type of handleFreeWithNonTrivialDependency to be able to use isFreeCall whithout a cast or new overload
llvm-svn: 106823
2010-06-25 07:40:32 +00:00
Dan Gohman
b9c2ab6698 Add an exports file for the Hello example plugin.
llvm-svn: 106768
2010-06-24 17:36:51 +00:00
Dan Gohman
dc46a52b6a A few minor micro-optimizations.
llvm-svn: 106764
2010-06-24 16:57:52 +00:00
Dan Gohman
006947c4da Teach getExactSDiv to evaluate x/1 to x up front, as it's a common
enough special case, and it theoretically allows more folding because
it works even when x is unanalyzable.

llvm-svn: 106763
2010-06-24 16:51:25 +00:00
Dan Gohman
bb9ce7fbcd Fix copy+pasto issues in isMulSExtable.
llvm-svn: 106759
2010-06-24 16:45:11 +00:00
Gabor Greif
b81fcc907e use ArgOperand API
llvm-svn: 106752
2010-06-24 16:11:44 +00:00
Gabor Greif
04a3ec3771 use (even more, still) ArgOperand API
llvm-svn: 106750
2010-06-24 15:51:11 +00:00
Gabor Greif
520f2c6cb9 use ArgOperand API and CallSite for arg range; add necessary casts and perform some cosmetics
llvm-svn: 106747
2010-06-24 14:42:01 +00:00
Gabor Greif
63d0d93613 use ArgOperand API and CallSite for arg range
llvm-svn: 106745
2010-06-24 14:13:36 +00:00
Gabor Greif
55a6d5f8c5 use (even more) ArgOperand API
llvm-svn: 106744
2010-06-24 13:54:33 +00:00
Gabor Greif
37ff2f8455 use ArgOperand API
llvm-svn: 106743
2010-06-24 13:42:49 +00:00
Gabor Greif
f53212a5a3 use ArgOperand API
llvm-svn: 106740
2010-06-24 12:58:35 +00:00
Gabor Greif
c7140da218 use ArgOperand API
llvm-svn: 106737
2010-06-24 12:35:13 +00:00
Gabor Greif
847eba58d8 use ArgOperand API, also tighten the type of visitFree to make this work out smoothly
llvm-svn: 106736
2010-06-24 12:21:15 +00:00
Gabor Greif
06307766e9 use ArgOperand API; introduce downcasted pointers into scope to facilitate this
llvm-svn: 106734
2010-06-24 12:03:56 +00:00
Gabor Greif
29b71efff8 use ArgOperand API
llvm-svn: 106731
2010-06-24 10:42:46 +00:00
Gabor Greif
014e415167 use ArgOperand API
llvm-svn: 106730
2010-06-24 10:17:17 +00:00
Gabor Greif
37d6595a5d use callsite to obtain all arguments
llvm-svn: 106729
2010-06-24 10:04:07 +00:00
Gabor Greif
14afc1e2d9 use callsite to obtain all arguments
llvm-svn: 106728
2010-06-24 09:56:43 +00:00
Gabor Greif
39ff38468c use getNumArgOperands
llvm-svn: 106709
2010-06-24 00:48:48 +00:00
Gabor Greif
1d1526999b use ArgOperand API
llvm-svn: 106707
2010-06-24 00:44:01 +00:00
Devang Patel
0c927a80fe Use ValueMap instead of DenseMap.
The ValueMapper used by various cloning utility maps MDNodes also.

llvm-svn: 106706
2010-06-24 00:33:28 +00:00
Devang Patel
ad744f3fa3 Use available typedef for " DenseMap<const Value*, Value*>".
llvm-svn: 106699
2010-06-24 00:00:42 +00:00
Devang Patel
373b10cbaa Cosmetic change.
Do not use "ValueMap" as a name for a local variable or an argument.

llvm-svn: 106698
2010-06-23 23:55:51 +00:00
Devang Patel
1967a51efc Revert 106592 for now. It causes clang-selfhost build failure.
llvm-svn: 106598
2010-06-22 23:29:55 +00:00
Dan Gohman
2ac2a33a1b Fix OptimizeMax to handle an odd case where one of the max operands
is another max which folds. This fixes PR7454.

llvm-svn: 106594
2010-06-22 23:07:13 +00:00
Devang Patel
a24bf5907c If a metadata operand is seeded in value map and the metadata should also be seeded in value map. This is not limited to function local metadata.
Failure to seed metdata in such cases causes troubles when in a cloned module, metadata from a new module refers to values in old module. Usually this results in mysterious bugpoint crashes. For example,

 Checking to see if we can delete global inits: Unknown constant!
 UNREACHABLE executed at /d/g/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:904!

llvm-svn: 106592
2010-06-22 22:53:21 +00:00
Devang Patel
dca60347e5 While cloning a module, clone metadata attached with instructions.
llvm-svn: 106591
2010-06-22 22:50:42 +00:00
Devang Patel
eba73529a6 Clone named metadata while cloning a module.
Reapply Bob's patch.

llvm-svn: 106560
2010-06-22 18:52:38 +00:00
Dan Gohman
74d5144414 Use pre-increment instead of post-increment when the result is not used.
llvm-svn: 106542
2010-06-22 15:08:57 +00:00
Devang Patel
981ff4464c Revert 106528. It is causing self host failures.
llvm-svn: 106529
2010-06-22 06:14:09 +00:00
Devang Patel
d5696fa05b Do not rely on DenseMap slot which can be easily invalidated when DenseMap grows.
llvm-svn: 106528
2010-06-22 05:16:56 +00:00
Bob Wilson
714eba185c Revert my change to clone named metadata. Buildbots are complaining.
--- Reverse-merging r106508 into '.':
U    lib/Transforms/Utils/CloneModule.cpp

llvm-svn: 106521
2010-06-22 02:08:51 +00:00
Bob Wilson
6a07aa9ae8 Include named metadata when cloning a module.
llvm-svn: 106508
2010-06-22 00:11:03 +00:00
Dan Gohman
6a3c46ad49 Use A.append(...) instead of A.insert(A.end(), ...) when A is a
SmallVector, and other SmallVector simplifications.

llvm-svn: 106452
2010-06-21 19:47:52 +00:00
Dan Gohman
565876f980 Add a TODO comment.
llvm-svn: 106397
2010-06-19 21:30:18 +00:00
Dan Gohman
fcb0f1936b Include the use kind along with the expression in the key of the
use sharing map. The reconcileNewOffset logic already forces a
separate use if the kinds differ, so incorporating the kind in the
key means we can track more sharing opportunities.

More sharing means fewer total uses to track, which means smaller
problem sizes, which means the conservative throttles don't kick
in as often.

llvm-svn: 106396
2010-06-19 21:29:59 +00:00
Dan Gohman
5d3629eaa0 Don't include things in anonymous namespaces that don't need it.
llvm-svn: 106395
2010-06-19 21:21:39 +00:00
Dan Gohman
e375e96f0d Disable indvars on loops when LoopSimplify form is not available.
This fixes PR7333.

llvm-svn: 106267
2010-06-18 01:35:11 +00:00