1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 06:22:51 +01:00
Commit Graph

2766 Commits

Author SHA1 Message Date
Vikram S. Adve
986a4f61da Fix libs and includes for compiling with llc.
llvm-svn: 2654
2002-05-19 15:47:52 +00:00
Vikram S. Adve
5a71686624 Added log2 for log-base-2 and also modified IsPower2 to use it.
llvm-svn: 2653
2002-05-19 15:46:52 +00:00
Vikram S. Adve
45eb62b709 Added parameter IntRegSize for standard general-purpose register size.
llvm-svn: 2652
2002-05-19 15:44:07 +00:00
Vikram S. Adve
ee3fd3dda9 New function CreateSignExtensionInstructions.
Methods now take MachineCodeForInstruction& as an argument and record
temporary values in it directly, instead of return the temps.
Really simplifies callers.

llvm-svn: 2651
2002-05-19 15:43:31 +00:00
Vikram S. Adve
8261256950 Many functions that returned a single MachineInstr now take a
vector of MachineInstr* to return multiple ones.

llvm-svn: 2650
2002-05-19 15:42:21 +00:00
Vikram S. Adve
21ed1be093 InstrnsBefore and InstrnsAfter are now vectors instead of deques.
May be slightly less efficient but significantly reduces special
cases interfaces in code generation.

llvm-svn: 2649
2002-05-19 15:41:33 +00:00
Vikram S. Adve
2552231a8c Better interface to generating machine instr for common cases
(many places still need to be updated to use this interface).

llvm-svn: 2648
2002-05-19 15:40:41 +00:00
Vikram S. Adve
0cc9f53701 MachineInstr now inherits from Annotable.
llvm-svn: 2647
2002-05-19 15:39:59 +00:00
Vikram S. Adve
c0db1765f4 Hash pointer values to a sequence number to get identical results from
lli and llc.  This is controlled with options -tracehash on|off.

Also, added an option to specify which functions should be traced.
Particularly useful to reduce output volume in basic-block tracing.

llvm-svn: 2646
2002-05-19 15:39:02 +00:00
Vikram S. Adve
3d968bccd8 Better folding getelementptr operations with mixed
array and struct indexes.
Update operand values in CallArgsDescriptor (a new class)
when replacing constant values with immediates.

llvm-svn: 2645
2002-05-19 15:34:29 +00:00
Vikram S. Adve
883c425f15 cpValue2Value now needs a vector of MachineInstr to store return values.
llvm-svn: 2644
2002-05-19 15:31:08 +00:00
Vikram S. Adve
1f8badf623 Annotation class for MachineInstr.
llvm-svn: 2643
2002-05-19 15:30:21 +00:00
Vikram S. Adve
6133689517 Numerous bug fixes:
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect coloring for CC registers (both int and FP): interferences
   were being completely ignored for int CC and were considered but no
   spills were marked for fp CC!

