1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

3338 Commits

Author SHA1 Message Date
Andrew Lenharth
c2973ea159 Remember plugins should someone like bugpoint want to know them.
llvm-svn: 25649
2006-01-26 18:36:50 +00:00
Jim Laskey
036aa0ddc9 Split out Dwarf constants for use outside DwarfWriter.
llvm-svn: 25646
2006-01-26 14:45:22 +00:00
Chris Lattner
b94207514a add methods for constraint parsing
llvm-svn: 25636
2006-01-26 02:21:42 +00:00
Chris Lattner
a3d00d1780 Allow use of isa<InlineAsm>(X) without #including InlineAsm.h
llvm-svn: 25632
2006-01-26 01:54:21 +00:00
Evan Cheng
cf49c6411a Duh.
llvm-svn: 25628
2006-01-26 00:28:35 +00:00
Chris Lattner
81aef013ac add another method
llvm-svn: 25616
2006-01-25 22:10:35 +00:00
Chris Lattner
aff32aa901 add some useful accessors :)
llvm-svn: 25612
2006-01-25 19:58:26 +00:00
Chris Lattner
d36993d81d Change inline asms to be uniqued like constants, not embedded in a Module.
llvm-svn: 25610
2006-01-25 18:57:27 +00:00
Evan Cheng
168b8c5b29 No need to keep track of top and bottom nodes in a group since the vector is
already in order. Thanks Jim for pointing it out.

llvm-svn: 25608
2006-01-25 18:54:24 +00:00
Nate Begeman
c29fac7fce First part of bug 680:
Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.

llvm-svn: 25606
2006-01-25 18:21:52 +00:00
Evan Cheng
f4b53efbb2 Add a enum to specify target scheduling preference: SchedulingForLatency or
SchedulingForRegPressure. Added corresponding methods to set / get the value.

llvm-svn: 25598
2006-01-25 09:09:02 +00:00
Evan Cheng
27e82023a4 Some minor scheduler changes.
llvm-svn: 25597
2006-01-25 09:07:50 +00:00
Chris Lattner
1c40cfd488 add a method
llvm-svn: 25581
2006-01-24 05:47:05 +00:00
Jeff Cohen
d08e0cadd6 Be consistent in using class/struct to keep Visual Studio happy.
llvm-svn: 25575
2006-01-24 04:41:48 +00:00
Chris Lattner
50ba79e71b Initial checkin of the InlineAsm class
llvm-svn: 25570
2006-01-24 04:13:11 +00:00
Jim Laskey
18ba7ce7b3 Crude Dwarf global variable debugging.
llvm-svn: 25569
2006-01-24 00:49:18 +00:00
Chris Lattner
7812ed6d6a Add global scope asm support
llvm-svn: 25555
2006-01-23 23:02:28 +00:00
Andrew Lenharth
35efa9c2d9 another couple selects
llvm-svn: 25551
2006-01-23 21:51:14 +00:00
Andrew Lenharth
28a8d211f6 another selectto
llvm-svn: 25548
2006-01-23 20:59:12 +00:00
Evan Cheng
f622869383 Skeleton of the list schedule.
llvm-svn: 25544
2006-01-23 08:26:10 +00:00
Reid Spencer
a8aebf9192 Update for including additional function tests.
llvm-svn: 25542
2006-01-23 08:15:53 +00:00
Evan Cheng
37c62244a6 Factor out more instruction scheduler code to the base class.
llvm-svn: 25532
2006-01-23 07:01:07 +00:00
Chris Lattner
ff2ce95673 Speedup and simplify pass registration by the observation that there is
exactly one PassInfo object per RegisterPass object and that their lifetimes
are the same.  As such, there is no reason for the RegisterPass object to
dynamically allocate the PassInfo object at compiler startup time: just inline
the object by-value.  This should reduce codesize, heap size, and startup time. Yaay.

llvm-svn: 25521
2006-01-23 01:01:04 +00:00
Chris Lattner
b1b6b1d541 This only needs <iosfwd> not <iostream>
llvm-svn: 25517
2006-01-22 23:43:45 +00:00
Chris Lattner
4cefd6fa96 This header should not pull in <iostream>
llvm-svn: 25511
2006-01-22 22:54:51 +00:00
Jeff Cohen
a31ecbc2a0 Visual Studio neurotic about inconsistent class/struct usage.
llvm-svn: 25506
2006-01-22 20:36:43 +00:00
Evan Cheng
4a57a7551f Do some code refactoring on Jim's scheduler in preparation of the new list
scheduler.

