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

285 Commits

Author SHA1 Message Date
Dan Gohman
dfd828dd87 Remove redundant inline keywords.
llvm-svn: 111192
2010-08-16 21:57:30 +00:00
Dan Gohman
05fbd723d5 Eliminate the TopLevelManagerType enum; instead, just make
PMTopLevelManager's constructor take a PMDataManager *, which already
provides the needed abstraction support.

llvm-svn: 111189
2010-08-16 21:38:42 +00:00
Dan Gohman
88b65340ea Trim #includes.
llvm-svn: 110983
2010-08-12 23:56:03 +00:00
Dan Gohman
6fd1662d06 Tidy up whitespace.
llvm-svn: 110982
2010-08-12 23:50:08 +00:00
Dan Gohman
f6ffbfbbd1 Use .empty() instead of .size().
llvm-svn: 110981
2010-08-12 23:46:28 +00:00
Dan Gohman
48a98809af More #include cleanups.
llvm-svn: 110499
2010-08-07 01:18:18 +00:00
Dan Gohman
9cabe94039 Oops, check in this file too.
llvm-svn: 110496
2010-08-07 01:04:15 +00:00
Dan Gohman
1d48a4b1d7 Tidy some #includes and forward-declarations, and move the C binding code
out of PassManager.cpp and into Core.cpp with the rest of the C binding code.

llvm-svn: 110494
2010-08-07 00:43:20 +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
e5f3371961 Pull out r108755. After offline discussion with Chris, we're going to go a different direction with this.
llvm-svn: 108856
2010-07-20 16:55:05 +00:00
Owen Anderson
5f218b8612 Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch
would cause them to fail the way they are, but none of the other intervening patches seem likely either.

llvm-svn: 108818
2010-07-20 08:26:15 +00:00
Owen Anderson
cf625d0179 Reapply r108794, a fix for the failing test from last time.
llvm-svn: 108813
2010-07-20 06:52:42 +00:00
Daniel Dunbar
3280e3aebf Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

llvm-svn: 108805
2010-07-20 03:06:07 +00:00
Owen Anderson
3502f9a91b Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
llvm-svn: 108794
2010-07-20 01:19:58 +00:00
Owen Anderson
522ef60c01 Change the implemented interfaces list on PassInfo from a std::vector to a manually implemented
linked list.  This is a little slower and involves more malloc'ing, but these lists are
typically short, and it allows PassInfo to be entirely constant initializable.

llvm-svn: 108755
2010-07-19 21:44:48 +00:00
Dan Gohman
745765d0b8 Move several non-performance-critical member functinos out of line.
llvm-svn: 106444
2010-06-21 18:46:45 +00:00
Dan Gohman
1ebf23a692 Revert r103493, materializing functions in the regular PassManager.
It works in simple cases, but it isn't a general solution.

llvm-svn: 103499
2010-05-11 20:30:00 +00:00
Dan Gohman
4c44e690d7 Teach the regular pass manager how to materialize functions as needed.
llvm-svn: 103493
2010-05-11 19:58:43 +00:00
David Greene
dec8f8b802 Fix PR6875:
This includes a patch by Roman Divacky to fix the initial crash.

Move the actual addition of passes from *PassManager::add to
*PassManager::addImpl.  That way, when adding printer passes we won't
recurse infinitely.

Finally, check to make sure that we are actually adding a FunctionPass
to a FunctionPassManager before doing a print before or after it.
Immutable passes are strange in this way because they aren't
FunctionPasses yet they can be and are added to the FunctionPassManager.

llvm-svn: 103425
2010-05-10 20:24:27 +00:00
Benjamin Kramer
0fb23008bb Use twines to simplify calls to report_fatal_error. For code size and readability.
llvm-svn: 100756
2010-04-08 10:44:28 +00:00
Chris Lattner
80b41881bc rename llvm::llvm_report_error -> llvm::report_fatal_error
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
f927d33d8c minor tidying up
llvm-svn: 100702
2010-04-07 22:41:29 +00:00
David Greene
7c81589636 Ok, third time's the charm. No changes from last time except the CMake
source addition.  Apparently the buildbots were wrong about failures.

---

Add some switches helpful for debugging:

-print-before=<Pass Name>

Dump IR before running pass <Pass Name>.

-print-before-all

Dump IR before running each pass.

-print-after-all

Dump IR after running each pass.

These are helpful when tracking down a miscompilation.  It is easy to
get IR dumps and do diffs on them, etc.

To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.

llvm-svn: 100249
2010-04-02 23:17:14 +00:00
Evan Cheng
499918dabf Revert 100204. It broke a bunch of tests and apparently changed what passes are run during codegen.
llvm-svn: 100207
2010-04-02 19:29:15 +00:00
David Greene
554373897c Let's try this again. Re-apply 100143 including an apparent missing
<string> include.  For some reason the buildbot choked on this while my
builds did not.  It's probably due to a difference in system headers.

