Commit Graph

3493 Commits

Author SHA1 Message Date
Chris Lattner
03839956e2 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24944 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 06:07:52 +00:00
Reid Spencer
65f6ad804e Fix documentation for the AlarmSetup function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24940 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 03:57:15 +00:00
Reid Spencer
b13cf98e6b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24937 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 03:23:46 +00:00
Jeff Cohen
9337de8651 Oh oh... Unix is case sensitive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24928 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:46:59 +00:00
Jeff Cohen
f31a60cd71 Make it compile with VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24927 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:44:51 +00:00
Reid Spencer
6a2bd74606 Add an eol at the end to shut gcc up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24925 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:40:06 +00:00
Evan Cheng
c85b33f264 Added TargetLowering::isMaskedValueZeroForTargetNode() declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 23:15:41 +00:00
Jim Laskey
9369a5dbc7 Oops llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24913 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:46:32 +00:00
Jim Laskey
7f149034e5 Start of Dwarf framework code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24912 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:44:40 +00:00
Evan Cheng
7226158d7e Added a hook to print out names of target specific DAG nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24877 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 06:22:03 +00:00
Chris Lattner
bc149b2c98 Add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24831 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 21:00:53 +00:00
Evan Cheng
05a4c35494 Yet another variant of getTargetNode().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:44:51 +00:00
Jeff Cohen
c5f24a2c2a Fix VC++ level 4 warnings. Because a base class has declared these private, VC++ complains it cannot automatically generate this methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 00:19:22 +00:00
Jeff Cohen
e15ccf464c Fix VC++ level 4 warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24750 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 00:18:06 +00:00
Jim Laskey
f5395cee6a Added source file/line correspondence for dwarf (PowerPC only at this point.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 22:45:29 +00:00
Reid Spencer
328ead9fce 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-13 20:00:37 +00:00
Chris Lattner
ed13893ff7 Add a couple more fields, move ctor init list to .cpp file, add support
for emitting the ctor/dtor list for common targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24694 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-13 06:32:10 +00:00
Evan Cheng
7038daf342 Added new getNode and getTargetNode variants for X86 stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24653 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-10 00:37:58 +00:00
Evan Cheng
ab24ed2a32 Added patterns for ADD8rm, etc. These fold load operands. e.g. addb 4(%esp), %al
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24648 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-09 22:48:48 +00:00
Evan Cheng
0fc7198890 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24634 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-08 02:00:36 +00:00
Chris Lattner
8b6cea1b95 Remove a now-dead map, patch by Saem Ghani, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24629 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-07 05:41:44 +00:00
Sumant Kowshik
f8395ba498 Added comment for removing assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24623 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 18:16:08 +00:00
Sumant Kowshik
14d1d22f37 Handling of zero length last fields in struct used for growing it arbitrarily
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24620 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 18:01:20 +00:00
Chris Lattner
767a033a5c Implement external storage for post-order iteration, implementing PR267
Patch by Saem Ghani, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24617 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 07:05:27 +00:00
Nate Begeman
8cfa57b1b4 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
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24616 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 06:18:55 +00:00
Chris Lattner
30614675f4 Add a flag to Module::getGlobalVariable to allow it to return vars with
internal linkage.

Patch provided by Evan Jones, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24604 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-05 05:30:21 +00:00
Nate Begeman
6510b22cec Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24563 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 04:51:06 +00:00
Evan Cheng
66a48bbc35 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 00:18:45 +00:00
Chris Lattner
eb19e40efb Make SelectNodeTo return N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24548 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 22:45:14 +00:00
Chris Lattner
8bdbb63243 Add a simple clear() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24543 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 19:31:23 +00:00
Nate Begeman
f43a3ca26d 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
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24534 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 08:22:07 +00:00
Chris Lattner
7bcd6a36e2 minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24528 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 05:26:03 +00:00
Reid Spencer
6ff7240a5c 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24527 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 05:21:10 +00:00
Evan Cheng
14229bb636 Fixed a bug introduced by my last commit: TargetGlobalValues should key on
GlobalValue * and index pair. Update getGlobalAddress() for symmetry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24524 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 02:49:21 +00:00
Evan Cheng
61ca74bc3a Added an index field to GlobalAddressSDNode so it can represent X+12, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 02:04:11 +00:00
Chris Lattner
47725d059b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24512 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 06:15:39 +00:00
Nate Begeman
6a648614e8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24511 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 05:45:29 +00:00
Chris Lattner
d87ef134d7 Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 01:07:12 +00:00
Andrew Lenharth
bb227c1b79 Added documented rsprofiler interface. Also remove new profiler passes, the
old ones have been updated to implement the interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24499 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 18:00:38 +00:00
Andrew Lenharth
701f5ac73c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24493 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 00:58:09 +00:00
Andrew Lenharth
7c0c567058 Reg2Mem is something a pass may depend on, so allow that
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24488 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 22:14:23 +00:00
Nate Begeman
ab48be3772 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24484 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 18:16:00 +00:00
Chris Lattner
291ca1c563 Add a new flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 23:06:08 +00:00
Chris Lattner
02d09206ee Add some more directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24474 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 19:51:51 +00:00
Chris Lattner
97e32e3239 add two more config directives, add method for printing constant pool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24463 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:24:11 +00:00
Chris Lattner
d5ab7e1c54 Make the AsmPrinter keep track of the notion of a function number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24460 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:12:47 +00:00
Chris Lattner
6fe3acce74 Capitalize methods for better consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24455 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:51:06 +00:00
Chris Lattner
e2b1f1188f Add section switching to to common AsmPrinter code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24444 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:05:42 +00:00
Chris Lattner
adb0a068c6 Add a new option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24439 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 06:41:08 +00:00
Chris Lattner
006e3e3649 add a new node type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 22:55:57 +00:00
Chris Lattner
8f3366ad27 Add two new construction methods, patch by Evan Cheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24417 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 01:42:10 +00:00
Nate Begeman
5fbb5d2459 Teach LLVM how to scalarize packed types. Currently, this only works on
packed types with an element count of 1, although more generic support is
coming.  This allows LLVM to turn the following code:

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

Into:

_foo:
        lfs f0, 0(r3)
        fadds f0, f0, f0
        stfs f0, 0(r3)
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 00:36:38 +00:00
Chris Lattner
a35bef9db2 Fix the dominates method to return true if the two nodes are the same. Add
a new properlyDominates method to do what the old one did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24407 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:27:33 +00:00
Nate Begeman
395cba8d41 Teach the type lowering code about turning packed types into vector types.
Next step: generating vector dag nodes, and legalizing them into scalar
code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24404 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 21:44:42 +00:00
Chris Lattner
b13b3801fc add a flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24375 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 07:21:15 +00:00
Chris Lattner
a1ab72daad Teach emitAlignment to handle explicit alignment requests by globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24354 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-14 19:00:06 +00:00
Chris Lattner
368c36ff32 add malloc_zone_statistics, remove mstats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24350 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-14 07:24:17 +00:00
Chris Lattner
0b14259eb2 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24348 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-14 06:57:34 +00:00
Chris Lattner
4de4123fb1 Shrink derived types by 8 bytes each by not having to have 2 vtables pointers
and other MI overhead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24344 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 03:26:12 +00:00
Chris Lattner
1c6a80d31c Refactor some code, moving methods and data around. This gets rid of some
virtual methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24342 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 03:13:26 +00:00
Chris Lattner
665d62efdf Shrink the Type class from 32 to 28 bytes on Darwin (which has silly 32-bit
bools).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24326 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 10:07:47 +00:00
Chris Lattner
6dc0b7bea9 remove a dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24325 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 08:42:30 +00:00
Chris Lattner
7a13354dde Add support for putting globals in a particular section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24309 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:09:49 +00:00
Andrew Lenharth
8b91c77385 added a chain output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24306 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 22:48:54 +00:00
Andrew Lenharth
aeef8fc5c6 Add support for a cycle counter intrinsic. As basically all processors have
this and have it in about the same form, I think this makes sense.
on X86, you do a RDTSC (64bit result, from any ring since the P5MMX)
on Alpha, you do a RDCC
on PPC, there is a sequence which may or may not work depending on how things
are setup by the OS.  Or something like that.  Maybe someone who knows PPC
can add support.  Something about the time base register.
on Sparc, you read %tick, which in some solaris versions (>=8) is readable by
userspace
on IA64 read ar.itc

So I think the ulong is justified since all of those are 64bit.
Support is slighly flaky on old chips (P5 and lower) and sometimes
depends on OS (PPC, Sparc).  But for modern OS/Hardware (aka this decade),
we should be ok.

I am still not sure what to do about lowering.  I can either see a lower to 0, to
gettimeofday (or the target os equivalent), or loudly complaining and refusing to
continue.

I am commiting an Alpha implementation.  I will add the X86 implementation if I
have to (I have use of it in the near future), but if someone who knows that
backend (and the funky multi-register results) better wants to add it, it would
take them a lot less time ;)