llvm-svn: 25493
2006-01-21 02:32:06 +00:00
Jim Laskey
75adb3d269 Simplify search for abbreviations.
llvm-svn: 25491
2006-01-21 01:13:18 +00:00
Jim Laskey
08d15fdc02 Correct some simple errors.
llvm-svn: 25490
2006-01-21 00:59:54 +00:00
Jim Laskey
946caff856 Right size integer values before emitting.
llvm-svn: 25489
2006-01-20 21:02:36 +00:00
Jim Laskey
b2abea6ab6 Reworked how Dwarf debug info entries and abbreviations are handled. Added
pubnames and debuy str sections.

llvm-svn: 25487
2006-01-20 20:34:06 +00:00
Reid Spencer
ae31d4858b Make sure that libm is used during config tests so that ceil, floor, and
friends are actually detected.

llvm-svn: 25454
2006-01-19 08:31:08 +00:00
Reid Spencer
effe3e54e4 For PR696:
Add checks for ceil, ceilf, floor, and floorf

llvm-svn: 25453
2006-01-19 08:22:40 +00:00
Reid Spencer
c2e3662a89 1. Documentation upgrade.
2. Have UpgradeInstrinicCall return an Instruction* instead of a CallInst*
   and return the needed CastInst* if the result of the upgraded call needs
   to be casted back to a signed type.

llvm-svn: 25446
2006-01-19 06:59:26 +00:00
Reid Spencer
7ee9a0016a Add a new interface function to AutoUpgrade for simultaneously upgrading
the Function and the CallInst: UpgradeCallsToIntrinsic(Function*). Also,
re-factor the AutoUpgrade implementation to eliminate some duplication of
code.

llvm-svn: 25432
2006-01-19 01:18:29 +00:00
Jim Laskey
6b25a4e659 Added minimum Dwarf aranges. Cleaned up some section headers. Line number
support now works in gdb.

llvm-svn: 25417
2006-01-18 16:54:26 +00:00
Jim Laskey
964e70be01 Pastos.
llvm-svn: 25412
2006-01-17 21:39:39 +00:00
Jim Laskey
52d9832e70 Add frame work for additional dwarf sections. Comments will improve as code
is added.

llvm-svn: 25410
2006-01-17 20:41:40 +00:00
Robert Bocchino
dc31d8561b Support for the insertelement operation.
llvm-svn: 25405
2006-01-17 20:06:42 +00:00
Robert Bocchino
a5ec2815a1 Instruction and constant expression definitions for the insertelement
operation.

llvm-svn: 25402
2006-01-17 20:05:59 +00:00
Evan Cheng
a9c4d32e7e Suppress "no newline at end of file" warnings.
llvm-svn: 25400
2006-01-17 19:21:01 +00:00
Jim Laskey
a86da88ba3 Misc. errors.
llvm-svn: 25399
2006-01-17 19:12:24 +00:00
Jim Laskey
0c4202b0ba Adding basic support for Dwarf line number debug information.
I promise to keep future commits smaller.

llvm-svn: 25396
2006-01-17 17:31:53 +00:00
Jim Laskey
38e4ff875d Reduce memory consumption and force (somewhat) access to entries via ID.
llvm-svn: 25393
2006-01-17 16:29:58 +00:00
Evan Cheng
3a7f44a3b6 Yet another getTargetNode() variant. I promise one of these days I'll fix
tblgen so this is unnecessary.

llvm-svn: 25380
2006-01-17 00:32:38 +00:00
Jim Laskey
bf73e50cc5 Redundant inline keyword.
llvm-svn: 25377
2006-01-16 23:44:03 +00:00
Jim Laskey
9f2391c897 UniqueVector template provides a means of enumerating objects uniquely.
llvm-svn: 25376
2006-01-16 23:29:43 +00:00
Reid Spencer
3cecd3c4cf For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
  llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
  llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
  llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
  llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
  llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.

