Chris Lattner [Mon, 21 Nov 2005 08:32:23 +0000 (08:32 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 08:29:17 +0000 (08:29 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 08:26:15 +0000 (08:26 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 08:25:09 +0000 (08:25 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 08:24:11 +0000 (08:24 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 08:14:07 +0000 (08:14 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 08:13:27 +0000 (08:13 +0000)]
increment the function number in SetupMachineFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24461
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 08:12:47 +0000 (08:12 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 08:02:41 +0000 (08:02 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 07:57:37 +0000 (07:57 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 07:51:36 +0000 (07:51 +0000)]
Adjust to capitalized asmprinter method names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24457
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 07:51:23 +0000 (07:51 +0000)]
Adjust to capitalized AsmPrinter method names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24456
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 07:51:06 +0000 (07:51 +0000)]
Capitalize methods for better consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24455
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 07:43:59 +0000 (07:43 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 07:41:05 +0000 (07:41 +0000)]
use PrivateGlobalPrefix for basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24453
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 07:39:22 +0000 (07:39 +0000)]
Use PrivateGlobalPrefix for basic block labels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24452
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 07:38:08 +0000 (07:38 +0000)]
Use PrivateGlobalPrefix for basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24451
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 07:30:28 +0000 (07:30 +0000)]
Switch to the new shared SwitchSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24450
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 07:26:04 +0000 (07:26 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 07:16:34 +0000 (07:16 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 07:11:11 +0000 (07:11 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 07:06:58 +0000 (07:06 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 07:06:27 +0000 (07:06 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 07:05:42 +0000 (07:05 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 06:55:27 +0000 (06:55 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 06:51:52 +0000 (06:51 +0000)]
Start using PrivateGlobalPrefix correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24442
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Nov 2005 06:47:58 +0000 (06:47 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 06:46:22 +0000 (06:46 +0000)]
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
Chris Lattner [Mon, 21 Nov 2005 06:41:08 +0000 (06:41 +0000)]
Add a new option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24439
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Nov 2005 22:57:19 +0000 (22:57 +0000)]
Lower READCYCLECOUNTER correctly, preserving the chain result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24438
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Nov 2005 22:56:56 +0000 (22:56 +0000)]
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
Chris Lattner [Sun, 20 Nov 2005 22:55:57 +0000 (22:55 +0000)]
add a new node type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24436
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Nov 2005 22:13:18 +0000 (22:13 +0000)]
encode rdtsc correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24435
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Nov 2005 22:01:40 +0000 (22:01 +0000)]
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
Chris Lattner [Sun, 20 Nov 2005 21:46:52 +0000 (21:46 +0000)]
This should not be dce'd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24433
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 20 Nov 2005 21:42:49 +0000 (21:42 +0000)]
oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24432
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 20 Nov 2005 21:41:59 +0000 (21:41 +0000)]
check that rdtsc is generated from readcyclecounter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24431
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sun, 20 Nov 2005 21:41:10 +0000 (21:41 +0000)]
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
Andrew Lenharth [Sun, 20 Nov 2005 21:32:07 +0000 (21:32 +0000)]
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
Chris Lattner [Sun, 20 Nov 2005 03:45:52 +0000 (03:45 +0000)]
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
Chris Lattner [Sat, 19 Nov 2005 18:40:42 +0000 (18:40 +0000)]
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
Chris Lattner [Sat, 19 Nov 2005 07:48:33 +0000 (07:48 +0000)]
Initialize this variable on all paths, fixing a crasher in windows. Thanks
to JeffC for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24426
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Nov 2005 07:44:09 +0000 (07:44 +0000)]
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
Chris Lattner [Sat, 19 Nov 2005 07:05:57 +0000 (07:05 +0000)]
Teach tblgen about instruction operands that have multiple MachineInstr
operands, digging into them to find register values (used on X86). Patch
by Evan Cheng!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24424
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Nov 2005 07:01:30 +0000 (07:01 +0000)]
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
Chris Lattner [Sat, 19 Nov 2005 07:00:10 +0000 (07:00 +0000)]
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
Chris Lattner [Sat, 19 Nov 2005 06:58:46 +0000 (06:58 +0000)]
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
Chris Lattner [Sat, 19 Nov 2005 05:51:46 +0000 (05:51 +0000)]
Silence a bogus warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24420
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Nov 2005 02:11:08 +0000 (02:11 +0000)]
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
Chris Lattner [Sat, 19 Nov 2005 01:44:53 +0000 (01:44 +0000)]
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
Chris Lattner [Sat, 19 Nov 2005 01:42:10 +0000 (01:42 +0000)]
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
Nate Begeman [Sat, 19 Nov 2005 00:36:38 +0000 (00:36 +0000)]
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
Chris Lattner [Fri, 18 Nov 2005 19:38:15 +0000 (19:38 +0000)]
testcase for recent indvars patches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24415
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Nov 2005 18:30:47 +0000 (18:30 +0000)]
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
Andrew Lenharth [Fri, 18 Nov 2005 13:57:03 +0000 (13:57 +0000)]
prevent latent switch creation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24413
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 18 Nov 2005 07:42:56 +0000 (07:42 +0000)]
Split out the shift code from visitBinary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24412
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Nov 2005 07:31:42 +0000 (07:31 +0000)]
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
Chris Lattner [Fri, 18 Nov 2005 07:29:44 +0000 (07:29 +0000)]
This needs proper dominance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24410
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Nov 2005 07:28:26 +0000 (07:28 +0000)]
post-dom-frontiers requires proper post-dominance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Nov 2005 07:27:53 +0000 (07:27 +0000)]
This requires proper dominance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24408
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Nov 2005 07:27:33 +0000 (07:27 +0000)]
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
Chris Lattner [Fri, 18 Nov 2005 01:04:42 +0000 (01:04 +0000)]
add more patterns, patch by Evan Cheng.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24406
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 18 Nov 2005 00:53:32 +0000 (00:53 +0000)]
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
Nate Begeman [Thu, 17 Nov 2005 21:44:42 +0000 (21:44 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 19:40:30 +0000 (19:40 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 19:35:42 +0000 (19:35 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 19:25:59 +0000 (19:25 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 19:16:08 +0000 (19:16 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 18:55:48 +0000 (18:55 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 18:30:17 +0000 (18:30 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 18:26:56 +0000 (18:26 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 18:02:16 +0000 (18:02 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 17:52:01 +0000 (17:52 +0000)]
Generate LA and ADDIS when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24395
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Nov 2005 17:51:38 +0000 (17:51 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 17:43:52 +0000 (17:43 +0000)]
Validate that the input to 'Pat' patterns is sane.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24393
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Nov 2005 16:08:04 +0000 (16:08 +0000)]
Allow users to specify -Wl,-native* multiple times if they please
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24392
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Nov 2005 07:39:45 +0000 (07:39 +0000)]
teach tblgen to be smart enough to handle tglobaladdr nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24391
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Nov 2005 07:30:41 +0000 (07:30 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 07:20:15 +0000 (07:20 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 07:04:43 +0000 (07:04 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 06:41:44 +0000 (06:41 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 05:56:14 +0000 (05:56 +0000)]
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
Chris Lattner [Thu, 17 Nov 2005 05:52:24 +0000 (05:52 +0000)]
Teach legalize about targetglobaladdress
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24385
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Nov 2005 02:01:55 +0000 (02:01 +0000)]
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
Chris Lattner [Wed, 16 Nov 2005 23:14:54 +0000 (23:14 +0000)]
fix a tblgen bug that Evan ran into, where we would lose the '$src' name
on patterns like "(set R32:$dst, (i32 imm:$src))"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24383
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Nov 2005 22:59:19 +0000 (22:59 +0000)]
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
Andrew Lenharth [Wed, 16 Nov 2005 21:15:53 +0000 (21:15 +0000)]
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
Chris Lattner [Wed, 16 Nov 2005 07:24:31 +0000 (07:24 +0000)]
This passes on ppc and x86 now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24378
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Nov 2005 07:22:30 +0000 (07:22 +0000)]
when debugging lower dbg intrinsics to calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24377
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Nov 2005 07:21:47 +0000 (07:21 +0000)]
tell selectiondag when we're debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24376
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Nov 2005 07:21:15 +0000 (07:21 +0000)]
add a flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24375
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Nov 2005 06:36:47 +0000 (06:36 +0000)]
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
Jeff Cohen [Wed, 16 Nov 2005 06:10:53 +0000 (06:10 +0000)]
Keep Visual Studio building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Nov 2005 06:09:47 +0000 (06:09 +0000)]
* 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
Chris Lattner [Wed, 16 Nov 2005 01:54:32 +0000 (01:54 +0000)]
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
Nate Begeman [Wed, 16 Nov 2005 00:48:01 +0000 (00:48 +0000)]
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
Jeff Cohen [Tue, 15 Nov 2005 16:11:55 +0000 (16:11 +0000)]
Keep Visual Studio informed of new files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24366
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Nov 2005 06:44:15 +0000 (06:44 +0000)]
remove these labels, there are now bigger jumps in the graph that are unlabeled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24365
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Nov 2005 06:07:55 +0000 (06:07 +0000)]
Fix some typos noticed by Gabor Greif!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24364
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Nov 2005 01:45:01 +0000 (01:45 +0000)]
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