TODO: better lowering and legalizing, and support more platforms


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24299 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 16:45:18 +00:00
Chris Lattner
d35f605613 Allow per-character control over what target assemblers allow in symbol
names.  This also changes the default to allow all of "$_." in addition
to letters and numbers as symbol names.  If you don't want this, use
markCharUnacceptable to remove one of these or markCharAcceptable to add
to the set.  This corresponds with what GAS accepts by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24291 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 21:39:12 +00:00
Chris Lattner
ac8c834288 Add a new option for targets that accept quoted labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24283 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 19:30:07 +00:00
Chris Lattner
6c636c0fff Remove M, which is dead. Eliminate a dead typedef. Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24282 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 19:02:52 +00:00
Chris Lattner
b8c5ec0869 This method is no longer static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24280 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:55:09 +00:00
Chris Lattner
a112e0f447 minor interface changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24276 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:46:57 +00:00
Chris Lattner
38b6d78112 add support for .asciz, and enable it by default. If your target assembler
doesn't support .asciz, just set AscizDirective to null in your asmprinter.

This compiles C strings to:

l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"

instead of:

l1__2E_str_1:                           ; '.str_1'
        .ascii  "foo\000"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24271 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:05:57 +00:00
Andrew Lenharth
105b2f5374 needs to go here to apparently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24268 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 02:07:45 +00:00
Andrew Lenharth
183119cdf6 The pass everyone has been waiting for!
Reg2Mem