llvm-svn: 25366
2006-01-16 21:12:35 +00:00
Reid Spencer
ea1bec59db For PR411:
This file makes the helper functions for auto-upgrade of llvm assembly and
bytecode more accessible. This is part of de-overloading of intrinsic
functions to support the flat symbol table (no type planes).

llvm-svn: 25365
2006-01-16 21:06:01 +00:00
Chris Lattner
5c0f92e308 Remove a never-working pass
llvm-svn: 25348
2006-01-16 01:05:24 +00:00
Chris Lattner
fa8477498c Initialize DFSnum's to -1, in case a node is not reachable.
llvm-svn: 25344
2006-01-15 21:48:36 +00:00
Chris Lattner
789d498d78 add an assert, patch by Daniel Berlin
llvm-svn: 25343
2006-01-15 21:46:23 +00:00
Chris Lattner
551df64bd0 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!

llvm-svn: 25323
2006-01-14 20:55:09 +00:00
Chris Lattner
3e2e2b22ec Teach inline function how to update the callgraph when it makes changes.
llvm-svn: 25318
2006-01-14 20:05:06 +00:00
Chris Lattner
62ab0d6471 Add CallGraph::getOrInsertFunction, to allow clients to update the callgraph
when they change the program

llvm-svn: 25316
2006-01-14 20:01:50 +00:00
Chris Lattner
f75f017cae add a dump method to CallGraph
llvm-svn: 25314
2006-01-14 19:17:02 +00:00
Jeff Cohen
ae3d2a938b Fix generous source of VC++ truncation warnings.
llvm-svn: 25311
2006-01-14 02:17:20 +00:00
Nate Begeman
4750001146 Add bswap intrinsics as documented in the Language Reference
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Chris Lattner
b64d2919c7 Add a new InvalidateStructLayoutInfo method and some comments.
llvm-svn: 25303
2006-01-14 00:06:42 +00:00
Chris Lattner
673ccaba39 Simplify the implementations of classof using the new IntrinsicInst classof.
llvm-svn: 25291
2006-01-13 20:00:51 +00:00
Chris Lattner
731f17c9bd Add some functionality to the IntrinsicInst class and some comments
llvm-svn: 25289
2006-01-13 19:49:02 +00:00
Chris Lattner
67fb415248 Allow the code cloning interfaces to capture some important info about the
code being cloned if the client wants.

llvm-svn: 25281
2006-01-13 18:39:17 +00:00
Chris Lattner
8fe9dd16fb Provide an interface for Targets to specify their stack pointer register
for llvm.stacksave/restore.

llvm-svn: 25275
2006-01-13 17:47:52 +00:00
Chris Lattner
fac137d4bd add stacksave/stackrestore nodes
llvm-svn: 25270
2006-01-13 02:39:42 +00:00
Chris Lattner
6f8204560f add new llvm.stacksave/llvm.stackrestore intrinsics
llvm-svn: 25265
2006-01-13 02:15:02 +00:00
Nate Begeman
cff96008ac Add bswap, rotl, and rotr nodes
Add dag combiner code to recognize rotl, rotr
Add ppc code to match rotl

Targets should add rotl/rotr patterns if they have them

llvm-svn: 25222
2006-01-11 21:21:00 +00:00
Chris Lattner
4456e1530a Simple is good, CVS log is for history, not the silly credits block
llvm-svn: 25204
2006-01-11 05:38:15 +00:00
Chris Lattner
07daf14bbd Switch loopinfo to using ETForest instead of DominatorSet to compute itself.Patch by Daniel Berlin!
llvm-svn: 25200
2006-01-11 05:08:57 +00:00
Robert Bocchino
1088fb019d Added an instruction and constant expression for the extractelement
operation.

llvm-svn: 25176
2006-01-10 19:04:13 +00:00
Reid Spencer
ebf3eceb26 For PR411:
First step in refactoring the SymbolTable is to split it into two classes,
one for a symbol table of types and one for a symbol table of Values.

llvm-svn: 25175
2006-01-10 09:51:48 +00:00
Reid Spencer
57db434426 Make ValueSymbolTable (temporarily) a friend of Value so it can mod the
Name of Value instances.

llvm-svn: 25174
2006-01-10 09:45:57 +00:00
Reid Spencer
783084211a For PR521:
With these patches we implement the ability for the Linker library to
keep track of which libraries were actually bytecode files (not archives)
and cause their users to remove such files from the list of libraries to
pass to the native linker.

