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

11891 Commits

Author SHA1 Message Date
Chris Lattner
82278b599b Implement SimplifyCFG/branch-cond-prop.ll
llvm-svn: 13306
2004-05-01 22:36:37 +00:00
Chris Lattner
d4abdd9dc3 New testcase for case that simplifycfg should catch
llvm-svn: 13305
2004-05-01 22:36:24 +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
dd7eb23ccf Stop LiveVariables from using BasicBlocks as part of the mapping, instead
use MachineBasicBlocks.

llvm-svn: 13300
2004-05-01 21:23:35 +00:00
Chris Lattner
939685e14b Move the GraphTraits for MachineBasicBlocks to the MachineBasicBlock file.
llvm-svn: 13299
2004-05-01 21:05:34 +00:00
Chris Lattner
aac6ae5b07 Add comment about optimizations
llvm-svn: 13298
2004-05-01 11:40:07 +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
Chris Lattner
ac07b271e7 Fix broken link, again.
llvm-svn: 13295
2004-04-30 22:17:12 +00:00
Tanya Lattner
6332b09438 Sorry, now friend class name should be right!!
llvm-svn: 13294
2004-04-30 20:48:37 +00:00
Tanya Lattner
7a414c92c2 Fixed friend class name for ModuloScheduling.
llvm-svn: 13293
2004-04-30 20:47:59 +00:00
Tanya Lattner
185c13da4c Fixed friend class name for ModuloSched
llvm-svn: 13292
2004-04-30 20:46:40 +00:00
Tanya Lattner
077c819d5a Removing MachineResource class.
llvm-svn: 13291
2004-04-30 20:40:38 +00:00
Chris Lattner
d7ac5532a6 Fix a broken link
llvm-svn: 13290
2004-04-30 14:13:16 +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
Brian Gaeke
af5e2f1ea5 Add machine-CFG graph traits specializations.
llvm-svn: 13288
2004-04-29 17:43:55 +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
9f6428ea0e Added `zeroinitializer' keyword.
llvm-svn: 13253
2004-04-28 19:36:08 +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
3673c653b5 * Make contained ostream not public.
* Remove various print methods that called the Value* method, just have one that
  all subclasses of Value will use anyway.
* Remove template for printing constant references
* Add methods to print char* and strings
* setStream now sets the stream on the contained AssemblyWriter

llvm-svn: 13246
2004-04-28 19:22:58 +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
Misha Brukman
dd23f36ed6 * Add ability to get and set the output stream
* New feature: outputting a Type* as symbolic, controlled via the stream
  similarly to sending std::hex to change number format

llvm-svn: 13226
2004-04-28 15:30:33 +00:00
Brian Gaeke
8e3668faca Add pred./succ. list size methods.
llvm-svn: 13214
2004-04-28 04:46:35 +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
369fa0ed81 Move private methods to end of class decl at Chris's request
llvm-svn: 13210
2004-04-28 04:15:06 +00:00
Brian Gaeke
d63179c70b Fix thinkos that Chris caught for me.
Make pred mutators private.

llvm-svn: 13209
2004-04-28 03:59:48 +00:00
Brian Gaeke
213538a039 Add machine-code CFG support: MachineBasicBlocks may now have their own
predecessors and successors

llvm-svn: 13208
2004-04-28 02:16:33 +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
adacba2678 Fix warning
llvm-svn: 13189
2004-04-27 18:21:56 +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
9679a3b445 Because I like being able to instantiate the cfgprinter from external projects,
this header file is born.

llvm-svn: 13176
2004-04-26 16:27:53 +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
Brian Gaeke
1aada2b128 Fix a typo in a comment.
llvm-svn: 13174
2004-04-26 16:26:21 +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
Chris Lattner
312eb88522 Add a new testcase for X/-1, fix bug that prevented tests from running right
llvm-svn: 13171
2004-04-26 14:01:47 +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
ebb3422358 Standardize header comments of top-level Makefiles.
llvm-svn: 13143
2004-04-24 00:10:56 +00:00