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

3583 Commits

Author SHA1 Message Date
Dan Gohman
d1bf1d8013 Implement PartialAlias checking in BasicAA.
llvm-svn: 121520
2010-12-10 20:47:03 +00:00
Dan Gohman
b0fa0f7849 Minimally update this code to handle PartialAlias.
llvm-svn: 121518
2010-12-10 20:14:49 +00:00
Dan Gohman
98f5b2ae22 Use PartialAlias to do better noalias lint checking.
llvm-svn: 121514
2010-12-10 20:04:06 +00:00
Dan Gohman
cbee92bb65 Teach AliasAnalysisCounter about PartialAlias.
llvm-svn: 121513
2010-12-10 19:53:05 +00:00
Dan Gohman
26e1b4ac11 Teach AliasAnalysisEvaluator about PartialAlias.
llvm-svn: 121512
2010-12-10 19:52:40 +00:00
Dan Gohman
9e03ffc789 Update this code to handle PartialAlias as MayAlias.
llvm-svn: 121508
2010-12-10 19:40:47 +00:00
Owen Anderson
a882a78d4b Take the first step towards making LVI non-recursive: get rid of the LVIQuery abstraction.
llvm-svn: 121357
2010-12-09 06:14:58 +00:00
Devang Patel
e515e18523 Use type's file info while describing inheritance relationship.
llvm-svn: 121289
2010-12-08 21:46:37 +00:00
Devang Patel
90fd70aa09 Add support to create debug info for functions and methods.
llvm-svn: 121281
2010-12-08 20:42:44 +00:00
Devang Patel
53f05af4c1 Add support to create class type.
llvm-svn: 121279
2010-12-08 20:18:20 +00:00
Devang Patel
b7a7988b6b Add support to create vector, array, enums etc...
llvm-svn: 121224
2010-12-08 01:50:15 +00:00
Devang Patel
0c0accf6bc Global variable does not need linkage name.
llvm-svn: 121212
2010-12-08 00:06:22 +00:00
Devang Patel
bdbff5f106 Add support to create local variable's debug info.
llvm-svn: 121211
2010-12-07 23:58:00 +00:00
Devang Patel
cef2982b39 Add support to create variables, structs etc.. using DIBuilder.
This is still work in progress.

llvm-svn: 121205
2010-12-07 23:25:47 +00:00
Jay Foad
79e18ed269 PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.

llvm-svn: 121120
2010-12-07 08:25:19 +00:00
Jakob Stoklund Olesen
6f535251de Also inore '()' while creating mdnode name from ObjC symbol name.
llvm-svn: 120856
2010-12-03 23:40:45 +00:00
Devang Patel
fdc570cad4 Ignore '+' while creating mdnode name from ObjC symbol name.
llvm-svn: 120853
2010-12-03 23:29:30 +00:00
Jay Foad
789e8ac4f7 PR5207: Rename overloaded APInt methods set(), clear(), flip() to
setAllBits(), setBit(unsigned), etc.

llvm-svn: 120564
2010-12-01 08:53:58 +00:00
Chris Lattner
58b829f94c move GetPointerBaseWithConstantOffset out of GVN into ValueTracking.h
llvm-svn: 120476
2010-11-30 22:25:26 +00:00
Jay Foad
c663d7e4f6 PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.
llvm-svn: 120413
2010-11-30 09:02:01 +00:00
Chris Lattner
84d3d220c1 strength reduce this.
llvm-svn: 120381
2010-11-30 01:56:13 +00:00
Chris Lattner
cbe6b88afe getLocationForDest should work for memset as well.
llvm-svn: 120380
2010-11-30 01:48:20 +00:00
Chris Lattner
083731f3d6 enhance basicaa to return "Mod" for a memcpy call when the
queried location doesn't overlap the source, and add a testcase.

llvm-svn: 120370
2010-11-30 00:43:16 +00:00
Chris Lattner
8ec1830a01 Teach basicaa that memset's modref set is at worst "mod" and never
contains "ref".

Enhance DSE to use a modref query instead of a store-specific hack
to generalize the "ignore may-alias stores" optimization to handle
memset and memcpy.

llvm-svn: 120368
2010-11-30 00:28:45 +00:00
Frits van Bommel
6610b43890 Teach ConstantFoldInstruction() how to fold insertvalue and extractvalue.
llvm-svn: 120316
2010-11-29 20:36:52 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Chandler Carruth
12806a53f3 Add some dead stores to pacify my least favorite GCC warning: may be
uninitialized. The warning is terrible, has incorrect source locations, and has
a huge false positive rate such as *all* of these.

If anyone has a better solution, please let me know. Alternatively, I'll
happily add -Wno-uninitialized to the -Werror build mode. Maybe I can even do
it *only* when building with GCC instead of Clang.

llvm-svn: 120281
2010-11-29 01:41:13 +00:00
Duncan Sands
97ada840ed Expand a little on the description of what InstructionSimplify does.
llvm-svn: 120016
2010-11-23 10:50:08 +00:00
Duncan Sands
809b3e3634 Clarify that constant folding of instructions applies when all operands
are constant.  There was in fact one exception to this (phi nodes) - so
remove that exception (InstructionSimplify handles this so there should
be no loss).

