Commit Graph

12016 Commits

Author SHA1 Message Date
Chris Lattner
fd5df2b203 don't say this is i128, because it isn't yet. Hopefully nate will change
this to be something sane, but in the mean time it is unused, so safe to
make something bogus.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24504 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 00:41:40 +00:00
Chris Lattner
46ec78646b revert my change for the time being, which broke the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24503 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 00:24:08 +00:00
Chris Lattner
0ba7d71213 fix a typo :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24501 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 22:42:15 +00:00
Andrew Lenharth
8dc2d50988 a few more comments on the interfaces and functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24500 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 18:10:59 +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
Jeff Cohen
3523f6e7a4 Fix VC++ warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24496 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 06:45:57 +00:00
Chris Lattner
1e4ed93599 Add a missed optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24495 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 04:52:39 +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
Nate Begeman
01595c52b3 Small tweaks noticed while on the plane.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24492 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-26 22:39:34 +00:00
Andrew Lenharth
b0826529f8 since reg2mem requires it, might as well mention that it preserves it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24491 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-25 16:04:54 +00:00
Duraid Madina
7b1e154c5a add support for dynamic_stackalloc to the dag isel (thanks andrew ;)
next up: support argument passing in memory, not just registers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24490 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-25 07:49:25 +00:00
Nate Begeman
e4f17a5f9b Some first bits of AltiVec stuff: Instruction Formats, Encodings, and
Registers.  Apologies to Jim if the scheduling info so far isn't accurate.

There's a few more things like VRsave support that need to be finished up
in my local tree before I can commit code that Does The Right Thing for
turning 4 x float into the various altivec packed float instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24489 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-23 05:29:52 +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
Andrew Lenharth
7045f6c56e turns out, demotion and invokes and critical edges don't mix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24487 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 21:45:19 +00:00
Andrew Lenharth
4052f02cdb Fix warning, the better way. Really, this is what this instruction is for, so use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24486 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 20:59:00 +00:00
Andrew Lenharth
475d31729d Fix warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24485 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 20:56:05 +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
Andrew Lenharth
50b37845ef massive DAGISel patch. lots and lots more stuff compiles now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24483 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 04:20:06 +00:00
Nate Begeman
4ef3b817fe Rather than attempting to legalize 1 x float, make sure the SD ISel never
generates it.  Make MVT::Vector expand-only, and remove the code in
Legalize that attempts to legalize it.

The plan for supporting N x Type is to continually epxand it in ExpandOp
until it gets down to 2 x Type, where it will be scalarized into a pair of
scalars.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24482 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 01:29:36 +00:00
Chris Lattner
ac2902bcb5 Use HasDotTypeDotSizeDirective instead of forELF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24481 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 23:06:54 +00:00
Chris Lattner
9787c6443f Remove a level of indentation by using a continue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24479 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 22:48:18 +00:00
Chris Lattner
d460f57d65 Simplify the subtarget info, allow the asmwriter to do some target sensing
based on TargetType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24478 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 22:43:58 +00:00
Chris Lattner
a35a8e87fa Use subtarget information computed by X86Subtarget instead of rolling our own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24477 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 22:39:40 +00:00
Chris Lattner
e5600e5509 Make the X86 subtarget compute the basic target type: ELF, Cygwin, Darwin,
or native Win32


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24476 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 22:31:58 +00:00
Chris Lattner
5df14ca0a1 Add a forELF flag, allowing the removal of forCygwin and simplification of
conditionals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24475 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 22:19:48 +00:00
Chris Lattner
8fccc97b0b simplify and genericize this code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24473 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 19:50:31 +00:00
Duraid Madina
b6f023ac21 add support for div/rem to the dag->dag isel. yay.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24472 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 14:14:54 +00:00
Duraid Madina
e0b632a5d8 I think I know what you meant here, but just to be safe I'll let you
do it. :)

    <_sabre_> excuses excuses


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24471 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 14:09:40 +00:00
Chris Lattner
42a76cdb04 Eliminate unneeded intermediate class. Move doFinalizeMethod to bottom of
file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24470 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:40:17 +00:00
Chris Lattner
3dfbe2ed34 Start using shared asmprinter Constant Pool emitter, use shorter cpi names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24469 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:38:26 +00:00
Chris Lattner
69191f8f05 prune #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24468 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:33:17 +00:00
Chris Lattner
d939f6c85d Switch to using the shared constant pool printer, along with using shorter
CPI ids


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24467 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:32:23 +00:00
Chris Lattner
6053010f9c Switch to using the generic constant pool emitter impl, use shorter
CPI names


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24466 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:29:17 +00:00
Chris Lattner
c569e6108a Use generic constant pool emission code in the AsmPrinter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24465 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:26:15 +00:00
Chris Lattner
3b4fd32a41 Allow target to customize directive used to switch to arbitrary section in SwitchSection,
add generic constant pool emitter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24464 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:25:09 +00:00
Chris Lattner
0745536c00 Use the FunctionNumber provided by the AsmPrinter class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24462 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:14:07 +00:00
Chris Lattner
77bc22866a increment the function number in SetupMachineFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24461 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:13:27 +00:00
Chris Lattner
6d5a4f6a8e Use CommentString where possible, fix a bug where aix mode wouldn't assemble
due to basic blocks being misnamed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24459 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:02:41 +00:00
Chris Lattner
ef65874151 unify the darwin and aix constant pool printers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24458 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:57:37 +00:00
Chris Lattner
25045bdcda Adjust to capitalized asmprinter method names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24457 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:51:36 +00:00
Chris Lattner
8b8b9515d6 Adjust to capitalized AsmPrinter method names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24456 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:51:23 +00:00
Chris Lattner
64965ba8b0 Use PrivateGlobalPrefix for basic block labels. This allows the x86 darwin
port to properly use L for the bb prefix instead of .


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24454 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:43:59 +00:00
Chris Lattner
7f9ccde91e use PrivateGlobalPrefix for basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24453 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:41:05 +00:00
Chris Lattner
2ec30b5e82 Use PrivateGlobalPrefix for basic block labels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24452 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:39:22 +00:00
Chris Lattner
87744a2dbd Use PrivateGlobalPrefix for basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24451 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:38:08 +00:00
Chris Lattner
0a70a49dd6 Switch to the new shared SwitchSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24450 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:30:28 +00:00
Chris Lattner
4bfa3a3eb0 Start using SwitchSection, allowing globals and functions to be emitted
to specific sections.  Delete some dead functions copied from the X86 backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24449 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:26:04 +00:00
Chris Lattner
7b6e53cde7 convert the rest of this over to use SwitchSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24448 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:16:34 +00:00
Chris Lattner
224cfc2eac Start using the AsmPrinter shared SwitchSection code. This allows the X86
backend to implement global variables in sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24447 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:11:11 +00:00
Chris Lattner
f6163a0079 This is now implemented in common codegen code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24446 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:06:58 +00:00
Chris Lattner
ac28fbd043 Add section switching to common code generator code. Add a couple of
asserts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24445 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:06:27 +00:00
Chris Lattner
62cbf2aab9 Rename SwitchSection -> switchSection to avoid conflicting with a future
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24443 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 06:55:27 +00:00
Chris Lattner
81a994e42e Start using PrivateGlobalPrefix correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24442 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 06:51:52 +00:00
Chris Lattner
f55366e3c2 set PrivateGlobalPrefix on darwin, use it when printing out CP references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24441 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 06:47:58 +00:00
Chris Lattner
c41cc83117 Naturally align doubles in the constant pool, set PrivateGlobalPrefix on
darwin, use it when printing the constant pool indices so the labels are
appropriately private, emit cp entries to .const instead of .data on darwin
and only emit a single .section for the constant pool, not one for each
entry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24440 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 06:46:22 +00:00
Chris Lattner
81f803df80 Lower READCYCLECOUNTER correctly, preserving the chain result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24438 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 22:57:19 +00:00
Chris Lattner
308575be66 Legalize MERGE_VALUES, expand READCYCLECOUNTER correctly, so it doesn't
break control dependence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24437 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 22:56:56 +00:00
Chris Lattner
441b223c9b encode rdtsc correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24435 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 22:13:18 +00:00
Chris Lattner
81363c3871 use chain operands to ensure the copies don't wander from the rdtsc instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24434 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 22:01:40 +00:00
Andrew Lenharth
b873ff322c The second patch of X86 support for read cycle counter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24430 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 21:41:10 +00:00
Andrew Lenharth
f70e30b41d The first patch of X86 support for read cycle counter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24429 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 21:32:07 +00:00
Chris Lattner
6bf234c4a8 more progress towards bug 291 being finished. Patch by Owen Anderson,
HAVE_GV case fixed up by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24428 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-20 03:45:52 +00:00
Chris Lattner
b67eb9131c Unbreak codegen of bools. This should fix the llc/jit/llc-beta failures
from last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 18:40:42 +00:00
Chris Lattner
3aa2c74e19 Improve Selection DAG printer portability. Patch by Owen Anderson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24425 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 07:44:09 +00:00
Chris Lattner
6adaf79ad7 Teach the x86 backend about the register constraints of its addressing mode.
Patch by Evan Cheng


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24423 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 07:01:30 +00:00
Chris Lattner
be7a2ff2dd Capture more operand info, patch by Evan Cheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24422 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 07:00:10 +00:00
Chris Lattner
44fa764355 Teach the graph viewer to handle register operands that are zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24421 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 06:58:46 +00:00
Chris Lattner
b89175feff Silence a bogus warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24420 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 05:51:46 +00:00
Chris Lattner
f9ce9fb49b Add load and other support to the dag-dag isel. Patch contributed by Evan
Cheng!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24419 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 02:11:08 +00:00
Chris Lattner
0fb094fd60 Add some method variants, patch by Evan Cheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24418 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-19 01:44:53 +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
1730078d5f Fix a crash building 176.gcc due to my recent patch, which only fixed
half the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24414 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 18:30:47 +00:00
Andrew Lenharth
f27b6145af prevent latent switch creation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24413 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 13:57:03 +00:00
Nate Begeman
e21ea61588 Split out the shift code from visitBinary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:42:56 +00:00
Chris Lattner
36ba5006df Implement a refinement to the mem2reg algorithm for cases where an alloca
has a single def.  In this case, look for uses that are dominated by the def
and attempt to rewrite them to directly use the stored value.