llvm-svn: 25169
2006-01-10 03:14:40 +00:00
Evan Cheng
7a32c047d9 New getNode() variants.
llvm-svn: 25156
2006-01-09 18:29:18 +00:00
Reid Spencer
fb5ba86d31 Add some documentation.
llvm-svn: 25150
2006-01-08 22:41:22 +00:00
Chris Lattner
60499c68b3 Fix the build on platforms where <cassert> doesn't define NULL
llvm-svn: 25147
2006-01-08 09:10:46 +00:00
Chris Lattner
84a9d11b28 Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!

llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Chris Lattner
31d0e66ff2 Fix out of date comments, patch by Marco Matthies.
llvm-svn: 25143
2006-01-08 02:32:52 +00:00
Jim Laskey
b5b63a11df Grammer correction.
llvm-svn: 25106
2006-01-05 01:53:28 +00:00
Jim Laskey
5eddaee9f3 Added initial support for DEBUG_LABEL allowing debug specific labels to be
inserted in the code.

llvm-svn: 25104
2006-01-05 01:25:28 +00:00
Jim Laskey
61138e28ff Applied some recommend changes from sabre. The dominate one beginning "let the
pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.

llvm-svn: 25100
2006-01-04 22:28:25 +00:00
Jeff Cohen
9b99d8fde6 Be consistent in using class vs struct to make VC++ happy. And as it contains
methods, virtual method even, class wins.

llvm-svn: 25098
2006-01-04 17:21:23 +00:00
Jim Laskey
897ad8ddb7 Add unique id to debug location for debug label use (work in progress.)
llvm-svn: 25096
2006-01-04 15:04:11 +00:00
Jim Laskey
d834ac50d5 Add flag for debug presence.
llvm-svn: 25094
2006-01-04 14:29:26 +00:00
Jim Laskey
62b29812a6 Tie dwarf generation to darwin assembler.
llvm-svn: 25093
2006-01-04 13:52:30 +00:00
Jim Laskey
36c8946b56 1. Make MachineDebugInfo a pass.
2. Add label uniquing code.

llvm-svn: 25092
2006-01-04 13:46:37 +00:00
Jim Laskey
3519bc08c5 Move MachineDebugInfo to module level location.
llvm-svn: 25091
2006-01-04 13:44:43 +00:00
Chris Lattner
064e45054a Patch #6's in Saem's refactor-the-passmanager patch series. From him:
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.

llvm-svn: 25085
2006-01-04 07:47:13 +00:00
Chris Lattner
3e65439986 add a comment that I should have written a long time ago
llvm-svn: 25084
2006-01-04 07:29:33 +00:00
Chris Lattner
16d652bfff add a dump method to help debugging
llvm-svn: 25079
2006-01-04 05:39:51 +00:00
Nate Begeman
7e8b1378e1 add support for generating v4i32 code
llvm-svn: 25043
2005-12-30 00:09:56 +00:00
Duraid Madina
cb824cbac3 be more polite in public headers
llvm-svn: 25036
2005-12-28 06:47:33 +00:00
Duraid Madina
836978f337 undo yuletide naughtyness(tm)
llvm-svn: 25035
2005-12-28 06:29:38 +00:00
Duraid Madina
d7f51144d0 more standards compliance (damn, I can't wait for unordered_set (tee hee)
and unordered_map to make it into the standard)

Hurry up, JTC1 SC22 WG21 Library Working Group!

llvm-svn: 25020
2005-12-26 13:34:00 +00:00
Duraid Madina
a5fef30feb I laugh at your dual-core G5s! Fear my precompiled headers.
llvm-svn: 25019
2005-12-26 10:34:38 +00:00
Duraid Madina
a7fad54b4f i love xmas!!!! *;D*
llvm-svn: 25016
2005-12-26 08:36:53 +00:00
Chris Lattner
1d16f29ca7 improve comment: mention vectors
llvm-svn: 24971
2005-12-23 00:46:10 +00:00
Chris Lattner
77ebc833c1 add a new node
llvm-svn: 24969
2005-12-23 00:15:59 +00:00
Chris Lattner
0b240343df remove a dead node
llvm-svn: 24966
2005-12-22 21:16:35 +00:00
Duraid Madina
a83ab290ec i need to do this to take over the earth
when I take over the earth, sabre will be happy because i'll stop asking
him silly questions!!!!!!

