Alkis Evlogimenos
8ac958bf43
Use newly added API to emit bytes for instructions that gas misassembles
...
llvm-svn: 12253
2004-03-09 03:35:34 +00:00
Alkis Evlogimenos
508b459d12
Add emitInstruction() API so that we can get the bytes of a simple instruction
...
llvm-svn: 12252
2004-03-09 03:34:53 +00:00
Alkis Evlogimenos
a7c2da3af5
Constify things a bit
...
llvm-svn: 12251
2004-03-09 03:30:12 +00:00
Chris Lattner
c567f402e5
Bug fixed
...
llvm-svn: 12250
2004-03-09 00:59:15 +00:00
Chris Lattner
349910567e
Checkin testcase for PR261
...
llvm-svn: 12249
2004-03-09 00:55:58 +00:00
Chris Lattner
0536f8df6e
John fixed this bug
...
llvm-svn: 12248
2004-03-09 00:40:49 +00:00
Brian Gaeke
d734587436
Change PhyRegAlloc::saveStateForValue()'s arg type to deal with
...
AllocInfo.Instruction becoming an int.
llvm-svn: 12247
2004-03-08 23:22:03 +00:00
Brian Gaeke
f0a73a3f42
Save argument list alloc state by recording it as the operands of Instruction
...
#-1. Other minor changes to deal with AllocInfo.Instruction becoming an int.
llvm-svn: 12246
2004-03-08 23:22:02 +00:00
Brian Gaeke
0be7ea7289
Make AllocInfo's Instruction an int, so that we can overload it for arguments.
...
(Instruction #-1's operands = argument list).
llvm-svn: 12245
2004-03-08 23:22:01 +00:00
Misha Brukman
b22926616e
Fix some spelling and grammar.
...
llvm-svn: 12244
2004-03-08 23:06:46 +00:00
Chris Lattner
d6e1b28837
Update the profiling section
...
llvm-svn: 12243
2004-03-08 22:29:35 +00:00
Chris Lattner
9bde783c5c
Switch to using edge profiling information as the basic source of profile info
...
from using basic block counts.
llvm-svn: 12242
2004-03-08 22:04:08 +00:00
Chris Lattner
d6eda1a9ef
Switch over to using edge profile information as the basic profiling representation,
...
from basic block counts.
llvm-svn: 12241
2004-03-08 22:03:45 +00:00
Chris Lattner
bd481d588a
Refactor implementations
...
llvm-svn: 12240
2004-03-08 21:30:35 +00:00
Chris Lattner
755ffeb292
We don't want to make this a pure interface, as it makes all implementors
...
bear the burden of implementing what will be all exactly the same methods.
They just want to provide the information in differing ways.
llvm-svn: 12239
2004-03-08 21:30:18 +00:00
Chris Lattner
b08e4653cb
Rearrange some methods, implement the dominates method
...
llvm-svn: 12237
2004-03-08 21:07:12 +00:00
Chris Lattner
63b49d0574
Import the trace class from the reoptimizer
...
llvm-svn: 12236
2004-03-08 20:57:27 +00:00
Chris Lattner
9c222ed4b5
Default to using edge counts
...
llvm-svn: 12234
2004-03-08 20:04:46 +00:00
Chris Lattner
c71ea6e3d4
Annotate functions with edge counts as well, if they are available.
...
llvm-svn: 12233
2004-03-08 20:04:32 +00:00
Chris Lattner
5302943ff7
If we have edge counts, we can produce block counts. I've verified that
...
using an edge profile to produce block counts gives the exact same numbers
as using a block count directly.
llvm-svn: 12232
2004-03-08 20:03:52 +00:00
Chris Lattner
96cdd27b65
Adjust to new interface
...
llvm-svn: 12231
2004-03-08 18:51:45 +00:00
Chris Lattner
03745f3e80
Add the ability to put an annotation at the end of a basic block as well.
...
llvm-svn: 12230
2004-03-08 18:51:05 +00:00
Chris Lattner
8b8a0641a1
Add initial support for reading edge counts. This will be improved to enable
...
translation of edge counts into block/function counts when possible.
llvm-svn: 12229
2004-03-08 18:20:18 +00:00
Chris Lattner
178608ee2b
Add support for representing edge counts
...
llvm-svn: 12228
2004-03-08 18:19:37 +00:00
Chris Lattner
29ba1be907
Add edge profiling support to the runtime library
...
llvm-svn: 12227
2004-03-08 18:04:31 +00:00
Misha Brukman
3702b9d79b
Fix link to license: point to current version in CVS.
...
llvm-svn: 12226
2004-03-08 17:59:31 +00:00
Chris Lattner
721264aecc
Initial support for edge profiling
...
llvm-svn: 12225
2004-03-08 17:54:34 +00:00
Chris Lattner
dae48f93b0
Split utility functions out of BlockProfiling.cpp
...
llvm-svn: 12224
2004-03-08 17:06:13 +00:00
Chris Lattner
b16526108c
Remove the comment "Constants must always have an initial value.", which
...
is incorrect. Fix some formatting nastiness.
llvm-svn: 12223
2004-03-08 16:49:10 +00:00
Chris Lattner
d91e676700
finegrainify namespacification
...
llvm-svn: 12221
2004-03-08 16:45:53 +00:00
Chris Lattner
e2b27080e7
Insert functions into the module promptly, not lazily. This fixes a bug
...
I introduced last night. Note to self: test the *correct* tree...
llvm-svn: 12220
2004-03-08 16:14:19 +00:00
Chris Lattner
ea0789ca7b
Implement test/Regression/Assembler/2004-03-07-FunctionAddressAlignment.llx
...
llvm-svn: 12218
2004-03-08 06:17:35 +00:00
Chris Lattner
be3a169d18
New testcase for folding in some important situations. The first two
...
come up a lot in the code generated by the C++ front-end for pointers
to member functions. See PR166.
llvm-svn: 12217
2004-03-08 06:17:15 +00:00
Chris Lattner
c3ecaae16c
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
...
This is one small step towards the complete obliteration of
ConstantPointerRef's entirely!! Woot!
llvm-svn: 12216
2004-03-08 06:16:10 +00:00
Chris Lattner
8301a593a9
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
...
llvm-svn: 12215
2004-03-08 06:15:33 +00:00
Chris Lattner
9f4918ab93
Eliminate nightmarish API
...
llvm-svn: 12214
2004-03-08 06:11:10 +00:00
Chris Lattner
16e27f3af3
remove *THANKFULLY* dead method
...
llvm-svn: 12213
2004-03-08 06:10:32 +00:00
Chris Lattner
75998c0885
Eliminate a REALLY HORRIBLE API: mutateReferences, which is gross gross gross.
...
llvm-svn: 12212
2004-03-08 06:09:57 +00:00
Chris Lattner
7e201ecc31
New testcase for PR269
...
llvm-svn: 12211
2004-03-08 05:35:12 +00:00
Chris Lattner
f0cbbabea7
Bug fixed
...
llvm-svn: 12210
2004-03-08 04:55:45 +00:00
Chris Lattner
451e10e46a
Testcase that crashes the C front-end.
...
llvm-svn: 12209
2004-03-08 04:41:32 +00:00
Chris Lattner
84c697d520
Fix a bug handling globals that are constants, but are still external
...
llvm-svn: 12208
2004-03-08 03:52:24 +00:00
Chris Lattner
98502aae76
Avoid allocating special registers a bit more robustly
...
llvm-svn: 12207
2004-03-08 03:48:07 +00:00
Chris Lattner
0653e1167d
New code-quality testcase.
...
llvm-svn: 12205
2004-03-08 02:12:36 +00:00
Chris Lattner
653e662a93
Implement folding explicit load instructions into binary operations. For a
...
testcase like this:
int %test(int* %P, int %A) {
%Pv = load int* %P
%B = add int %A, %Pv
ret int %B
}
We now generate:
test:
mov %ECX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP + 8]
add %EAX, DWORD PTR [%ECX]
ret
Instead of:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
mov %EAX, DWORD PTR [%EAX]
add %EAX, %ECX
ret
... saving one instruction, and often a register. Note that there are a lot
of other instructions that could use this, but they aren't handled. I'm not
really interested in adding them, but mul/div and all of the FP instructions
could be supported as well if someone wanted to add them.
llvm-svn: 12204
2004-03-08 01:58:35 +00:00
Chris Lattner
1dd6afe6a2
Rearrange and refactor some code. No functionality changes.
...
llvm-svn: 12203
2004-03-08 01:18:36 +00:00
Chris Lattner
fe6f2e3e80
Implement ArgumentPromotion/aggregate-promote.ll
...
This allows pointers to aggregate objects, whose elements are only read, to
be promoted and passed in by element instead of by reference. This can
enable a LOT of subsequent optimizations in the caller function.
It's worth pointing out that this stuff happens a LOT of C++ programs, because
objects in templates are generally passed around by reference. When these
templates are instantiated on small aggregate or scalar types, however, it is
more efficient to pass them in by value than by reference.
This transformation triggers most on C++ codes (e.g. 334 times on eon), but
does happen on C codes as well. For example, on mesa it triggers 72 times,
and on gcc it triggers 35 times. this is amazingly good considering that
we are using 'basicaa' so far.
llvm-svn: 12202
2004-03-08 01:04:36 +00:00
Chris Lattner
1f7f22c42c
New testcase
...
llvm-svn: 12201
2004-03-08 00:58:19 +00:00
Chris Lattner
cc544e57f3
Implement: ArgumentPromotion/chained.ll
...
llvm-svn: 12200
2004-03-07 22:52:53 +00:00
Chris Lattner
332a8bdf31
New testcase for missed case
...
llvm-svn: 12199
2004-03-07 22:52:41 +00:00