Commit Graph

785 Commits

Author SHA1 Message Date
Chris Lattner
ad80a46caa Fix iterator invalidation problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5895 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 17:52:20 +00:00
Chris Lattner
892310eaff Make sure that the cloned module retains the type symbol table entries!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5894 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 17:15:33 +00:00
Chris Lattner
7899b74fdb Make sure to preserve endiannes and pointer size when cloning modules!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5892 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 15:54:40 +00:00
Chris Lattner
c2b97d43a0 Fix Bug: Linker/2003-04-23-LinkOnceLost.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5879 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 18:38:39 +00:00
Chris Lattner
e408e25132 Remove unnecesary &*'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5872 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:37:45 +00:00
Chris Lattner
14383485ac New pass to lower switch instructions to branch instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5865 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:23:59 +00:00
Chris Lattner
350c0a8216 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5863 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:18:14 +00:00
Chris Lattner
43a9994c01 Add warning when linking modules with disagreeing target properties
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5845 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 19:13:20 +00:00
Chris Lattner
37f59419b8 Preserve the new moduleID field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5835 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:02:26 +00:00
Chris Lattner
2719bac905 Fix bug: 2003-01-30-LinkerRename.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5828 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 21:15:04 +00:00
Chris Lattner
0fec08eb58 Fix linking a function with qualifiers to a external function declaration:
Fixed bug: Linker/2003-04-21-Linkage.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5827 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 21:07:05 +00:00
Chris Lattner
085c801dee Fix bug where use still existed in dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5824 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 19:15:26 +00:00
Chris Lattner
ea2294a498 Implement: FunctionResolve/2003-04-18-ForwardDeclGlobal.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5816 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 00:15:27 +00:00
Chris Lattner
393689afa9 Fix bug: Mem2reg/2003-04-18-DeadBlockProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5810 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 19:25:22 +00:00
Chris Lattner
156bcf3f65 Global constants CAN be external
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5808 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 04:34:29 +00:00
Chris Lattner
17d145d26f Refactor CloneFunction to expose the new CloneBasicBlock function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5806 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 03:50:09 +00:00
Chris Lattner
15faa8498c New const_cast instead of c style cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5805 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 03:49:49 +00:00
Chris Lattner
fb242b6edc Change the interface to constant expressions to allow automatic folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 22:40:51 +00:00
Chris Lattner
4ad02e726d Add new linkage types to support a real frontend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5786 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 20:28:45 +00:00
Chris Lattner
af7ccd9bba Make help message more clear
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5775 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-13 03:50:14 +00:00
Chris Lattner
d4bd3eba5d * Fix bug: Mem2Reg/2003-04-10-DFNotFound.ll
* Make Mem2Reg assign version numbers now for renamed variables instead of
  .mem2reg suffixes.  This produces what people think of as SSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5771 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-10 19:41:13 +00:00
Chris Lattner
e941291a7a Initial checkin of PRE on LLVM. This implementation is still lacking in
several ways:

 * Load expressions are not PRE'd well.  Alias Analysis should be used to
   get accurate information when computing anticipatibility.
 * The expression collection implementation does not handle PHI nodes properly,
   thus the implementation misses many opportunities to PRE.
 * This code could be sped up quite a bit