llvm-svn: 24949
2005-12-22 07:02:51 +00:00
Chris Lattner
7f45e655a8 Separate the call graph implementation from its interface. This implements
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt,
allowing new spiffy implementations of the callgraph interface to be built.

Many thanks to Saem Ghani for contributing this!

llvm-svn: 24944
2005-12-22 06:07:52 +00:00
Reid Spencer
7c8ac1cf8c Fix documentation for the AlarmSetup function.
llvm-svn: 24940
2005-12-22 03:57:15 +00:00
Reid Spencer
94bbff0319 Implement a generic polled Alarm function. This merely removes the system
dependent portion of the lib/Support/SlowOperationTimer code into the
lib/System implementation where it can be ported to different platforms.

llvm-svn: 24937
2005-12-22 03:23:46 +00:00
Jeff Cohen
8727139340 Oh oh... Unix is case sensitive.
llvm-svn: 24928
2005-12-22 01:46:59 +00:00
Jeff Cohen
8afabfd8f1 Make it compile with VC++.
llvm-svn: 24927
2005-12-22 01:44:51 +00:00
Reid Spencer
458adf241f Add an eol at the end to shut gcc up.
llvm-svn: 24925
2005-12-22 01:40:06 +00:00
Evan Cheng
822f360f84 Added TargetLowering::isMaskedValueZeroForTargetNode() declaration.
llvm-svn: 24923
2005-12-21 23:15:41 +00:00
Jim Laskey
53d56a5c9a Oops llvm namespace.
llvm-svn: 24913
2005-12-21 19:46:32 +00:00
Jim Laskey
70293489ac Start of Dwarf framework code.
llvm-svn: 24912
2005-12-21 19:44:40 +00:00
Evan Cheng
44e4e6a57f Added a hook to print out names of target specific DAG nodes.
llvm-svn: 24877
2005-12-20 06:22:03 +00:00
Chris Lattner
5d042179e6 Add an accessor
llvm-svn: 24831
2005-12-18 21:00:53 +00:00
Evan Cheng
be5a63c601 Yet another variant of getTargetNode().
llvm-svn: 24758
2005-12-17 01:44:51 +00:00
Jeff Cohen
19d804b6d6 Fix VC++ level 4 warnings. Because a base class has declared these private, VC++ complains it cannot automatically generate this methods.
llvm-svn: 24751
2005-12-17 00:19:22 +00:00
Jeff Cohen
0998a3e70e Fix VC++ level 4 warnings.
llvm-svn: 24750
2005-12-17 00:18:06 +00:00
Jim Laskey
37957b1ad3 Added source file/line correspondence for dwarf (PowerPC only at this point.)
llvm-svn: 24748
2005-12-16 22:45:29 +00:00
Reid Spencer
2b33292a67 Adjust the constructor to the Linker class to take an argument that names
the module being constructed. This is used to correctly name the module.
Previously the name of the linker tool was used which produces confusing
output when the module identifier is used in an error message.

llvm-svn: 24699
2005-12-13 20:00:37 +00:00
Chris Lattner
d27892a194 Add a couple more fields, move ctor init list to .cpp file, add support
for emitting the ctor/dtor list for common targets.

llvm-svn: 24694
2005-12-13 06:32:10 +00:00
Evan Cheng
0b7a482921 Added new getNode and getTargetNode variants for X86 stores.
llvm-svn: 24653
2005-12-10 00:37:58 +00:00
Evan Cheng
6610545b7e Added patterns for ADD8rm, etc. These fold load operands. e.g. addb 4(%esp), %al
llvm-svn: 24648
2005-12-09 22:48:48 +00:00
Evan Cheng
d11d31e0bd Added support for ComplexPattern. These are patterns that require C++ pattern
matching code that is not currently auto-generated by tblgen, e.g. X86
addressing mode. Selection routines for complex patterns can return multiple operands, e.g. X86 addressing mode returns 4.

