1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
Commit Graph

17300 Commits

Author SHA1 Message Date
Chris Lattner
703dfdda2a Due to previous simplifications, we can simplify the data structures being
used here.

llvm-svn: 19913
2005-01-29 07:04:10 +00:00
Chris Lattner
0823ac4234 Properly handle volatile.
llvm-svn: 19912
2005-01-29 06:42:34 +00:00
Chris Lattner
8df4ba51b4 Remove some useless map operations. Loads/stores that are in the same
BB as the load are not included in the Cand* sets at all.

llvm-svn: 19911
2005-01-29 06:39:25 +00:00
Chris Lattner
af286e3600 Before doing expensive global analysis, check to make sure the pointer is
not invalidated on entry and on exit of the block.  This fixes some N^2
behavior in common cases, and speeds up gcc another 5% to 22.35s.

llvm-svn: 19910
2005-01-29 06:31:53 +00:00
Chris Lattner
41114c90af Fix quotes.
llvm-svn: 19909
2005-01-29 06:29:45 +00:00
Jeff Cohen
8d28a62773 Unbreak VC++ build
llvm-svn: 19908
2005-01-29 06:27:16 +00:00
Chris Lattner
43ccc5c945 Minor simplification/speedup. Replaces a set lookup with a pointer comparison.
This speeds up 176.gcc from 25.73s to 23.48s, which is 9.5%

llvm-svn: 19907
2005-01-29 06:20:55 +00:00
Chris Lattner
ae8d4bb675 Eliminate generality that is not buying us anything. In particular, this
will cause us to miss cases where the input pointer to a load could be value
numbered to another load.  Something like this:


  %X = load int* %P1
  %Y = load int* %P2

Those are obviously the same if P1/P2 are the same.  The code this patch
removes attempts to handle that.  However, since GCSE iterates, this doesn't
actually buy us anything: GCSE will first replace P1 or P2 with the other
one, then the load can be value numbered as equal.

Removing this code speeds up gcse a lot.  On 176.gcc in debug mode, this
speeds up gcse from 29.08s -> 25.73s, a 13% savings.

llvm-svn: 19906
2005-01-29 06:11:16 +00:00
Chris Lattner
68d73bed4a If we see:
%A = alloca int
  %V = load int* %A

value number %V to undef, not 0.

llvm-svn: 19905
2005-01-29 05:57:01 +00:00
Chris Lattner
3b3e7f7cc2 Memory used is a delta between memuse at the start of the time and the
memuse at the end, thus it is signed.

llvm-svn: 19904
2005-01-29 05:21:16 +00:00
Jeff Cohen
2cb1c71fc1 Unbreak VC++ build
llvm-svn: 19903
2005-01-29 03:32:49 +00:00
Chris Lattner
35281b677a Make sure that we always grow a multiple of 2 operands.
llvm-svn: 19902
2005-01-29 01:05:12 +00:00
Chris Lattner
bf540473f8 noteworthy.
llvm-svn: 19901
2005-01-29 00:44:22 +00:00
Chris Lattner
c29f25e260 Adjust to changes in instruction interfaces.
llvm-svn: 19900
2005-01-29 00:39:08 +00:00
Chris Lattner
7dab604f10 Switchinst takes a hint for the number of cases it will have.
llvm-svn: 19899
2005-01-29 00:38:45 +00:00
Chris Lattner
ccc0c99fae switchinst ctor now takes a hint for the number of cases that it will have.
llvm-svn: 19898
2005-01-29 00:38:26 +00:00
Chris Lattner
d87666619f Adjust Valuehandle to hold its operand directly in it.
llvm-svn: 19897
2005-01-29 00:37:36 +00:00
Chris Lattner
774d64469c Finegrainify namespacification.
Adjust TmpInstruction to work with the new User model.

llvm-svn: 19896
2005-01-29 00:36:59 +00:00
Chris Lattner
0b2dec0f59 add namespace qualifier
llvm-svn: 19895
2005-01-29 00:36:38 +00:00
Chris Lattner
031d5f649c Adjust to changes in User class and minor changes in instruction ctors.
llvm-svn: 19894
2005-01-29 00:36:19 +00:00
Chris Lattner
e0580122ab Adjust to slight changes in instruction interfaces.
llvm-svn: 19893
2005-01-29 00:35:55 +00:00
Chris Lattner
50d674e9da Adjust to changes in User class.
llvm-svn: 19892
2005-01-29 00:35:33 +00:00
Chris Lattner
12f9442dc3 Merge InstrTypes.cpp into this file
Adjust to changes in the User class, operand handling is very different.
PHI node and switch statements must handle explicit resizing of operand
lists.

llvm-svn: 19891
2005-01-29 00:35:16 +00:00
Chris Lattner
5244a770c3 Adjust to changes in User class. Aggregate constants now must explicitly
manage their operands.

llvm-svn: 19890
2005-01-29 00:34:39 +00:00
Chris Lattner
a0498b9190 This file is now merged into Instructions.cpp
llvm-svn: 19889
2005-01-29 00:33:32 +00:00
Chris Lattner
d8266ae3dd Adjust to changes in the User class.
llvm-svn: 19888
2005-01-29 00:33:00 +00:00
Chris Lattner
941fce0bb5 Adjust to changes in the User class. Introduce a new UnaryInstruction
class.

