Commit Graph

49050 Commits

Author SHA1 Message Date
Chris Lattner
d3ffc06174 fix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization.
This eliminates redundancy setting up the mangler and adds support to them
for module-level inline asm and a .file directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:37:35 +00:00
Chris Lattner
74625023a8 convert this test to filecheck format, which is faster and avoids false matches of "st" -> "stdin"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:36:24 +00:00
Chris Lattner
90f8b7073d Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
LLVM IR concept.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:30:51 +00:00
Daniel Dunbar
7cb6860185 Move StringRef comparison operators out of class.
Also, tweak the return type of size().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:25:46 +00:00
Chris Lattner
1010c21e4e fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76587 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:25:13 +00:00
Chris Lattner
da6c240423 remove an unneeded override.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76586 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:23:41 +00:00
Chris Lattner
a46cb523ca more random whitespace cleanup, eliminate #define, avoid copying
vectors needlessly, doxygenify comments, improve constness, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:20:18 +00:00
Chris Lattner
99bd8bf8a2 add a testcase for the pic16 section handling stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 16:48:20 +00:00
Chris Lattner
dc47146a25 some simple whitespace cleanup, avoid copying vectors for no reason
as much, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 16:44:47 +00:00
Daniel Dunbar
f5fdf73238 Add StringRef::{substr, startswith}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 09:18:49 +00:00
Evan Cheng
5d885023fe Another rewriter bug exposed by recent coalescer changes. ReuseInfo::GetRegForReload() should make sure the "switched" register is in the desired register class. I'm surprised this hasn't caused more failures in the past.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 09:15:00 +00:00
Daniel Dunbar
92645acd33 Add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 08:58:44 +00:00
Daniel Dunbar
bda9653f5b Switch this API to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76554 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 08:57:31 +00:00
Daniel Dunbar
fbee579ed4 Simplify / normalize some uses of Value::getName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 08:54:24 +00:00
Daniel Dunbar
4cf95d75c6 Add StringRef class, with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 07:28:51 +00:00
Torok Edwin
05717f9a80 unbreak unit-tests on gcc-4.4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 07:09:05 +00:00
Daniel Dunbar
a8f0af5e0e Remove some unused code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 07:08:59 +00:00
Bruno Cardoso Lopes
68491c1217 Support adding relocations for data sections, handling the cases where
global declared symbols are initialized with references from other global
symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 06:51:32 +00:00
Chris Lattner
634d61b135 remove a very large testcase for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 06:28:36 +00:00
Evan Cheng
77159e39a6 Add jumps with 8-bit relocation for assembler / disassembler. Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76536 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 06:00:18 +00:00
Evan Cheng
d101a72d79 Fix a dagga combiner bug: avoid creating illegal constant.
Is this really a winning transformation?
fold (shl (srl x, c1), c2) -> (shl (and x, (shl -1, c1)), (sub c2, c1)) or                                                                              
                              (srl (and x, (shl -1, c1)), (sub c1, c2))


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 05:40:15 +00:00
Owen Anderson
f53c371983 Move a bit more state over to the LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 02:47:59 +00:00
Bill Wendling
7239b51694 Add the following functions:
- SYSCALL (normal fast system call instruction) [0f 05]
- SYSENTER (system call entry instruction) [0f 34]
- SYSEXIT (system call exit instruction) [0f 35]
- SYSEXIT64 (system call exit instruction to 64-bit user code) [REX.W 0f 35]
- SYSRET (system call return instruction) [0f 07]

Patch by Sean Callanan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 01:07:24 +00:00
Dan Gohman
126b56659c Add a testcase for PR2831.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 01:02:18 +00:00
Dan Gohman
19211b47cc Add a testcase for PR4569, which is now fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:50:52 +00:00
Dan Gohman
0b106d9627 Add an svn:ignore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:43:42 +00:00
Dan Gohman
a16b5764e3 Make the range calculations for addrecs to be more conservative,
as they aren't currently prepared to handle complicated overflow
cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:42:47 +00:00
Dan Gohman
c2b015e4c0 Whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:38:55 +00:00
Dan Gohman
c268e7c51e Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:37:45 +00:00
Evan Cheng
af9e7a7c20 Fix ARM isle code that optimize multiply by constants which are power-of-2 +/- 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:31:12 +00:00
Evan Cheng
c95be59371 Cross RC coalescing is now on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:22:59 +00:00
Dale Johannesen
60b3ba0472 revert 76503 while I figure out what's going on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76517 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:12:29 +00:00
Dan Gohman
f117ed462c Add a comment to clarify why there isn't any code in this spot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76505 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 23:54:43 +00:00
Dan Gohman
4500e9eb80 Remove the code that tried to evaluate whether (A pred B) is known
by determining if (B pred (B-A)) is known, as it doesn't handle
overflow correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 23:53:35 +00:00
Dale Johannesen
71bbebdac9 Make sure a global matching asm 'i' constraint gets its
flags set properly.  (hasMemory is clearly irrelevant
when matching 'i', I don't understand what this was
supposed to be doing.)
gcc.apple/asm-block-25.c (test passed before by
accident, but generated code was wrong)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 23:39:13 +00:00
Dale Johannesen
5339c551b5 Move stripping of bitcasts in inline asm arguments
to a place where it affects everything.  Occurs
only on calls AFAIK.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 23:27:39 +00:00
Dan Gohman
0d5bae41fb Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:41:51 +00:00
Dan Gohman
cbb38f2f67 Documentation for the new non-overflow and exact keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:41:19 +00:00
Dan Gohman
746f3b1a9b The upper argument of ConstantRange is exclusive, not inclusive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76492 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:34:18 +00:00
Chris Lattner
b3e7189353 clean up some formatting, indent by 2 instead of 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:23:48 +00:00
David Goodwin
c27a4547a3 CMP and TST define CPSR, not use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:13:31 +00:00
David Greene
76081c4ef7 Re-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comes
next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:02:59 +00:00
Evan Cheng
87faa1fc67 Forgot this test earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76485 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:46:42 +00:00
Bill Wendling
ecc2da8efd Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that humans can understand it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:38:26 +00:00
Bill Wendling
4cef584860 Pass in the unfortunately named "LessPrivatePrefix" for the
"LinkerPrivatePrefix". It seems to have been used in only one place before I
started this "linker_private" business. I'm thinking that a rename is in
order...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:30:28 +00:00
Dan Gohman
1224c38698 Assembly and Bitcode support for unsigned/signed overflow flags and
exact sdiv flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76475 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:19:07 +00:00
Evan Cheng
33d0474bf5 Use TII->findCommutedOpIndices to find the commute operands (rather than guessing).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:16:08 +00:00
Bill Wendling
4aebcb4f5f Change the casting of linkage types into a map. This makes this much more robust
as it no longer depends upon two different enums being kept in sync with each
other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76465 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:34:46 +00:00
Dan Gohman
344df5ecdf Clarify that OverflowingBinaryOperator is not used for SDiv, even though
SDiv is a binary operation that can overflow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76464 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:32:43 +00:00
Kevin Enderby
5026ae4514 Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as
the parsing of the .dump and .load should be done in the assembly parser and
not have any need for an MCStreamer API.  Changed the code for now so these
just produce an error saying these specific directives are not yet implemented
since they are likely no longer used and may never need to be implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:25:37 +00:00