This speeds up mem2reg on these values and reduces the number of phi nodes
inserted.  This should address PR665.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24411 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:31:42 +00:00
Chris Lattner
fed40df846 This needs proper dominance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24410 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:29:44 +00:00
Chris Lattner
4b5086cc71 post-dom-frontiers requires proper post-dominance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24409 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:28:26 +00:00
Chris Lattner
a1fecc9c26 This requires proper dominance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:27:53 +00:00
Chris Lattner
f124d5e500 add more patterns, patch by Evan Cheng.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24406 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 01:04:42 +00:00
Nate Begeman
69a2cf421b Also add the new vector value type here, for completeness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24405 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 00:53:32 +00:00
Chris Lattner
9542f9714e only use dyld stubs if not in ppc-static mode. This completes support for
non-static codegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24403 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 19:40:30 +00:00
Chris Lattner
ceda605fd7 This was checking the wrong GEP expression. Fixing this fixes a gccas crash
compiling mysql reported by Ted Kremenek.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24402 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 19:35:42 +00:00
Chris Lattner
9ba13e4aef refactor call operand handling to eliminate special cases from printOp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24401 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 19:25:59 +00:00
Chris Lattner
3e7f86a037 disentangle call operands from branch operands a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24400 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 19:16:08 +00:00
Chris Lattner
1d05cb47a9 add an option to generate completely non-pic code, corresponding to what
gcc -static produces on PPC.  This is used for building kexts and other things.

With this, materializing the address of a global looks like:

        lis r2, ha16(L_H$non_lazy_ptr)
        la r3, lo16(L_H$non_lazy_ptr)(r2)

we're still emitting stubs for functions, which is wrong.  That is next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24399 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 18:55:48 +00:00
Chris Lattner
1df747867c Fix a bug that resistor on IRC hit where we tried to create token factor
nodes of load results, not of their chain results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24398 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 18:30:17 +00:00
Chris Lattner
3eef4e377c Enable global address legalization, fixing a todo and allowing the removal
of some code.  This exposes the implicit load from the stubs to the DAG, allowing
them to be optimized by the dag combiner.  It also moves darwin specific stuff
out of the isel into the legalizer, and allows more to be moved to the .td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24397 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 18:26:56 +00:00
Chris Lattner
4f0f86de5f Teach the selector to fold lo(g) into load instruction immediate fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24396 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 18:02:16 +00:00
Chris Lattner
490ad08097 Generate LA and ADDIS when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24395 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 17:52:01 +00:00
Chris Lattner
1566613ca4 Use the right accessor to create this node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24394 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 17:51:38 +00:00
Chris Lattner
860e8862c1 Add an initial hack at legalizing GlobalAddress into the appropriate nodes
on Darwin to remove smarts from the isel.  This is currently disabled by
default (uncomment setOperationAction(ISD::GlobalAddress to enable it).
tblgen needs to become smarter about tglobaladdr nodes and bigger patterns
needed to be added to the .td file.  However, we can currently emit stuff like
this:  :)

        li r2, lo16(L_x$non_lazy_ptr)
        lis r3, ha16(L_x$non_lazy_ptr)
        lwzx r2, r3, r2