for fun you can opt -reg2mem -mem2reg


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24267 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 01:58:38 +00:00
Chris Lattner
b80e2be889 Switch the allnodes list from a vector of pointers to an ilist of nodes.
This eliminates the vector, allows constant time removal of a node from
a graph, and makes iteration over the all nodes list stable when adding
nodes to the graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24262 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 23:46:43 +00:00
Chris Lattner
109654fae9 Change the ValueList array for each node to be shared instead of individually
allocated.  Further, in the common case where a node has a single value, just
reference an element from a small array.  This is a small compile-time wi.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24250 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 23:30:11 +00:00
Chris Lattner
f71e843f65 Switch the operandlist/valuelist from being vectors to being just an array.
This saves 12 bytes from SDNode, but doesn't speed things up substantially
(our graphs apparently already fit within the cache on my g5).  In any case
this reduces memory usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24248 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 22:06:23 +00:00
Chris Lattner
f0e80cf909 adjust itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24242 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 18:52:57 +00:00
Chris Lattner
df2e425f2a Add a new option to indicate we want the code generator to emit code quickly,
not spending tons of time microoptimizing it.  This is useful for an -O0
style of build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24235 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 02:12:47 +00:00
Chris Lattner
cb982916f7 Change a comment slightly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24226 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 17:40:18 +00:00
Nate Begeman
ae232e7a10 Add the necessary support to the ISel to allow targets to codegen the new
alignment information appropriately.  Includes code for PowerPC to support
fixed-size allocas with alignment larger than the stack.  Support for
arbitrarily aligned dynamic allocas coming soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24224 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 09:00:38 +00:00
Chris Lattner
3aef571287 Make sure to initialize the alignment field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24222 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 08:22:18 +00:00
Chris Lattner
b2f71b12f7 allow functions and modules to have an explicit alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24209 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:44:42 +00:00
Chris Lattner
8ae779da70 add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24201 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:58:30 +00:00
Nate Begeman
14b0529532 Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs.

No targets currently do anything with this information, nor is it presrved
in the bytecode representation.  That's coming up next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24196 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 09:21:28 +00:00
Jeff Cohen
be07f72ca2 <cassert> no longer required to make VC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24177 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 02:59:16 +00:00
Duraid Madina
0954038705 change NULL to 0, unbreaks the ppc target when building on ia64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24176 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 01:45:04 +00:00
Jim Laskey
7f39c14f52 1. Remove ranges from itinerary data.
2. Tidy up the subtarget emittined code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24172 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-03 22:47:41 +00:00
Jeff Cohen
55d1728ec8 Keep VC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24148 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 04:03:16 +00:00
Jim Laskey
6cee630070 Allow itineraries to be passed through the Target Machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24139 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 20:06:59 +00:00
Chris Lattner
3aa4e15331 Remove the LowerConstantExpressionsPass pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24089 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 05:32:20 +00:00
Chris Lattner
9a83508a27 remove a dead header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24084 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:43:10 +00:00
Jim Laskey
15517be4bf Structures used to hold scheduling information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24049 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 18:18:05 +00:00
John Criswell
bd9d37026a Move some constant folding functions into LLVMAnalysis since they are used
by Analysis and Transformation passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 16:00:10 +00:00
Jeff Cohen
61b42eb928 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24004 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 15:02:21 +00:00
Jeff Cohen
8030c25882 Eliminate use of sed in Visual Studio builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24003 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 14:48:53 +00:00
Chris Lattner
753c8f20e4 Add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23989 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 21:02:21 +00:00
Chris Lattner
70cfe13f19 Remove some dead argument names which irritates GCC at certain warning levels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23979 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 17:59:28 +00:00
Chris Lattner
304a564c1f Add a missing Module::setTargetTriple method.
Remove Function::aiterator and Module::giterator typedefs (and const versions)
as they should have been removed when abegin/gbegin were removed.  Thanks to
alkis for bringing this to my attn.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23978 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 17:58:00 +00:00
Jim Laskey
34bd5d5d87 Preparation of supporting scheduling info. Need to find info based on selected
CPU.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23974 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 15:15:28 +00:00
Chris Lattner
a542b4c133 Move the END_WITH_NULL marker. Vladimir suggests that this works better with
GCC 4.1.  I tried it with 4.0 and 3.3 and it seems fine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23957 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 05:03:46 +00:00