---

Add some switches helpful for debugging:

-print-before=<Pass Name>

Dump IR before running pass <Pass Name>.

-print-before-all

Dump IR before running each pass.

-print-after-all

Dump IR after running each pass.

These are helpful when tracking down a miscompilation.  It is easy to
get IR dumps and do diffs on them, etc.

To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.

llvm-svn: 100204
2010-04-02 18:46:26 +00:00
Eric Christopher
77e4cc4bbd Revert r100143.
llvm-svn: 100146
2010-04-01 22:54:42 +00:00
David Greene
a358be0ef7 Add some switches helpful for debugging:
-print-before=<Pass Name>

Dump IR before running pass <Pass Name>.

-print-before-all

Dump IR before running each pass.

-print-after-all

Dump IR after running each pass.

These are helpful when tracking down a miscompilation.  It is easy to
get IR dumps and do diffs on them, etc.

To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.

llvm-svn: 100143
2010-04-01 22:43:57 +00:00
Chris Lattner
4424043996 reapply my timer rewrite with a change for PassManager to store
timers by pointer instead of by-value.

llvm-svn: 99871
2010-03-30 04:03:22 +00:00
Chris Lattner
bbb637bacc revert r99862 which is causing FNT failures.
llvm-svn: 99870
2010-03-30 03:57:00 +00:00
Chris Lattner
65efe21d42 fairly major rewrite of various timing related stuff.
llvm-svn: 99862
2010-03-30 02:38:19 +00:00
Erick Tryzelaar
66bf49241f Add Module functions in place of module providers.
llvm-svn: 97608
2010-03-02 23:58:54 +00:00
Dan Gohman
4fc1d1236f Don't print "Modified" for passes which haven't modified anything.
llvm-svn: 97446
2010-03-01 17:34:28 +00:00
Nick Lewycky
1dcde6b319 Don't try to materialize a function that isn't materializable anyways. This
fixes a crash using FPM on a Function that isn't owned by a Module.

llvm-svn: 96273
2010-02-15 21:27:56 +00:00
Jeffrey Yasskin
fb10587e50 Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods.  The bindings to
other languages still use the ModuleProvider concept.  It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.

llvm-svn: 94686
2010-01-27 20:34:15 +00:00
Chris Lattner
c07d7f41e3 elimiante the dynamic_cast's from opt.
llvm-svn: 94160
2010-01-22 06:03:06 +00:00
Chris Lattner
f683d7d909 eliminate a bunch more unneeded dynamic_cast's.
llvm-svn: 94156
2010-01-22 05:37:10 +00:00
Chris Lattner
1bd9c3ec88 eliminate a bunch of dynamic_cast's.
llvm-svn: 94155
2010-01-22 05:24:46 +00:00
Chris Lattner
997ad42b6d eliminate a bunch of dynamic_cast's.
llvm-svn: 94154
2010-01-22 04:55:08 +00:00
Chris Lattner
953394de82 "In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
Patch by James Y Knight!

llvm-svn: 93079
2010-01-09 22:27:07 +00:00
David Greene
3a9e6e8827 Change errs() to dbgs().
llvm-svn: 92660
2010-01-05 01:30:02 +00:00
Bill Wendling
c49babee26 Avoid assigning to Changed when it won't be used after the return.
llvm-svn: 92160
2009-12-25 13:50:18 +00:00
Benjamin Kramer
2d6d1651cf Remove useless calls to c_str().
llvm-svn: 90855
2009-12-08 13:07:38 +00:00
Andreas Neustifter
c427ec12c0 Added debug output for inherited passes that are invalidated.
llvm-svn: 90553
2009-12-04 06:58:24 +00:00
Dan Gohman
29dbc79996 Move FunctionPassManagerImpl's dumpArguments and dumpPasses calls
out of its run function and into its doInitialization method, so
that it does the dump once instead of once per function.

llvm-svn: 89660
2009-11-23 16:24:18 +00:00
Daniel Dunbar
4daaf9d3f4 Pass StringRef by value.
llvm-svn: 86251
2009-11-06 10:58:06 +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
Dan Gohman
bd50ec69e4 Move the dominator verification code out of special code embedded within
the PassManager code into a regular verifyAnalysis method.

Also, reorganize loop verification. Make the LoopPass infrastructure
call verifyLoop as needed instead of having LoopInfo::verifyAnalysis
check every loop in the function after each looop pass. Add a new
command-line argument, -verify-loop-info, to enable the expensive
full checking.

llvm-svn: 82952
2009-09-28 00:27:48 +00:00
Dan Gohman
09f5f7f190 Extend the StartPassTimer and StopPassTimer functions so that the
code that stops the timer doesn't have to search to find the timer
object before it stops the timer. This avoids a lock acquisition
and a few other things done with the timer running.

llvm-svn: 82949
2009-09-28 00:07:05 +00:00