The obvious improvements will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24390 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 07:30:41 +00:00
Chris Lattner
db40dc2d63 Add globaladdress and targetglobaladdress nodes for dag patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24389 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 07:20:15 +00:00
Chris Lattner
bae5b3c1c6 LI could theoretically be used for the lo-part of a global address, just like
lis can be used for the high part.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24388 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 07:04:43 +00:00
Chris Lattner
0c8fbe33a4 Allow targets to custom legalize leaf nodes like GlobalAddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24387 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 06:41:44 +00:00
Chris Lattner
2823b3e70e When lowering direct calls, lower them to use a targetglobaladress directly
instead of a globaladdress.  This has no effect on the generated code at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24386 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 05:56:14 +00:00
Chris Lattner
b9debbf54c Teach legalize about targetglobaladdress
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24385 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 05:52:24 +00:00
Chris Lattner
78432feff8 Add patterns for some 16-bit immediate instructions, patch contributed by
Evan Cheng.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24384 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 02:01:55 +00:00
Chris Lattner
7a12537843 Add patterns for several simple instructions that take i32 immediates.
Patch contributed by Evan Cheng!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24382 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 22:59:19 +00:00
Andrew Lenharth
81b5a3c387 who would have thought you would want to write into globals too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24381 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 21:15:53 +00:00
Chris Lattner
b1a5a5c4c0 when debugging lower dbg intrinsics to calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24377 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 07:22:30 +00:00
Chris Lattner
b081ccbf56 tell selectiondag when we're debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24376 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 07:21:47 +00:00
Chris Lattner
d5bd52ca48 indicate when a tool is a debug build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24374 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 06:36:47 +00:00
Chris Lattner
3787c95e86 * Fix DerivedType::dropAllTypeUses to not change the number of types in a
type when it gets refined.  This allows us to hash on this crucial value.
* Fix several issues in TypeMap::RefineAbstractType that prevent it from
  handling hash values that change correctly.
* Define hashTypeStructure to not always return 0.  :)

This last part (which depends on the first two) speeds up gccld time on eon
from 3.78s to 2.75s with a release build (a 28% speedup!).  This resolves
PR474.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24372 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 06:09:47 +00:00
Chris Lattner
c961eea6cb initial step at adding a dag-to-dag isel for X86 backend. Patch contributed
by Evan Cheng!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24371 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 01:54:32 +00:00
Nate Begeman
422b0cee7a Patch to clean up function call pseudos and support the BLA instruction,
which branches to an absolute address.  This is required to support objc
direct dispatch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-16 00:48:01 +00:00
Chris Lattner
2c3d3d2a59 Make sure to use SwitchSection to switch sections so that we don't accidentally emit
functions into the .const section.  Whoops.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24363 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-15 01:45:01 +00:00
Chris Lattner
d358cfc1bf Fix handling of multiple unnamed globals with the same type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24362 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-15 01:32:03 +00:00
Chris Lattner
dbdbf0ce2e Separate X86ISelLowering stuff out from the X86ISelPattern.cpp file. Patch
contributed by Evan Cheng.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24358 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-15 00:40:23 +00:00
Chris Lattner
27ecef510f Remove extraneous parents around constants when using a constant expr cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24357 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-15 00:03:16 +00:00
Chris Lattner
ced704ba60 Handle globals with explicit alignment requests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24355 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-14 19:00:30 +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
ac7fd7fcc6 Teach the PPC asmwriter to honor globals with explicit section requests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24353 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-14 18:52:46 +00:00
Chris Lattner
c590e9afc9 instead of using mstats, use malloc_zone_statistics which returns numbers
that actually make sense.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24352 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-14 07:27:56 +00:00
Chris Lattner
513a9547f5 Teach -track-memory to work on darwin. Looking at sbrk doesn't work because
the default allocator uses mmap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24349 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-14 07:00:29 +00:00
Duraid Madina
889649e78e add FP select. next up - divide!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24346 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-14 01:17:30 +00:00
Chris Lattner
c35abc2393 Add some dummy method impls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24345 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 03:26:33 +00:00
Chris Lattner
cfe822728f Move some methods around. Refactor the parts of TypeMap that do not depend
on its template arguments into a base class so that the code isn't duplicated
5 times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24343 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 03:14:09 +00:00
Chris Lattner
bcf6bc2610 Split the type refinement case completely out of the type-becomes-concrete
case, simplifying the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24340 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 01:58:06 +00:00
Chris Lattner
773a959523 unbreak the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24339 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 01:45:23 +00:00
Chris Lattner
66cafb33bc Separate the type-became-concrete case from the type-is-resolved case, the
former of which takes much less work than the later.  This speeds up linking
eon from 3.749 to 3.637s with a release build (about 3%).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24338 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-13 01:27:50 +00:00
Andrew Lenharth
ea2fdf9380 enable LSR by default on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24337 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 19:21:08 +00:00
Andrew Lenharth
6467dfa40d fix more regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24335 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 19:06:28 +00:00
Andrew Lenharth
82a698ce6a fix READCYCLECOUNTER
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24334 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 19:04:09 +00:00
Chris Lattner
c76ea439b6 trivial cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24330 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 18:34:09 +00:00
Chris Lattner
39979ea43f Fix reading LLVM 1.3 bc files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24329 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 18:31:54 +00:00
Chris Lattner
b475c42314 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24328 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 18:22:38 +00:00
Chris Lattner
b2b96679d1 refactor grammar to eliminate shift-reduce conflict. Move alignment checking
code out of all of the clients and into OptAlign/OptCAlign


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24327 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 18:21:21 +00:00
Chris Lattner
7548590ecc Unswitch a loop, add more assertions, eliminate use of removeUserFromConcrete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24324 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 08:39:48 +00:00
Chris Lattner
d4f328e8c1 Tiny speedup, improve comments and code organization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24323 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 08:22:41 +00:00
Chris Lattner
404cddfcf9 Read and write section info from/to .bc files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24321 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 01:33:40 +00:00
Jeff Cohen
ba0ffcc1bc Wrap long line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24320 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 01:01:50 +00:00
Jeff Cohen
277973bf23 Fix VC++ warning that bools cannot be ORed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24319 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:59:39 +00:00
Jeff Cohen
06d9b4ab24 Fix operator precedence bug caught by VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24318 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:59:01 +00:00
Chris Lattner
e869eef7d3 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24316 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:11:49 +00:00
Chris Lattner
b7d08a50f5 add a token
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24315 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:11:30 +00:00
Chris Lattner
164c378047 Parse section info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24314 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:11:10 +00:00
Chris Lattner
60962dbfba print section info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24313 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-12 00:10:19 +00:00
Andrew Lenharth
b921f1b731 fix yet more regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24308 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 23:08:46 +00:00
Andrew Lenharth
2729e614fa generate chain result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24307 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 23:02:55 +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
c2c64fd3c6 Fix a bunch more alpha regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24304 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 19:52:25 +00:00
Andrew Lenharth
f6947c1bb8 prevent cse of readcyclecounter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24303 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 19:02:54 +00:00
Andrew Lenharth
51b8d54922 continued readcyclecounter support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24300 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 16:47:30 +00:00
Chris Lattner
92c4bb904f Fix the optimized code handling of user asm strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24296 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 23:24:26 +00:00
Chris Lattner
5684598f3f Make BB and CPI labels use the function number, not the function name as a
uniquing id.  This makes things happy when the function name is quoted,
preventing labels like LBB"foo"_2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24295 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 21:59:25 +00:00
Chris Lattner
bc076665cb speedup the common case where nothing needs to be quoted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24294 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 21:47:01 +00:00
Chris Lattner
91150e5d46 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.

