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

1248 Commits

Author SHA1 Message Date
Chris Lattner
f4c2dcbe21 Add header file I accidentally removed in teh shuffle
llvm-svn: 10795
2004-01-12 19:15:20 +00:00
Chris Lattner
de401bbd4b Remove use of the ConstantHandling interfaces
llvm-svn: 10793
2004-01-12 19:12:50 +00:00
Chris Lattner
47e9056669 Remove use of ConstantExpr::getShift
llvm-svn: 10792
2004-01-12 19:10:58 +00:00
Chris Lattner
758109ce2e Don't use ConstantExpr::getShift anymore
llvm-svn: 10791
2004-01-12 19:08:43 +00:00
Chris Lattner
23da5dbed6 Remove use of ConstantHandling
llvm-svn: 10789
2004-01-12 18:35:03 +00:00
Chris Lattner
4db788b6c5 Remove unneeded #include
llvm-svn: 10788
2004-01-12 18:33:54 +00:00
Chris Lattner
7242f6af5f Move llvm::ConstantFoldInstruction from VMCore to here, next to ConstantFoldTerminator
llvm-svn: 10785
2004-01-12 18:25:22 +00:00
Chris Lattner
a5101c4743 Remove uses of ConstantHandling itf
llvm-svn: 10783
2004-01-12 18:12:44 +00:00
Chris Lattner
5a9246fb56 Use constantexprs for casts. Eliminate use of the ConstantHandling interfaces
llvm-svn: 10779
2004-01-12 17:43:40 +00:00
Chris Lattner
8e3cb82d12 Fix fairly severe bug in my last checking where we treated all unfoldable
constants as being "true" when evaluating branches.  This was introduced
because we now create constantexprs for the constants instead of failing the
fold.

llvm-svn: 10778
2004-01-12 17:40:36 +00:00
Chris Lattner
a523d45c39 * Implement minor performance optimization for the getelementptr case
* Implement SCCP of load instructions, implementing Transforms/SCCP/loadtest.ll
  This allows us to fold expressions like "foo"[2], even if the pointer is only
  a conditional constant.

llvm-svn: 10767
2004-01-12 04:29:41 +00:00
Chris Lattner
cb0fc1ce41 Do not hack on volatile loads. I'm not sure what the point of a volatile load
from constant memory is, but lets not take chances.

llvm-svn: 10765
2004-01-12 04:13:56 +00:00
Chris Lattner
1269b71517 Implement SCCP/phitest.ll
llvm-svn: 10763
2004-01-12 03:57:30 +00:00
Chris Lattner
40c667e0bc Implement Transforms/ScalarRepl/phinodepromote.ll, which is an important
case that the C/C++ front-end generates.

llvm-svn: 10761
2004-01-12 01:18:32 +00:00
Chris Lattner
06e5894c37 Update obsolete comments
Fix iterator invalidation problems which was causing -mstrip to miss some
entries, and read free'd memory.  This shrinks the symbol table of 254.gap
from 333 to 284 bytes!  :)

llvm-svn: 10751
2004-01-10 21:36:49 +00:00
Chris Lattner
031bd7e9f3 Finegrainify namespacification
llvm-svn: 10727
2004-01-09 06:12:26 +00:00
Chris Lattner
f8c085f3f1 Remove dependence on structure index type. s/MT/FT
llvm-svn: 10726
2004-01-09 06:02:51 +00:00
Chris Lattner
d33cc684b5 Finegrainify namespacification
llvm-svn: 10725
2004-01-09 06:02:20 +00:00
Chris Lattner
a607777821 Finegrainify namespacification
add flags for PR82

llvm-svn: 10724
2004-01-09 05:53:38 +00:00
Chris Lattner
605b8b34fa Inching towards fixing PR82
llvm-svn: 10722
2004-01-09 05:44:50 +00:00
Chris Lattner
1736f44b1d Improve encapsulation in the Loop and LoopInfo classes by eliminating the
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.

