Commit Graph

11796 Commits

Author SHA1 Message Date
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
Brian Gaeke 088dd3e121 Add initial implementation of basic-block tracing instrumentation pass.
llvm-svn: 13335
2004-05-03 22:06:32 +00:00
Chris Lattner 6e6baf6157 Initialize member out of paranoia
llvm-svn: 13319
2004-05-02 16:06:40 +00:00
Chris Lattner 6942946132 Fix a problem with double freeing memory. For some reason, CallGraph is not
acting like a normal pass.  :(

llvm-svn: 13318
2004-05-02 16:06:18 +00:00
Chris Lattner 929291aabb Plug a minor memory leak
llvm-svn: 13317
2004-05-02 07:31:34 +00:00
Chris Lattner be6f06818c Do not clone arbitrary condition instructions.
llvm-svn: 13316
2004-05-02 05:19:36 +00:00
Chris Lattner 51a6dbcb65 Do not infinitely "unroll" single BB loops.
llvm-svn: 13315
2004-05-02 05:02:03 +00:00
Chris Lattner 2ad4878d8e Add some stuff to the release notes.
llvm-svn: 13314
2004-05-02 04:19:15 +00:00
Brian Gaeke 19202cd08b Chris told me to take these assertions out a few days ago, but I forgot to
check this in.

llvm-svn: 13313
2004-05-02 01:04:52 +00:00
Chris Lattner 1e94ed606e Dont' merge terminators that are needed to select PHI node values.
llvm-svn: 13312
2004-05-02 01:00:44 +00:00
Chris Lattner 2e93c4275e Implement SimplifyCFG/branch-cond-merge.ll
Turning "if (A < B && B < C)" into "if (A < B & B < C)"

llvm-svn: 13311
2004-05-01 23:35:43 +00:00
Chris Lattner c9b34e5648 New testcase:
Turn "if (A < B && B < C)" into "if (A < B & B < C)"

llvm-svn: 13310
2004-05-01 23:35:21 +00:00