llvm-svn: 24634
2005-12-08 02:00:36 +00:00
Chris Lattner
2fbfb322b1 Remove a now-dead map, patch by Saem Ghani, thanks!
llvm-svn: 24629
2005-12-07 05:41:44 +00:00
Sumant Kowshik
4e682cf56e Added comment for removing assert
llvm-svn: 24623
2005-12-06 18:16:08 +00:00
Sumant Kowshik
de8f54485b Handling of zero length last fields in struct used for growing it arbitrarily
llvm-svn: 24620
2005-12-06 18:01:20 +00:00
Chris Lattner
18a2c21fc0 Implement external storage for post-order iteration, implementing PR267
Patch by Saem Ghani, thanks!

llvm-svn: 24617
2005-12-06 07:05:27 +00:00
Nate Begeman
6c1b8712c5 Teach the SelectionDAG ISel how to turn ConstantPacked values into
constant nodes with vector types.  Also teach the asm printer how to print
ConstantPacked constant pool entries.  This allows us to generate altivec
code such as the following, which adds a vector constantto a packed float.

LCPI1_0:  <4 x float> < float 0.0e+0, float 0.0e+0, float 0.0e+0, float 1.0e+0 >
        .space  4
        .space  4
        .space  4
        .long   1065353216      ; float 1
        .text
        .align  4
        .globl  _foo
_foo:
        lis r2, ha16(LCPI1_0)
        la r2, lo16(LCPI1_0)(r2)
        li r4, 0
        lvx v0, r4, r2
        lvx v1, r4, r3
        vaddfp v0, v1, v0
        stvx v0, r4, r3
        blr

For the llvm code:

void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, < float 0.0, float 0.0, float 0.0, float 1.0 >
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}

llvm-svn: 24616
2005-12-06 06:18:55 +00:00
Chris Lattner
8e01c48256 Add a flag to Module::getGlobalVariable to allow it to return vars with
internal linkage.

Patch provided by Evan Jones, thanks!

llvm-svn: 24604
2005-12-05 05:30:21 +00:00
Nate Begeman
811a41a87c Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.

llvm-svn: 24563
2005-12-01 04:51:06 +00:00
Evan Cheng
9c3508e1ab Teach tblgen to accept register source operands in patterns, e.g.
def SHL8rCL  : I<0xD2, MRM4r, (ops R8 :$dst, R8 :$src),
                 "shl{b} {%cl, $dst|$dst, %CL}",
                 [(set R8:$dst, (shl R8:$src, CL))]>, Imp<[CL],[]>;

This generates a CopyToReg operand and added its 2nd result to the shl as
a flag operand.

llvm-svn: 24557
2005-12-01 00:18:45 +00:00
Chris Lattner
7bed501258 Make SelectNodeTo return N
llvm-svn: 24548
2005-11-30 22:45:14 +00:00
Chris Lattner
80afe26d76 Add a simple clear() method
llvm-svn: 24543
2005-11-30 19:31:23 +00:00
Nate Begeman
31121419c8 First chunk of actually generating vector code for packed types. These
changes allow us to generate the following code:

_foo:
        li r2, 0
        lvx v0, r2, r3
        vaddfp v0, v0, v0
        stvx v0, r2, r3
        blr

for this llvm:

void %foo(<4 x float>* %a) {
entry:
        %tmp1 = load <4 x float>* %a
        %tmp2 = add <4 x float> %tmp1, %tmp1
        store <4 x float> %tmp2, <4 x float>* %a
        ret void
}

llvm-svn: 24534
2005-11-30 08:22:07 +00:00
Chris Lattner
7dfd25992c minor cleanup
llvm-svn: 24528
2005-11-30 05:26:03 +00:00
Reid Spencer
3bac59d2f0 Fix a problem with llvm-ranlib that (on some platforms) caused the archive
file to become corrupted due to interactions between mmap'd memory segments
and file descriptors closing. The problem is completely avoiding by using
a third temporary file.

Patch provided by Evan Jones

llvm-svn: 24527
2005-11-30 05:21:10 +00:00
Evan Cheng
08ab45044b Fixed a bug introduced by my last commit: TargetGlobalValues should key on
GlobalValue * and index pair. Update getGlobalAddress() for symmetry.

llvm-svn: 24524
2005-11-30 02:49:21 +00:00
Evan Cheng
025dab1137 Added an index field to GlobalAddressSDNode so it can represent X+12, etc.
llvm-svn: 24523
2005-11-30 02:04:11 +00:00
Chris Lattner
f9ea6dbf66 Add support for a new STRING and LOCATION node for line number support, patch
contributed by Daniel Berlin, with a few cleanups here and there by me.