llvm-svn: 10714
2004-01-08 00:09:44 +00:00
Chris Lattner
428c27dfbf Merging constants can cause further room for improvement. Iterate until
we converge

llvm-svn: 10618
2003-12-28 07:19:08 +00:00
Chris Lattner
099e1f16b8 rename ClassifyExpression -> ClassifyExpr
llvm-svn: 10592
2003-12-23 08:04:08 +00:00
Chris Lattner
fefdb67375 More minor non-functional changes. This now computes the exit condition, though
it doesn't do anything with it.

llvm-svn: 10590
2003-12-23 07:47:09 +00:00
Chris Lattner
77fe880dcf Remove extraneous #include
finegrainify namespacification

llvm-svn: 10589
2003-12-23 07:43:38 +00:00
Chris Lattner
30fa61ca6c Fix memory corruption bug PR193
llvm-svn: 10586
2003-12-22 23:49:36 +00:00
Chris Lattner
8ec8b9c28a Don't mind me, I'm just refactoring away. This patch makes room for LFTR, but
contains no functionality changes.

llvm-svn: 10583
2003-12-22 09:53:29 +00:00
Chris Lattner
1f0b2be06c Implement IndVarsSimplify/pointer-indvars.ll, transforming pointer
arithmetic into "array subscripts"

llvm-svn: 10580
2003-12-22 05:02:01 +00:00
Chris Lattner
dfe3e25d89 Fix PR194
llvm-svn: 10573
2003-12-22 03:58:44 +00:00
Chris Lattner
e0021ba353 Fix ADCE/2003-12-19-MergeReturn.llx
llvm-svn: 10539
2003-12-19 09:08:34 +00:00
Chris Lattner
399d5ad32e Remove the wierd "Operands" loop, by traversing basicblocks in reverse order
llvm-svn: 10536
2003-12-19 08:18:16 +00:00
Chris Lattner
68db81e684 Implement LICM/sink_multiple.ll, by sinking all possible instructions in the
loop before hoisting any.

llvm-svn: 10534
2003-12-19 07:22:45 +00:00
Chris Lattner
a0b16fb57d Generalize a special case to fix PR187
llvm-svn: 10531
2003-12-19 06:27:08 +00:00
Chris Lattner
e0e1fe84e8 Factor code out into the Utils library
llvm-svn: 10530
2003-12-19 05:58:40 +00:00
Chris Lattner
c1952a1fd6 Add new function
llvm-svn: 10529
2003-12-19 05:56:28 +00:00
John Criswell
3304c39869 Reverted back to previous revision - this was previously merged
according to the CVS log messages.

llvm-svn: 10517
2003-12-18 17:19:19 +00:00
John Criswell
0659bb0c4a Merged in RELEASE_11.
llvm-svn: 10516
2003-12-18 16:43:17 +00:00
Chris Lattner
17122cbe7b When we delete instructions from the loop, make sure to remove them from the
AliasSetTracker as well.

llvm-svn: 10507
2003-12-18 08:12:32 +00:00
Chris Lattner
062d3a4ab5 Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llx
llvm-svn: 10473
2003-12-15 17:34:02 +00:00
Chris Lattner
5fc36a496f Refactor code just a little bit, allowing us to implement TailCallElim/return_constant.ll
llvm-svn: 10467
2003-12-14 23:57:39 +00:00
Chris Lattner
0d3a8b1cb4 Do not promote volatile alias sets into registers
llvm-svn: 10458
2003-12-14 04:52:31 +00:00
Chris Lattner
1f7737b44f Fix LICM/2003-12-11-SinkingToPHI.ll, and quite possibly all of the other known problems in the universe.
llvm-svn: 10409
2003-12-11 22:23:32 +00:00
Chris Lattner
bba48ffc66 verifyFunction depends on dominator info, which levelraise does not declare
that it needs.  This is pretty scary code!  This fixes

Regression.Transforms.LevelRaise.2002-07-16-SourceAndDestCrash
Regression.Transforms.LevelRaise.2002-07-31-AssertionFailure