llvm-svn: 120015
2010-11-23 10:16:18 +00:00
Duncan Sands
73f0559779 If a GEP index simply advances by multiples of a type of zero size,
then replace the index with zero.

llvm-svn: 119974
2010-11-22 16:32:50 +00:00
Duncan Sands
ffcd1f61d9 Move the "gep undef" -> "undef" transform from instcombine to
InstructionSimplify.

llvm-svn: 119970
2010-11-22 13:42:49 +00:00
Benjamin Kramer
3fb7d5556c Initialize MemDep's TD member so buildbots don't trip over an uninitialized pointer (TD is passed to PHITransAddr).
I wonder why this didn't explode earlier.

llvm-svn: 119944
2010-11-21 15:21:46 +00:00
Duncan Sands
c2b128ad7d Add a rather pointless InstructionSimplify transform, inspired by recent constant
folding improvements: if P points to a type of size zero, turn "gep P, N" into "P".
More generally, if a gep index type has size zero, instcombine could replace the
index with zero, but that is not done here.

llvm-svn: 119942
2010-11-21 13:53:09 +00:00
Duncan Sands
4ef7e7f158 Fix spelling.
llvm-svn: 119941
2010-11-21 12:43:13 +00:00
Chris Lattner
1b3dffa2d1 apply Dan's fix for PR8268 which allows constant folding to handle indexes over
zero sized elements.  This allows us to compile:

  #include <string>
  void foo() { std::string s; }

into an empty function.

llvm-svn: 119933
2010-11-21 08:39:01 +00:00
Chris Lattner
a39a40d351 add "getLocation" method to AliasAnalysis for getting the source and
destination location of a memcpy/memmove.  I'm not clear about whether
TBAA works on these, so I'm leaving it out for now.  Dan, please revisit
this when convenient.

llvm-svn: 119928
2010-11-21 07:51:27 +00:00
Chris Lattner
3a0edfb37c implement PR8576, deleting dead stores with intervening may-alias stores.
llvm-svn: 119927
2010-11-21 07:34:32 +00:00
Benjamin Kramer
9141603779 Simplify code. No change in functionality.
llvm-svn: 119908
2010-11-20 18:43:35 +00:00
Benjamin Kramer
821c39433d Silence warning about an uninitialized variable.
llvm-svn: 119800
2010-11-19 11:37:26 +00:00
Duncan Sands
56aefef080 Remove threading of Xor over selects and phis, with an explanation
of why such threading is pointless.

llvm-svn: 119798
2010-11-19 09:20:39 +00:00
Duncan Sands
4562d3b919 Factor code for testing whether replacing one value with another
preserves LCSSA form out of ScalarEvolution and into the LoopInfo
class.  Use it to check that SimplifyInstruction simplifications
are not breaking LCSSA form.  Fixes PR8622.

llvm-svn: 119727
2010-11-18 19:59:41 +00:00
Dan Gohman
87b78a4726 Strip trailing whitespace.
llvm-svn: 119706
2010-11-18 17:06:31 +00:00
Dan Gohman
99ac1c6b83 Use llvm_unreachable for "impossible" situations.
llvm-svn: 119705
2010-11-18 17:05:57 +00:00
Dan Gohman
ec75e876ab Add support for PHI-translating sext, zext, and trunc instructions,
enabling more PRE. PR8586.

llvm-svn: 119704
2010-11-18 17:05:13 +00:00
Dan Gohman
3213622610 Introduce memoization for ScalarEvolution dominates and properlyDominates
queries, and SCEVExpander getRelevantLoop queries.

llvm-svn: 119595
2010-11-18 00:34:22 +00:00
Dan Gohman
ecff21cc67 Factor out the code for purging a SCEV from all the various memoization maps.
Some of these maps may merge in the future, but for now it's convenient to have
a utility function for them.

llvm-svn: 119587
2010-11-17 23:28:48 +00:00
Dan Gohman
8e594dfe39 Merge the implementations of isLoopInvariant and hasComputableLoopEvolution, and
memoize the results. This improves compile time in code which highly complex
expressions which get queried many times.

llvm-svn: 119584
2010-11-17 23:21:44 +00:00
Dan Gohman
fb6ea18d0a Make SCEV::getType() and SCEV::print non-virtual. Move SCEV::hasOperand
to ScalarEvolution. Delete SCEV::~SCEV. SCEV is no longer virtual.

llvm-svn: 119578
2010-11-17 22:27:42 +00:00
Dan Gohman
9bbb0fa515 Move SCEV::dominates and properlyDominates to ScalarEvolution.
llvm-svn: 119570
2010-11-17 21:41:58 +00:00
Dan Gohman
04df5af12b Move SCEV::isLoopInvariant and hasComputableLoopEvolution to be member
functions of ScalarEvolution, in preparation for memoization and
other optimizations.

llvm-svn: 119562
2010-11-17 21:23:15 +00:00