Brian Gaeke
0d477a958f
Add support for copying bool constants to registers.
...
Disable the code that copies long constants to registers - it looks fishy.
Implement some simple casts: integral, smaller than longs, and equal-width
or narrowing only.
llvm-svn: 13413
2004-05-07 21:39:30 +00:00
Chris Lattner
67c21e74ec
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
0bfc4cbb20
Add more casts. You can never have enough casts.
...
llvm-svn: 13408
2004-05-07 21:10:28 +00:00
Chris Lattner
2021030378
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
9d47fb5055
PR implemented
...
llvm-svn: 13406
2004-05-07 19:23:05 +00:00
Chris Lattner
335945deb6
Bug fixed
...
llvm-svn: 13403
2004-05-07 18:40:38 +00:00
Chris Lattner
25eab703b8
New testcase
...
llvm-svn: 13402
2004-05-07 18:38:59 +00:00
Chris Lattner
d2bfeadad8
New testcase for PR336
...
llvm-svn: 13401
2004-05-07 15:38:50 +00:00
Chris Lattner
6340390476
Fix PR336: The instcombine pass asserts when visiting load instruction
...
llvm-svn: 13400
2004-05-07 15:35:56 +00:00
John Criswell
9d57722f25
Regression test for PR#330.
...
llvm-svn: 13399
2004-05-07 13:57:19 +00:00
Chris Lattner
49980050b5
Add the enum corresponding to the source change I made earlier
...
llvm-svn: 13395
2004-05-07 02:27:32 +00:00
John Criswell
e3ff9d83cf
Bug fixed.
...
llvm-svn: 13392
2004-05-06 22:23:24 +00:00
John Criswell
ec6d378d21
Don't call getForwardedType() twice, as recommended by Chris.
...
llvm-svn: 13391
2004-05-06 22:15:47 +00:00
Chris Lattner
d055a56886
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
88706ea172
Implement the new cl::PositionalEatsArgs flag, refactor code a bit
...
llvm-svn: 13388
2004-05-06 22:04:31 +00:00
Chris Lattner
83bd016ffd
Add a new cl::PositionalEatsArgs flag
...
llvm-svn: 13387
2004-05-06 22:03:59 +00:00
John Criswell
2d7c5ae892
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
f1cb30f481
Remove a really old comment
...
llvm-svn: 13385
2004-05-06 19:29:58 +00:00
Reid Spencer
ddd4f21d34
Just testing the "Reid has CVS commit access" system
...
llvm-svn: 13384
2004-05-06 18:06:18 +00:00
Misha Brukman
8876e2fe5b
Give props to Vladimir Prus for the inst_iterator patch.
...
llvm-svn: 13383
2004-05-06 16:53:18 +00:00
Chris Lattner
5f18bec9e6
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
6345ab33dd
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
dfe0d9af07
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
2165451812
Apply simplification suggested by Chris: why assign() when operator = will do?
...
llvm-svn: 13364
2004-05-04 22:02:41 +00:00
John Criswell
b51e979c2c
Fixed inconsistent indentation.
...
llvm-svn: 13363
2004-05-04 21:46:05 +00:00
Brian Gaeke
c9ca9d6625
Missing piece of fix for Bug 333
...
llvm-svn: 13362
2004-05-04 21:41:45 +00:00
Brian Gaeke
5485e6fa0a
Bugs fixed
...
llvm-svn: 13360
2004-05-04 21:22:57 +00:00
Brian Gaeke
439e61cc1f
update command guide to have --tool-args
...
llvm-svn: 13359
2004-05-04 21:13:35 +00:00
Brian Gaeke
433b49b796
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
28d81c4d0d
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
ba26360c7e
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
42e602b94f
Remove unneeded check
...
llvm-svn: 13355
2004-05-04 19:35:11 +00:00
Chris Lattner
dac54ebbee
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
4d6a3d4e1e
Provide visit(Module&) and visitModule(Module&) functionality.
...
llvm-svn: 13353
2004-05-04 18:30:38 +00:00
Brian Gaeke
f3b62c562e
Add stub support for reading BBTraces.
...
llvm-svn: 13352
2004-05-04 17:11:14 +00:00
Brian Gaeke
e9fab81769
Add BBTrace accessor method and data member.
...
llvm-svn: 13351
2004-05-04 17:11:13 +00:00
Chris Lattner
6adc20db80
Bug fixed
...
llvm-svn: 13350
2004-05-04 17:04:09 +00:00
Chris Lattner
05f657f5c2
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
fb38755cdd
New testcase for PR332
...
llvm-svn: 13348
2004-05-04 17:00:10 +00:00
Brian Gaeke
c9d203e3d2
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
ae8607e56a
Share ProfilingType enum with the C profiling runtime libraries.
...
llvm-svn: 13346
2004-05-04 16:53:07 +00:00
Brian Gaeke
c30f79d8f4
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
2690f648c6
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
b2d9d71730
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
cb9a614ea4
Improve code generated for integer multiplications by 2,3,5,9
...
llvm-svn: 13342
2004-05-04 15:47:14 +00:00
Chris Lattner
7896144611
Minor efficiency tweak, suggested by Patrick Meredith
...
llvm-svn: 13341
2004-05-04 15:19:33 +00:00
Brian Gaeke
a5b32230db
Fix typo
...
llvm-svn: 13340
2004-05-03 23:52:07 +00:00
Brian Gaeke
6b569a35ba
Add initial implementation of basic block tracing runtime
...
llvm-svn: 13339
2004-05-03 23:51:50 +00:00
Brian Gaeke
581652e2e1
Add basic block tracing functions as exported symbols.
...
llvm-svn: 13338
2004-05-03 23:49:17 +00:00
Brian Gaeke
0f806b8509
Add basic block tracing information as a type of "profiling" information.
...
llvm-svn: 13337
2004-05-03 23:49:16 +00:00