llvm-svn: 19887
2005-01-29 00:32:51 +00:00
Chris Lattner
1567599aae Adjust to user changes.
llvm-svn: 19886
2005-01-29 00:32:00 +00:00
Chris Lattner
6e2367383d Many changes to cope with the User.h changes. Instructions now generally
directly embed their operands.

llvm-svn: 19885
2005-01-29 00:31:36 +00:00
Chris Lattner
91422cffe4 Adjust to User.h changes.
llvm-svn: 19884
2005-01-29 00:30:52 +00:00
Chris Lattner
c6c1106909 Instead of storing operands as std::vector<Use>, just maintain a pointer
and num operands in the User class.  this allows us to embed the operands
directly in the subclasses if possible.  For example, for binary operators
we store the two operands in the derived class.

The has several effects:
  1. it improves locality because the operands and instruction are together
  2. it makes accesses to operands faster (one less load) if you access them
     through the derived class pointer.  For example this:

Value *GetBinaryOperatorOp(BinaryOperator *I, int i) {
  return I->getOperand(i);
}

Was compiled to:

_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
        movl    4(%esp), %edx
        movl    8(%esp), %eax
        sall    $4, %eax
        movl    24(%edx), %ecx
        addl    %ecx, %eax
        movl    (%eax), %eax
        ret

and is now compiled to:

_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
        movl    8(%esp), %eax
        movl    4(%esp), %edx
        sall    $4, %eax
        addl    %edx, %eax
        movl    44(%eax), %eax
        ret

Accesses through "Instruction*" are unmodified.

   3. This reduces memory consumption (by about 3%) by eliminating 1 word of
      vector overhead and a malloc header on a seperate object.
   4. This speeds up gccas about 10% (both debug and release builds) on
      large things (such as 176.gcc).  For example, it takes a debug build
      from 172.9 -> 155.6s and a release gccas from 67.7 -> 61.8s

llvm-svn: 19883
2005-01-29 00:29:39 +00:00
Andrew Lenharth
8a3a14d343 fix ExprMap, partially teach about add long
llvm-svn: 19882
2005-01-28 23:17:54 +00:00
Chris Lattner
f893f17907 Fix a nasty thinko in my previous commit.
llvm-svn: 19881
2005-01-28 23:17:27 +00:00
Chris Lattner
2755fb4171 Alpha doesn't have a native f32 extload instruction.
llvm-svn: 19880
2005-01-28 22:58:25 +00:00
Chris Lattner
da7b5277c1 implement legalization of truncates whose results and sources need to be
truncated, e.g. (truncate:i8 something:i16) on a 32 or 64-bit RISC.

llvm-svn: 19879
2005-01-28 22:52:50 +00:00
Chris Lattner
89cac82479 Get alpha working with memset/memcpy/memmove
llvm-svn: 19878
2005-01-28 22:29:18 +00:00
Reid Spencer
0931107cf9 Fix some typos in the Makefile.rules.
Patch contributed by Vladimer Merzliakov.

llvm-svn: 19877
2005-01-28 19:52:32 +00:00
Chris Lattner
2d1b7e14d2 Hrm, who knows what 'uint' is, but it seems to work sometimes? Wierd.
llvm-svn: 19876
2005-01-28 19:37:35 +00:00
Chris Lattner
b035ec4a9c * add some DEBUG statements
* Properly compile this:

struct a {};
int test() {
  struct a b[2];
  if (&b[0] != &b[1])
    abort ();
  return 0;
}

to 'return 0', not abort().

llvm-svn: 19875
2005-01-28 19:32:01 +00:00
Chris Lattner
f24ea9cf5e Fix ConstProp/2005-01-28-SetCCGEP.ll: indexing over zero sized elements does
not change the address.

llvm-svn: 19874
2005-01-28 19:09:51 +00:00
Chris Lattner
1d8c703bc9 New testcase.
llvm-svn: 19873
2005-01-28 19:08:32 +00:00
Chris Lattner
a695542e41 Add some initial documentation for the SelectionDAG based instruction selectors
llvm-svn: 19872
2005-01-28 17:22:53 +00:00
Chris Lattner
a7ce993d7f Do not clean up if the MappedFile was never used or if the client already
closed the file.  This unbreaks the build.

llvm-svn: 19871
2005-01-28 16:08:23 +00:00
Andrew Lenharth
9db35b0763 fix ExprMap and constant check in setcc
llvm-svn: 19870
2005-01-28 14:06:46 +00:00
Jeff Cohen
29092b4f26 Get VC++ compiling again
llvm-svn: 19869
2005-01-28 07:29:32 +00:00
Reid Spencer
dab05f06a4 Convert some old C-style casts to C++ style.
llvm-svn: 19868
2005-01-28 07:22:20 +00:00
Andrew Lenharth
4cfda09ee9 move FP into it's own select
llvm-svn: 19867
2005-01-28 06:57:18 +00:00
Chris Lattner
4134789c8f CopyFromReg produces two values. Make sure that we remember that both are
legalized, and actually return the correct result when we legalize the chain first.

llvm-svn: 19866
2005-01-28 06:27:38 +00:00
Chris Lattner
9ed700733d These passes are no more.
llvm-svn: 19865
2005-01-28 06:13:52 +00:00
Chris Lattner
fadcc07232 Remove this code as it is currently completely broken and unmaintained.
If needed, this can be resurrected from CVS.

Note that several of the interfaces (e.g. the IPModRef ones) are supersumed
by generic AliasAnalysis interfaces that have been written since this code
was developed (and they are not DSA specific).

llvm-svn: 19864
2005-01-28 06:12:46 +00:00