Commit Graph

650 Commits

Author SHA1 Message Date
Vikram S. Adve d9676ed983 External routines used to identify Cilk operations inserted by the
parallelization pass.

llvm-svn: 4965
2002-12-10 13:08:48 +00:00
Vikram S. Adve c864ab1e33 This file implements the function DemoteRegToStack(), which takes a
virtual register computed by an Instruction& X and replaces it with
a slot in the stack frame, allocated via alloca.

llvm-svn: 4964
2002-12-10 13:07:58 +00:00
Vikram S. Adve 9a672d17ae This file implements a pass that automatically parallelizes a program,
using the Cilk multi-threaded runtime system to execute parallel code.
The current version inserts too many sync() operations in the program
because it does not attempt to optimize their placement.

llvm-svn: 4962
2002-12-10 00:43:34 +00:00
Chris Lattner 1ee7f8e6bb Fix bug that was bugging bugpoint
llvm-svn: 4953
2002-12-07 21:27:16 +00:00
Chris Lattner 688ac5b723 Remove dead code
llvm-svn: 4952
2002-12-07 18:42:13 +00:00
Chris Lattner c6509f487b Fix bug: 2002-12-05-MissedConstProp.ll pointed out by Casey Carter
llvm-svn: 4935
2002-12-05 22:41:53 +00:00
Chris Lattner f4c0811faa Fix big bug introduced with symbol table changes
llvm-svn: 4885
2002-12-03 18:32:30 +00:00
Chris Lattner e4dbb1af42 Initial checkin of Module cloning support stuff
llvm-svn: 4788
2002-11-20 20:47:41 +00:00
Chris Lattner 8016a16ed0 Fix symbol table problem
llvm-svn: 4785
2002-11-20 19:32:43 +00:00
Chris Lattner 98cf1f5d64 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.

llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner 7c6d9d9eac Fix minor bugs
llvm-svn: 4778
2002-11-20 18:32:31 +00:00
Chris Lattner 84dd0f4767 Remove unneccesary #include
llvm-svn: 4772
2002-11-19 23:12:53 +00:00
Chris Lattner fb311d203a Implement the CloneFunction function
llvm-svn: 4771
2002-11-19 23:12:22 +00:00
Chris Lattner c362618f2a Minor changes to cloning interface
llvm-svn: 4770
2002-11-19 22:54:01 +00:00
Chris Lattner 8bce9886c3 Fix two fixmes: integrate with inlining, and document
llvm-svn: 4769
2002-11-19 22:04:49 +00:00
Chris Lattner b1120055b9 Rework inline pass to use cloning infrastructure to do the dirty work
llvm-svn: 4766
2002-11-19 21:54:07 +00:00
Chris Lattner 1666751257 Start using the new function cloning header
llvm-svn: 4764
2002-11-19 20:59:41 +00:00
Chris Lattner d06467db62 Move MutatStructTypes.h out of IPO
llvm-svn: 4762
2002-11-19 20:49:40 +00:00
Chris Lattner fb8ca4a899 Rename CloneFunction.h to Cloning.h
llvm-svn: 4760
2002-11-19 20:08:24 +00:00
Chris Lattner 58f9002b4a Move the function extractor pass from tools/extract into lib/Xform/IPO
llvm-svn: 4759
2002-11-19 18:42:59 +00:00
Chris Lattner 7a3c0671da Fix bug: 2002-11-13-PointerFunction.ll
This should fix codegen on vortex to work much better

llvm-svn: 4704
2002-11-13 06:54:20 +00:00
Chris Lattner 52b8fc0c35 Fix testcase: FunctionResolve/2002-11-09-ExternFn.ll
llvm-svn: 4668
2002-11-10 03:36:55 +00:00
Chris Lattner a2620ac156 Fix warning
llvm-svn: 4649
2002-11-09 00:49:43 +00:00
Chris Lattner 0da31d6648 Fix spelling error
llvm-svn: 4645
2002-11-08 23:18:37 +00:00
Chris Lattner 17069b342a Use the new getMainFunction() method to efficiently locate main
llvm-svn: 4630
2002-11-08 20:34:21 +00:00
Chris Lattner 5997c3d866 Fix bug: FunctionResolve/2002-11-07-RetMismatch.ll
llvm-svn: 4618
2002-11-08 00:38:20 +00:00
Chris Lattner 5d606a09ff Instcombine this away:
%A = getelementptr [4 x int]* %M, long 0, long 0
        %B = getelementptr int* %A, long 2

