Commit Graph

21076 Commits

Author SHA1 Message Date
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