llvm-svn: 24512
2005-11-29 06:15:39 +00:00
Nate Begeman
a1c2df2471 Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.

llvm-svn: 24511
2005-11-29 05:45:29 +00:00
Chris Lattner
8154ba119b Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
llvm-svn: 24508
2005-11-29 01:07:12 +00:00
Andrew Lenharth
cad1d52b64 Added documented rsprofiler interface. Also remove new profiler passes, the
old ones have been updated to implement the interface.

llvm-svn: 24499
2005-11-28 18:00:38 +00:00
Andrew Lenharth
311ec68cf4 Random sampling (aka Arnold and Ryder) profiling. This is still preliminary, but it works on spec on x86 and alpha. The idea is to allow profiling passes to remember what profiling they inserted, then a random sampling framework is inserted which consists of duplicated basic blocks (without profiling), such that at each backedge in the program and entry into every function, the framework chooses whether to use the instrumented code or the instrumentation free code. The goal of such a framework is to make it reasonably cheap to do random sampling of very expensive profiling products (such as load-value profiling).
The code is organized into 3 parts (2 passes)
1) a linked set of profiling passes, which implement an analysis group (linked, like alias analysis are).  These insert profiling into the program, and remember what they inserted, so that at a later time they can be queried about any instruction.

2) a pass that handles inserting the random sampling framework.  This also has options to control how random samples are choosen.  Currently implemented are Global counters, register allocated global counters, and read cycle counter (see? there was a reason for it).

The profiling passes are almost identical to the existing ones (block, function, and null profiling is supported right now), and they are valid passes without the sampling framework (hence the existing passes can be unified with the new ones, not done yet).

Some things are a bit ugly still, but that should be fixed up soon enough.

Other todo? making the counter values not "magic 2^16 -1" values, but dynamically choosable.

llvm-svn: 24493
2005-11-28 00:58:09 +00:00
Andrew Lenharth
79ee761b69 Reg2Mem is something a pass may depend on, so allow that
llvm-svn: 24488
2005-11-22 22:14:23 +00:00
Nate Begeman
a90bb6d9b1 Check in code to scalarize arbitrarily wide packed types for some simple
vector operations (load, add, sub, mul).

This allows us to codegen:
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, %tmp1
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}

on ppc as:
_foo:
        lfs f0, 12(r3)
        lfs f1, 8(r3)
        lfs f2, 4(r3)
        lfs f3, 0(r3)
        fadds f0, f0, f0
        fadds f1, f1, f1
        fadds f2, f2, f2
        fadds f3, f3, f3
        stfs f0, 12(r3)
        stfs f1, 8(r3)
        stfs f2, 4(r3)
        stfs f3, 0(r3)
        blr

llvm-svn: 24484
2005-11-22 18:16:00 +00:00
Chris Lattner
e8b78e73f7 Add a new flag
llvm-svn: 24480
2005-11-21 23:06:08 +00:00
Chris Lattner
e68011991d Add some more directives
llvm-svn: 24474
2005-11-21 19:51:51 +00:00
Chris Lattner
7edfd3138a add two more config directives, add method for printing constant pool
llvm-svn: 24463
2005-11-21 08:24:11 +00:00
Chris Lattner
37cc677f05 Make the AsmPrinter keep track of the notion of a function number.
llvm-svn: 24460
2005-11-21 08:12:47 +00:00
Chris Lattner
29dcb4d3ef Capitalize methods for better consistency
llvm-svn: 24455
2005-11-21 07:51:06 +00:00
Chris Lattner
05782d4087 Add section switching to to common AsmPrinter code.
llvm-svn: 24444
2005-11-21 07:05:42 +00:00
Chris Lattner
cf57490f4c Add a new option.
llvm-svn: 24439
2005-11-21 06:41:08 +00:00
Chris Lattner
f6ae8401db add a new node type
llvm-svn: 24436
2005-11-20 22:55:57 +00:00
Chris Lattner
e9a33d2505 Add two new construction methods, patch by Evan Cheng
llvm-svn: 24417
2005-11-19 01:42:10 +00:00