Despite these flaws, the code seems to work well, and handles PR's as one
would expect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5759 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 19:55:43 +00:00
Chris Lattner
6c0e0496dc * We now preserve the no-critical-edge pass (because we cannot insert critical edges)
* Small modification to be more efficient


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5757 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 17:30:25 +00:00
Chris Lattner
c277eaa41e Move BreakCriticalEdges pass to lib/Transforms/Utils
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5754 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-21 21:43:19 +00:00
Chris Lattner
c8802d2c16 Add the following instcombine xforms:
- Implement simple reassociation: (A|c1)|(B|c2) == (A|B)|(c1|c2)
  - (A & C1)+(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
  - (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5743 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-11 00:12:48 +00:00
Chris Lattner
a4f445b28c Implement: -A*-B == A*B
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5740 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 23:23:04 +00:00
Chris Lattner
a27231acc0 Add new transformation: // (~A | ~B) == (~(A & B))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5738 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 23:13:59 +00:00
Chris Lattner
8d96964e29 Generalize not and neg comparison testers to allow constant to be considered not'able and neg'able. This
allows optimization of this:
int %test4(int %A, int %B) {
        %a = xor int %A, -1
        %c = and int %a, 5    ; 5 = ~c2
        %d = xor int %c, -1
        ret int %d
}

into this:
int %test4(int %A, int %B) {            ; No predecessors!
        %c.demorgan = or int %A, -6             ; <int> [#uses=1]
        ret int %c.demorgan
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5736 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 23:06:50 +00:00
Chris Lattner
4f98c56936 Generalize (A+c1)+c2 optimization to work with all associative operators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5733 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 21:43:22 +00:00
Chris Lattner
28ba1aad99 Minor change, no functionality diff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5731 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 19:20:30 +00:00
Chris Lattner
ea34005404 Fix bug: (x << 100) wasn't folded to 0, but (x >> 100) was (when x is unsigned)
Implement new shift optimizations for shifting the result of a shift.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5729 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 19:16:08 +00:00
Chris Lattner
cb40a3749a Implement: (A|B)^B == A & (~B)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5728 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 18:24:17 +00:00
Chris Lattner
3a43837d85 Fix bug: SimplifyCFG/2003-03-07-DominateProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5722 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-07 18:13:41 +00:00
Chris Lattner
decd0812ec Implement %test7 in InstCombine/getelementptr.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5704 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-05 22:33:14 +00:00
Chris Lattner
46a5f1f6e4 Implement CFGSimplify/PhiBlockMerge*.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5702 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-05 21:36:33 +00:00
Chris Lattner
e2ca540e7c Implement testcase CFGSimplify/EqualPHIEdgeBlockMerge.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5699 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-05 21:01:52 +00:00
Chris Lattner
0252e49f6d Convert LICM over to use AliasSetTracker. Besides being nicer, this automatically
allows LICM to use access sizes to help alias analysis be more precise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5693 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-03 23:32:45 +00:00
Chris Lattner
dde601d0eb Eliminate tons of bogus warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5686 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-03 19:57:46 +00:00
Chris Lattner
fb743a937f Change the mem2reg interface to accept a TargetData argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5685 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-03 17:25:18 +00:00
Chris Lattner
caadc93f7b Fix bug: LICM/2003-02-28-PromoteDifferentType.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5675 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-28 19:21:40 +00:00
Chris Lattner
6315938d68 Fix bug I introduced yesterday :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5669 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-28 16:54:17 +00:00
Chris Lattner
74cd04ea01 Fix bug: LICM/2003-02-27-PreheaderExitNodeUpdate.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5667 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-28 03:07:54 +00:00
Chris Lattner
9f879cfb0a Fix bug: 2003-02-27-PreheaderExitNodeUpdate.ll by updating exit node info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5664 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 22:48:57 +00:00
Chris Lattner
7e7ad49c23 Add a new assertion to check that stuff is happening right
Ironically the exit block modification code wasn't updating the exit block
information itself.  Fix this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5659 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 22:31:07 +00:00
Chris Lattner
8601a9bf54 Fix bug: 2003-02-27-StoreSinkPHIs.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5658 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 21:59:36 +00:00
Chris Lattner
69269ac203 * Don't forget to update Loop information!
* Remove bogus assertion: there may be a single outside predecessor and
    still need a new loop-preheader if the predecessor has multiple
    successors.  See bug: LICM/2003-02-27-PreheaderProblem.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5655 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 21:50:19 +00:00
Chris Lattner
4e2fd7574a Replace assertion with a handler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5653 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 20:55:48 +00:00
Chris Lattner
dbf3cd7952 * Significant changes to the preheader insertion pass:
- Now we perform loop exit-block splitting to ensure exit blocks are
     always dominated by the loop header.
   - We now preserve dominance frontier information
   - This fixes bug: LICM/2003-02-26-LoopExitNotDominated.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5652 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 20:27:08 +00:00
Chris Lattner
2d0a4a4eb8 Convert to work with new AliasAnalysis interface by conservatively assuming all pointers are arbitrarily large accesses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 19:28:57 +00:00
Chris Lattner
f0a93ed9c5 Rename Instruction::hasSideEffects() -> mayWriteToMemory()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5620 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-24 20:48:32 +00:00
Chris Lattner
2e6e741b73 Initial implementation of Loop invariant memory->scalar promotion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5613 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-24 03:52:32 +00:00
Chris Lattner
d99bf49a53 Split mem2reg promotion into two parts: a function which does the work, and
a pass which wraps the function.  This allows other passes to use the functionality


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5610 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-22 23:57:48 +00:00
Chris Lattner
cc139de15a Clean up std namespace references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5608 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-22 22:25:17 +00:00
Chris Lattner
ad3448c917 4 new transformations:
* X*C + X --> X * (C+1)
  * X + X*C --> X * (C+1)
  * X - X*C --> X * (1-C)
  * X*C - X --> X * (C-1)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5592 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-18 19:57:07 +00:00
Chris Lattner
a2881961b9 Add a variety of new transformations:
* A & ~A == 0
  * A / (2^c) == A >> c  if unsigned
  * 0 / A == 0
  * 1.0 * A == A
  * A * (2^c) == A << c
  * A ^ ~A == -1
  * A | ~A == -1
  * 0 % X = 0
  * A % (2^c) == A & (c-1) if unsigned
  * A - (A & B) == A & ~B
  * -1 - A == ~A


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5587 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-18 19:28:33 +00:00
Anand Shukla
92d5e30e76 Changes to runtime framework
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5572 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-14 20:41:53 +00:00
Chris Lattner
fd595203bd Fix a bug that cause a crash resolving questionable function calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5567 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-14 19:12:29 +00:00
Chris Lattner
a3183be835 Fix a misunderstanding of the standard associative containers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-14 05:34:36 +00:00
Chris Lattner
6b403233f7 Fix bug: LevelRaise/2003-02-13-CallRaise.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5562 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-14 03:07:17 +00:00
Chris Lattner
dab73bef89 Revert Anand's patch which broke the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5525 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-10 15:55:50 +00:00
Anand Shukla
f013d3d40b *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5522 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-09 21:15:36 +00:00
Chris Lattner
617d92c7d9 Fix a problem Sumant was running into
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5499 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-06 22:03:46 +00:00
Chris Lattner
f9c81670d7 Split public interface out into header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5472 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-03 19:08:18 +00:00
Chris Lattner
41c04f730b Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
This change provides a small (3%) but consistent speedup


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5460 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 04:52:08 +00:00
Chris Lattner
bac74584f1 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5458 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 04:50:59 +00:00
Chris Lattner
49f2012140 Fix a bug resolving sprintf(...) to sprintf(char*, char*, ...)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5446 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 22:38:44 +00:00
Chris Lattner
9943a59cb5 Actually print the function _name_ if there is a problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5443 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 21:33:07 +00:00
Chris Lattner
2f6bb2bce1 * Fix linking of opaque types and their non-opaque versions
* Fix bug: Linker/2003-01-30-LinkerTypeRename.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5441 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 20:53:43 +00:00
Chris Lattner
5c2d335d86 Eliminate using decls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5439 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 19:53:34 +00:00
Chris Lattner
da902ba970 * Fix function resolution for varargs function to generate incorrect bytecode instead of crashing
* remove using decls
 CVS: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5437 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 18:22:32 +00:00
Chris Lattner
8c73b0f7f6 Fix levelraise/2003-01-30-ShiftCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5435 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 17:10:41 +00:00
Chris Lattner
f34e1ba79c Initial checkin of pool allocation code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5432 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-29 21:12:13 +00:00
Chris Lattner
0ea3e6dc41 Disable construction of pool allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5422 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-24 20:13:20 +00:00
Chris Lattner
e5fa63a578 Fix bug: LevelRaise/2003-01-22-GEPProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5407 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23 02:39:10 +00:00
Chris Lattner
d7f268d418 Fix bug: ADCE/2003-01-22-PredecessorProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5405 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23 02:12:18 +00:00
Chris Lattner
c56d239510 Rename include/llvm/Transforms/Instrumentation/TraceFunctions.h to Instrumentation.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5281 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:39:29 +00:00
Chris Lattner
4b208dc599 Fix typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5278 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:34:36 +00:00
Chris Lattner
e9e55131e8 Remove unused header and function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5277 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:34:13 +00:00
Chris Lattner
b117fb57a6 Clean up #includes
Move graph.h into local directory


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5276 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:33:56 +00:00
Chris Lattner
408e72df50 Fix bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5264 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 19:04:43 +00:00
Chris Lattner
3cf5db73c7 Add debugging helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5235 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:52:25 +00:00
Chris Lattner
80e5ed9f77 Make sure to handle %'s in strings correctly so that the names of BB's and functions are actually printed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5234 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:52:14 +00:00
Chris Lattner
019a7c801b Fix references to functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5222 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:27:23 +00:00
Chris Lattner
4d0a82da2d Fix a huge performance problem in reassociate by introducing a
rank map cache for instruction ranks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5030 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 03:56:00 +00:00
Chris Lattner
680f0c283d Minor changes:
* Reword comment to make more clear
  * Don't print out BB's after modification made
  * Don't delete and new an instruction when we need to move something, just move it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5029 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 03:49:50 +00:00
Vikram S. Adve
d86deb689b External routines used to identify Cilk operations inserted by the
parallelization pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-10 13:08:48 +00:00
Vikram S. Adve
83e3b6503d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-10 13:07:58 +00:00
Vikram S. Adve
e12c74c07b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4962 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-10 00:43:34 +00:00
Chris Lattner
ac8d4d9d59 Fix bug that was bugging bugpoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4953 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-07 21:27:16 +00:00
Chris Lattner
342d1826fb Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4952 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-07 18:42:13 +00:00
Chris Lattner
c736d56562 Fix bug: 2002-12-05-MissedConstProp.ll pointed out by Casey Carter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4935 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-05 22:41:53 +00:00
Chris Lattner
b91b657e02 Fix big bug introduced with symbol table changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4885 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 18:32:30 +00:00
Chris Lattner
51cbcbf435 Initial checkin of Module cloning support stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4788 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 20:47:41 +00:00
Chris Lattner
da3c8a7674 Fix symbol table problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4785 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 19:32:43 +00:00
Chris Lattner
6e6026b465 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:36:02 +00:00
Chris Lattner
c09aab0a4d Fix minor bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4778 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:32:31 +00:00
Chris Lattner
03b4c2d22a Remove unneccesary #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4772 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 23:12:53 +00:00
Chris Lattner
5a8932f57f Implement the CloneFunction function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4771 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 23:12:22 +00:00
Chris Lattner
d18015599c Minor changes to cloning interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4770 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 22:54:01 +00:00
Chris Lattner
6c2e2e5287 Fix two fixmes: integrate with inlining, and document
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4769 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 22:04:49 +00:00