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

77 Commits

Author SHA1 Message Date
Chris Lattner
9cece85acb Use a set to keep track of which edges have been noticed as executable already
to avoid reprocessing PHI nodes needlessly.  This speeds up the big bad PHI
testcase 43%: from 104.9826 to 73.5157s

llvm-svn: 8964
2003-10-08 16:55:34 +00:00
Chris Lattner
251ff679ce Minor fixes here and there
llvm-svn: 8963
2003-10-08 16:21:03 +00:00
Chris Lattner
36960b263b Avoid building data structures we don't really need. This improves the runtime
of a test that Bill Wendling sent me from 228.5s to 105s.  Obviously there is
more improvement to be had, but this is a nice speedup which should be "felt"
by many programs.

llvm-svn: 8962
2003-10-08 15:47:41 +00:00
Chris Lattner
4ad8720f91 Add support for the unwind instruction
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner
491ea39105 Fix bug: SCCP/2003-08-26-InvokeHandling.ll
llvm-svn: 8152
2003-08-27 01:08:35 +00:00
Misha Brukman
56f7db4178 Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
686e94e760 DEBUG got moved to Support/Debug.h
llvm-svn: 7492
2003-08-01 22:15:03 +00:00
Chris Lattner
867b7661cb Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.ll
llvm-svn: 6883
2003-06-24 20:29:52 +00:00
Misha Brukman
825e174bf7 Hopefully, the final fix for `[Pp]ropogate'.
llvm-svn: 6251
2003-05-20 21:01:22 +00:00
Chris Lattner
a7ee27e0fd Handle va_arg instruction correctly
llvm-svn: 6030
2003-05-08 02:50:13 +00:00
Chris Lattner
c78cd5c758 Fix major problem with PHI node traversal: rechecking PHIs should go into
the visit function.  The worklist is for when their lattice value changes.

llvm-svn: 5927
2003-04-25 03:35:10 +00:00
Chris Lattner
7b67a6e77d Minor non-functional changes:
* Spell propagate right
  * Improve performance of phi node handling
  * Delete using directive
  * Other minor changes

llvm-svn: 5920
2003-04-25 02:50:03 +00:00
Chris Lattner
db6b7ba364 Remove unnecesary &*'s
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
b9fa84c1ed Make sure to _delete_ memory allocated by worklists
llvm-svn: 4523
2002-11-04 02:54:22 +00:00
Misha Brukman
c9c721edf0 Fix spelling of `propagate'.
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
b565d3ac5b - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.

llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner
7cf9f6f4b1 Updates to work with recent Statistic's changes:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.

llvm-svn: 4002
2002-10-01 22:38:41 +00:00
Chris Lattner
bb8f1a072b - Implement SCCP of getelementptr instructions
- Implement SCCP of globals into ConstantExprs hopefully opening new
   opportunities for more SCCP.

llvm-svn: 3555
2002-08-30 23:39:00 +00:00
Chris Lattner
20b85d96e4 Eliminated the MemAccessInst class, folding contents into GEP class.
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
34a9a81756 Remove extra #includes
llvm-svn: 3322
2002-08-14 18:17:32 +00:00
Chris Lattner
c264beb7c5 Remove support for unary operators
llvm-svn: 3318
2002-08-14 17:53:45 +00:00
Chris Lattner
7a9eb848cd * Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses

llvm-svn: 3113
2002-07-26 21:12:46 +00:00
Chris Lattner
c482880f9e *** empty log message ***
llvm-svn: 3016
2002-07-23 18:06:35 +00:00
Chris Lattner
dfd421a7df MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
1f2723a2c9 Use the new DEBUG(x) macro to allow debugging code to be enabled on the commandline
llvm-svn: 2713
2002-05-22 17:17:27 +00:00
Chris Lattner
245c8615e4 Fix bug: test/Regression/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
Improperly handling edges... by not marking them alive properly

llvm-svn: 2707
2002-05-22 16:07:20 +00:00
Chris Lattner
c3d944c4f7 Fix bug: test/Regression/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
That was causing a miscompilation of strtol/atoi plus others