llvm-svn: 10406
2003-12-11 21:47:37 +00:00
Chris Lattner
6eae2a120e Fix bug: LICM/sink_multiple_exits.ll
Thanks for pointing this out John  :)

llvm-svn: 10387
2003-12-10 22:35:56 +00:00
Chris Lattner
9b1a0ca03b Don't allow dead instructions to stop sinking early.
llvm-svn: 10386
2003-12-10 20:43:29 +00:00
Chris Lattner
677f1ebb07 Fix bug: IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx
llvm-svn: 10385
2003-12-10 20:43:04 +00:00
Chris Lattner
0b72993a49 Finegrainify namespacification
Fix bug: LowerInvoke/2003-12-10-Crash.llx

llvm-svn: 10382
2003-12-10 20:22:42 +00:00
Chris Lattner
2c641008e6 Finegrainify namespacification
Reorder #includes
Implement: IndVarsSimplify/2003-12-10-IndVarDeadCode.ll

llvm-svn: 10376
2003-12-10 18:06:47 +00:00
Chris Lattner
8c7f69563e Finegrainify namespacification
Fix bug: LoopSimplify/2003-12-10-ExitBlocksProblem.ll

llvm-svn: 10373
2003-12-10 17:20:35 +00:00
Chris Lattner
d6d41b5e23 Simplify code
llvm-svn: 10371
2003-12-10 16:58:24 +00:00
Chris Lattner
7eff699231 Avoid performing two identical lookups when one will suffice
llvm-svn: 10370
2003-12-10 16:57:24 +00:00
Chris Lattner
94944ee4aa Make LICM itself a bit more efficient, and make the generated code more efficient too: don't insert a store in every exit block, because a particular block may be exited to more than once by a loop
llvm-svn: 10369
2003-12-10 15:56:24 +00:00
Chris Lattner
fe8fd04cce Implement instruction sinking out of loops. This still can do a little bit
better job, but this is the majority of the work.  This implements
LICM/sink*.ll

llvm-svn: 10358
2003-12-10 06:41:05 +00:00
Chris Lattner
c49a27b2b6 Do not insert one entry PHI nodes in split exit blocks!
llvm-svn: 10348
2003-12-09 23:12:55 +00:00
Chris Lattner
f5f65c4000 Refactor code a little bit, eliminating the gratuitous InstVisitor, which
should make subsequent changes simpler.  This also allows us to hoist vaarg
and vanext instructions

llvm-svn: 10342
2003-12-09 19:32:44 +00:00
Chris Lattner
2ffca818b6 Fine grainify namespacification
Code cleanups
Make LICM::SafeToHoist marginally more efficient

llvm-svn: 10341
2003-12-09 17:18:00 +00:00
Chris Lattner
a62c29757d Implement: TailCallElim/accum_recursion_constant_arg.ll
Also make sure to clean up any PHI nodes that are inserted which are pointless.

llvm-svn: 10333
2003-12-08 23:37:35 +00:00
Chris Lattner
647b7d8869 Implement: test/Regression/Transforms/TailCallElim/accum_recursion.ll
We now insert accumulator variables as necessary to eliminate tail recursion
more aggressively.  This is still fairly limited, but allows us to transform
fib/factorial, and other functions into nice happy loops.  :)

llvm-svn: 10332
2003-12-08 23:19:26 +00:00
Chris Lattner
be2b3fb417 Cleanup and restructure the code to make it easier to read and maintain.
The only functionality change is that we now implement:
  Regression/Transforms/TailCallElim/intervening-inst.ll

Which is really kinda pointless, because it means that trivially dead code
does not interfere with -tce, but trivially dead code probably wouldn't be
around anytime when this pass is run anyway.

The point of including this change it to support other more aggressive
transformations when we have the analysis capabilities to do so.

