Chris Lattner [Tue, 1 Feb 2005 01:24:01 +0000 (01:24 +0000)]
Update for API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19960
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Feb 2005 01:23:49 +0000 (01:23 +0000)]
API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19959
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Feb 2005 01:23:31 +0000 (01:23 +0000)]
Adjust to changes in APIs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19958
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Feb 2005 01:22:56 +0000 (01:22 +0000)]
Hacks to make this ugly ugly code work with the new use lists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19957
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Feb 2005 01:22:06 +0000 (01:22 +0000)]
Switch from using an ilist for uses to using a custom doubly linked list.
This list does not provide the ability to go backwards in the list (its
more of an unordered collection, stored in the shape of a list).
This change means that use iterators are now only forward iterators, not
bidirectional.
This improves the memory usage of use lists from '5 + 4*#use' per value to
'1 + 4*#use'. While it would be better to reduce the multiplied factor,
I'm not smart enough to do so. This list also has slightly more efficient
operators for manipulating list nodes (a few less loads/stores), due to not
needing to be able to iterate backwards through the list.
This change reduces the memory footprint required to hold 176.gcc from
66.025M -> 57.687M, a 14% reduction. It also speeds up the compiler,
7.73% in the case of bytecode loading alone (release build loading 176.gcc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19956
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Feb 2005 00:18:30 +0000 (00:18 +0000)]
Fix a problem where we could infinitely recurse on phi nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19955
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 31 Jan 2005 06:19:57 +0000 (06:19 +0000)]
Fix hyphenation in output comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19954
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 05:51:45 +0000 (05:51 +0000)]
Implement InstCombine/cast.ll:test25, a case that occurs many times
in spec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19953
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 05:51:18 +0000 (05:51 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19952
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Mon, 31 Jan 2005 05:42:10 +0000 (05:42 +0000)]
Add LLVM with Visual Studio overview
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19951
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 05:36:43 +0000 (05:36 +0000)]
Implement the trivial cases in InstCombine/store.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19950
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 05:36:19 +0000 (05:36 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19949
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 05:17:31 +0000 (05:17 +0000)]
Rename these to start with %c, as they are the only ones that are checked.
No change to the tests themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19948
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 04:50:46 +0000 (04:50 +0000)]
Implement Transforms/InstCombine/cast-load-gep.ll, which allows us to devirtualize
11 indirect calls in perlbmk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19947
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 04:49:22 +0000 (04:49 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19946
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 31 Jan 2005 03:19:31 +0000 (03:19 +0000)]
indirect call fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19945
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 31 Jan 2005 01:44:26 +0000 (01:44 +0000)]
fp to int and back conversion sequences
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19944
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 01:11:13 +0000 (01:11 +0000)]
Fix the regressions my User changes introduced. Apparently some parts of
LLVM make the very reasonable assumption that constant expressions will
have at least one operand! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19943
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 00:10:58 +0000 (00:10 +0000)]
Rename variables to work with VC++'s hokey scoping rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19942
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Jan 2005 00:10:45 +0000 (00:10 +0000)]
Fix some scary bugs that VC++ detected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19941
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Jan 2005 23:51:25 +0000 (23:51 +0000)]
Make things more const-correct, adjust to changes in DSA interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19940
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Jan 2005 23:51:02 +0000 (23:51 +0000)]
* Make some methods more const correct.
* Change the FunctionCalls and AuxFunctionCalls vectors into std::lists.
This makes many operations on these lists much more natural, and avoids
*exteremely* expensive copying of DSCallSites (e.g. moving nodes around
between lists, erasing a node from not the end of the vector, etc).
With a profile build of analyze, this speeds up BU DS from 25.14s to
12.59s on 176.gcc. I expect that it would help TD even more, but I don't
have data for it.
This effectively eliminates removeIdenticalCalls and children from the
profile, going from 6.53 to 0.27s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19939
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 30 Jan 2005 20:42:36 +0000 (20:42 +0000)]
added fp extend and removed a forgotten assert in more than 6 arg support (should break somewhere else now :) ) and fix an incorrect asm sequence for indirect calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19938
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sun, 30 Jan 2005 17:54:12 +0000 (17:54 +0000)]
Silence VC++ warnings about using 'this' in base member initializations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19937
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Jan 2005 16:33:46 +0000 (16:33 +0000)]
This code is really unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19934
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Jan 2005 16:32:48 +0000 (16:32 +0000)]
Fix warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19933
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 30 Jan 2005 00:35:27 +0000 (00:35 +0000)]
support for larger calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19932
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Jan 2005 00:13:34 +0000 (00:13 +0000)]
Improve spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19931
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 30 Jan 2005 00:09:23 +0000 (00:09 +0000)]
Improve conformance with the Misha spelling benchmark suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19930
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Sat, 29 Jan 2005 23:29:55 +0000 (23:29 +0000)]
Make this work on systems where size_t == unsigned and where they are not
the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19929
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Sat, 29 Jan 2005 23:08:01 +0000 (23:08 +0000)]
Make this work on systems where size_t is not the same as unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19928
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 19:27:28 +0000 (19:27 +0000)]
Unbreak the build :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19926
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 18:43:28 +0000 (18:43 +0000)]
Adjust to ilist changes.
Based on the ilist changes avoid allocating an entire Use object for the
end of the Use chain. This saves 8 bytes of memory for each Value allocated
in the program. For 176.gcc, this reduces us from 69.5M -> 66.0M, a 5.3%
memory savings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19925
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 18:41:25 +0000 (18:41 +0000)]
adjust to ilist changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19924
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 18:41:12 +0000 (18:41 +0000)]
Adjust to ilist changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 18:41:00 +0000 (18:41 +0000)]
Adjust to changes in ilist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19922
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 18:40:19 +0000 (18:40 +0000)]
Rename createNode -> createSentinal.
Add a new method, destroySentinal, that is used to delete it (instead of
requiring use of delete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19921
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 17:29:05 +0000 (17:29 +0000)]
clean up comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19920
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 17:27:26 +0000 (17:27 +0000)]
This has been deprecated for long enough, nuke it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19919
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 17:17:18 +0000 (17:17 +0000)]
This file was schizophrenic when it came to representing sizes. In some
cases it represented them as 'unsigned's, which are not enough for 64-bit
hosts. In other cases, it represented them as uint64_t's, which are
inefficient for 32-bit hosts.
This patch unifies all of the sizes to use size_t instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19918
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 17:16:07 +0000 (17:16 +0000)]
There is no reason to include ostream here, include iosfwd instead.
This file was schizophrenic when it came to representing sizes. In some
cases it represented them as 'unsigneds', which are not enough for 64-bit
hosts. In other cases, it represented them as uint64_t's, which are
inefficient for 32-bit hosts.
This patch unifies all of the sizes to use size_t instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19917
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 17:05:56 +0000 (17:05 +0000)]
After reading in a bc file, trim the resultant buffer down to what we
really need. This reduces 4M of memory consumption reading 176.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19916
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 16:53:02 +0000 (16:53 +0000)]
Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19915
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sat, 29 Jan 2005 15:42:07 +0000 (15:42 +0000)]
first step towards a correct and complete stack. also add some forms for things that were getting stuck in the nightly tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19914
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 07:04:10 +0000 (07:04 +0000)]
Due to previous simplifications, we can simplify the data structures being
used here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19913
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 06:42:34 +0000 (06:42 +0000)]
Properly handle volatile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19912
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 06:39:25 +0000 (06:39 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19911
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 06:31:53 +0000 (06:31 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19910
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 06:29:45 +0000 (06:29 +0000)]
Fix quotes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19909
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 29 Jan 2005 06:27:16 +0000 (06:27 +0000)]
Unbreak VC++ build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19908
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 06:20:55 +0000 (06:20 +0000)]
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%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19907
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 06:11:16 +0000 (06:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19906
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 05:57:01 +0000 (05:57 +0000)]
If we see:
%A = alloca int
%V = load int* %A
value number %V to undef, not 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19905
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 05:21:16 +0000 (05:21 +0000)]
Memory used is a delta between memuse at the start of the time and the
memuse at the end, thus it is signed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19904
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 29 Jan 2005 03:32:49 +0000 (03:32 +0000)]
Unbreak VC++ build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19903
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 01:05:12 +0000 (01:05 +0000)]
Make sure that we always grow a multiple of 2 operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19902
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:44:22 +0000 (00:44 +0000)]
noteworthy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19901
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:39:08 +0000 (00:39 +0000)]
Adjust to changes in instruction interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19900
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:38:45 +0000 (00:38 +0000)]
Switchinst takes a hint for the number of cases it will have.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19899
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:38:26 +0000 (00:38 +0000)]
switchinst ctor now takes a hint for the number of cases that it will have.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19898
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:37:36 +0000 (00:37 +0000)]
Adjust Valuehandle to hold its operand directly in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19897
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:36:59 +0000 (00:36 +0000)]
Finegrainify namespacification.
Adjust TmpInstruction to work with the new User model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19896
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:36:38 +0000 (00:36 +0000)]
add namespace qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19895
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:36:19 +0000 (00:36 +0000)]
Adjust to changes in User class and minor changes in instruction ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19894
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:35:55 +0000 (00:35 +0000)]
Adjust to slight changes in instruction interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19893
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:35:33 +0000 (00:35 +0000)]
Adjust to changes in User class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19892
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:35:16 +0000 (00:35 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19891
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:34:39 +0000 (00:34 +0000)]
Adjust to changes in User class. Aggregate constants now must explicitly
manage their operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19890
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:33:32 +0000 (00:33 +0000)]
This file is now merged into Instructions.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19889
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:33:00 +0000 (00:33 +0000)]
Adjust to changes in the User class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19888
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:32:51 +0000 (00:32 +0000)]
Adjust to changes in the User class. Introduce a new UnaryInstruction
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19887
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:32:00 +0000 (00:32 +0000)]
Adjust to user changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19886
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:31:36 +0000 (00:31 +0000)]
Many changes to cope with the User.h changes. Instructions now generally
directly embed their operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19885
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:30:52 +0000 (00:30 +0000)]
Adjust to User.h changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19884
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:29:39 +0000 (00:29 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19883
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 28 Jan 2005 23:17:54 +0000 (23:17 +0000)]
fix ExprMap, partially teach about add long
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19882
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 23:17:27 +0000 (23:17 +0000)]
Fix a nasty thinko in my previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19881
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 22:58:25 +0000 (22:58 +0000)]
Alpha doesn't have a native f32 extload instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19880
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 22:52:50 +0000 (22:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19879
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 22:29:18 +0000 (22:29 +0000)]
Get alpha working with memset/memcpy/memmove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19878
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 28 Jan 2005 19:52:32 +0000 (19:52 +0000)]
Fix some typos in the Makefile.rules.
Patch contributed by Vladimer Merzliakov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19877
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 19:37:35 +0000 (19:37 +0000)]
Hrm, who knows what 'uint' is, but it seems to work sometimes? Wierd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19876
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 19:32:01 +0000 (19:32 +0000)]
* 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().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19875
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 19:09:51 +0000 (19:09 +0000)]
Fix ConstProp/2005-01-28-SetCCGEP.ll: indexing over zero sized elements does
not change the address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19874
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 19:08:32 +0000 (19:08 +0000)]
New testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19873
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 17:22:53 +0000 (17:22 +0000)]
Add some initial documentation for the SelectionDAG based instruction selectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19872
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 16:08:23 +0000 (16:08 +0000)]
Do not clean up if the MappedFile was never used or if the client already
closed the file. This unbreaks the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19871
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 28 Jan 2005 14:06:46 +0000 (14:06 +0000)]
fix ExprMap and constant check in setcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19870
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Fri, 28 Jan 2005 07:29:32 +0000 (07:29 +0000)]
Get VC++ compiling again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19869
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 28 Jan 2005 07:22:20 +0000 (07:22 +0000)]
Convert some old C-style casts to C++ style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19868
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 28 Jan 2005 06:57:18 +0000 (06:57 +0000)]
move FP into it's own select
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 06:27:38 +0000 (06:27 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19866
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 06:13:52 +0000 (06:13 +0000)]
These passes are no more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19865
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 06:12:46 +0000 (06:12 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19864
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Fri, 28 Jan 2005 01:17:07 +0000 (01:17 +0000)]
Properly close mapped files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19863
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 27 Jan 2005 17:59:51 +0000 (17:59 +0000)]
Mark -parallel pass as `experimental'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19858
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 08:31:19 +0000 (08:31 +0000)]
stack frame fix and zero FP reg fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19857
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 07:58:15 +0000 (07:58 +0000)]
Floating point instructions like Floating point registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19856
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 07:50:35 +0000 (07:50 +0000)]
int to float conversion and another setcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19855
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 27 Jan 2005 06:46:38 +0000 (06:46 +0000)]
Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19854
91177308-0d34-0410-b5e6-
96231b3b80d8