Chris Lattner
a2dc6bf6e6
Codegen floating point stores of constants into integer instructions. This
...
allows us to compile:
store float 10.0, float* %P
into:
mov DWORD PTR [%EAX], 1092616192
instead of:
.CPItest_0: # float 0x4024000000000000
.long 1092616192 # float 10
...
fld DWORD PTR [.CPItest_0]
fstp DWORD PTR [%EAX]
llvm-svn: 13409
2004-05-07 21:18:15 +00:00
Brian Gaeke
1edc9637d0
Add more casts. You can never have enough casts.
...
llvm-svn: 13408
2004-05-07 21:10:28 +00:00
Chris Lattner
cecf3f94a4
Make comparisons against the null pointer as efficient as integer comparisons
...
against zero. In particular, don't emit:
mov %ESI, 0
cmp %ECX, %ESI
instead, emit:
test %ECX, %ECX
llvm-svn: 13407
2004-05-07 19:55:55 +00:00
Chris Lattner
cf5822a2be
PR implemented
...
llvm-svn: 13406
2004-05-07 19:23:05 +00:00
Chris Lattner
3553fe3a5b
Bug fixed
...
llvm-svn: 13403
2004-05-07 18:40:38 +00:00
Chris Lattner
798b5e4a6f
New testcase
...
llvm-svn: 13402
2004-05-07 18:38:59 +00:00
Chris Lattner
0a8ee61c51
New testcase for PR336
...
llvm-svn: 13401
2004-05-07 15:38:50 +00:00
Chris Lattner
d9e5813821
Fix PR336: The instcombine pass asserts when visiting load instruction
...
llvm-svn: 13400
2004-05-07 15:35:56 +00:00
John Criswell
e0727fe00d
Regression test for PR#330.
...
llvm-svn: 13399
2004-05-07 13:57:19 +00:00
Chris Lattner
c6fdf8ddb3
Add the enum corresponding to the source change I made earlier
...
llvm-svn: 13395
2004-05-07 02:27:32 +00:00
John Criswell
6956afa7c5
Bug fixed.
...
llvm-svn: 13392
2004-05-06 22:23:24 +00:00
John Criswell
2af0fd3ca8
Don't call getForwardedType() twice, as recommended by Chris.
...
llvm-svn: 13391
2004-05-06 22:15:47 +00:00
Chris Lattner
6aee736d1b
Use the new commandline flag to allow us to call bugpoint like this:
...
bugpoint ... --tool-args -enable-correct-eh-support -regalloc=linearscan --args -- -foo
So that tool-args option gets the -enable-correct-eh-support -regalloc=linearscan flags instead of bugpoint.
llvm-svn: 13389
2004-05-06 22:05:35 +00:00
Chris Lattner
a60f355c87
Implement the new cl::PositionalEatsArgs flag, refactor code a bit
...
llvm-svn: 13388
2004-05-06 22:04:31 +00:00
Chris Lattner
b68bd76978
Add a new cl::PositionalEatsArgs flag
...
llvm-svn: 13387
2004-05-06 22:03:59 +00:00
John Criswell
f6709bc579
Fix for PR#330.
...
When looking at getelementptr instructions, make sure to use a forwarded
type. We want to do this because a DerivedType may drop its uses and then
refine its users, who may then use another user who hasn't been refined yet.
By getting the forwarded type, we always ensure that we're looking at a
Type that isn't in a halfway refined state.
Now, I should be able to put this stuff in PATypeHandle, but it doesn't work
for some reason. This should do for now.
llvm-svn: 13386
2004-05-06 21:18:08 +00:00
Chris Lattner
8737169a6a
Remove a really old comment
...
llvm-svn: 13385
2004-05-06 19:29:58 +00:00
Reid Spencer
432f53b47f
Just testing the "Reid has CVS commit access" system
...
llvm-svn: 13384
2004-05-06 18:06:18 +00:00
Misha Brukman
afdd8a0608
Give props to Vladimir Prus for the inst_iterator patch.
...
llvm-svn: 13383
2004-05-06 16:53:18 +00:00
Chris Lattner
991425ae70
numeric_limits::infinity() apparently does not work on all systems. As a
...
workaround, use the C HUGE_VAL macro instead.
llvm-svn: 13377
2004-05-06 16:25:59 +00:00
Alkis Evlogimenos
4c4497e834
Fix for gcc3.4: invalid use of forward delacred class on line 93
...
llvm-svn: 13370
2004-05-06 02:07:42 +00:00
Brian Gaeke
e330adf842
Move the stuff that fixes the size, orientation & fonts of graphs to
...
the debugging functions that call "dot". These fixed settings have
various problems: for example, the fixed size that is set in the graph
traits classes is not appropriate for turning the dot file into a PNG,
and if TrueType font rendering is being used, the 'Courier' TrueType font
may not be installed. It seems easy enough to specify these things on the
command line, anyhow.
llvm-svn: 13366
2004-05-05 06:10:06 +00:00
Brian Gaeke
706bd5bf2b
Apply simplification suggested by Chris: why assign() when operator = will do?
...
llvm-svn: 13364
2004-05-04 22:02:41 +00:00
John Criswell
987ad1945d
Fixed inconsistent indentation.
...
llvm-svn: 13363
2004-05-04 21:46:05 +00:00
Brian Gaeke
d26074eef1
Missing piece of fix for Bug 333
...
llvm-svn: 13362
2004-05-04 21:41:45 +00:00
Brian Gaeke
e307f8a791
Bugs fixed
...
llvm-svn: 13360
2004-05-04 21:22:57 +00:00
Brian Gaeke
48ef3f0fa1
update command guide to have --tool-args
...
llvm-svn: 13359
2004-05-04 21:13:35 +00:00
Brian Gaeke
4a278f0b1b
Add --tool-args flag which lets you pass arguments to llc or lli.
...
This is intended to address Bug 40.
llvm-svn: 13358
2004-05-04 21:09:16 +00:00
Brian Gaeke
f2ff5dd442
Correctly mangle function names when they are used as part of a
...
constant pool member's name.
This is intended to address Bug 333.
Also, fix an anachronistic usage of "M" as a parameter of type Function *.
llvm-svn: 13357
2004-05-04 21:09:02 +00:00
Brian Gaeke
b3a9a0fcbd
Add "Args" optional argument to AbstractInterpreter factory methods, which
...
fills in a ToolArgs vector in the AbstractInterpreter if it is set. This
ToolArgs vector is used to pass additional arguments to LLI and/or LLC.
This is intended to address Bug 40.
Also, make -debug-only=toolrunner work for the LLC and CBE
AbstractInterpreters.
llvm-svn: 13356
2004-05-04 21:09:01 +00:00
Chris Lattner
c6f601310f
Remove unneeded check
...
llvm-svn: 13355
2004-05-04 19:35:11 +00:00
Chris Lattner
22df9a59b4
Improve signed division by power of 2 *dramatically* from this:
...
div:
mov %EDX, DWORD PTR [%ESP + 4]
mov %ECX, 64
mov %EAX, %EDX
sar %EDX, 31
idiv %ECX
ret
to this:
div:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
sar %ECX, 5
shr %ECX, 26
mov %EDX, %EAX
add %EDX, %ECX
sar %EAX, 6
ret
Note that the intel compiler is currently making this:
div:
movl 4(%esp), %edx #3.5
movl %edx, %eax #4.14
sarl $5, %eax #4.14
shrl $26, %eax #4.14
addl %edx, %eax #4.14
sarl $6, %eax #4.14
ret #4.14
Which has one less register->register copy. (hint hint alkis :)
llvm-svn: 13354
2004-05-04 19:33:58 +00:00
Misha Brukman
bc1ccfd053
Provide visit(Module&) and visitModule(Module&) functionality.
...
llvm-svn: 13353
2004-05-04 18:30:38 +00:00
Brian Gaeke
600f2045a9
Add stub support for reading BBTraces.
...
llvm-svn: 13352
2004-05-04 17:11:14 +00:00
Brian Gaeke
9a1b8c73a8
Add BBTrace accessor method and data member.
...
llvm-svn: 13351
2004-05-04 17:11:13 +00:00
Chris Lattner
ea309ff082
Bug fixed
...
llvm-svn: 13350
2004-05-04 17:04:09 +00:00
Chris Lattner
9490849028
Do not mark instructions in unreachable sections of the function as live.
...
This fixes PR332 and ADCE/2004-05-04-UnreachableBlock.llx
llvm-svn: 13349
2004-05-04 17:00:46 +00:00
Chris Lattner
1190a4de0b
New testcase for PR332
...
llvm-svn: 13348
2004-05-04 17:00:10 +00:00
Brian Gaeke
ba7b0d7a0e
New header file containing profile info enums shared between the C++ analysis
...
libraries and the C runtime support library
llvm-svn: 13347
2004-05-04 16:57:57 +00:00
Brian Gaeke
34c13fbe94
Share ProfilingType enum with the C profiling runtime libraries.
...
llvm-svn: 13346
2004-05-04 16:53:07 +00:00
Brian Gaeke
495d9340e9
Share the profile info type enum with the C++ analysis libraries.
...
Add a documentation comment for write_profiling_data().
llvm-svn: 13345
2004-05-04 16:51:48 +00:00
Brian Gaeke
875d70b3c0
Constants for profile info type changed names to match the C++ ones.
...
llvm-svn: 13344
2004-05-04 16:51:47 +00:00
Brian Gaeke
6e72e2a6e9
Constants for profile info type changed names to match the C++ ones.
...
Edited comments.
llvm-svn: 13343
2004-05-04 16:51:46 +00:00
Chris Lattner
8c22ece232
Improve code generated for integer multiplications by 2,3,5,9
...
llvm-svn: 13342
2004-05-04 15:47:14 +00:00
Chris Lattner
dd1a86d858
Minor efficiency tweak, suggested by Patrick Meredith
...
llvm-svn: 13341
2004-05-04 15:19:33 +00:00
Brian Gaeke
5237476f75
Fix typo
...
llvm-svn: 13340
2004-05-03 23:52:07 +00:00
Brian Gaeke
2157c9a49b
Add initial implementation of basic block tracing runtime
...
llvm-svn: 13339
2004-05-03 23:51:50 +00:00
Brian Gaeke
417d555b6f
Add basic block tracing functions as exported symbols.
...
llvm-svn: 13338
2004-05-03 23:49:17 +00:00
Brian Gaeke
213715bceb
Add basic block tracing information as a type of "profiling" information.
...
llvm-svn: 13337
2004-05-03 23:49:16 +00:00
Brian Gaeke
e96196081e
In InsertProfilingInitCall(), make it legal to pass in a null array, in
...
which case you'll get a null array and zero passed to the profiling function.
llvm-svn: 13336
2004-05-03 22:06:33 +00:00