Commit Graph

14 Commits

Author SHA1 Message Date
Craig Topper 9520719b9b Mark some static arrays as const.
llvm-svn: 157377
2012-05-24 06:35:32 +00:00
Eli Friedman fdeaf25827 Fix a stupid typo in MemDepPrinter.
llvm-svn: 146549
2011-12-14 02:54:39 +00:00
Eli Friedman c1702c8f22 Enhance the memdep interface so that users can tell the difference between a dependency which cannot be calculated and a path reaching the entry point of the function. This patch introduces isNonFuncLocal, which replaces isUnknown in some cases.
Patch by Xiaoyi Guo.

llvm-svn: 141896
2011-10-13 22:14:57 +00:00
Eli Friedman 5494adac67 Misc analysis passes that need to be aware of atomic load/store.
llvm-svn: 137650
2011-08-15 20:54:19 +00:00
Eli Friedman 7d58bc7bc0 Add "unknown" results for memdep, which mean "I don't know whether a dependence for the given instruction exists in the given block". This cleans up all the existing hacks in memdep which represent this concept by returning clobber with various unrelated instructions.
llvm-svn: 133031
2011-06-15 00:47:34 +00:00
Dan Gohman 65316d6749 Add helper functions for computing the Location of load, store,
and vaarg instructions.

llvm-svn: 118845
2010-11-11 21:50:19 +00:00
Dan Gohman 0a6021a54d Enhance GVN to do more precise alias queries for non-local memory
references. For example, this allows gvn to eliminate the load in
this example:

  void foo(int n, int* p, int *q) {
    p[0] = 0;
    p[1] = 1;
    if (n) {
      *q = p[0];
    }
  }

llvm-svn: 118714
2010-11-10 20:37:15 +00:00
Dan Gohman 1b85604130 Memdep says that an instruction clobbers itself
when it means there is no specific clobber instruction.

llvm-svn: 116960
2010-10-20 22:37:41 +00:00
Owen Anderson 6c18d1aac0 Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor.  This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes.  Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin.  It is possible that there are problems
with the static dependencies that will only be visible with non-standard options.  If you encounter any crash in pass
registration/creation, please send the testcase to me directly.

llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Owen Anderson 8ac477ffb5 Begin adding static dependence information to passes, which will allow us to
perform initialization without static constructors AND without explicit initialization
by the client.  For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve.  I hope to be able to relax
the latter requirement in the future.

llvm-svn: 116334
2010-10-12 19:48:12 +00:00
Owen Anderson df7a4f2515 Now with fewer extraneous semicolons!
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Dan Gohman 2fa59799d9 Add an #include of raw_ostream.h. Previously, this only compiled
because it was using Twine.h's declaration of operator<<(const Twine &).

llvm-svn: 114141
2010-09-17 00:33:43 +00:00
Dan Gohman f4925061af Rename a variable to avoid a declaration conflict.
llvm-svn: 114126
2010-09-16 22:50:09 +00:00
Dan Gohman ee74402fe6 Add a pass which prints out all the memdep dependencies.
llvm-svn: 114121
2010-09-16 22:08:32 +00:00