Commit Graph

13372 Commits

Author SHA1 Message Date
Chris Lattner
56b1319fbe now that elf weak bss symbols are handled correctly, simplify a bunch of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93845 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 03:13:44 +00:00
Chris Lattner
c7fbe90389 fix a significant difference between llvm and gcc on ELF systems:
GCC would put weak zero initialized mutable data in the .bss section,
we would put it into a crasy '.gnu.linkonce.b.test,"aw",@nobits' 
section.  Fixing this will allow simplifications next up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 03:06:01 +00:00
Chris Lattner
a3839bc371 introduce a section kind for common linkage. Use this to slightly
simplify and commonize some of the asmprinter logic for globals.

This also avoids printing the MCSection for .zerofill, which broke
the llvm-gcc build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93843 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 02:48:26 +00:00
Bill Wendling
e1e0f485f9 Even more explanation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93841 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 02:44:01 +00:00
Chris Lattner
6e3be14be4 change an accessor to a predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93839 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 02:13:06 +00:00
Chris Lattner
aac138e84d Cleanup handling of .zerofill on darwin:
1. TargetLoweringObjectFileMachO should decide if something
   goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
   the right MCSection, the asmprinters should just emit to the
   right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
   MAI can have a bool "haszerofill" instead of having the textual
   directive to emit.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93838 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 02:09:44 +00:00
Evan Cheng
f609bb8466 Fix r93758. Use isel patterns instead of c++ selection code to select rbit and make sure we pick different instructions for ARM vs. Thumb2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93829 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 00:44:15 +00:00
Dale Johannesen
f082d7abe1 Revert 93811 per request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93818 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 00:10:52 +00:00
Dale Johannesen
1b346b7f8f Enable code to emit dbg.declare as DEBUG_VALUE
comments (fast isel, X86).  This doesn't seem
to break any functionality, but will introduce
cases where -g affects the generated code.  I'll
be fixing that.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93811 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 23:34:55 +00:00
Eli Friedman
9cfb3adf44 Add some potentially interesting transformations to README.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93797 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:36:59 +00:00
Bill Wendling
48814681d7 - Add getLSDAEncoding to the PowerPC backend.
- Greatly improve the comments to the getLSDAEncoding method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93796 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:36:35 +00:00
Eric Christopher
77f79895f8 Have FastISel handle llvm.trap().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93781 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:11:29 +00:00
Jim Grosbach
6a19947dd6 Minor cleanup for jump table printing. Need a reference, not a pointer, for
printing via <<. Otherwise we just print the pointer value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93777 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:01:39 +00:00
Johnny Chen
eb231ce51d The most significant encoding bit of GPR:$src or GPR:$dst was over-specified in
the various MOV (register) instructions (16-bit Thumb), including tBRIND (the
indirect branch).  Instead of '1', it should be specified as '?', because GPR
only specifies the register class, which includes both hi-and-lo registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 20:15:56 +00:00
Jim Grosbach
3482c8003a Patch by David Conrad:
"On ARMv6T2 this turns cttz into rbit, clz instead of the 4 instruction
 sequence it is now."




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93758 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:58:49 +00:00
Bill Wendling
097ea8315f Add FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93755 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:47:53 +00:00
Bill Wendling
a8c18890da - Add a comment to the callback indicating that it's *extremely* not a good
idea, but unfortunately necessary.
- Default to using 4-bytes for the LSDA pointer encoding to agree with the
  encoded value in the CIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93753 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 19:36:27 +00:00
Bob Wilson
9fedc33ca8 Emit spaces after commas in Neon register lists. This is more consistent
with the rest of the assembly output, is easier to read, and matches the
expected output for gcc's Neon tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 01:24:43 +00:00
Chris Lattner
aad30363fb switch x86 zerofill emission over to use MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93702 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 01:21:08 +00:00
Chris Lattner
5957c84e09 Change CurrentFnSym to be a non-const pointer since asmprinter mutates it
as it emits code.  Switch .globl directives to use OutStreamer instead of
doing it textually (in x86)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 00:59:24 +00:00
Chris Lattner
8cb9a3b13f remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 00:37:40 +00:00
Chris Lattner
950558aa23 unbreak x86 jump tables with my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93698 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 00:21:06 +00:00
Chris Lattner
10b318bcb3 now that MCSymbol::print doesn't use it's MAI argument, we can
remove it and change all the code that prints MCSymbols to use 
<< instead, which is much simpler and cleaner.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93695 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 21:43:43 +00:00
Chris Lattner
0bd58b0e81 stop the CBE from using Mangler::appendMangledName, which is a private function, it is mangling types, which don't matter how they are done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:32:29 +00:00
Chris Lattner
acd03ae679 Get MCSymbol out of the mangling business, and move all the logic
to Mangler.  Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.