llvm-svn: 10312
2003-12-08 05:34:54 +00:00
Chris Lattner
0dbb3822a4 Implement RaiseAllocations/FreeCastConstantExpr.ll
llvm-svn: 10305
2003-12-07 01:42:08 +00:00
Chris Lattner
60dae0e7d9 * Finegrainify namespacification
* Transform: free <ty>* (cast <ty2>* X to <ty>*) into free <ty2>* X

llvm-svn: 10303
2003-12-07 01:24:23 +00:00
Chris Lattner
0d57e06a37 Finegrainify namespacification
Fix regressions ScalarRepl/basictest.ll & arraytest.ll

llvm-svn: 10287
2003-12-02 17:43:55 +00:00
Chris Lattner
a29f6743a1 Fix test: Transforms/LevelRaise/2003-11-28-IllegalTypeConversion.ll
Some gep generalization changes

llvm-svn: 10252
2003-11-29 05:31:25 +00:00
Chris Lattner
7b895914a2 Do not use index type to determine what it is indexing into!
llvm-svn: 10226
2003-11-25 21:09:18 +00:00
Chris Lattner
7d794a8431 Delete dead line
llvm-svn: 10164
2003-11-22 02:26:17 +00:00
Chris Lattner
87e444b65b Fix bug: Transforms/PruneEH/2003-11-21-PHIUpdate.llx
llvm-svn: 10163
2003-11-22 02:20:36 +00:00
Chris Lattner
a88e567e00 Do not crash when deleing a region with a dead invoke instruction
llvm-svn: 10161
2003-11-22 02:13:08 +00:00
Chris Lattner
3b71386e30 Finegrainify namespacification
The module stripping pass should not strip symbols on external globals

llvm-svn: 10157
2003-11-22 01:29:35 +00:00
Chris Lattner
c837881d43 Considering that CI is not even IN SCOPE here, I wooda thought the compiler
would have caught this.  *sigh*

llvm-svn: 10142
2003-11-21 21:57:29 +00:00
Chris Lattner
9ae9c45d43 Finegrainify namespacification
llvm-svn: 10138
2003-11-21 21:54:22 +00:00
Chris Lattner
ebbe1376b3 Get rid of using decls, finegrainify namespacification
llvm-svn: 10137
2003-11-21 21:52:10 +00:00
Chris Lattner
5f38817de9 * Finegrainify namespacification
* Make the cost metric for passing constants in as arguments to functions MUCH
  more accurate, by actually estimating the amount of code that will be constant
  propagated away.

llvm-svn: 10136
2003-11-21 21:46:09 +00:00
Chris Lattner
4a92f545ba Finegrainify namespacification
Print out the costs for functions that AREN'T inlined as well

llvm-svn: 10135
2003-11-21 21:45:31 +00:00
Chris Lattner
2b7309dd1c Minor cleanups and simplifications
llvm-svn: 10127
2003-11-21 16:52:05 +00:00
Chris Lattner
01ab0d2d7b * Finegrainify namespacification
* Implement FuncResolve/2003-11-20-BogusResolveWarning.ll
   ... which eliminates a large number of annoying warnings.  I know misha
   will miss them though!

llvm-svn: 10123
2003-11-20 21:21:31 +00:00
Chris Lattner
feeb3261f2 Start using the nicer terminator auto-insertion API
llvm-svn: 10111
2003-11-20 18:25:24 +00:00
Chris Lattner
071bf19ef5 Spew symbolic types!
llvm-svn: 10110
2003-11-20 18:23:14 +00:00
Chris Lattner
0128ea6e23 When spewing out warnings during function resolution, do not vomit out pages
and pages of non-symbolic types.

