1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

34192 Commits

Author SHA1 Message Date
Chris Lattner
d4602cc0e7 Add some notes about better flag handling.
llvm-svn: 41808
2007-09-10 21:43:18 +00:00
Chris Lattner
2add65570c Emit:
cmpl    %eax, %ecx
        setae   %al
        movzbl  %al, %eax

instead of:

        cmpl    %eax, %ecx
        setb    %al
        xorb    $1, %al
        movzbl  %al, %eax

when using logical not of a C comparison.

llvm-svn: 41807
2007-09-10 21:39:07 +00:00
Chris Lattner
5fd9bec89d this is not infinite recursion.
llvm-svn: 41806
2007-09-10 21:16:23 +00:00
Chris Lattner
ca656d2007 1. Don't call Value::getName(), which is slow.
2. Lower calls to fabs and friends to FABS nodes etc unless the function has
   internal linkage.  Before we wouldn't lower if it had a definition, which
   is incorrect.  This allows us to compile:

define double @fabs(double %f) {
        %tmp2 = tail call double @fabs( double %f )
        ret double %tmp2
}

into:

_fabs:
        fabs f1, f1
        blr 

llvm-svn: 41805
2007-09-10 21:15:22 +00:00
Chris Lattner
ab8aa7d61a Prevent tailcallelim from breaking "recursive" calls to builtins.
llvm-svn: 41804
2007-09-10 20:58:55 +00:00
Evan Cheng
4715ccb29c It's not safe to rematerialize MOV32r0 etc. by simply cloning the original
instruction. These are implemented with xor which will modify the conditional
code. They should be rematerialized as move instructions.

llvm-svn: 41802
2007-09-10 20:48:53 +00:00
Devang Patel
76790c1b28 Filter exit conditions which are not yet handled.
llvm-svn: 41800
2007-09-10 18:33:42 +00:00
Devang Patel
952baa25c2 New test.
llvm-svn: 41799
2007-09-10 18:12:52 +00:00
Devang Patel
7a759cdfd7 Require SCEV before LCSSA.
llvm-svn: 41798
2007-09-10 18:08:23 +00:00
Owen Anderson
ab8a978ed7 Remove an un-needed dependence query. This improves compile time marginally on 401.bzip2.
llvm-svn: 41792
2007-09-09 21:43:49 +00:00
Daniel Berlin
f0f3834ee6 Add SparseBitVector implementation
llvm-svn: 41790
2007-09-09 01:10:40 +00:00
Owen Anderson
b1388b7afb Turn GVN on by default.
llvm-svn: 41787
2007-09-08 22:23:52 +00:00
Dale Johannesen
9dfdc452d9 Implement misaligned FP loads and stores.
llvm-svn: 41786
2007-09-08 19:29:23 +00:00
Nick Lewycky
7a9495d5e6 Fix description of the call instruction. There are two types, with one being
optional.

llvm-svn: 41785
2007-09-08 13:57:50 +00:00
Chuck Rose III
788df70ec3 Fix for VisualStudio. It is treating a 2 bit enum as a signed int for comparison purposes, causing failures. Using an extra bit fixes it.
llvm-svn: 41784
2007-09-08 04:17:08 +00:00
Evan Cheng
e6c68e7668 Smarter Reset(). Instead of deallocating all memory regions and reallocate the
first region, just deallocate all but the last region in the list.

llvm-svn: 41782
2007-09-08 00:02:17 +00:00
Evan Cheng
65df926ced TableGen no longer emit CopyFromReg nodes for implicit results in physical
registers. The scheduler is now responsible for emitting them.

llvm-svn: 41781
2007-09-07 23:59:02 +00:00
Bill Wendling
04a6163921 Add missing index versions of instructions to the map.
llvm-svn: 41776
2007-09-07 22:01:02 +00:00
Dan Gohman
3bc1bc2590 Avoid storing and reloading zeros and other constants from stack slots
by flagging the associated instructions as being trivially rematerializable.

llvm-svn: 41775
2007-09-07 21:32:51 +00:00
Dale Johannesen
783215c630 Apply feedback from previous patch.
llvm-svn: 41774
2007-09-07 21:07:57 +00:00
Dale Johannesen
81660f7d7b Revert previous change to IR.
llvm-svn: 41769
2007-09-07 18:31:50 +00:00
Rafael Espindola
8c57e70f93 Add support for having different alignment for objects on call frames.
The x86-64 ABI states that objects passed on the stack have
8 byte alignment. Implement that.

llvm-svn: 41768
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
899c0c9c8d Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register
liveins and we let frontend solve type issue, not lowering code :)

llvm-svn: 41763
2007-09-07 11:39:35 +00:00
Bill Wendling
538f8f9d7f Test for PR1641.
llvm-svn: 41762
2007-09-07 08:30:09 +00:00
Chris Lattner
8e6c39d961 Don't zap back to back volatile load/stores
llvm-svn: 41759
2007-09-07 05:33:03 +00:00
Owen Anderson
4b71e55287 Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein!

llvm-svn: 41758
2007-09-07 04:06:50 +00:00
David Greene
04a132ad5f Constify to catch bugs.
llvm-svn: 41751
2007-09-06 19:46:46 +00:00
Dale Johannesen
86f367a6b7 Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)