This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93690 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:23:46 +00:00
Chris Lattner
ff240053bf factor this code better how that the string version of getNameWithPrefix
takes a twine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 18:52:16 +00:00
Chris Lattner
c0dba723d1 now that mangler is in libtarget, it can use MCAsmInfo instead of clients
having to pass various fields from it in.  Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 18:22:35 +00:00
Bob Wilson
3a4a832223 The Neon "vtst" instruction takes a suffix that is the element size alone --
adding an "i" to the suffix, indicating that the elements are integers, is
accepted but not part of the standard syntax.  This helps us pass a few more
of the Neon tests from gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93677 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 06:35:17 +00:00
Bob Wilson
507d32aad2 Fix an off-by-one error that caused the chain operand to be dropped from Neon
vector load-lane and store-lane instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93673 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 05:58:23 +00:00
Benjamin Kramer
dbc130f592 Update CMake files for Mangler move.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 22:23:09 +00:00
Chris Lattner
45111d160c move the mangler into libtarget from vmcore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 21:57:06 +00:00
Chris Lattner
7a2ba94d03 rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,
and add an explicit ForcePrivate argument.

Switch FunctionEHFrameInfo to be MCSymbol based instead of string based.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 18:37:32 +00:00
Devang Patel
6b61f5816e Replace DebugLocTuple with DILocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93630 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 06:09:35 +00:00
Chris Lattner
036d8f9581 fix build failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 03:38:27 +00:00
Chris Lattner
0b3735e65a remove a couple of actively incorrect uses of getMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 02:16:09 +00:00
Chris Lattner
27891030ed this doesn't need the mangler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93626 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 02:15:38 +00:00
Chris Lattner
75abc68d32 more string -> sym, getMangledName is now gone from this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 02:09:06 +00:00
Chris Lattner
a40128c350 use symbols instead of strings, eliminating a bunch of getMangledName
calls.  Add FIXMEs about a bunch of nondeterminism in stub output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93621 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 02:00:23 +00:00
Chris Lattner
76a3c48e68 simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93619 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:45:47 +00:00
Bill Wendling
d58e9cb42d Retrying r91337:
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE for some platforms. Allow
individual platforms to decide for themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:40:55 +00:00
Chris Lattner
9ab19f25aa eliminate uses of mangler and simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:40:07 +00:00
Chris Lattner
ef4e536c7e get pic16 off CurrentFnName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:21:04 +00:00
Chris Lattner
5c40e694dc remove the string form of printVisibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:17:26 +00:00
Chris Lattner
9c09363637 switch more stuff onto MCSymbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93608 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:12:01 +00:00
Chris Lattner
8570f594ad eliminate uses of deprecated mangler apis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93605 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:00:27 +00:00
Chris Lattner
4fb69f40be switch X86 target off CurFunctionName and MCIze more.
Note that the code wasn't calling DecorateCygMingName
when emitting the ".ascii -export" stuff at the end of
file for DLLExported functions.  I don't know if it should
or not, but I'm preserving behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93603 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 00:51:39 +00:00
Chris Lattner
551cdd56ce MCize tis, and make it keep CurrentFnSym up to date with CurrentFnName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93598 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 00:32:38 +00:00
Chris Lattner
99db039e72 revert the x86 part of my last patch, cygwin is mutating CurrentFnName!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 00:24:20 +00:00
Chris Lattner
12164414dd MCize a bunch more stuff, eliminating a lot of uses of the mangler
and CurrentFnName.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 00:21:18 +00:00
Chris Lattner
8914fc20c2 remove two write-only sets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93590 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 23:56:03 +00:00