llvm-svn: 10109
2003-11-20 18:19:35 +00:00
Misha Brukman
4eedd560a6 This file was somehow missing a top-level comment line.
llvm-svn: 10055
2003-11-17 19:35:17 +00:00
Chris Lattner
04d122be8f Fix PR116
llvm-svn: 10032
2003-11-16 21:39:27 +00:00
Chris Lattner
fe4e3f7108 Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll
llvm-svn: 9981
2003-11-13 19:17:02 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
7dd63c59d1 Reorganize code for locality, improve comments
llvm-svn: 9857
2003-11-10 04:42:42 +00:00
Chris Lattner
e0d83d79e4 Adjust to new critical edge interface
llvm-svn: 9853
2003-11-10 04:10:50 +00:00
Chris Lattner
953f23925f Do NOT inline self recursive calls into other functions. This is causing the
pool allocator no end of trouble, and doesn't make a lot of sense anyway.  This
does not solve the problem with mutually recursive functions, but they are much less common.

llvm-svn: 9828
2003-11-09 05:05:36 +00:00
Chris Lattner
a1040ce57e Untypo
llvm-svn: 9827
2003-11-09 05:04:25 +00:00
Misha Brukman
acc53cc7c6 Declare FunctionPasses as such so that they can be used in FunctionPassManager.
llvm-svn: 9768
2003-11-07 17:20:18 +00:00
Chris Lattner
8e2385eb4d Various cleanups and efficiency improvements
llvm-svn: 9753
2003-11-06 19:46:29 +00:00
Chris Lattner
8321e79ea6 Fix bug: PR93
llvm-svn: 9752
2003-11-06 19:18:49 +00:00
Chris Lattner
58016b49ef Fix the problem with running cleanups in bugpoint: We were deleting arguments
of intrinsic functions, causing the verifier to fail.

llvm-svn: 9745
2003-11-05 21:53:41 +00:00
Chris Lattner
f7304f3379 Split behavior into two pieces
llvm-svn: 9741
2003-11-05 21:43:02 +00:00
Chris Lattner
a8d3699eb3 Yet more fixes for constant expr shifts
llvm-svn: 9739
2003-11-05 20:43:58 +00:00
Chris Lattner
dba798775b Further fixes for PR93
llvm-svn: 9738
2003-11-05 20:37:01 +00:00
Chris Lattner
9b9fdd0f17 Fix flawed logic that was breaking several SPEC benchmarks, including gzip and crafty.
llvm-svn: 9731
2003-11-05 17:31:36 +00:00
Chris Lattner
f7a909f914 Be gcc 3.4 clean
llvm-svn: 9725
2003-11-05 06:12:18 +00:00
Chris Lattner
fd8ec07a8e Fix bug with previous implementation:
-      // ~(c-X) == X-(c-1) == X+(-c+1)
+      // ~(c-X) == X-c-1 == X+(-c-1)

Implement: C - ~X == X + (1+C)
llvm-svn: 9715
2003-11-05 01:06:05 +00:00
Chris Lattner
ac2e4e15dd Minor cleanup, plus implement InstCombine/xor.ll:test17
llvm-svn: 9711
2003-11-04 23:50:51 +00:00
Chris Lattner
a309338bd4 Implement InstCombine/xor.ll:test(15|16)
llvm-svn: 9708
2003-11-04 23:37:10 +00:00
John Criswell
3e30e40801 Checking in Chris's suggestions:
Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.

llvm-svn: 9693
2003-11-04 15:22:26 +00:00
Chris Lattner
19a418db92 Implement InstCombine/cast-set.ll:test6[a]. This improves code generated for
a hot function in em3d

llvm-svn: 9673
2003-11-03 05:17:03 +00:00
Chris Lattner
d8c97ff65d Implement InstCombine/cast-set.ll: test1, test2, test7
llvm-svn: 9670
2003-11-03 04:25:02 +00:00
Chris Lattner
01dd059e75 Fix bug with zero sized casts
llvm-svn: 9667
2003-11-03 01:29:41 +00:00
Chris Lattner
e005f61e9e Fix bug in previous checkin
llvm-svn: 9656
2003-11-02 06:54:48 +00:00
Chris Lattner
a06aa3d2f2 Implement transmogriphication of allocation instructions
llvm-svn: 9654
2003-11-02 05:57:39 +00:00
Chris Lattner
d6b4a4c1c9 Fix PR78
llvm-svn: 9648
2003-11-02 02:06:27 +00:00
Chris Lattner
18192fe20c Strip off CPR's manually, because if we don't, the inliner doesn't delete dead
functions.  GRR

