Commit Graph

11778 Commits

Author SHA1 Message Date
Brian Gaeke
d11577b68b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:09:01 +00:00
Chris Lattner
bbc130d110 Remove unneeded check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 19:35:11 +00:00
Chris Lattner
c8af02c403 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13354 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 19:33:58 +00:00
Misha Brukman
2dd5c96866 Provide visit(Module&) and visitModule(Module&) functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 18:30:38 +00:00
Brian Gaeke
b171d7949d Add stub support for reading BBTraces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 17:11:14 +00:00
Brian Gaeke
7e3f82e6a5 Add BBTrace accessor method and data member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13351 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 17:11:13 +00:00
Chris Lattner
d4594dc61e Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13350 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 17:04:09 +00:00
Chris Lattner
b9110c61fb Do not mark instructions in unreachable sections of the function as live.
This fixes PR332 and ADCE/2004-05-04-UnreachableBlock.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13349 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 17:00:46 +00:00
Chris Lattner
b71ebdf03c New testcase for PR332
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13348 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 17:00:10 +00:00
Brian Gaeke
dc0bedcd25 New header file containing profile info enums shared between the C++ analysis
libraries and the C runtime support library


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13347 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 16:57:57 +00:00
Brian Gaeke
660ef70b62 Share ProfilingType enum with the C profiling runtime libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13346 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 16:53:07 +00:00
Brian Gaeke
ada3c4f805 Share the profile info type enum with the C++ analysis libraries.
Add a documentation comment for write_profiling_data().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13345 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 16:51:48 +00:00
Brian Gaeke
9fa49c8906 Constants for profile info type changed names to match the C++ ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13344 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 16:51:47 +00:00
Brian Gaeke
40114b780b Constants for profile info type changed names to match the C++ ones.
Edited comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13343 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 16:51:46 +00:00
Chris Lattner
9eb9b8ecb9 Improve code generated for integer multiplications by 2,3,5,9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13342 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 15:47:14 +00:00
Chris Lattner
32ed46b36e Minor efficiency tweak, suggested by Patrick Meredith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13341 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 15:19:33 +00:00
Brian Gaeke
96e68f9ab1 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13340 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-03 23:52:07 +00:00
Brian Gaeke
ca1a6976ba Add initial implementation of basic block tracing runtime
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13339 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-03 23:51:50 +00:00
Brian Gaeke
86329b3fd6 Add basic block tracing functions as exported symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13338 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-03 23:49:17 +00:00
Brian Gaeke
273595f907 Add basic block tracing information as a type of "profiling" information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13337 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-03 23:49:16 +00:00
Brian Gaeke
ebbc0e9bbf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13336 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-03 22:06:33 +00:00
Brian Gaeke
c03eb7b923 Add initial implementation of basic-block tracing instrumentation pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13335 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-03 22:06:32 +00:00
Chris Lattner
1570cb14d7 Initialize member out of paranoia
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13319 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 16:06:40 +00:00
Chris Lattner
7b11e339d2 Fix a problem with double freeing memory. For some reason, CallGraph is not
acting like a normal pass.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13318 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 16:06:18 +00:00
Chris Lattner
224f7e65e0 Plug a minor memory leak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13317 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 07:31:34 +00:00
Chris Lattner
bdcc0b8c55 Do not clone arbitrary condition instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13316 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 05:19:36 +00:00
Chris Lattner
12fe2b1b82 Do not infinitely "unroll" single BB loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13315 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 05:02:03 +00:00
Chris Lattner
6e1ef199ab Add some stuff to the release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13314 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 04:19:15 +00:00
Brian Gaeke
3ec4f261d2 Chris told me to take these assertions out a few days ago, but I forgot to
check this in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13313 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 01:04:52 +00:00
Chris Lattner
a1f79fb08b Dont' merge terminators that are needed to select PHI node values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13312 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 01:00:44 +00:00
Chris Lattner
e67fa05036 Implement SimplifyCFG/branch-cond-merge.ll
Turning "if (A < B && B < C)" into "if (A < B & B < C)"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13311 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 23:35:43 +00:00
Chris Lattner
470221cfc0 New testcase:
Turn "if (A < B && B < C)" into "if (A < B & B < C)"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13310 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 23:35:21 +00:00
Chris Lattner
00d513182d Make sure to reprocess instructions used by deleted instructions to avoid
missing opportunities for combination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13309 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 23:27:23 +00:00
Chris Lattner
216d4d85fd Make sure the instruction combiner doesn't lose track of instructions
when replacing them, missing the opportunity to do simplifications


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13308 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 23:19:52 +00:00
Chris Lattner
951fdb9764 Fix my missing parens
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13307 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 22:41:51 +00:00
Chris Lattner
92da2c2053 Implement SimplifyCFG/branch-cond-prop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13306 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 22:36:37 +00:00
Chris Lattner
be8d170c83 New testcase for case that simplifycfg should catch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13305 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 22:36:24 +00:00
Chris Lattner
77993632a1 Remove unused #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13304 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:29:16 +00:00
Chris Lattner
2268684f6f Iterate over the Machine CFG that Brian added instead of the LLVM CFG.
Look at all of the pretty minuses. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13303 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:27:53 +00:00
Chris Lattner
015959ee38 Operate on the Machine CFG instead of on the LLVM CFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13302 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:24:39 +00:00
Chris Lattner
f25fb4bc64 Stop LiveVariables from using BasicBlocks as part of the mapping, instead
use MachineBasicBlocks.  To do this, we traverse the Machine CFG instead of
the LLVM CFG, which is also *MUCH* more efficient by having fewer levels of
indirections and mappings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13301 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:24:24 +00:00
Chris Lattner
96362e9cac Stop LiveVariables from using BasicBlocks as part of the mapping, instead
use MachineBasicBlocks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13300 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:23:35 +00:00
Chris Lattner
0aef12a7a9 Move the GraphTraits for MachineBasicBlocks to the MachineBasicBlock file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13299 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:05:34 +00:00
Chris Lattner
a19a3db446 Add comment about optimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13298 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 11:40:07 +00:00
Chris Lattner
55a4700857 Add a constructor that got lost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13297 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 11:17:13 +00:00
Brian Gaeke
3c66c355b6 Generalize the strlen size_t hack, for the benefit of the other external
functions with wrappers that either take or return size_ts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13296 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 06:42:15 +00:00
Chris Lattner
4b538b911e Fix broken link, again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13295 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-30 22:17:12 +00:00
Tanya Lattner
d11297f2ee Sorry, now friend class name should be right!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-30 20:48:37 +00:00
Tanya Lattner
c9bdf09192 Fixed friend class name for ModuloScheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13293 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-30 20:47:59 +00:00
Tanya Lattner
32c182a0a8 Fixed friend class name for ModuloSched
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13292 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-30 20:46:40 +00:00