Also some code improvements:
-- better interface to generating machine instr for common cases
   (many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
   one codegen phase to another (now used to pass information about
   CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint

llvm-svn: 2642
2002-05-19 15:29:31 +00:00
Vikram S. Adve
a5968c518f Add integer register size field.
Make all sizes and offsets uint64_t instead of uint.
Fixed GetIndexedOffset to handle mixed array and struct indices.

llvm-svn: 2641
2002-05-19 15:28:02 +00:00
Vikram S. Adve
fa6c24db76 Numerous bug fixes:
-- correct sign extensions for integer casts and for shift-by-constant
   instructions generated for integer multiply
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect stack frame size when padding a section
-- folding getelementptr operations with mixed array and struct indexes
-- use uint64_t instead of uint for constant offsets in mem operands
-- incorrect coloring for CC registers (both int and FP): interferences
   were being completely ignored for int CC and were considered but no
   spills were marked for fp CC!

Also some code improvements:
-- better interface to generating machine instr for common cases
   (many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
   one codegen phase to another (now used to pass information about
   CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint

llvm-svn: 2640
2002-05-19 15:25:51 +00:00
Chris Lattner
4d98351cea Fix bug: test/Regression/CBackend/2002-05-16-NameCollide.ll by tracking
which global variables would have name collisions if they were not mangled,
and use this info to mangle them iff they would collide.

llvm-svn: 2639
2002-05-17 04:55:35 +00:00
Chris Lattner
6bc0815b11 New C backend testcases with first testcase
llvm-svn: 2638
2002-05-17 04:53:52 +00:00
Chris Lattner
a524df6d1d * Make debug output conditional on #define
* Add optimization to rank computation to not recursively search when
  unneccesary.
* More agressively negate expressions to open reassociation opportunities.
* Linearize (A+B)+(C+D) into ((A+B)+C)+D

llvm-svn: 2637
2002-05-16 04:37:07 +00:00
Chris Lattner
7a5a9d057e Add tests of redundant load elimination
llvm-svn: 2636
2002-05-16 01:03:12 +00:00
Chris Lattner
92c56ccbfa New testcases for sub/neg reassociation
llvm-svn: 2635
2002-05-16 00:56:59 +00:00
Chris Lattner
27ade6e173 Fix testcase
llvm-svn: 2634
2002-05-16 00:56:36 +00:00
Chris Lattner
5393f68ffd New testcases to ensure sub's are maximally reassociable
llvm-svn: 2633
2002-05-15 21:59:31 +00:00
Chris Lattner
d666f1af99 Testcase to ensure trees structures are correctly linearized
llvm-svn: 2632
2002-05-15 21:56:51 +00:00
Chris Lattner
2de1df062f Test to ensure sub -> neg promotion is working and why.
llvm-svn: 2631
2002-05-15 20:30:48 +00:00
Chris Lattner
876da68baa New testcase
llvm-svn: 2630
2002-05-15 17:22:01 +00:00
Chris Lattner
fc21b26332 * Fix bug: test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll
By making sure to consider binary expressions identical if their operands
are backwards, but swappable.

llvm-svn: 2629
2002-05-14 19:57:25 +00:00
Chris Lattner
4859d6b591 New testcase
llvm-svn: 2628
2002-05-14 19:56:14 +00:00
Chris Lattner
8106c7a841 Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
llvm-svn: 2627
2002-05-14 16:44:07 +00:00
Chris Lattner
0535bc0d66 New testcase for bug
llvm-svn: 2626
2002-05-14 16:40:43 +00:00
Chris Lattner
e8c237b1ce Run another local value numbering phase after redundancy elimination
llvm-svn: 2625
2002-05-14 16:23:14 +00:00
Chris Lattner
f7333e31a1 Avoid emitting a useless comment for a basic block with no uses (which
often happens for the entry basic block of a function)

llvm-svn: 2624
2002-05-14 16:02:05 +00:00
Chris Lattner
0ee0c26f4e Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-TouchDeletedInst.ll
"This testcase caused instcombine to fail because it got the same instruction on
it's worklist more than once (which is ok), but then deleted the instruction.
Since the inst stayed on the worklist, as soon as it came back up to be
processed, bad things happened, and opt asserted."

llvm-svn: 2623
2002-05-14 15:24:07 +00:00
Chris Lattner
6a7eccad5f New testcase
llvm-svn: 2622
2002-05-14 15:22:50 +00:00
Chris Lattner
f98fefc1ea Fix a major source of "type unsafety", where a cast is neccesary, but can
be put either before or after a load.  We chose to cast the value loaded
instead of the pointer to load from.

Fixes bug: test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll

llvm-svn: 2621
2002-05-14 05:23:45 +00:00
Chris Lattner
b7688286c1 Implement elimination of loads
llvm-svn: 2620
2002-05-14 05:02:40 +00:00
Chris Lattner
9d013ca535 Invoke inst has side effects!
llvm-svn: 2619
2002-05-14 04:20:25 +00:00
Chris Lattner
e14cba5c34 New file
llvm-svn: 2618
2002-05-13 22:19:50 +00:00
Chris Lattner
fc14cb90a2 Trivial cleanups
llvm-svn: 2617
2002-05-13 22:04:46 +00:00
Chris Lattner
2735171cf5 Add method to check to see if two _Instructions_ dominate each other
llvm-svn: 2616
2002-05-13 22:03:16 +00:00
Chris Lattner
1b769f2a94 Initial checkin of LICM pass
llvm-svn: 2615
2002-05-10 22:44:58 +00:00
Chris Lattner
b04d5ecc11 expose LICM pass
llvm-svn: 2614
2002-05-10 22:44:37 +00:00
Chris Lattner
97b501879c Add LICM pass to compiler
llvm-svn: 2613
2002-05-10 22:44:31 +00:00
Chris Lattner
5a85ea20e5 Add prototype for LICM pass
llvm-svn: 2612
2002-05-10 22:44:16 +00:00
Chris Lattner
1e198023b9 Add testcase for when there is no loop header
llvm-svn: 2611
2002-05-10 22:43:26 +00:00
Chris Lattner
717e99c79a A basic test that LICM is working
llvm-svn: 2610
2002-05-10 22:27:49 +00:00
Chris Lattner
c2766aada8 Run LICM tests
llvm-svn: 2609
2002-05-10 22:21:38 +00:00
Chris Lattner
1215378a67 run LICM tests
llvm-svn: 2608
2002-05-10 22:21:25 +00:00
Chris Lattner
708b869951 Make sure to call the derived visit versions from the ranged iterator.
llvm-svn: 2607
2002-05-10 22:21:05 +00:00
Chris Lattner
590bcc9629 We actually need this code for the release build to prevent link errors,
un#ifdef it.

llvm-svn: 2606
2002-05-10 18:54:35 +00:00
Chris Lattner
ff9f677248 Add explicit abort so optimized build knows that the function does not return
llvm-svn: 2605
2002-05-10 18:53:55 +00:00