llvm-svn: 9641
2003-10-31 21:05:58 +00:00
Chris Lattner
c8ea13f032 Fix bug: 2003-10-29-CallSiteResolve.ll & PR70
llvm-svn: 9600
2003-10-30 00:46:41 +00:00
Chris Lattner
7c5cf380af Refactor code, initial implementation of -insert-block-profiling pass
llvm-svn: 9593
2003-10-29 21:24:22 +00:00
Chris Lattner
cb21ea9a32 Fix PR66 & ScalarRepl/2003-10-29-ArrayProblem.ll
llvm-svn: 9585
2003-10-29 17:55:44 +00:00
Chris Lattner
89b33b1999 Fix bug: ConstantMerge/2003-10-28-MergeExternalConstants.ll & PR64
llvm-svn: 9579
2003-10-29 06:01:26 +00:00
Chris Lattner
01c0589d69 Check in statistifying patch for Bill
llvm-svn: 9572
2003-10-28 23:14:59 +00:00
Chris Lattner
19e529f0e3 Pass in argc & argv
llvm-svn: 9563
2003-10-28 22:42:24 +00:00
Chris Lattner
7e6b286041 Initial checkin of profiling instrumentation pass. So far, despite the
file name, we only support function profiling.  This will be fixed in the
near future.

llvm-svn: 9547
2003-10-28 18:59:04 +00:00
Chris Lattner
51c13a0c9a Eliminate using declarations
llvm-svn: 9543
2003-10-27 21:44:09 +00:00
Chris Lattner
bbca4bb7a6 Propagating constants to arguments can make other arguments constant. For now
do something dumb, and inefficient, but more complete.

llvm-svn: 9542
2003-10-27 21:09:00 +00:00
Chris Lattner
00fed59c28 Fix test: Linker/2003-10-27-LinkOncePromote.ll
Fix PR58

llvm-svn: 9530
2003-10-27 16:39:39 +00:00
Chris Lattner
4fb1540128 Get the list of PHI node values before the basic block is split. Also, add
PHI node entries for unwind instructions just like for call instructions which
became invokes!  This fixes PR57, tested by
Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll

llvm-svn: 9526
2003-10-27 05:33:09 +00:00
Chris Lattner
0683439f74 We might as well strip off any CPRs before propagation
llvm-svn: 9437
2003-10-23 18:49:23 +00:00
Chris Lattner
9273a90311 * We were forgetting to pass varargs arguments through a call
* Add a work around for bug PR56, gross but necessary for now.

llvm-svn: 9428
2003-10-23 17:44:53 +00:00
Chris Lattner
ab282af103 Check in initial version of ipcp
llvm-svn: 9423
2003-10-23 16:52:27 +00:00
Chris Lattner
51684bea99 Make this pass substantially stronger by having it delete dead return values
as well as arguments.  Now it can delete arguments and return values which are
only passed into other arguments or are returned, if they are dead.  This causes
it to delete several hundred extra args/retvals from the C++ hello world program,
shrinking it by about 2K.

llvm-svn: 9398
2003-10-23 03:48:17 +00:00
Chris Lattner
d4e7c091a5 This important patch fixes two warnings in the linker which can occur from linking
valid pieces of code

llvm-svn: 9390
2003-10-22 23:03:38 +00:00
Chris Lattner
5b2282a2e4 Update the 'used' flag correctly
llvm-svn: 9366
2003-10-22 04:43:18 +00:00
Chris Lattner
a322b9b4f3 Loop over the module, not the symbol table. This makes the code handle
unused external functions again

