Andrew Lenharth
03390557fa
Fix warning
...
llvm-svn: 24485
2005-11-22 20:56:05 +00:00
Nate Begeman
d37c13154a
Check in code to scalarize arbitrarily wide packed types for some simple
...
vector operations (load, add, sub, mul).
This allows us to codegen:
void %foo(<4 x float> * %a) {
entry:
%tmp1 = load <4 x float> * %a;
%tmp2 = add <4 x float> %tmp1, %tmp1
store <4 x float> %tmp2, <4 x float> *%a
ret void
}
on ppc as:
_foo:
lfs f0, 12(r3)
lfs f1, 8(r3)
lfs f2, 4(r3)
lfs f3, 0(r3)
fadds f0, f0, f0
fadds f1, f1, f1
fadds f2, f2, f2
fadds f3, f3, f3
stfs f0, 12(r3)
stfs f1, 8(r3)
stfs f2, 4(r3)
stfs f3, 0(r3)
blr
llvm-svn: 24484
2005-11-22 18:16:00 +00:00
Andrew Lenharth
0294e33ea4
massive DAGISel patch. lots and lots more stuff compiles now
...
llvm-svn: 24483
2005-11-22 04:20:06 +00:00
Nate Begeman
07890bbec4
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.
llvm-svn: 24482
2005-11-22 01:29:36 +00:00
Chris Lattner
ac6cb46429
Use HasDotTypeDotSizeDirective instead of forELF
...
llvm-svn: 24481
2005-11-21 23:06:54 +00:00
Chris Lattner
629d09757e
Add a new flag
...
llvm-svn: 24480
2005-11-21 23:06:08 +00:00
Chris Lattner
78161dbc84
Remove a level of indentation by using a continue.
...
llvm-svn: 24479
2005-11-21 22:48:18 +00:00
Chris Lattner
40f8c8450d
Simplify the subtarget info, allow the asmwriter to do some target sensing
...
based on TargetType.
llvm-svn: 24478
2005-11-21 22:43:58 +00:00
Chris Lattner
99be8f766f
Use subtarget information computed by X86Subtarget instead of rolling our own.
...
llvm-svn: 24477
2005-11-21 22:39:40 +00:00
Chris Lattner
3eb876117a
Make the X86 subtarget compute the basic target type: ELF, Cygwin, Darwin,
...
or native Win32
llvm-svn: 24476
2005-11-21 22:31:58 +00:00
Chris Lattner
ebc39f5a9c
Add a forELF flag, allowing the removal of forCygwin and simplification of
...
conditionals.
llvm-svn: 24475
2005-11-21 22:19:48 +00:00
Chris Lattner
505ee2b886
Add some more directives
...
llvm-svn: 24474
2005-11-21 19:51:51 +00:00
Chris Lattner
7df25ab429
simplify and genericize this code
...
llvm-svn: 24473
2005-11-21 19:50:31 +00:00
Duraid Madina
8edbf805d7
add support for div/rem to the dag->dag isel. yay.
...
llvm-svn: 24472
2005-11-21 14:14:54 +00:00
Duraid Madina
f28b3bd8b4
I think I know what you meant here, but just to be safe I'll let you
...
do it. :)
<_sabre_> excuses excuses
llvm-svn: 24471
2005-11-21 14:09:40 +00:00
Chris Lattner
b9db67a045
Eliminate unneeded intermediate class. Move doFinalizeMethod to bottom of
...
file.
llvm-svn: 24470
2005-11-21 08:40:17 +00:00
Chris Lattner
b55de47595
Start using shared asmprinter Constant Pool emitter, use shorter cpi names.
...
llvm-svn: 24469
2005-11-21 08:38:26 +00:00
Chris Lattner
4a7eb5132b
prune #include
...
llvm-svn: 24468
2005-11-21 08:33:17 +00:00
Chris Lattner
8a5f3c1b68
Switch to using the shared constant pool printer, along with using shorter
...
CPI ids
llvm-svn: 24467
2005-11-21 08:32:23 +00:00
Chris Lattner
882b9fa977
Switch to using the generic constant pool emitter impl, use shorter
...
CPI names
llvm-svn: 24466
2005-11-21 08:29:17 +00:00
Chris Lattner
ef83ebd45d
Use generic constant pool emission code in the AsmPrinter class.
...
llvm-svn: 24465
2005-11-21 08:26:15 +00:00
Chris Lattner
f2991cee1f
Allow target to customize directive used to switch to arbitrary section in SwitchSection,
...
add generic constant pool emitter
llvm-svn: 24464
2005-11-21 08:25:09 +00:00
Chris Lattner
4fd1c411ba
add two more config directives, add method for printing constant pool
...
llvm-svn: 24463
2005-11-21 08:24:11 +00:00
Chris Lattner
ffbfa71866
Use the FunctionNumber provided by the AsmPrinter class
...
llvm-svn: 24462
2005-11-21 08:14:07 +00:00
Chris Lattner
08adbd13ff
increment the function number in SetupMachineFunction
...
llvm-svn: 24461
2005-11-21 08:13:27 +00:00
Chris Lattner
462263274f
Make the AsmPrinter keep track of the notion of a function number.
...
llvm-svn: 24460
2005-11-21 08:12:47 +00:00
Chris Lattner
dd3bf8e4a2
Use CommentString where possible, fix a bug where aix mode wouldn't assemble
...
due to basic blocks being misnamed.
llvm-svn: 24459
2005-11-21 08:02:41 +00:00
Chris Lattner
a0222a1698
unify the darwin and aix constant pool printers
...
llvm-svn: 24458
2005-11-21 07:57:37 +00:00
Chris Lattner
bb644e39c0
Adjust to capitalized asmprinter method names
...
llvm-svn: 24457
2005-11-21 07:51:36 +00:00
Chris Lattner
99946fb63f
Adjust to capitalized AsmPrinter method names
...
llvm-svn: 24456
2005-11-21 07:51:23 +00:00
Chris Lattner
02363bbb61
Capitalize methods for better consistency
...
llvm-svn: 24455
2005-11-21 07:51:06 +00:00
Chris Lattner
d365627d3e
Use PrivateGlobalPrefix for basic block labels. This allows the x86 darwin
...
port to properly use L for the bb prefix instead of .
llvm-svn: 24454
2005-11-21 07:43:59 +00:00
Chris Lattner
c2bc19af57
use PrivateGlobalPrefix for basic blocks
...
llvm-svn: 24453
2005-11-21 07:41:05 +00:00
Chris Lattner
2b53ea99b0
Use PrivateGlobalPrefix for basic block labels
...
llvm-svn: 24452
2005-11-21 07:39:22 +00:00
Chris Lattner
9885c97088
Use PrivateGlobalPrefix for basic blocks
...
llvm-svn: 24451
2005-11-21 07:38:08 +00:00
Chris Lattner
a43b832f7f
Switch to the new shared SwitchSection
...
llvm-svn: 24450
2005-11-21 07:30:28 +00:00
Chris Lattner
2bccd73dbb
Start using SwitchSection, allowing globals and functions to be emitted
...
to specific sections. Delete some dead functions copied from the X86 backend.
llvm-svn: 24449
2005-11-21 07:26:04 +00:00
Chris Lattner
050bf2faf8
convert the rest of this over to use SwitchSection
...
llvm-svn: 24448
2005-11-21 07:16:34 +00:00
Chris Lattner
024e32e118
Start using the AsmPrinter shared SwitchSection code. This allows the X86
...
backend to implement global variables in sections.
llvm-svn: 24447
2005-11-21 07:11:11 +00:00
Chris Lattner
b650241f8b
This is now implemented in common codegen code
...
llvm-svn: 24446
2005-11-21 07:06:58 +00:00
Chris Lattner
2ea5c99eca
Add section switching to common code generator code. Add a couple of
...
asserts.
llvm-svn: 24445
2005-11-21 07:06:27 +00:00
Chris Lattner
279f96c55e
Add section switching to to common AsmPrinter code.
...
llvm-svn: 24444
2005-11-21 07:05:42 +00:00
Chris Lattner
2c0b435ba6
Rename SwitchSection -> switchSection to avoid conflicting with a future
...
change.
llvm-svn: 24443
2005-11-21 06:55:27 +00:00
Chris Lattner
8a4995e42a
Start using PrivateGlobalPrefix correctly
...
llvm-svn: 24442
2005-11-21 06:51:52 +00:00
Chris Lattner
41cb115afb
set PrivateGlobalPrefix on darwin, use it when printing out CP references
...
llvm-svn: 24441
2005-11-21 06:47:58 +00:00
Chris Lattner
618981fd03
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.
llvm-svn: 24440
2005-11-21 06:46:22 +00:00
Chris Lattner
e927c3ff4e
Add a new option.
...
llvm-svn: 24439
2005-11-21 06:41:08 +00:00
Chris Lattner
6c1ca888d4
Lower READCYCLECOUNTER correctly, preserving the chain result
...
llvm-svn: 24438
2005-11-20 22:57:19 +00:00
Chris Lattner
44c28c22b7
Legalize MERGE_VALUES, expand READCYCLECOUNTER correctly, so it doesn't
...
break control dependence.
llvm-svn: 24437
2005-11-20 22:56:56 +00:00
Chris Lattner
2d4ff48cf2
add a new node type
...
llvm-svn: 24436
2005-11-20 22:55:57 +00:00
Chris Lattner
d1061ac8d1
encode rdtsc correctly
...
llvm-svn: 24435
2005-11-20 22:13:18 +00:00
Chris Lattner
6df9e11989
use chain operands to ensure the copies don't wander from the rdtsc instruction.
...
llvm-svn: 24434
2005-11-20 22:01:40 +00:00
Chris Lattner
cde2a174a7
This should not be dce'd
...
llvm-svn: 24433
2005-11-20 21:46:52 +00:00
Andrew Lenharth
4db9ae7aa3
oops
...
llvm-svn: 24432
2005-11-20 21:42:49 +00:00
Andrew Lenharth
c943f6bfae
check that rdtsc is generated from readcyclecounter
...
llvm-svn: 24431
2005-11-20 21:41:59 +00:00
Andrew Lenharth
0bf68ae434
The second patch of X86 support for read cycle counter.
...
llvm-svn: 24430
2005-11-20 21:41:10 +00:00
Andrew Lenharth
627cbd49b1
The first patch of X86 support for read cycle counter
...
llvm-svn: 24429
2005-11-20 21:32:07 +00:00
Chris Lattner
a8d37d748f
more progress towards bug 291 being finished. Patch by Owen Anderson,
...
HAVE_GV case fixed up by me.
llvm-svn: 24428
2005-11-20 03:45:52 +00:00
Chris Lattner
19baba67b5
Unbreak codegen of bools. This should fix the llc/jit/llc-beta failures
...
from last night.
llvm-svn: 24427
2005-11-19 18:40:42 +00:00
Chris Lattner
f2807be3da
Initialize this variable on all paths, fixing a crasher in windows. Thanks
...
to JeffC for pointing this out.
llvm-svn: 24426
2005-11-19 07:48:33 +00:00
Chris Lattner
377bdbff91
Improve Selection DAG printer portability. Patch by Owen Anderson!
...
llvm-svn: 24425
2005-11-19 07:44:09 +00:00
Chris Lattner
6bc0304c91
Teach tblgen about instruction operands that have multiple MachineInstr
...
operands, digging into them to find register values (used on X86). Patch
by Evan Cheng!
llvm-svn: 24424
2005-11-19 07:05:57 +00:00
Chris Lattner
d7102c4980
Teach the x86 backend about the register constraints of its addressing mode.
...
Patch by Evan Cheng
llvm-svn: 24423
2005-11-19 07:01:30 +00:00
Chris Lattner
252d88c68e
Capture more operand info, patch by Evan Cheng
...
llvm-svn: 24422
2005-11-19 07:00:10 +00:00
Chris Lattner
a22eae0163
Teach the graph viewer to handle register operands that are zero.
...
llvm-svn: 24421
2005-11-19 06:58:46 +00:00
Chris Lattner
301015a703
Silence a bogus warning
...
llvm-svn: 24420
2005-11-19 05:51:46 +00:00
Chris Lattner
3f0f71b92b
Add load and other support to the dag-dag isel. Patch contributed by Evan
...
Cheng!
llvm-svn: 24419
2005-11-19 02:11:08 +00:00
Chris Lattner
f090f7eb0e
Add some method variants, patch by Evan Cheng
...
llvm-svn: 24418
2005-11-19 01:44:53 +00:00
Chris Lattner
8e28ce9f94
Add two new construction methods, patch by Evan Cheng
...
llvm-svn: 24417
2005-11-19 01:42:10 +00:00
Nate Begeman
b2e089c31b
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
llvm-svn: 24416
2005-11-19 00:36:38 +00:00
Chris Lattner
26904c7ac9
testcase for recent indvars patches
...
llvm-svn: 24415
2005-11-18 19:38:15 +00:00
Chris Lattner
9c37f23645
Fix a crash building 176.gcc due to my recent patch, which only fixed
...
half the problem.
llvm-svn: 24414
2005-11-18 18:30:47 +00:00
Andrew Lenharth
6bc51c6f34
prevent latent switch creation
...
llvm-svn: 24413
2005-11-18 13:57:03 +00:00
Nate Begeman
127321b14c
Split out the shift code from visitBinary.
...
llvm-svn: 24412
2005-11-18 07:42:56 +00:00
Chris Lattner
3e9e8bd25c
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.
llvm-svn: 24411
2005-11-18 07:31:42 +00:00
Chris Lattner
31dc3827d3
This needs proper dominance
...
llvm-svn: 24410
2005-11-18 07:29:44 +00:00
Chris Lattner
b14c41378d
post-dom-frontiers requires proper post-dominance
...
llvm-svn: 24409
2005-11-18 07:28:26 +00:00
Chris Lattner
f519d1c6ef
This requires proper dominance
...
llvm-svn: 24408
2005-11-18 07:27:53 +00:00
Chris Lattner
9705c1b655
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.
llvm-svn: 24407
2005-11-18 07:27:33 +00:00
Chris Lattner
57ce97862d
add more patterns, patch by Evan Cheng.
...
llvm-svn: 24406
2005-11-18 01:04:42 +00:00
Nate Begeman
227f1bdd2f
Also add the new vector value type here, for completeness.
...
llvm-svn: 24405
2005-11-18 00:53:32 +00:00
Nate Begeman
3c40f074ff
Teach the type lowering code about turning packed types into vector types.
...
Next step: generating vector dag nodes, and legalizing them into scalar
code.
llvm-svn: 24404
2005-11-17 21:44:42 +00:00
Chris Lattner
cdde9990b7
only use dyld stubs if not in ppc-static mode. This completes support for
...
non-static codegen.
llvm-svn: 24403
2005-11-17 19:40:30 +00:00
Chris Lattner
bca0be812d
This was checking the wrong GEP expression. Fixing this fixes a gccas crash
...
compiling mysql reported by Ted Kremenek.
llvm-svn: 24402
2005-11-17 19:35:42 +00:00
Chris Lattner
6ab87fa360
refactor call operand handling to eliminate special cases from printOp.
...
llvm-svn: 24401
2005-11-17 19:25:59 +00:00
Chris Lattner
bd9efdb64c
disentangle call operands from branch operands a bit
...
llvm-svn: 24400
2005-11-17 19:16:08 +00:00
Chris Lattner
3570cf456b
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.
llvm-svn: 24399
2005-11-17 18:55:48 +00:00
Chris Lattner
8f8ed28a64
Fix a bug that resistor on IRC hit where we tried to create token factor
...
nodes of load results, not of their chain results.
llvm-svn: 24398
2005-11-17 18:30:17 +00:00
Chris Lattner
5aba6ae3b3
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.
llvm-svn: 24397
2005-11-17 18:26:56 +00:00
Chris Lattner
0fe88e3f32
Teach the selector to fold lo(g) into load instruction immediate fields
...
llvm-svn: 24396
2005-11-17 18:02:16 +00:00
Chris Lattner
4b11fa284d
Generate LA and ADDIS when possible.
...
llvm-svn: 24395
2005-11-17 17:52:01 +00:00
Chris Lattner
3648c20472
Use the right accessor to create this node
...
llvm-svn: 24394
2005-11-17 17:51:38 +00:00
Chris Lattner
a70c7dff2e
Validate that the input to 'Pat' patterns is sane.
...
llvm-svn: 24393
2005-11-17 17:43:52 +00:00
Chris Lattner
fab12d00c9
Allow users to specify -Wl,-native* multiple times if they please
...
llvm-svn: 24392
2005-11-17 16:08:04 +00:00
Chris Lattner
2a230e1c1a
teach tblgen to be smart enough to handle tglobaladdr nodes
...
llvm-svn: 24391
2005-11-17 07:39:45 +00:00
Chris Lattner
595088aa0f
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.
llvm-svn: 24390
2005-11-17 07:30:41 +00:00
Chris Lattner
840458276c
Add globaladdress and targetglobaladdress nodes for dag patterns
...
llvm-svn: 24389
2005-11-17 07:20:15 +00:00
Chris Lattner
63ed749ce0
LI could theoretically be used for the lo-part of a global address, just like
...
lis can be used for the high part.
llvm-svn: 24388
2005-11-17 07:04:43 +00:00
Chris Lattner
45ca1c0194
Allow targets to custom legalize leaf nodes like GlobalAddress.
...
llvm-svn: 24387
2005-11-17 06:41:44 +00:00
Chris Lattner
b7025749e1
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.
llvm-svn: 24386
2005-11-17 05:56:14 +00:00
Chris Lattner
4ff65ec745
Teach legalize about targetglobaladdress
...
llvm-svn: 24385
2005-11-17 05:52:24 +00:00
Chris Lattner
2bf458af92
Add patterns for some 16-bit immediate instructions, patch contributed by
...
Evan Cheng.
llvm-svn: 24384
2005-11-17 02:01:55 +00:00
Chris Lattner
b22950df6c
fix a tblgen bug that Evan ran into, where we would lose the '$src' name
...
on patterns like "(set R32:$dst, (i32 imm:$src))"
llvm-svn: 24383
2005-11-16 23:14:54 +00:00
Chris Lattner
5930d3df3d
Add patterns for several simple instructions that take i32 immediates.
...
Patch contributed by Evan Cheng!
llvm-svn: 24382
2005-11-16 22:59:19 +00:00
Andrew Lenharth
59eefd4787
who would have thought you would want to write into globals too
...
llvm-svn: 24381
2005-11-16 21:15:53 +00:00
Chris Lattner
b1ded32f3b
This passes on ppc and x86 now
...
llvm-svn: 24378
2005-11-16 07:24:31 +00:00
Chris Lattner
f2b62f317c
when debugging lower dbg intrinsics to calls
...
llvm-svn: 24377
2005-11-16 07:22:30 +00:00
Chris Lattner
168fe79229
tell selectiondag when we're debugging
...
llvm-svn: 24376
2005-11-16 07:21:47 +00:00
Chris Lattner
672f1bac59
add a flag
...
llvm-svn: 24375
2005-11-16 07:21:15 +00:00
Chris Lattner
fdc8b19ad6
indicate when a tool is a debug build.
...
llvm-svn: 24374
2005-11-16 06:36:47 +00:00
Jeff Cohen
4ca13b3f47
Keep Visual Studio building.
...
llvm-svn: 24373
2005-11-16 06:10:53 +00:00
Chris Lattner
6b41edb30f
* 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.
llvm-svn: 24372
2005-11-16 06:09:47 +00:00
Chris Lattner
655e7dfd0d
initial step at adding a dag-to-dag isel for X86 backend. Patch contributed
...
by Evan Cheng!
llvm-svn: 24371
2005-11-16 01:54:32 +00:00
Nate Begeman
a171f6b20c
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.
llvm-svn: 24370
2005-11-16 00:48:01 +00:00
Jeff Cohen
67f6f97aed
Keep Visual Studio informed of new files.
...
llvm-svn: 24366
2005-11-15 16:11:55 +00:00
Chris Lattner
3ea1e255f7
remove these labels, there are now bigger jumps in the graph that are unlabeled
...
llvm-svn: 24365
2005-11-15 06:44:15 +00:00
Chris Lattner
e64d41def3
Fix some typos noticed by Gabor Greif!
...
llvm-svn: 24364
2005-11-15 06:07:55 +00:00
Chris Lattner
63985e2892
Make sure to use SwitchSection to switch sections so that we don't accidentally emit
...
functions into the .const section. Whoops.
llvm-svn: 24363
2005-11-15 01:45:01 +00:00
Chris Lattner
7c727b2736
Fix handling of multiple unnamed globals with the same type
...
llvm-svn: 24362
2005-11-15 01:32:03 +00:00
Chris Lattner
76ac068568
Separate X86ISelLowering stuff out from the X86ISelPattern.cpp file. Patch
...
contributed by Evan Cheng.
llvm-svn: 24358
2005-11-15 00:40:23 +00:00
Chris Lattner
bba9c372c1
Remove extraneous parents around constants when using a constant expr cast.
...
llvm-svn: 24357
2005-11-15 00:03:16 +00:00
Andrew Lenharth
b720e2c29f
this file moved
...
llvm-svn: 24356
2005-11-14 19:32:05 +00:00
Chris Lattner
1a4adc7aee
Handle globals with explicit alignment requests
...
llvm-svn: 24355
2005-11-14 19:00:30 +00:00
Chris Lattner
dd8eeed096
Teach emitAlignment to handle explicit alignment requests by globals.
...
llvm-svn: 24354
2005-11-14 19:00:06 +00:00
Chris Lattner
0aacd2ab9b
Teach the PPC asmwriter to honor globals with explicit section requests.
...
llvm-svn: 24353
2005-11-14 18:52:46 +00:00
Chris Lattner
16cbc6a177
instead of using mstats, use malloc_zone_statistics which returns numbers
...
that actually make sense.
llvm-svn: 24352
2005-11-14 07:27:56 +00:00
Chris Lattner
8147902625
regenearte
...
llvm-svn: 24351
2005-11-14 07:25:50 +00:00
Chris Lattner
58cee558fe
add malloc_zone_statistics, remove mstats
...
llvm-svn: 24350
2005-11-14 07:24:17 +00:00
Chris Lattner
698fa760f4
Teach -track-memory to work on darwin. Looking at sbrk doesn't work because
...
the default allocator uses mmap.
llvm-svn: 24349
2005-11-14 07:00:29 +00:00
Chris Lattner
973917a3de
regenerate
...
llvm-svn: 24348
2005-11-14 06:57:34 +00:00
Chris Lattner
390ff6e898
add some stuff for mstats on darwin
...
llvm-svn: 24347
2005-11-14 06:54:33 +00:00
Duraid Madina
76034f95f6
add FP select. next up - divide!
...
llvm-svn: 24346
2005-11-14 01:17:30 +00:00
Chris Lattner
0333e68f72
Add some dummy method impls
...
llvm-svn: 24345
2005-11-13 03:26:33 +00:00
Chris Lattner
ee8cd4e66d
Shrink derived types by 8 bytes each by not having to have 2 vtables pointers
...
and other MI overhead.
llvm-svn: 24344
2005-11-13 03:26:12 +00:00
Chris Lattner
06b453b2dc
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.
llvm-svn: 24343
2005-11-13 03:14:09 +00:00
Chris Lattner
ffacf337b2
Refactor some code, moving methods and data around. This gets rid of some
...
virtual methods.
llvm-svn: 24342
2005-11-13 03:13:26 +00:00
Chris Lattner
d05550a746
typeo
...
llvm-svn: 24341
2005-11-13 02:09:55 +00:00
Chris Lattner
5c28b96304
Split the type refinement case completely out of the type-becomes-concrete
...
case, simplifying the code.
llvm-svn: 24340
2005-11-13 01:58:06 +00:00
Chris Lattner
54c8fcf303
unbreak the build
...
llvm-svn: 24339
2005-11-13 01:45:23 +00:00
Chris Lattner
708bb251d8
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%).
llvm-svn: 24338
2005-11-13 01:27:50 +00:00
Andrew Lenharth
ab72424488
enable LSR by default on alpha
...
llvm-svn: 24337
2005-11-12 19:21:08 +00:00
Andrew Lenharth
2ba45d1ee9
fix more regressions
...
llvm-svn: 24335
2005-11-12 19:06:28 +00:00
Andrew Lenharth
56526ec1a9
fix READCYCLECOUNTER
...
llvm-svn: 24334
2005-11-12 19:04:09 +00:00
Chris Lattner
b04c88cf05
this is no apparently passing on alpha
...
llvm-svn: 24331
2005-11-12 18:35:13 +00:00
Chris Lattner
026a5ef177
trivial cleanup
...
llvm-svn: 24330
2005-11-12 18:34:09 +00:00
Chris Lattner
b264c5d4dc
Fix reading LLVM 1.3 bc files.
...
llvm-svn: 24329
2005-11-12 18:31:54 +00:00
Chris Lattner
11ca4d636b
regenerate
...
llvm-svn: 24328
2005-11-12 18:22:38 +00:00
Chris Lattner
bce7ca8a73
refactor grammar to eliminate shift-reduce conflict. Move alignment checking
...
code out of all of the clients and into OptAlign/OptCAlign
llvm-svn: 24327
2005-11-12 18:21:21 +00:00
Chris Lattner
810b501282
Shrink the Type class from 32 to 28 bytes on Darwin (which has silly 32-bit
...
bools).
llvm-svn: 24326
2005-11-12 10:07:47 +00:00
Chris Lattner
47c4c65cb6
remove a dead method
...
llvm-svn: 24325
2005-11-12 08:42:30 +00:00
Chris Lattner
f2794fa073
Unswitch a loop, add more assertions, eliminate use of removeUserFromConcrete.
...
llvm-svn: 24324
2005-11-12 08:39:48 +00:00
Chris Lattner
11edcc19da
Tiny speedup, improve comments and code organization.
...
llvm-svn: 24323
2005-11-12 08:22:41 +00:00
Chris Lattner
7bf26c1d4d
Describe section name encoding
...
llvm-svn: 24322
2005-11-12 01:46:21 +00:00
Chris Lattner
8e1e6117d0
Read and write section info from/to .bc files
...
llvm-svn: 24321
2005-11-12 01:33:40 +00:00
Jeff Cohen
045f096b18
Wrap long line.
...
llvm-svn: 24320
2005-11-12 01:01:50 +00:00
Jeff Cohen
93b3d8f415
Fix VC++ warning that bools cannot be ORed.
...
llvm-svn: 24319
2005-11-12 00:59:39 +00:00
Jeff Cohen
cf1f782a2f
Fix operator precedence bug caught by VC++.
...
llvm-svn: 24318
2005-11-12 00:59:01 +00:00
Chris Lattner
662c8726b8
document sections
...
llvm-svn: 24317
2005-11-12 00:45:07 +00:00
Chris Lattner
a0c20b4f8b
regenerate
...
llvm-svn: 24316
2005-11-12 00:11:49 +00:00
Chris Lattner
9da804d8e9
add a token
...
llvm-svn: 24315
2005-11-12 00:11:30 +00:00
Chris Lattner
71b936cab9
Parse section info
...
llvm-svn: 24314
2005-11-12 00:11:10 +00:00
Chris Lattner
4b96c540f6
print section info
...
llvm-svn: 24313
2005-11-12 00:10:19 +00:00
Chris Lattner
d6f99000e6
new testcase
...
llvm-svn: 24310
2005-11-12 00:10:02 +00:00
Chris Lattner
7e617e36e9
Add support for putting globals in a particular section
...
llvm-svn: 24309
2005-11-12 00:09:49 +00:00
Andrew Lenharth
97e8207a05
fix yet more regressions
...
llvm-svn: 24308
2005-11-11 23:08:46 +00:00
Andrew Lenharth
fab772045e
generate chain result
...
llvm-svn: 24307
2005-11-11 23:02:55 +00:00
Andrew Lenharth
de1b5d6baa
added a chain output
...
llvm-svn: 24306
2005-11-11 22:48:54 +00:00
Andrew Lenharth
5b3b9d7052
Fix a bunch more alpha regressions
...
llvm-svn: 24304
2005-11-11 19:52:25 +00:00
Andrew Lenharth
5278ca3fa2
prevent cse of readcyclecounter
...
llvm-svn: 24303
2005-11-11 19:02:54 +00:00
Andrew Lenharth
01aa56397d
continued readcyclecounter support
...
llvm-svn: 24300
2005-11-11 16:47:30 +00:00
Andrew Lenharth
bd0127e467
Add support for a cycle counter intrinsic. As basically all processors have
...
this and have it in about the same form, I think this makes sense.
on X86, you do a RDTSC (64bit result, from any ring since the P5MMX)
on Alpha, you do a RDCC
on PPC, there is a sequence which may or may not work depending on how things
are setup by the OS. Or something like that. Maybe someone who knows PPC
can add support. Something about the time base register.
on Sparc, you read %tick, which in some solaris versions (>=8) is readable by
userspace
on IA64 read ar.itc
So I think the ulong is justified since all of those are 64bit.
Support is slighly flaky on old chips (P5 and lower) and sometimes
depends on OS (PPC, Sparc). But for modern OS/Hardware (aka this decade),
we should be ok.
I am still not sure what to do about lowering. I can either see a lower to 0, to
gettimeofday (or the target os equivalent), or loudly complaining and refusing to
continue.
I am commiting an Alpha implementation. I will add the X86 implementation if I
have to (I have use of it in the near future), but if someone who knows that
backend (and the funky multi-register results) better wants to add it, it would
take them a lot less time ;)
TODO: better lowering and legalizing, and support more platforms
llvm-svn: 24299
2005-11-11 16:45:18 +00:00
Jeff Cohen
dc6bfeae26
Fix some typos.
...
llvm-svn: 24298
2005-11-11 02:15:27 +00:00
Jeff Cohen
6579d1dabb
Add new file to Visual Studio.
...
llvm-svn: 24297
2005-11-11 01:34:02 +00:00
Chris Lattner
ecc301df17
Fix the optimized code handling of user asm strings
...
llvm-svn: 24296
2005-11-10 23:24:26 +00:00
Chris Lattner
fafff9ba1d
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.
llvm-svn: 24295
2005-11-10 21:59:25 +00:00
Chris Lattner
86164e6e9e
speedup the common case where nothing needs to be quoted
...
llvm-svn: 24294
2005-11-10 21:47:01 +00:00
Chris Lattner
e1d34bac0b
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
llvm-svn: 24293
2005-11-10 21:40:01 +00:00
Chris Lattner
4b3b9192b2
do not allow '.' in symbol names
...
llvm-svn: 24292
2005-11-10 21:39:29 +00:00
Chris Lattner
fe99e2de95
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.
llvm-svn: 24291
2005-11-10 21:39:12 +00:00
Andrew Lenharth
d9c13b1336
the pain isn't gone unless the phinodes are spilled too
...
llvm-svn: 24288
2005-11-10 19:39:09 +00:00
Chris Lattner
9eb7dfa15a
Darwin supports quoted labels. This implements:
...
test/Regression/CodeGen/PowerPC/darwin-labels.ll
llvm-svn: 24287
2005-11-10 19:33:43 +00:00
Chris Lattner
b8e8cbec50
Check that this compiles to a label with a space in it.
...
llvm-svn: 24284
2005-11-10 19:33:04 +00:00
Chris Lattner
4b155fa5c3
Add a new option for targets that accept quoted labels.
...
llvm-svn: 24283
2005-11-10 19:30:07 +00:00
Chris Lattner
98d58eab21
Remove M, which is dead. Eliminate a dead typedef. Add comments.
...
llvm-svn: 24282
2005-11-10 19:02:52 +00:00
Chris Lattner
9fa3bcc8b4
remove the M instance var
...
llvm-svn: 24281
2005-11-10 19:02:18 +00:00
Chris Lattner
2d29be21d1
This method is no longer static
...
llvm-svn: 24280
2005-11-10 18:55:09 +00:00
Chris Lattner
369b61f068
Call this method with the object we have
...
llvm-svn: 24279
2005-11-10 18:53:25 +00:00
Chris Lattner
4f827446da
nuke blank line
...
llvm-svn: 24278
2005-11-10 18:49:46 +00:00
Chris Lattner
12b0831295
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"
llvm-svn: 24277
2005-11-10 18:48:58 +00:00
Chris Lattner
144650c3c1
minor interface changes.
...
llvm-svn: 24276
2005-11-10 18:46:57 +00:00
Chris Lattner
c0a1eba0ab
Get rid of casts by #including the right header
...
llvm-svn: 24275
2005-11-10 18:36:17 +00:00
Chris Lattner
59e44ff3d3
Make the aix asm printer interface properly with the parent class
...
llvm-svn: 24274
2005-11-10 18:20:29 +00:00
Chris Lattner
747960d21e
Compile C strings to:
...
l1__2E_str_1: ; '.str_1'
.asciz "foo"
not:
.align 0
l1__2E_str_1: ; '.str_1'
.asciz "foo"
llvm-svn: 24273
2005-11-10 18:09:27 +00:00
Chris Lattner
55a6d9067b
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"
llvm-svn: 24272
2005-11-10 18:06:33 +00:00
Chris Lattner
e039210a5b
add support for .asciz, and enable it by default. If your target assembler
...
doesn't support .asciz, just set AscizDirective to null in your asmprinter.
This compiles C strings to:
l1__2E_str_1: ; '.str_1'
.asciz "foo"
instead of:
l1__2E_str_1: ; '.str_1'
.ascii "foo\000"
llvm-svn: 24271
2005-11-10 18:05:57 +00:00
Andrew Lenharth
8e66c0c8a9
this works with backedges to the existing entry block alot better
...
llvm-svn: 24270
2005-11-10 17:35:34 +00:00
Andrew Lenharth
e373163e95
fix a bunch of regressions
...
llvm-svn: 24269
2005-11-10 16:59:55 +00:00
Andrew Lenharth
3d3de4e6c3
needs to go here to apparently.
...
llvm-svn: 24268
2005-11-10 02:07:45 +00:00
Andrew Lenharth
4130a4f061
The pass everyone has been waiting for!
...
Reg2Mem
for fun you can opt -reg2mem -mem2reg
llvm-svn: 24267
2005-11-10 01:58:38 +00:00
Chris Lattner
330ce692a2
Packed elements must be a power of two in size
...
llvm-svn: 24266
2005-11-10 01:44:22 +00:00
Chris Lattner
625b9c8765
Force vectors to be a power of two in size
...
llvm-svn: 24265
2005-11-10 01:42:43 +00:00
Chris Lattner
d7dbb856b9
Force packed vectors to be a power of two in length.
...
llvm-svn: 24264
2005-11-10 01:40:59 +00:00
Chris Lattner
bf4f233214
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.
llvm-svn: 24263
2005-11-09 23:47:37 +00:00
Chris Lattner
46b1976a18
Switch the allnodes list from a vector of pointers to an ilist of nodes.
...
This eliminates the vector, allows constant time removal of a node from
a graph, and makes iteration over the all nodes list stable when adding
nodes to the graph.
llvm-svn: 24262
2005-11-09 23:46:43 +00:00
Chris Lattner
cd6f0f47f2
Refactor intrinsic lowering stuff out of visitCall
...
llvm-svn: 24261
2005-11-09 19:44:01 +00:00
Andrew Lenharth
97a7fcfd2b
whatever. Intermediate patch to see what breaks. Seems ok.
...
llvm-svn: 24260
2005-11-09 19:17:08 +00:00
Chris Lattner
af3aefa10e
Handle the trivial (but common) two-op case more efficiently
...
llvm-svn: 24259
2005-11-09 18:48:57 +00:00
Chris Lattner
619dfaa42b
Nuke noop copies.
...
llvm-svn: 24258
2005-11-09 18:22:42 +00:00
Chris Lattner
41fd6d5d27
Fix CodeGen/X86/shift-folding.ll:test3 on X86
...
llvm-svn: 24256
2005-11-09 16:50:40 +00:00
Chris Lattner
35ecaa76fa
Disable some overly-aggressive checking code. This speeds up the local
...
allocator from 23s to 11s on kc++ in debug mode.
llvm-svn: 24255
2005-11-09 05:28:45 +00:00
Chris Lattner
b7cad90e55
Avoid creating a token factor node in trivially redundant cases. This
...
eliminates almost one node per block in common cases.
llvm-svn: 24254
2005-11-09 05:03:03 +00:00
Chris Lattner
43535a19b1
Handle GEP's a bit more intelligently. Fold constant indices early and
...
turn power-of-two multiplies into shifts early to improve compile time.
llvm-svn: 24253
2005-11-09 04:45:33 +00:00
Chris Lattner
c4d6050db6
Allocate the right amount of memory for this vector up front.
...
llvm-svn: 24252
2005-11-08 23:32:44 +00:00
Chris Lattner
88fa11c3d5
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.
...
llvm-svn: 24251
2005-11-08 23:30:28 +00:00
Chris Lattner
90f017c114
Change the ValueList array for each node to be shared instead of individually
...
allocated. Further, in the common case where a node has a single value, just
reference an element from a small array. This is a small compile-time wi.
llvm-svn: 24250
2005-11-08 23:30:11 +00:00
Chris Lattner
7e4b5d33cb
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.
llvm-svn: 24249
2005-11-08 22:07:03 +00:00
Chris Lattner
e406e481d3
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.
llvm-svn: 24248
2005-11-08 22:06:23 +00:00
Chris Lattner
3ba38cba64
Explicitly initialize some instance vars
...
llvm-svn: 24247
2005-11-08 21:54:57 +00:00
Chris Lattner
578ab91f2b
Rip out 1.6ness, bump version # to 1.7cvs
...
llvm-svn: 24246
2005-11-08 21:29:17 +00:00
John Criswell
e1d319ab69
Updated version to 1.7cvs.
...
llvm-svn: 24244
2005-11-08 21:13:01 +00:00
John Criswell
3bdbd3024b
Merged from RELEASE_16.
...
llvm-svn: 24243
2005-11-08 21:11:33 +00:00
Chris Lattner
ba1b2ed1e9
adjust itf
...
llvm-svn: 24242
2005-11-08 18:52:57 +00:00
Chris Lattner
aba48dd34c
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. :)
llvm-svn: 24241
2005-11-08 18:52:27 +00:00
Chris Lattner
88e234dd49
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.
llvm-svn: 24235
2005-11-08 02:12:47 +00:00
Chris Lattner
731055e370
Add a new -fast option, which generates code quickly.
...
llvm-svn: 24234
2005-11-08 02:12:17 +00:00
Chris Lattner
b28f214033
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.
...
llvm-svn: 24233
2005-11-08 02:11:51 +00:00
Jim Laskey
1d2f26adcc
Let's try ignoring resource utilization on the backward pass.
...
llvm-svn: 24231
2005-11-07 19:08:53 +00:00
Duraid Madina
3c1c8c55c3
add support for storing and returning bools
...
llvm-svn: 24228
2005-11-07 03:11:02 +00:00
Chris Lattner
629ba44e50
Always compute max align.
...
llvm-svn: 24227
2005-11-06 17:43:20 +00:00
Chris Lattner
d082803948
Change a comment slightly
...
llvm-svn: 24226
2005-11-06 17:40:18 +00:00
Duraid Madina
4a30d4a460
just some random hacking - calls (particularly indirect) need a lot of
...
love (especially with -sched=simple)
llvm-svn: 24225
2005-11-06 13:43:30 +00:00
Nate Begeman
3ee3e69556
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.
llvm-svn: 24224
2005-11-06 09:00:38 +00:00
Chris Lattner
c5455bcbd2
minor clarity changes, no functionality difference.
...
llvm-svn: 24223
2005-11-06 08:23:17 +00:00
Chris Lattner
d5286ba3d5
Make sure to initialize the alignment field
...
llvm-svn: 24222
2005-11-06 08:22:18 +00:00
Chris Lattner
54611b4af1
document alignment on globals, functions, and allocation instructions.
...
llvm-svn: 24221
2005-11-06 08:02:57 +00:00
Chris Lattner
9e0781f9a7
Minor correction
...
llvm-svn: 24220
2005-11-06 07:48:11 +00:00
Chris Lattner
05c64d1496
don't misencode CC#'s
...
llvm-svn: 24219
2005-11-06 07:46:13 +00:00
Chris Lattner
49d1908af1
encode/decode function alignment in bc files
...
llvm-svn: 24218
2005-11-06 07:43:39 +00:00
Chris Lattner
84acbccc33
describe extensions to the .bc format for function/global alignment
...
llvm-svn: 24217
2005-11-06 07:20:25 +00:00
Chris Lattner
547f20c63e
Read/write global variable alignments if present
...
llvm-svn: 24216
2005-11-06 07:11:04 +00:00
Chris Lattner
cc99ec2a14
add alignment info for globals and functions
...
llvm-svn: 24213
2005-11-06 06:52:11 +00:00
Chris Lattner
f8a974d169
print alignment info for globals and functions
...
llvm-svn: 24212
2005-11-06 06:48:53 +00:00
Chris Lattner
840f789433
regenerate
...
llvm-svn: 24211
2005-11-06 06:46:53 +00:00
Chris Lattner
d57ed893e1
Allow globals to have an alignment specified. Switch to using isPowerOf2_32
...
at Jim's request for the checking code.
llvm-svn: 24210
2005-11-06 06:46:28 +00:00
Chris Lattner
6b27e499e5
allow functions and modules to have an explicit alignment
...
llvm-svn: 24209
2005-11-06 06:44:42 +00:00
Chris Lattner
86c352b782
regenerate
...
llvm-svn: 24208
2005-11-06 06:34:34 +00:00
Chris Lattner
c7de836a77
factor optional alignment
...
llvm-svn: 24207
2005-11-06 06:34:12 +00:00
Duraid Madina
4645db0948
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.
llvm-svn: 24206
2005-11-06 04:29:30 +00:00
Chris Lattner
16025eef80
enumerate non-standard argument encoding cases, such as alignment info for
...
allocations
llvm-svn: 24205
2005-11-05 22:32:06 +00:00
Chris Lattner
db1375823d
rearrange some info about the instruction encoding
...
llvm-svn: 24204
2005-11-05 22:20:06 +00:00