llvm-svn: 41747
2007-09-06 18:13:44 +00:00
Anton Korobeynikov
0e3789f07a Proper handle case, when aliasee is external weak symbol referenced only by alias itself.
Also, fix a case, when target doesn't have weak symbols supported.

llvm-svn: 41746
2007-09-06 17:21:48 +00:00
David Greene
6df3ab79be Add instruction dump output. This helps find bugs.
llvm-svn: 41744
2007-09-06 16:36:39 +00:00
David Greene
2ca4b270db Pluggable coalescers inplementation.
llvm-svn: 41743
2007-09-06 16:18:45 +00:00
Nick Lewycky
79e179ff1f Use isTrueWhenEqual. Thanks Chris!
llvm-svn: 41741
2007-09-06 02:40:25 +00:00
Nick Lewycky
2f66503c0a When the two operands of an icmp are equal, there are five possible predicates
that would make the icmp true. Fixes PR1637.

llvm-svn: 41740
2007-09-06 01:10:22 +00:00
Evan Cheng
15c07fb194 Fix a memory leak.
llvm-svn: 41739
2007-09-06 01:07:24 +00:00
Evan Cheng
896c1ed385 Fix a bug in X86InstrInfo::convertToThreeAddress that caused it to codegen:
leal    (,%rcx,8), %rcx
It should be
leal    (,%rcx,8), %ecx

llvm-svn: 41735
2007-09-06 00:14:41 +00:00
Bill Wendling
46d5fb4e5d LVXL and STVXL are also a load and store resp.
llvm-svn: 41733
2007-09-05 23:47:12 +00:00
Evan Cheng
884b7c0c81 Accidentially left this out.
llvm-svn: 41730
2007-09-05 21:58:18 +00:00
Evan Cheng
3bda699975 Use pool allocator for all the VNInfo's to improve memory access locality. This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks.
llvm-svn: 41729
2007-09-05 21:46:51 +00:00
Evan Cheng
5977c55f5d Added Reset() to free all allocated memory regions and reset state to be the same as right after ctor.
llvm-svn: 41728
2007-09-05 21:41:34 +00:00
Evan Cheng
804e104123 Missing break. Patch by Wojciech Matyjewicz.
llvm-svn: 41727
2007-09-05 21:36:14 +00:00
Dale Johannesen
1d92d23a89 Fix mod so it actually works. Fix conversions to
native types to handle denormals correctly.

llvm-svn: 41726
2007-09-05 20:39:49 +00:00
Chuck Rose III
4f602f5eba Forgot to obey 80 column rule. Fixing that.
llvm-svn: 41725
2007-09-05 20:36:41 +00:00
Dale Johannesen
f9ca7b6094 Change all floating constants that are not exactly
representable to use hex format.

llvm-svn: 41722
2007-09-05 17:50:36 +00:00
Chuck Rose III
a1061872a7 Added default parameters to GetElementPtrInstr constructor call. Visual Studio 2k5 was getting confused and was unable to compile it. Suspected compiler error.
llvm-svn: 41721
2007-09-05 16:54:38 +00:00
Duncan Sands
aefef49052 Due to label merging, the last label for an invoke
may be the same as the first label for the following
invoke.  Remove a micro-optimization which was wrong
in this case.

llvm-svn: 41720
2007-09-05 14:12:46 +00:00
Duncan Sands
2e32997f97 Testcases for PR1628.
llvm-svn: 41719
2007-09-05 11:53:04 +00:00
Duncan Sands
ab8eb598be Fix PR1628. When exception handling is turned on,
labels are generated bracketing each call (not just
invokes).  This is used to generate entries in
the exception table required by the C++ personality.
However it gets in the way of tail-merging.  This
patch solves the problem by no longer placing labels
around ordinary calls.  Instead we generate entries
in the exception table that cover every instruction
in the function that wasn't covered by an invoke
range (the range given by the labels around the invoke).
As an optimization, such entries are only generated for
parts of the function that contain a call, since for
the moment those are the only instructions that can
throw an exception [1].  As a happy consequence, we
now get a smaller exception table, since the same
region can cover many calls.  While there, I also
implemented folding of invoke ranges - successive
ranges are merged when safe to do so.  Finally, if
a selector contains only a cleanup, there's a special
shorthand for it - place a 0 in the call-site entry.
I implemented this while there.  As a result, the
exception table output (excluding filters) is now
optimal - it cannot be made smaller [2].  The
problem with throw filters is that folding them
optimally is hard, and the benefit of folding them is
minimal.

[1] I tested that having trapping instructions (eg
divide by zero) in such a region doesn't cause trouble.
[2] It could be made smaller with the help of higher
layers, eg by having branch folding reorder basic blocks
ending in invokes with the same landing pad so they
follow each other.  I don't know if this is worth doing.

llvm-svn: 41718
2007-09-05 11:27:52 +00:00
Bill Wendling
13549db795 Add the 64-bit versions of the DS* Altivec instructions.
llvm-svn: 41717
2007-09-05 04:05:20 +00:00
Devang Patel
db7970eac9 Enable loop index split pass.
llvm-svn: 41714
2007-09-04 20:46:58 +00:00
Devang Patel
2cebc6f649 Insert cloned loop basic blocks before original loop header.
llvm-svn: 41713
2007-09-04 20:46:35 +00:00