Also, this includes some minor speedups


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24293 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 21:40:01 +00:00
Chris Lattner
ba9c6434b9 do not allow '.' in symbol names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24292 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 21:39:29 +00:00
Andrew Lenharth
fa25e48412 the pain isn't gone unless the phinodes are spilled too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24288 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 19:39:09 +00:00
Chris Lattner
85eac0d941 Darwin supports quoted labels. This implements:
test/Regression/CodeGen/PowerPC/darwin-labels.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24287 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 19:33:43 +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
2f9bc4f2d3 remove the M instance var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24281 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 19:02:18 +00:00
Chris Lattner
36c975c023 Call this method with the object we have
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24279 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:53:25 +00:00
Chris Lattner
ed0c4ecf05 nuke blank line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24278 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:49:46 +00:00
Chris Lattner
9ddf21276e Make this more efficient of the common case where we are only mangling globals.
Do not mangle internal global names that do not collide with anything.

This gives us strings that now look like this:

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

instead of this:

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24277 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:48:58 +00:00
Chris Lattner
450de393ac Get rid of casts by #including the right header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24275 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:36:17 +00:00
Chris Lattner
3459bfbc39 Make the aix asm printer interface properly with the parent class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24274 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:20:29 +00:00
Chris Lattner
2a21c6e861 Compile C strings to:
l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"

not:

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24273 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:09:27 +00:00
Chris Lattner
2980cefb80 add support for .asciz, and enable it by default. If your target assemblerdoesn'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@24272 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:06:33 +00:00
Andrew Lenharth
99b8e26b84 this works with backedges to the existing entry block alot better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24270 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 17:35:34 +00:00
Andrew Lenharth
7b441dc966 fix a bunch of regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24269 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 16:59:55 +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
9547d7fe33 Force vectors to be a power of two in size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24265 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 01:42:43 +00:00
Chris Lattner
d115ef8973 Force packed vectors to be a power of two in length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24264 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 01:40:59 +00:00
Chris Lattner
de202b3cda 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 froma 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@24263 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 23:47:37 +00:00
Chris Lattner
c9ea6fde30 Refactor intrinsic lowering stuff out of visitCall
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24261 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 19:44:01 +00:00
Andrew Lenharth
5cefc5e64d whatever. Intermediate patch to see what breaks. Seems ok.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24260 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 19:17:08 +00:00
Chris Lattner
040c11c24e Handle the trivial (but common) two-op case more efficiently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24259 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 18:48:57 +00:00
Chris Lattner
e6a88ac1b9 Nuke noop copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24258 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 18:22:42 +00:00
Chris Lattner
6b2d69655a Fix CodeGen/X86/shift-folding.ll:test3 on X86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24256 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 16:50:40 +00:00
Chris Lattner
9a5ef20f5e Disable some overly-aggressive checking code. This speeds up the local
allocator from 23s to 11s on kc++ in debug mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24255 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 05:28:45 +00:00
Chris Lattner
7436b57de3 Avoid creating a token factor node in trivially redundant cases. This
eliminates almost one node per block in common cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 05:03:03 +00:00
Chris Lattner
7c0104b525 Handle GEP's a bit more intelligently. Fold constant indices early and
turn power-of-two multiplies into shifts early to improve compile time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24253 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 04:45:33 +00:00
Chris Lattner
0d902a9c74 Allocate the right amount of memory for this vector up front.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24252 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 23:32:44 +00:00
Chris Lattner
a32551197a Change the ValueList array for each node to be shared instead of individuallyallocated. Further, in the common case where a node has a single value, justreference an element from a small array. This is a small compile-time win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24251 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 23:30:28 +00:00
Chris Lattner
65113b2f86 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@24249 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 22:07:03 +00:00
Chris Lattner
4012eb2137 Explicitly initialize some instance vars
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24247 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 21:54:57 +00:00
Chris Lattner
f469cb6546 Clean up RemoveDeadNodes significantly, by eliminating the need for a temporary
set and eliminating the need to iterate whenever something is removed (which
can be really slow in some cases).  Thx to Jim for pointing out something silly
I was getting stuck on. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24241 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 18:52:27 +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
ce8eb0c16b 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 -O0style of build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24233 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 02:11:51 +00:00
Jim Laskey
26b91ebb63 Let's try ignoring resource utilization on the backward pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24231 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-07 19:08:53 +00:00
Duraid Madina
d525df3c27 add support for storing and returning bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24228 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-07 03:11:02 +00:00
Chris Lattner
cbef8ba5f9 Always compute max align.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24227 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 17:43:20 +00:00
Duraid Madina
00873ebc1f just some random hacking - calls (particularly indirect) need a lot of
love (especially with -sched=simple)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24225 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 13:43:30 +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
ce5e04e710 minor clarity changes, no functionality difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24223 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 08:23:17 +00:00
Chris Lattner
54b369e752 don't misencode CC#'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24219 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 07:46:13 +00:00
Chris Lattner
e73bd45c1d encode/decode function alignment in bc files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24218 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 07:43:39 +00:00
Chris Lattner
8eb52dd734 Read/write global variable alignments if present
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24216 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 07:11:04 +00:00
Chris Lattner
30caa2876c print alignment info for globals and functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24212 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:48:53 +00:00
Chris Lattner
0019bbe198 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24211 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:46:53 +00:00
Chris Lattner
87ac972709 Allow globals to have an alignment specified. Switch to using isPowerOf2_32
at Jim's request for the checking code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24210 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:46:28 +00:00
Chris Lattner
7d09ab6b88 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24208 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:34:34 +00:00
Chris Lattner
66db8e4aab factor optional alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24207 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 06:34:12 +00:00
Duraid Madina
21687e8f63 ask for 16-byte aligned jmpbufs. This should unbreak C++ on IA64 (and
a bunch of other things) but is currently ignored by the code
generator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24206 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 04:29:30 +00:00
Chris Lattner
42ba6b4b88 Write/read allocation instruction alignment info to .bc files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24203 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 22:08:14 +00:00
Chris Lattner
6033716140 verify that alignments are always a power of 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24200 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:57:54 +00:00
Chris Lattner
d91c32110a regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24199 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:54:23 +00:00
Chris Lattner
ac6e5c10db Verify that alignment amounts are a power of 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24198 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:54:03 +00:00
Chris Lattner
9fad0b9974 fix printing the alignment directive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24197 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 21:20:34 +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
Chris Lattner
ae4664a9f2 add a case Nate sent me
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24195 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 08:57:56 +00:00
Chris Lattner
3b5f45042b Implement Transforms/TailCallElim/return-undef.ll, a trivial case
that has been sitting in my inbox since May 18. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24194 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 08:21:11 +00:00
Chris Lattner
c812e5d6b8 Turn sdiv into udiv if both operands have a clear sign bit. This occurs
a few times in crafty:

