1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
Commit Graph

6187 Commits

Author SHA1 Message Date
Brian Gaeke
f3b62c562e Add stub support for reading BBTraces.
llvm-svn: 13352
2004-05-04 17:11:14 +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
Brian Gaeke
ae8607e56a Share ProfilingType enum with the C profiling runtime libraries.
llvm-svn: 13346
2004-05-04 16:53:07 +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
dcfc3c580e 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
c8cd0e9092 Add initial implementation of basic-block tracing instrumentation pass.
llvm-svn: 13335
2004-05-03 22:06:32 +00:00
Chris Lattner
f5f6f8c0de 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
099edda1b1 Plug a minor memory leak
llvm-svn: 13317
2004-05-02 07:31:34 +00:00
Chris Lattner
d8345001fa Do not clone arbitrary condition instructions.
llvm-svn: 13316
2004-05-02 05:19:36 +00:00
Chris Lattner
da2d746a3b Do not infinitely "unroll" single BB loops.
llvm-svn: 13315
2004-05-02 05:02:03 +00:00
Chris Lattner
5f393764c8 Dont' merge terminators that are needed to select PHI node values.
llvm-svn: 13312
2004-05-02 01:00:44 +00:00
Chris Lattner
bd705d7776 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
eb59aec632 Make sure to reprocess instructions used by deleted instructions to avoid
missing opportunities for combination.

llvm-svn: 13309
2004-05-01 23:27:23 +00:00
Chris Lattner
f5a5668cf6 Make sure the instruction combiner doesn't lose track of instructions
when replacing them, missing the opportunity to do simplifications

llvm-svn: 13308
2004-05-01 23:19:52 +00:00
Chris Lattner
911e21e8ca Fix my missing parens
llvm-svn: 13307
2004-05-01 22:41:51 +00:00
Chris Lattner
82278b599b Implement SimplifyCFG/branch-cond-prop.ll
llvm-svn: 13306
2004-05-01 22:36:37 +00:00
Chris Lattner
4b5d4eb5b1 Remove unused #include
llvm-svn: 13304
2004-05-01 21:29:16 +00:00
Chris Lattner
ffbf667718 Iterate over the Machine CFG that Brian added instead of the LLVM CFG.
Look at all of the pretty minuses. :)

llvm-svn: 13303
2004-05-01 21:27:53 +00:00
Chris Lattner
c09a94de9e Operate on the Machine CFG instead of on the LLVM CFG
llvm-svn: 13302
2004-05-01 21:24:39 +00:00
Chris Lattner
769668c09a 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.

llvm-svn: 13301
2004-05-01 21:24:24 +00:00
Chris Lattner
5f29db9741 Add a constructor that got lost
llvm-svn: 13297
2004-05-01 11:17:13 +00:00
Brian Gaeke
aaeb4c4d23 Generalize the strlen size_t hack, for the benefit of the other external
functions with wrappers that either take or return size_ts.

llvm-svn: 13296
2004-05-01 06:42:15 +00:00
Tanya Lattner
077c819d5a Removing MachineResource class.
llvm-svn: 13291
2004-04-30 20:40:38 +00:00
Chris Lattner
9b53c7c797 Fix a major pessimization in the instcombiner. If an allocation instruction
is only used by a cast, and the casted type is the same size as the original
allocation, it would eliminate the cast by folding it into the allocation.

Unfortunately, it was placing the new allocation instruction right before
the cast, which could pull (for example) alloca instructions into the body
of a function.  This turns statically allocatable allocas into expensive
dynamically allocated allocas, which is bad bad bad.

This fixes the problem by placing the new allocation instruction at the same
place the old one was, duh. :)

llvm-svn: 13289
2004-04-30 04:37:52 +00:00
Misha Brukman
f5e334783a Wrapped code and comments at 80 cols; doxygenified some comments.
llvm-svn: 13264
2004-04-29 04:05:30 +00:00
Misha Brukman
9c4c92c40c Reorder #includes as per style guide.
llvm-svn: 13263
2004-04-29 04:04:47 +00:00
Misha Brukman
5f5f6ca775 class AssemblyWriter:
* Make contained ostream pointer, not reference
* Allow setting of that ostream via setStream()

class CachedWriter:
* setStream() in turn calls setStream() on the AssemblyWriter

