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
Chris Lattner [Tue, 15 Nov 2005 01:32:03 +0000 (01:32 +0000)]
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
Chris Lattner [Tue, 15 Nov 2005 00:40:23 +0000 (00:40 +0000)]
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
Chris Lattner [Tue, 15 Nov 2005 00:03:16 +0000 (00:03 +0000)]
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
Andrew Lenharth [Mon, 14 Nov 2005 19:32:05 +0000 (19:32 +0000)]
this file moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24356
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Nov 2005 19:00:30 +0000 (19:00 +0000)]
Handle globals with explicit alignment requests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24355
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Nov 2005 19:00:06 +0000 (19:00 +0000)]
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
Chris Lattner [Mon, 14 Nov 2005 18:52:46 +0000 (18:52 +0000)]
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
Chris Lattner [Mon, 14 Nov 2005 07:27:56 +0000 (07:27 +0000)]
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
Chris Lattner [Mon, 14 Nov 2005 07:25:50 +0000 (07:25 +0000)]
regenearte
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Nov 2005 07:24:17 +0000 (07:24 +0000)]
add malloc_zone_statistics, remove mstats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24350
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Nov 2005 07:00:29 +0000 (07:00 +0000)]
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
Chris Lattner [Mon, 14 Nov 2005 06:57:34 +0000 (06:57 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Nov 2005 06:54:33 +0000 (06:54 +0000)]
add some stuff for mstats on darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24347
91177308-0d34-0410-b5e6-
96231b3b80d8
Duraid Madina [Mon, 14 Nov 2005 01:17:30 +0000 (01:17 +0000)]
add FP select. next up - divide!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24346
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Nov 2005 03:26:33 +0000 (03:26 +0000)]
Add some dummy method impls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24345
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Nov 2005 03:26:12 +0000 (03:26 +0000)]
Shrink derived types by 8 bytes each by not having to have 2 vtables pointers
and other MI overhead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24344
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Nov 2005 03:14:09 +0000 (03:14 +0000)]
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
Chris Lattner [Sun, 13 Nov 2005 03:13:26 +0000 (03:13 +0000)]
Refactor some code, moving methods and data around. This gets rid of some
virtual methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24342
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Nov 2005 02:09:55 +0000 (02:09 +0000)]
typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24341
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Nov 2005 01:58:06 +0000 (01:58 +0000)]
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
Chris Lattner [Sun, 13 Nov 2005 01:45:23 +0000 (01:45 +0000)]
unbreak the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24339
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Nov 2005 01:27:50 +0000 (01:27 +0000)]
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
Andrew Lenharth [Sat, 12 Nov 2005 19:21:08 +0000 (19:21 +0000)]
enable LSR by default on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24337
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sat, 12 Nov 2005 19:06:28 +0000 (19:06 +0000)]
fix more regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24335
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sat, 12 Nov 2005 19:04:09 +0000 (19:04 +0000)]
fix READCYCLECOUNTER
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24334
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 18:35:13 +0000 (18:35 +0000)]
this is no apparently passing on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24331
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 18:34:09 +0000 (18:34 +0000)]
trivial cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24330
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 18:31:54 +0000 (18:31 +0000)]
Fix reading LLVM 1.3 bc files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24329
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 18:22:38 +0000 (18:22 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24328
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 18:21:21 +0000 (18:21 +0000)]
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
Chris Lattner [Sat, 12 Nov 2005 10:07:47 +0000 (10:07 +0000)]
Shrink the Type class from 32 to 28 bytes on Darwin (which has silly 32-bit
bools).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24326
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 08:42:30 +0000 (08:42 +0000)]
remove a dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24325
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 08:39:48 +0000 (08:39 +0000)]
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
Chris Lattner [Sat, 12 Nov 2005 08:22:41 +0000 (08:22 +0000)]
Tiny speedup, improve comments and code organization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24323
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 01:46:21 +0000 (01:46 +0000)]
Describe section name encoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24322
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 01:33:40 +0000 (01:33 +0000)]
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
Jeff Cohen [Sat, 12 Nov 2005 01:01:50 +0000 (01:01 +0000)]
Wrap long line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24320
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 12 Nov 2005 00:59:39 +0000 (00:59 +0000)]
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
Jeff Cohen [Sat, 12 Nov 2005 00:59:01 +0000 (00:59 +0000)]
Fix operator precedence bug caught by VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24318
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 00:45:07 +0000 (00:45 +0000)]
document sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24317
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 00:11:49 +0000 (00:11 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24316
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 00:11:30 +0000 (00:11 +0000)]
add a token
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24315
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 00:11:10 +0000 (00:11 +0000)]
Parse section info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24314
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 00:10:19 +0000 (00:10 +0000)]
print section info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24313
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 00:10:02 +0000 (00:10 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24310
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 12 Nov 2005 00:09:49 +0000 (00:09 +0000)]
Add support for putting globals in a particular section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24309
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 11 Nov 2005 23:08:46 +0000 (23:08 +0000)]
fix yet more regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24308
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 11 Nov 2005 23:02:55 +0000 (23:02 +0000)]
generate chain result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24307
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 11 Nov 2005 22:48:54 +0000 (22:48 +0000)]
added a chain output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24306
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 11 Nov 2005 19:52:25 +0000 (19:52 +0000)]
Fix a bunch more alpha regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24304
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 11 Nov 2005 19:02:54 +0000 (19:02 +0000)]
prevent cse of readcyclecounter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24303
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 11 Nov 2005 16:47:30 +0000 (16:47 +0000)]
continued readcyclecounter support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24300
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 11 Nov 2005 16:45:18 +0000 (16:45 +0000)]
Add support for a cycle counter intrinsic. As basically all processors have
this and have it in about the same form, I think this makes sense.
on X86, you do a RDTSC (64bit result, from any ring since the P5MMX)
on Alpha, you do a RDCC
on PPC, there is a sequence which may or may not work depending on how things
are setup by the OS. Or something like that. Maybe someone who knows PPC
can add support. Something about the time base register.
on Sparc, you read %tick, which in some solaris versions (>=8) is readable by
userspace
on IA64 read ar.itc
So I think the ulong is justified since all of those are 64bit.
Support is slighly flaky on old chips (P5 and lower) and sometimes
depends on OS (PPC, Sparc). But for modern OS/Hardware (aka this decade),
we should be ok.
I am still not sure what to do about lowering. I can either see a lower to 0, to
gettimeofday (or the target os equivalent), or loudly complaining and refusing to
continue.
I am commiting an Alpha implementation. I will add the X86 implementation if I
have to (I have use of it in the near future), but if someone who knows that
backend (and the funky multi-register results) better wants to add it, it would
take them a lot less time ;)
TODO: better lowering and legalizing, and support more platforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24299
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Fri, 11 Nov 2005 02:15:27 +0000 (02:15 +0000)]
Fix some typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24298
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Fri, 11 Nov 2005 01:34:02 +0000 (01:34 +0000)]
Add new file to Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24297
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Nov 2005 23:24:26 +0000 (23:24 +0000)]
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
Chris Lattner [Thu, 10 Nov 2005 21:59:25 +0000 (21:59 +0000)]
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
Chris Lattner [Thu, 10 Nov 2005 21:47:01 +0000 (21:47 +0000)]
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
Chris Lattner [Thu, 10 Nov 2005 21:40:01 +0000 (21:40 +0000)]
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
Chris Lattner [Thu, 10 Nov 2005 21:39:29 +0000 (21:39 +0000)]
do not allow '.' in symbol names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24292
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Nov 2005 21:39:12 +0000 (21:39 +0000)]
Allow per-character control over what target assemblers allow in symbol
names. This also changes the default to allow all of "$_." in addition
to letters and numbers as symbol names. If you don't want this, use
markCharUnacceptable to remove one of these or markCharAcceptable to add
to the set. This corresponds with what GAS accepts by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24291
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 10 Nov 2005 19:39:09 +0000 (19:39 +0000)]
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
Chris Lattner [Thu, 10 Nov 2005 19:33:43 +0000 (19:33 +0000)]
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
Chris Lattner [Thu, 10 Nov 2005 19:33:04 +0000 (19:33 +0000)]
Check that this compiles to a label with a space in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24284
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Nov 2005 19:30:07 +0000 (19:30 +0000)]
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
Chris Lattner [Thu, 10 Nov 2005 19:02:52 +0000 (19:02 +0000)]
Remove M, which is dead. Eliminate a dead typedef. Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24282
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Nov 2005 19:02:18 +0000 (19:02 +0000)]
remove the M instance var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24281
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Nov 2005 18:55:09 +0000 (18:55 +0000)]
This method is no longer static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24280
91177308-0d34-0410-b5e6-
96231b3b80d8