llvm-svn: 2669
2002-05-20 20:48:03 +00:00
Chris Lattner
adba963886 Add support for printing out statistics information when -stats is added to
the command line

llvm-svn: 2601
2002-05-10 15:38:35 +00:00
Chris Lattner
2a43c7c03d Merge all individual .h files into a single Scalar.h file
llvm-svn: 2537
2002-05-07 20:03:00 +00:00
Chris Lattner
a35a291f7b Add #include no longer included by llvm/Transforms/Scalar/ConstantProp.h
llvm-svn: 2517
2002-05-07 18:11:30 +00:00
Chris Lattner
394781b660 * Convert InstWorkList to vector instead of set, because on big programs it
is empirically faster by a noticable margin, even though duplicates can
  happen.

llvm-svn: 2511
2002-05-07 04:29:32 +00:00
Chris Lattner
d12eac0b1b Implement constant propogation of shift instructions
llvm-svn: 2471
2002-05-06 03:01:37 +00:00
Chris Lattner
9606fd4830 Ok, really it only takes me 3 times to get this right!
Now use #if 0 instead of #ifdef 0

llvm-svn: 2448
2002-05-02 21:49:50 +00:00
Chris Lattner
de442f70ac Oops, disable debugging code all the way. :)
llvm-svn: 2447
2002-05-02 21:47:40 +00:00
Chris Lattner
7d4f3ed1f2 * Finish the implementation of isEdgeFeasible this fixes bug:
test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll
* SCCP now preserves the CFG:  It leaves conditional branches the way they
  are in the program, not simplifying them.  A seperate pass should eliminate
  the potentially dead basic blocks and edges in the CFG.

llvm-svn: 2446
2002-05-02 21:44:00 +00:00
Chris Lattner
b30088a50d * Enable SCCP debugging to be turned on with a simple change of #define
* Change worklist to a set so that duplicates cannot happen
* Add support for the invoke instruction
* Avoid marking store and free instructions as overdefined, since they
  cannot produce a value anyway.
* Inline the OperandChangedState implementation
* Add isEdgeFeasible in preparation to fix a bug.  Right now it behaves
  exactly as before.
* Remove obsolete comment about constant pools

llvm-svn: 2445
2002-05-02 21:18:01 +00:00
Chris Lattner
28a8acc476 * Simplify the code by not bothering to name the folded constant
* Do not skip the instruction immediately after a folded instruction.  This
  was causing the testcase failure:
	test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll

llvm-svn: 2443
2002-05-02 20:32:51 +00:00
Chris Lattner
5d1ac4dbc9 Significantly clean up SCCP pass. Now the two classes are merged and in
an anonymous namespace where they belong.

llvm-svn: 2415
2002-04-29 21:26:08 +00:00
Chris Lattner
96e0c48175 Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
589debc4ba Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.

llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
ec70d92221 Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
321a8cf4ba Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
536cf1b13f * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well

llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
0c04e4d1ef Changes because the Terminator::getSuccessor function now FAILS if successor
IDX is out of range instead of returning null.

llvm-svn: 2332
2002-04-27 03:15:45 +00:00
Chris Lattner
bb60c83409 Convert SCCP over to use InstVisitor instead of hand crafted switch
llvm-svn: 2286
2002-04-18 15:13:15 +00:00
Chris Lattner
b736829547 GEP instructions can never be constant propogated.
llvm-svn: 2284
2002-04-18 14:44:13 +00:00
Chris Lattner
5e12c7caf5 Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.

llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
31e5838296 s/Method/Function
Remove extraneous #includes of llvm/Assembly/Writer

llvm-svn: 2178
2002-04-08 22:03:00 +00:00
Chris Lattner
44f14449c4 ConstantHandling moved into VMCore library
llvm-svn: 2165
2002-04-08 20:18:09 +00:00
Chris Lattner
849c762b02 Change references from Method to Function
change references from MethodARgument to FunctionArgument

llvm-svn: 1991
2002-03-26 18:01:55 +00:00