llvm-svn: 13247
2004-04-28 19:24:28 +00:00
Misha Brukman
f8b734296e Send text and numbers directly to CachedWriter's contained ostream.
llvm-svn: 13243
2004-04-28 18:52:43 +00:00
Misha Brukman
fad1a41fce Squelch compile-time warning (profile build).
llvm-svn: 13228
2004-04-28 15:32:09 +00:00
Misha Brukman
d408a510b8 * Add ability to print out type as symbolic
* Add Module accessor to AssemblyWriter

llvm-svn: 13227
2004-04-28 15:31:21 +00:00
Brian Gaeke
bfb4fe5109 Make RequiresFPRegKill() take a MachineBasicBlock arg.
In InsertFPRegKills(), just check the MachineBasicBlock for successors
instead of its corresponding BasicBlock.

llvm-svn: 13213
2004-04-28 04:45:55 +00:00
Brian Gaeke
74ed24c9de In InsertFPRegKills(), use the machine-CFG itself rather than the
LLVM CFG when trying to find the successors of BB.

llvm-svn: 13212
2004-04-28 04:34:16 +00:00
Brian Gaeke
6c03805717 Update the machine-CFG edges whenever we see a branch.
llvm-svn: 13211
2004-04-28 04:19:37 +00:00
Brian Gaeke
7ce5ef244a Integrate the rest of my random sparcv9 scribblings into this file
llvm-svn: 13204
2004-04-27 22:04:03 +00:00
Chris Lattner
cc929742a1 Fix warning building in optimized mode
llvm-svn: 13190
2004-04-27 18:24:38 +00:00
Chris Lattner
02c65b5395 Changes to fix up the inst_iterator to pass to boost iterator checks. This
patch was graciously contributed by Vladimir Prus.

llvm-svn: 13185
2004-04-27 15:13:33 +00:00
Brian Gaeke
217515996f Add functions that return instances of these printer passes
llvm-svn: 13175
2004-04-26 16:27:08 +00:00
Chris Lattner
430a61e786 If an object is not in the scalar map then it must be a global from another
graph.

llvm-svn: 13173
2004-04-26 14:44:08 +00:00
Chris Lattner
5bad19bde7 Instcombine X/-1 --> 0-X
llvm-svn: 13172
2004-04-26 14:01:59 +00:00
Brian Gaeke
1e049bdc77 Fix file header comments and include guards -- many files have been moved or
renamed since they were last spiffed up, or they just never had proper comments
in the first place.

llvm-svn: 13148
2004-04-25 07:04:49 +00:00
Brian Gaeke
c3857275f9 Add a getRegisterInfo() accessor just like on the X86 target.
llvm-svn: 13147
2004-04-25 06:32:28 +00:00
Brian Gaeke
6e21a0858c Regularize file header comment and include guard.
Include SparcV9RegisterInfo.h.
Add a getRegisterInfo() accessor and SparcV9RegisterInfo instance, just like
on the X86 target.

llvm-svn: 13146
2004-04-25 06:32:16 +00:00
Brian Gaeke
a36743c473 Add MRegisterInfo subclass for the SparcV9 target (containing only stub
functions for now). This automatically turns on the printing of machine
registers using their own real names, instead of goofy things like %mreg(42),
and allows us to migrate code incrementally to the new interface as we see fit.

The register file description it uses is hand-written, so that the register
numbers will match the ones that the SparcV9 target already uses.
Perhaps someday we'll tablegen it.

llvm-svn: 13145
2004-04-25 06:32:05 +00:00
Misha Brukman
144b5572e1 * Allow aggregating extracted function arguments (controlled by flag)
* Commandline option (for now) controls that flag that is passed in

llvm-svn: 13141
2004-04-23 23:54:17 +00:00
Brian Gaeke
6ed3b116bc Fix a typo.
llvm-svn: 13136
2004-04-23 21:45:02 +00:00
Chris Lattner
b72fa5f541 Move the scev expansion code into this pass, where it belongs. There is
still room for cleanup, but at least the code modification is out of the
analysis now.

llvm-svn: 13135
2004-04-23 21:29:48 +00:00
Chris Lattner
f4eb9eb0f2 Eliminate all of the SCEV Expansion code which is really part of the
IndVars pass, not part of SCEV *analysis*.

llvm-svn: 13134
2004-04-23 21:29:03 +00:00
Brian Gaeke
7fba37bb96 Merge TargetRegInfo.h into SparcV9RegInfo.h, which is its only subclass.
This prepares us to be able to de-virtualize and de-abstract it, and
take the register allocator bits out and move them into the register allocator
proper...

llvm-svn: 13127
2004-04-23 18:15:48 +00:00