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

20 Commits

Author SHA1 Message Date
Owen Anderson
46990c17f7 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
Benjamin Kramer
a0e156fe6d Eliminate some calls to Value::getNameStr.
llvm-svn: 116670
2010-10-16 11:28:23 +00:00
Owen Anderson
63f757463c 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
69cbf2e8b7 Now with fewer extraneous semicolons!
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Owen Anderson
f2fea95f2f Reapply r110396, with fixes to appease the Linux buildbot gods.
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
aadd8a89ca Revert r110396 to fix buildbots.
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
b9762c07cb Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.

llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Owen Anderson
f8addbb0a1 Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
llvm-svn: 109045
2010-07-21 22:09:45 +00:00
Gabor Greif
c637593cda rename pred_const_iterator to const_pred_iterator for consistency's sake
llvm-svn: 99567
2010-03-25 23:25:28 +00:00
David Greene
f2377def25 Convert debug messages to use dbgs(). Generally this means
s/errs/dbgs/g except for certain special cases.

llvm-svn: 92066
2009-12-23 22:10:20 +00:00
Andreas Neustifter
aed28d814f Convert ProfileVerifier to template so it can be used for different types of ProfileInfo.
llvm-svn: 90451
2009-12-03 12:55:57 +00:00
Edward O'Callaghan
64a2e8f6a5 Apply fix for PR5135, Credit to Andreas Neustifter.
llvm-svn: 85779
2009-11-02 02:55:39 +00:00
Nick Lewycky
711c726c97 Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.

llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Andreas Neustifter
13935bc5be Bugfix. Sorry.
llvm-svn: 81517
2009-09-11 08:43:15 +00:00
Andreas Neustifter
9d49ec27fa Make ProfileEstimator even more robust on general CFGs.
llvm-svn: 81516
2009-09-11 08:39:33 +00:00
Andreas Neustifter
7a526c9491 Make ProfileEstimator more robust on general CFGs.
llvm-svn: 81450
2009-09-10 16:30:38 +00:00
Andreas Neustifter
14bc5768e0 Fixed wrong storage option for ProfileVerifierDisableAssertions.
Fixed non working -profile-verifier-noassert option.
Fixed missing newline in debugEntry().
Cleaned up assert messages. (assert(0 && Message) is still shown, but the message is printed before.)
When verifiying loaded profiles the ProfileVerifier got confused when block was a setjmp target, this is checked now.
When verifiying loaded profiles the ProfileVerifier got confused when block eventually reaching an exit(), this is checked now.

llvm-svn: 81338
2009-09-09 13:01:03 +00:00
Andreas Neustifter
bba38af145 Prevent warnings on compilers for which its not clear that assert won't return.
llvm-svn: 81044
2009-09-04 21:22:04 +00:00
Andreas Neustifter
a956e23520 Cleaned up ProfileVerifierPass.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086219.html)

llvm-svn: 81007
2009-09-04 17:15:10 +00:00
Andreas Neustifter
d2c2f12f1e Preparation for Optimal Edge Profiling:
This adds a pass to verify the current profile against the flow conditions.
This is very helpful when later on trying to perserve the profiling information
during all passes.

llvm-svn: 80666
2009-09-01 08:48:42 +00:00