llvm-svn: 9365
2003-10-22 04:42:20 +00:00
Chris Lattner
8d7712e9c5 Implement FunctionResolve/2003-10-21-GlobalResolveHack.ll
llvm-svn: 9363
2003-10-22 03:35:34 +00:00
Chris Lattner
2ae188d8e3 Fix bug: FunctionResolve/2003-10-21-GlobalTypeDifference.ll
llvm-svn: 9359
2003-10-21 23:17:56 +00:00
Chris Lattner
1519122fa7 Fix bug: Linker/2003-10-21-ConflictingTypesTolerance.ll
llvm-svn: 9357
2003-10-21 22:46:38 +00:00
Chris Lattner
4f65be9ac3 Fix message to make more sense and confuse Chris less
llvm-svn: 9354
2003-10-21 21:52:20 +00:00
John Criswell
de34542f41 Added LLVM copyright header.
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell
71d2894956 Added LLVM copyright notice to Makefiles.
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
caf5825a8a Reorder for minor efficiency gain
llvm-svn: 9285
2003-10-20 05:54:26 +00:00
Chris Lattner
87843f87b8 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
e4a69325ff Fix PR#50
llvm-svn: 9227
2003-10-18 06:14:59 +00:00
Chris Lattner
ae52a1b309 ADd support for the new varargs instructions
llvm-svn: 9225
2003-10-18 05:56:52 +00:00
Chris Lattner
67a86ccbed Do not crash on empty structures
llvm-svn: 9195
2003-10-17 18:03:54 +00:00
Chris Lattner
f46c45682a Add support for 'weak' linkage.
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner
f0da6e06e6 This code does not require random access use_lists
llvm-svn: 9156
2003-10-16 16:49:12 +00:00
Chris Lattner
0747f39327 Eliminate using declaration
Rewrite code to work with use_lists what are either random access or bidirectional

llvm-svn: 9155
2003-10-16 16:48:53 +00:00
Chris Lattner
f2ed60c0b7 Decrease usage of use_size()
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner
c6778e91f4 Cleanup
llvm-svn: 9133
2003-10-15 16:42:21 +00:00
Chris Lattner
a567862e89 Do not move variable sized allocations to the top of the caller, which might
break dominance relationships, and is otherwise bad.  This fixes bug:
Inline/2003-10-13-AllocaDominanceProblem.ll.  This also fixes miscompilation
of 3 176.gcc source files (reload1.c, global.c, flow.c)

llvm-svn: 9109
2003-10-14 01:11:07 +00:00
Chris Lattner
dda241ffe4 Whoops, we inserted into the wrong set. What's up with the dead set anyway?
llvm-svn: 9094
2003-10-13 16:49:21 +00:00
Chris Lattner
752b5bcffd Use external df iterators to avoid revisiting blocks in functions with
multiple setjmp calls.

llvm-svn: 9093
2003-10-13 16:44:50 +00:00
Chris Lattner
7a5241cc99 Wrap code at 80 columns
llvm-svn: 9073
2003-10-13 05:04:27 +00:00
Chris Lattner
b6c8569f05 Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
1c989f6d65 Regularize header file comment, eliminate using's
llvm-svn: 9069
2003-10-13 03:30:47 +00:00
Chris Lattner
c8586d8d06 Minor cleanups
llvm-svn: 9067
2003-10-13 01:02:33 +00:00
Chris Lattner
af8f585013 Checkin an improvement contributed by Bill:
Only transform call sites in a setjmp'ing function which are reachable from
the setjmp.  If the call dominates the setjmp (for example), the called
function cannot longjmp to the setjmp.

This dramatically reduces the number of invoke instructions created in some
large testcases.

llvm-svn: 9066
2003-10-13 00:57:16 +00:00
Chris Lattner
7519b1216b Add support to the loop canonicalization pass to make it transform loops to
have a SINGLE backedge.  This is useful to, for example, the -indvars pass.

This implements testcase LoopSimplify/single-backedge.ll and closes PR#34

llvm-svn: 9065
2003-10-13 00:37:13 +00:00