llvm-svn: 4536
2002-11-04 16:43:32 +00:00
Chris Lattner 1085bdf49f Add a transformation to turn:
malloc Ty, C
int
  malloc [C x Ty], 1

llvm-svn: 4534
2002-11-04 16:18:53 +00:00
Chris Lattner 0544dadbee Ack: Fix bug in previous checkin.
llvm-svn: 4526
2002-11-04 05:50:42 +00:00
Chris Lattner 4262f815b5 Be more generous about level raising constant expressions don't force each
constant to one particular type.

llvm-svn: 4525
2002-11-04 05:46:37 +00:00
Chris Lattner 669c6cf459 Make sure to _delete_ memory allocated by worklists
llvm-svn: 4523
2002-11-04 02:54:22 +00:00
Anand Shukla 320febba68 code to lightly instrument at branches
llvm-svn: 4511
2002-11-03 01:45:20 +00:00
Chris Lattner 36c05c8f69 Make sure to include name information if we have it
llvm-svn: 4481
2002-11-01 04:49:06 +00:00
Chris Lattner 8fdf75cde5 Fixes to the reassociate pass to make it respect dominance properties
Huge thanks go to Casey Carter for writing this fix, reassociate is now
reoperational!

llvm-svn: 4471
2002-10-31 17:12:59 +00:00
Chris Lattner 12764c85e8 BreakCriticalEdges should update dominance frontier information as well as
other dominance stuff.  Patch contributed by Casey Carter

llvm-svn: 4457
2002-10-31 02:44:36 +00:00
Misha Brukman 632df28deb Fix spelling of `propagate'.
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner 5ae3bd630d Ensure definate initialization
llvm-svn: 4263
2002-10-22 23:34:11 +00:00
Chris Lattner 820d971233 - 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 26783a5be5 * Apparently string::find doesn't work right on our sun boxes. Work around this.
llvm-svn: 4219
2002-10-17 16:22:08 +00:00
Chris Lattner 3ff5457b32 Really disable pool allocator
llvm-svn: 4216
2002-10-17 04:57:09 +00:00
Chris Lattner 149376dee5 - Change Function's so that their argument list is populated when they are
constructed.  Before, external functions would have an empty argument list,
    now a Function ALWAYS has a populated argument list.

llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner 69ce8674b5 - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.

llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Chris Lattner 5f9f4e3aac Account for global variables resolved more accurately.
llvm-svn: 4143
2002-10-13 17:30:30 +00:00
Chris Lattner 88dbc4dbe9 Use methods that are more explanatory
llvm-svn: 4142
2002-10-13 17:12:47 +00:00
Anand Shukla 12b05f3880 Changed to external global var
llvm-svn: 4120
2002-10-12 20:33:47 +00:00
Chris Lattner 1a535e18cd Stop using DataStructureGraph.h
llvm-svn: 4106
2002-10-10 20:33:46 +00:00
Chris Lattner eac4dcd0bd - Dramatically simplify the ConstantMerge code now that
Value::replaceAllUsesWith works with constants correctly.

llvm-svn: 4104
2002-10-09 23:16:04 +00:00
Chris Lattner 013eca003a Almost a complete rewrite of FunctionResolution to now resolve functions
and global variables.

This fixes bug: FuncResolve/2002-08-19-ResolveGlobalVarsEasier.ll
And bug: SingleSource/UnitTests/2002-10-09-ArrayResolution.c

Note that this does not fix bug:
FunctionResolve/2002-08-19-ResolveGlobalVars.ll because replaceAllUsesWith
breaks when a constantexpr is pointing to the thing being replaced.  This
is more of an infrastructure problem than anything.

llvm-svn: 4099
2002-10-09 21:10:06 +00:00
Chris Lattner a4e2653cd7 - Rename MTy to FTy (no methods exist anymore)
- Fix bug: LevelRaise/2002-10-08-VarArgCallInfLoop.ll

llvm-svn: 4088
2002-10-09 00:16:00 +00:00
Chris Lattner a185db3d72 - Fix bug: LevelRaise/2002-10-08-VarArgCall.ll
llvm-svn: 4083
2002-10-08 22:19:25 +00:00