OLD:    %tmp.36 = div int %tmp.35, 8            ; <int> [#uses=1]
NEW:    %tmp.36 = div uint %tmp.35, 8           ; <uint> [#uses=0]
OLD:    %tmp.19 = div int %tmp.18, 8            ; <int> [#uses=1]
NEW:    %tmp.19 = div uint %tmp.18, 8           ; <uint> [#uses=0]
OLD:    %tmp.117 = div int %tmp.116, 8          ; <int> [#uses=1]
NEW:    %tmp.117 = div uint %tmp.116, 8         ; <uint> [#uses=0]
OLD:    %tmp.92 = div int %tmp.91, 8            ; <int> [#uses=1]
NEW:    %tmp.92 = div uint %tmp.91, 8           ; <uint> [#uses=0]

Which all turn into shrs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24190 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 07:40:31 +00:00
Chris Lattner
11a49f2c0d Turn srem -> urem when neither input has their sign bit set. This triggers
8 times in vortex, allowing the srems to be turned into shrs:

OLD:    %tmp.104 = rem int %tmp.5.i37, 16               ; <int> [#uses=1]
NEW:    %tmp.104 = rem uint %tmp.5.i37, 16              ; <uint> [#uses=0]
OLD:    %tmp.98 = rem int %tmp.5.i24, 16                ; <int> [#uses=1]
NEW:    %tmp.98 = rem uint %tmp.5.i24, 16               ; <uint> [#uses=0]
OLD:    %tmp.91 = rem int %tmp.5.i19, 8         ; <int> [#uses=1]
NEW:    %tmp.91 = rem uint %tmp.5.i19, 8                ; <uint> [#uses=0]
OLD:    %tmp.88 = rem int %tmp.5.i14, 8         ; <int> [#uses=1]
NEW:    %tmp.88 = rem uint %tmp.5.i14, 8                ; <uint> [#uses=0]
OLD:    %tmp.85 = rem int %tmp.5.i9, 1024               ; <int> [#uses=2]
NEW:    %tmp.85 = rem uint %tmp.5.i9, 1024              ; <uint> [#uses=0]
OLD:    %tmp.82 = rem int %tmp.5.i, 512         ; <int> [#uses=2]
NEW:    %tmp.82 = rem uint %tmp.5.i1, 512               ; <uint> [#uses=0]
OLD:    %tmp.48.i = rem int %tmp.5.i.i161, 4            ; <int> [#uses=1]
NEW:    %tmp.48.i = rem uint %tmp.5.i.i161, 4           ; <uint> [#uses=0]
OLD:    %tmp.20.i2 = rem int %tmp.5.i.i, 4              ; <int> [#uses=1]
NEW:    %tmp.20.i2 = rem uint %tmp.5.i.i, 4             ; <uint> [#uses=0]

it also occurs 9 times in gcc, but with odd constant divisors (1009 and 61)
so the payoff isn't as great.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24189 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 07:28:37 +00:00
Jim Laskey
a5e5bff8b8 Fix logic bug in finding retry slot in tally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24188 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 00:01:25 +00:00
Jim Laskey
54f997d23f Fix a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24187 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 18:26:02 +00:00
Duraid Madina
764fe71e12 oops, forgot to load GP for indirect calls, though the old code now commented
out failed (e.g. methcall) - now the code compiles, though it's not quite
right just yet (tm) ;)

would fix this but it's 3am! :O


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24186 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 17:55:53 +00:00
Duraid Madina
b97cc99058 kill redundant SP/GP/RP save/restores across calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24183 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 10:01:10 +00:00
Duraid Madina
9f7290633a add support for loading bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24182 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 09:59:06 +00:00
Jim Laskey
7d090f3485 Scheduling now uses itinerary data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24180 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 04:05:35 +00:00
Duraid Madina
49fcc4006c fun with predicates! (add TRUNC i64->i1, AND i1 i1, fix XOR i1 i1)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24175 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-04 00:57:56 +00:00
Duraid Madina
0e5e0d14a8 add pattern to load constant 0 into a predicate reg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24164 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-03 10:09:32 +00:00
Chris Lattner
61bc60fc4f Fix a bug that prevented this pattern from matching
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24161 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-03 05:45:34 +00:00
Nate Begeman
5dc7e861f8 Fix a crash that Andrew noticed, and add a pair of braces to unfconfuse
XCode's indenting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24159 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 18:42:59 +00:00
Andrew Lenharth
7bbff04f7f make this 64 bit clean, fixed test30 of /Regression/Transforms/InstCombine/add.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24158 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 18:35:40 +00:00
Chris Lattner
bad13eb189 Fix a QOI issue noticed by Markus F.X.J. Oberhumer.
This fixes PR641


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24154 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 17:42:58 +00:00
Duraid Madina
056728f192 "fix" support for FP constants (this code asserts in the scheduler,
though)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24152 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 07:32:59 +00:00
Duraid Madina
a2df2aee81 add F0 and F1 to the FP register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24151 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 07:30:39 +00:00
Chris Lattner
cb2583e17d This works now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24150 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 06:49:37 +00:00
Duraid Madina
5966955445 add support for SELECT to TargetSelectionDAG.td, add support for
selecting ints to IA64, and a few other ia64 bits and pieces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24147 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 02:37:18 +00:00
Duraid Madina
93856802ae add support for loading FP constants +0.0 and +1.0 to the dag isel,
stop pretending -0.0 and -1.0 are machine constants


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24146 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 02:35:04 +00:00
Chris Lattner
7c22575e32 Fix a source of undefined behavior when dealing with 64-bit types. This
may fix PR652.  Thanks to Andrew for tracking down the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24145 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 01:47:04 +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
Duraid Madina
7a8ef3a0d4 heh, scheduling was easy?
need to send chris, jim and sampo a box of fish each


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24135 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 05:49:08 +00:00
Duraid Madina
dc9549b52c FORTRAN!!! :( and other similarly unfortunate things mean that on ia64
one sometimes needs to pass FP args in both FP *and* integer registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24134 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 05:46:16 +00:00
Duraid Madina
aba8457125 so tablegen was thinking I might want to convert FPs to predicates.
clever little tablegen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24133 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 03:32:15 +00:00
Duraid Madina
e2fd9e2d9d add support for int->FP and FP->int ops, and add ia64 patterns for these
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24132 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 03:07:25 +00:00
Duraid Madina
d1eda6d155 add zeroextend predicate->integer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24131 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 01:29:55 +00:00
Chris Lattner
5b0ac99c96 Add a flag to enable a darwin linker optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24130 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-01 00:12:36 +00:00
Chris Lattner
bb69e39b5b Make constant pool entries use private labels. This is important when you're
not compiling a whole program at a time :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24129 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-31 22:12:06 +00:00
Chris Lattner
306f6fefc9 Fix an iterator invalidation problem in code used by the -strip pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24124 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-31 18:42:37 +00:00
Chris Lattner
76ff2c7504 Limit the search depth of MaskedValueIsZero to 6 instructions, to avoid
bad cases.  This fixes Markus's second testcase in PR639, and should
seal it for good.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24123 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-31 18:35:52 +00:00
Jim Laskey
5a608ddada 1. Embed and not inherit vector for NodeGroup.
2. Iterate operands and not uses (performance.)

3. Some long pending comment changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24119 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-31 12:49:09 +00:00
Duraid Madina
363aff2f3c add FP compares and implicit register defs to the dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24118 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-31 01:42:11 +00:00
Chris Lattner
bf209489ad Significantly simplify this code and make it more aggressive. Instead of having
a special case hack for X86, make the hack more general: if an incoming argument
register is not used in any block other than the entry block, don't copy it to
a vreg.  This helps us compile code like this:

%struct.foo = type { int, int, [0 x ubyte] }
int %test(%struct.foo* %X) {
        %tmp1 = getelementptr %struct.foo* %X, int 0, uint 2, int 100
        %tmp = load ubyte* %tmp1                ; <ubyte> [#uses=1]
        %tmp2 = cast ubyte %tmp to int          ; <int> [#uses=1]
        ret int %tmp2
}

to:

_test:
        lbz r3, 108(r3)
        blr

instead of:

_test:
        lbz r2, 108(r3)
        or r3, r2, r2
        blr

The (dead) copy emitted to copy r3 into a vreg for extra-block uses was
increasing the live range of r3 past the load, preventing the coallescing.

This implements CodeGen/PowerPC/reg-coallesce-simple.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24115 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 19:42:35 +00:00
Chris Lattner
a4176525cc Reduce the number of copies emitted as machine instructions by
generating results in vregs that will need them.  In the case of something
like this:  CopyToReg((add X, Y), reg1024), we no longer emit code like
this:

   reg1025 = add X, Y
   reg1024 = reg 1025

Instead, we emit:

   reg1024 = add X, Y

Whoa! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24111 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 18:54:27 +00:00
Chris Lattner
c1d6f67e8e If the module has no t-t and the host is an alpha, default to using the Alpha BE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24110 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 16:44:01 +00:00
Duraid Madina
5c2c64e567 fix some broken comparisons, this affected the Pattern isel too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24109 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 10:14:19 +00:00
Chris Lattner
b685af3e60 This is implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24107 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 06:42:12 +00:00
Chris Lattner
3e6099b05f Codegen mul by negative power of two with a shift and negate.
This implements test/Regression/CodeGen/PowerPC/mul-neg-power-2.ll,
producing:

_foo:
        slwi r2, r3, 1
        subfic r3, r2, 63
        blr

instead of:

_foo:
        mulli r2, r3, -2
        addi r3, r2, 63
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24106 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 06:41:49 +00:00
Chris Lattner
df14a04b5c Fix a problem that Nate noticed with LSR:
When inserting code for an addrec expression with a non-unit stride, be
more careful where we insert the multiply.  In particular, insert the multiply
in the outermost loop we can, instead of the requested insertion point.

This allows LSR to notice the mul in the right loop, reducing it when it gets
to it.  This allows it to reduce the multiply, where before it missed it.

This happens quite a bit in the test suite, for example, eliminating 2
multiplies in art, 3 in ammp, 4 in apsi, reducing from 1050 multiplies to
910 muls in galgel (!), from 877 to 859 in applu, and 36 to 30 in bzip2.

This speeds up galgel from 16.45s to 16.01s, applu from 14.21 to 13.94s and
fourinarow from 66.67s to 63.48s.

This implements Transforms/LoopStrengthReduce/nested-reduce.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24102 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-30 06:24:33 +00:00
Chris Lattner
f519fe07e0 Make -time-passes output prettier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24096 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 16:45:02 +00:00
Duraid Madina
25d0a88eb8 add some FP stuff, some mix.* stuff, and constant pool support to the
DAG instruction selector, which should be destroyed one day (in the pattern
isel also) since ia64 can pack any constant in the instruction stream


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24094 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 16:08:30 +00:00
Chris Lattner
9fefdb5d66 This pass is now obsolete since all targets have moved to the SelectionDAG
infrastructure and the simple isels have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24090 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 05:33:46 +00:00
Chris Lattner
72fe0af68f remove reference to this pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24088 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 05:28:34 +00:00
Chris Lattner
eb99bd30e9 remove a dead file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24085 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:43:38 +00:00
Chris Lattner
5af401d5f1 Remove dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24083 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:41:30 +00:00
Chris Lattner
1462aa78c7 Now that instcombine does this xform, remove it from the -raise pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24082 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:40:23 +00:00
Chris Lattner
cfd65100c4 Pull some code out into a function, give it the ability to see through +.
This allows us to turn code like malloc(4*x+4) -> malloc int, (x+1)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24081 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:36:15 +00:00
Duraid Madina
274ecfb782 add shladd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24080 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:13:40 +00:00
Chris Lattner
455fcc8d35 Remove a special case, allowing the general case to handle it. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24076 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 03:19:53 +00:00
Nate Begeman
167f1e2651 New case to handle someday
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24075 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 23:26:57 +00:00
Chris Lattner
7d7b96746c Don't emit "32" for unordered comparison
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24073 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 22:58:07 +00:00
Chris Lattner
ed048c067d add a hack to get code with ordered comparisons working. This hack is
tracked as PR642


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24068 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 20:49:47 +00:00
Chris Lattner
6df2507121 add support for branch on ordered/unordered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24067 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 20:32:44 +00:00
Chris Lattner
f02a916d82 Do not globalize internal symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24064 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 18:44:07 +00:00
Chris Lattner
aee436bcc0 These are autogenerated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24063 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 18:26:52 +00:00
Duraid Madina
f2db9b88da DAG->DAG instruction selection for ia64! "hello world" works, not much else.
use -enable-ia64-dag-isel to turn this on

TODO: delete lowering stuff from the pattern isel
    : get operations on predicate bits working
    : get other bits of pseudocode going
    : use sampo's mulh/mull-using divide-by-constant magic
    : *so* many patterns ("extr", "tbit" and "dep" will be fun :)
    : add FP
    : add a JIT!
    : get it working 100%

in short: this'll be happier in a couple of weeks, but it's here now so
the tester can make me feel guilty sooner.

OTHER: there are a couple of fixes to the pattern isel, in particular
making the linker happy with big blobs of fun like pypy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24058 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 17:46:35 +00:00
Chris Lattner
325231c925 Fix a bit of backwards logic that broke exptree and smg2000
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24056 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 16:27:35 +00:00
Chris Lattner
4bd4a54d57 remove dead stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24054 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 04:58:24 +00:00
Chris Lattner
a411bef105 Eliminate getClass, it is not needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24053 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 04:57:11 +00:00
Chris Lattner
0195910558 a bad case for bitfield insert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24051 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-28 00:20:45 +00:00
Chris Lattner
108e902aeb Do not sink any instruction with side effects, including vaarg. This fixes
PR640


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24046 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 17:13:11 +00:00
Chris Lattner
cbbc6b74e3 Fix #include order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24044 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 16:34:00 +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
John Criswell
a115643357 Move some constant folding code shared by Analysis and Transform passes
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24036 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 15:54:34 +00:00
Chris Lattner
fe7f046de8 Fix DSE to not nuke dead stores unless they redundant store is the same
VT as the killing one.  Fix fixes PR491


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24034 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 07:10:34 +00:00
Chris Lattner
0e026de6ac Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24033 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 06:26:26 +00:00
Chris Lattner
e679288a30 Teach instcombine to promote stuff like (cast (malloc sbyte, 8*X) to int*)
into: malloc int, (2*X)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24032 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 06:24:46 +00:00
Chris Lattner
8142b0a54b Promote cases like cast (malloc sbyte, 100) to int* into
(malloc [25 x int]) directly without having to convert to
(malloc [100 x sbyte]) first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24031 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 06:12:00 +00:00
Chris Lattner
0ddac2a1c3 Minor change to this file to support obscure cases with constant array amounts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24030 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 05:53:56 +00:00
Chris Lattner
731d348166 Add a simple xform that is useful for bitfield operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24029 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 05:06:38 +00:00
John Criswell
e96a1a576b 1. Remove libraries no longer created from the list of libraries linked into the
SparcV9 JIT.
2. Make LLVMTransformUtils a relinked object file and always link it before
   LLVMAnalysis.a.  These two libraries have circular dependencies on each
   other which creates problem when building the SparcV9 JIT.  This change
   fixes the dependency on all platforms problems with a minimum of fuss.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24023 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 20:35:13 +00:00
Andrew Lenharth
2012cc013c int comparison patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24020 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 18:44:45 +00:00
Chris Lattner
c60e6020c0 Fix some spello's pointed out by Gabor Greif
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24019 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 18:41:41 +00:00
Jim Laskey
2cbc207c76 Typo made worse x 2 - take 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24018 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 18:07:50 +00:00
Chris Lattner
85fd97dc88 Fix an assert compiling MallocBench/gs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24017 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 18:01:11 +00:00
Jim Laskey
ff2fcee846 Typo x 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24016 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:50:22 +00:00
Andrew Lenharth
641b64aa4b Simplify instinfo, set random bits on more fp insts, and fix 1 opcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24014 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:41:46 +00:00
Jim Laskey
581a8f79bc Give full control of subtarget features over to table generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24013 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:30:34 +00:00
Jim Laskey
f0c2be4d2b Add attribute name and type to SubtargetFeatures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24012 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:28:23 +00:00
Chris Lattner
e9f15e538a fold nested and's early to avoid inefficiencies in MaskedValueIsZero. This
fixes a very slow compile in PR639.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24011 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:18:16 +00:00
Chris Lattner
1f426deade Add nodes for CondCodeSDNode and setcc, and add a bunch of pattern fragments
to make it easy to use them.  This lets you write patterns like:

(set PRRC:$rd, (setne GPRC:$rS, imm:$SH))

and stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24009 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 17:00:25 +00:00
Nate Begeman
5cd61ce1be Add a note about some bitfield stuff we could be doing better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23994 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 23:50:02 +00:00
Nate Begeman
ae749a9bb5 Correctly Expand or Promote FP_TO_UINT based on the capabilities of the
machine.  This allows us to generate great code for i32 FP_TO_UINT now on
targets with 64 bit extensions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23993 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 23:48:36 +00:00
Nate Begeman
b7f6ef12f6 Allow custom lowered FP_TO_SINT ops in the check for whether a larger
FP_TO_SINT is preferred to a larger FP_TO_UINT.  This seems to be begging
for a TLI.isOperationCustom() helper function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23992 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 23:47:25 +00:00
Chris Lattner
6e61ca6fa7 autogen undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23991 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 21:03:41 +00:00
Chris Lattner
978982628a Add undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23990 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 21:03:14 +00:00
Chris Lattner
3075a4e94d Allow pseudos to have patterns, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23988 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 20:58:43 +00:00
Chris Lattner
9c73f095bb Autogen fsel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23987 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 20:55:47 +00:00
Chris Lattner
eb255f2b83 Expose the fextend on the DAG instead of doing it in the matcher
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23986 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 20:54:57 +00:00
Chris Lattner
e6115b370a Autogen a few new ppc-specific nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23985 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 20:41:46 +00:00
Chris Lattner
8ecedbe2c3 The dag isel generator generates this now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23984 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 20:36:10 +00:00
Chris Lattner
99ea9da872 Be a bit more paranoid about calling SelectNodeTo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23982 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 20:26:41 +00:00
Chris Lattner
3393e80a06 Fix a couple of minor bugs. The first fixes povray, the second fixes things
if the dag combiner isn't run


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23981 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 19:32:37 +00:00
Chris Lattner
a158eee313 Clear a bit in this file that was causing a miscompilation of 178.galgel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23980 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 18:57:30 +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
Alkis Evlogimenos
e9c6d36377 Stop using deprecated types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23973 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 11:18:06 +00:00
Chris Lattner
08a6b3cf7e do not wrap this whole file in namespace llvm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23962 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 06:38:35 +00:00
Chris Lattner
39387a5c93 Handle allocations that, even after removing dead uses, still have more than
one use (but one is a cast).  This handles the very common case of:

 X = alloc [n x byte]
 Y = cast X to somethingbetter
 seteq X, null

In order to avoid infinite looping when there are multiple casts, we only
allow this if the xform is strictly increasing the alignment of the
allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23961 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 06:35:18 +00:00
Chris Lattner
18e78bb09e Fix a bug where we would 'promote' an allocation from one type to another
where the second has less alignment required.  If we had explicit alignment
support in the IR, we could handle this case, but we can't until we do.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23960 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 06:26:18 +00:00
Chris Lattner
b53c2382a9 Before promoting a malloc type, remove dead uses. This makes instcombine
more effective at promoting these allocations, catching them earlier in the
compile process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23959 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 06:22:12 +00:00
Chris Lattner
b3f8397a3d Pull some code out into a function, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23958 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 06:03:58 +00:00
Chris Lattner
02d608bd5f Make this build with GCC 4.1, patch contributed by Vladimir A. Merzliakov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23956 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 04:51:35 +00:00
Chris Lattner
8a6cd98e96 Alkis agrees that that iterative scan allocator isn't going to be worked on
in the future, remove it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23952 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 04:14:30 +00:00
Chris Lattner
f941a0fe6c Remove this pass, it is not useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23949 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:35:43 +00:00
Chris Lattner
d00a3cee80 Remove some beta code that no longer has an owner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23944 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:32:41 +00:00
Chris Lattner
a66459095c Do not build the ProfilePaths directory anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23943 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:31:49 +00:00
Chris Lattner
f36aeedaa3 DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23940 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:26:13 +00:00
Chris Lattner
aa9b596c5d only build .a version of this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23938 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:14:49 +00:00
Chris Lattner
e3242e2392 Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23937 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:11:51 +00:00
Chris Lattner
635df00b02 There is no need to build an archive version of this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23936 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:09:03 +00:00
Chris Lattner
11686f1c07 This file is hopelessly out of date
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23935 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:07:08 +00:00
Chris Lattner
b72bfd71aa Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23934 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:05:35 +00:00
Chris Lattner
ab0ed3592b Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23933 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:59:48 +00:00
Chris Lattner
492d4a9d84 Make sure that anything using the ADCE pass pulls in the UnifyFunctionExitNodes
code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23931 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:40:23 +00:00
Chris Lattner
83753937a6 don't bother building the archive version of this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23927 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:08:20 +00:00
Chris Lattner
4fb1b21b31 expose a ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23924 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:00:45 +00:00
Chris Lattner
6d796238b2 implement some prototypes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23920 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:38:38 +00:00
Chris Lattner
25d196880b move this to the analyze tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23918 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:27:36 +00:00
Chris Lattner
3db4b62c2f Fix a nasty bug that was causing miscompilation of global variables
on big endian 32-bit targets in some cases (e.g. PPC).  This fixes several
PPC JIT failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23914 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 23:54:56 +00:00
Chris Lattner
667eeca19d Shrinkify to match llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23912 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:39:01 +00:00
Chris Lattner
2224dcc88c Simplify this, matching changes in the tblgen emitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23909 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:34:25 +00:00
Chris Lattner
8ec9f331d2 Simplify this due to changes in the tblgen side
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23908 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:33:22 +00:00
Chris Lattner
aa38be17c8 mark this as beta
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23906 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:23:45 +00:00
Chris Lattner
3e808a45b3 If a user requests help, give them help on both features and processors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23905 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:23:13 +00:00
Chris Lattner
ed465f5407 Autogen subtarget information from .td files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23904 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:15:34 +00:00
Chris Lattner
5882e40ded Add subtarget feature/processor defns to the .td file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23903 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:08:45 +00:00
Chris Lattner
c8d28890f6 rearrange things a bit so that instructions can use subtarget features in the
future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23902 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:08:13 +00:00
Chris Lattner
f690e6f3f6 add a marker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23901 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:07:20 +00:00
Chris Lattner
ffff6175ef add a note that Nate mentioned last week
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23898 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 21:44:59 +00:00
Chris Lattner
1171ff4fd7 Put some of my random notes somewhere public
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23897 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 19:52:42 +00:00
Chris Lattner
ba76c21858 Improve help output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23893 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 05:33:39 +00:00
Chris Lattner
2e1f823aed improve -help output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23892 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 05:28:51 +00:00
Chris Lattner
54195c1a9d Move static functions from .h file, reduce #includes, pass strings by const&,
use LowercaseString from StringExtras.h, remove extraneous space from help
output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23891 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 05:26:26 +00:00
Jeff Cohen
66c5fd6c53 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 04:37:20 +00:00
Andrew Lenharth
8b7f14e970 Add several things.
loads
branches
setcc
working calls
Global address
External addresses

now I can manage malloc calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23887 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 03:43:48 +00:00
Andrew Lenharth
2a2de66db2 add TargetExternalSymbol
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23886 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 03:40:17 +00:00
Andrew Lenharth
756fbeb905 Well, the Constant matching pattern works. Can't say much about calls or globals yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23884 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-22 22:06:58 +00:00
Chris Lattner
5ef4d8dd6d This file is entirely ifdef'd out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23882 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-22 19:37:08 +00:00
Chris Lattner
e9936d14b8 BuildSDIV and BuildUDIV only work for i32/i64, but they don't check that
the input is that type, this caused a failure on gs on X86 last night.
Move the hard checks into Build[US]Div since that is where decisions like
this should be made.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23881 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-22 18:50:15 +00:00
Jim Laskey
5476b9bfce Add g3 back to the mix and reorder to irritate them anal folk. Actually, it's
to group appropriately and provide cues to maintainers that the lists don't
need to be ordered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23880 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-22 08:04:24 +00:00
Chris Lattner
4245f1d790 64-bit reg support should not be enabled by default, as support isn't complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23878 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 22:15:43 +00:00
Chris Lattner
c8597ca698 add a case missing from the dag combiner that exposed the failure on
2005-10-21-longlonggtu.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23875 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 21:23:25 +00:00
Chris Lattner
dabb8291e8 Instead of aborting if not a case we can handle specially, break out and
let the generic code handle it.  This fixes CodeGen/Generic/2005-10-21-longlonggtu.ll on ppc.

also, reindent this code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23874 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 21:17:10 +00:00
Jim Laskey
f5fc2cbd6b Plugin new subtarget backend into the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23870 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 19:05:19 +00:00
Chris Lattner
d2fc54edc4 silence a release mode warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23868 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 16:01:26 +00:00
Chris Lattner
aa51a484e1 Make the coallescer a bit smarter, allowing it to join more live ranges.
For example, we can now join things like [0-30:0)[31-40:1)[52-59:2)
with [40:60:0) if the 52-59 range is defined by a copy from the 40-60 range.
The resultant range ends up being [0-30:0)[31-60:1).

This fires a lot through-out the test suite (e.g. shrinking bc from
19492 -> 18509 machineinstrs) though most gains are smaller (e.g. about
50 copies eliminated from crafty).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23866 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 06:49:50 +00:00
Chris Lattner
9e20d352c2 Fix LiveInterval::getOverlapingRanges to take things in the right order
(an unused method).

Fix the merger so that it can merge ranges like this  [10:12)[16:40) with
[12:38) into [10:40) instead of bogus ranges.  This sort of input will be
possible for the merger coming shortly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23865 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-21 06:41:30 +00:00