oota-llvm.git
14 years agoAdd a few fairly obvious API changes I noticed while porting some old code.
Torok Edwin [Tue, 21 Jul 2009 20:27:10 +0000 (20:27 +0000)]
Add a few fairly obvious API changes I noticed while porting some old code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76636 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMissed a piece of the commit to remove the shift flavor.
Eli Friedman [Tue, 21 Jul 2009 20:15:24 +0000 (20:15 +0000)]
Missed a piece of the commit to remove the shift flavor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76635 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPrivatize the first of the value maps.
Owen Anderson [Tue, 21 Jul 2009 20:13:12 +0000 (20:13 +0000)]
Privatize the first of the value maps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76634 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove shift amount flavor. It isn't actually complete enough to
Eli Friedman [Tue, 21 Jul 2009 20:12:16 +0000 (20:12 +0000)]
Remove shift amount flavor.  It isn't actually complete enough to
be useful, and it's currently unused.  (Some issues: it isn't actually
rich enough to capture the semantics on many architectures, and
semantics can vary depending on the type being shifted.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76633 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a couple of already-implemented notes.
Eli Friedman [Tue, 21 Jul 2009 20:05:43 +0000 (20:05 +0000)]
Remove a couple of already-implemented notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76631 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago80 col violation.
Evan Cheng [Tue, 21 Jul 2009 19:25:09 +0000 (19:25 +0000)]
80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76629 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPrefix IR dumps with LiveInterval indices when possible. This turns
David Greene [Tue, 21 Jul 2009 18:56:32 +0000 (18:56 +0000)]
Prefix IR dumps with LiveInterval indices when possible.  This turns
this:

%ESI<def> = MOV32rr %EDI<kill>
ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
%reg1027<def> = MOVZX64rr32 %ESI
%reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead>
%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
%RDI<def> = MOV64rr %RSP
%RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead>
%RSP<def> = MOV64rr %RDI

into this:

4 %reg1024<def> = MOV32rr %EDI<kill>
12 ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
20 %reg1025<def> = MOVZX64rr32 %reg1024
28 %reg1026<def> = MOV64rr %reg1025<kill>
36 %reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead>
44 %reg1027<def> = MOV64rr %reg1026<kill>
52 %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
60 %reg1028<def> = MOV64rr %RSP
68 %reg1029<def> = MOV64rr %reg1028<kill>
76 %reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead>
84 %RSP<def> = MOV64rr %reg1029

This helps greatly when debugging register allocation and coalescing
problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76615 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd fake v7 itineraries for now.
Evan Cheng [Tue, 21 Jul 2009 18:54:14 +0000 (18:54 +0000)]
Add fake v7 itineraries for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76612 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomake AsmPrinter::doFinalization iterate over the global variables
Chris Lattner [Tue, 21 Jul 2009 18:38:57 +0000 (18:38 +0000)]
make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76604 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd PrefixPrinter arguments to the dump routines for MachineFunction and
David Greene [Tue, 21 Jul 2009 18:27:05 +0000 (18:27 +0000)]
Add PrefixPrinter arguments to the dump routines for MachineFunction and
MachineBasicBlock.  We'll use these shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76603 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a small utility class to configure IR printers. This will allow
David Greene [Tue, 21 Jul 2009 18:21:46 +0000 (18:21 +0000)]
Add a small utility class to configure IR printers.  This will allow
printers to do neat and wonderful things when printing debug
information.  The ideas is to allow passes to configer printers to emit
pass-specific information when dumping IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76602 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake a bunch of changes suggested by Chris and others to improve
David Greene [Tue, 21 Jul 2009 18:16:24 +0000 (18:16 +0000)]
Make a bunch of changes suggested by Chris and others to improve
efficiency.  Fix a few formatting bugs along the way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76601 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDo not select tSXTB / tSXTH in thumb2 mode.
Evan Cheng [Tue, 21 Jul 2009 18:15:26 +0000 (18:15 +0000)]
Do not select tSXTB / tSXTH in thumb2 mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76600 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename getConstantInt{True|False} to get{True|False} at Chris' behest.
Owen Anderson [Tue, 21 Jul 2009 18:03:38 +0000 (18:03 +0000)]
Rename getConstantInt{True|False} to get{True|False} at Chris' behest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76598 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd freed memory poisoning in !NDEBUG mode for DenseMap.
Torok Edwin [Tue, 21 Jul 2009 18:01:37 +0000 (18:01 +0000)]
Add freed memory poisoning in !NDEBUG mode for DenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76597 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreduce indentation by using an early exit.
Chris Lattner [Tue, 21 Jul 2009 17:59:36 +0000 (17:59 +0000)]
reduce indentation by using an early exit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76596 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate CMake files.
Ted Kremenek [Tue, 21 Jul 2009 17:43:20 +0000 (17:43 +0000)]
Update CMake files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76595 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse string comparison instead of numeric comparison when comparing digests.
Ted Kremenek [Tue, 21 Jul 2009 17:41:55 +0000 (17:41 +0000)]
Use string comparison instead of numeric comparison when comparing digests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76594 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agowhitespace cleanups, make the MipsAsmPrinter::doInitialization
Chris Lattner [Tue, 21 Jul 2009 17:39:48 +0000 (17:39 +0000)]
whitespace cleanups, make the MipsAsmPrinter::doInitialization
chain to the super class instead of initializing mangler directly.
This gives it .file and module level inline asm support among other
things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76593 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization.
Chris Lattner [Tue, 21 Jul 2009 17:37:35 +0000 (17:37 +0000)]
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

14 years agoconvert this test to filecheck format, which is faster and avoids false matches of...
Chris Lattner [Tue, 21 Jul 2009 17:36:24 +0000 (17:36 +0000)]
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

14 years agoRename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
Chris Lattner [Tue, 21 Jul 2009 17:30:51 +0000 (17:30 +0000)]
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

14 years agoMove StringRef comparison operators out of class.
Daniel Dunbar [Tue, 21 Jul 2009 17:25:46 +0000 (17:25 +0000)]
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

14 years agofix indentation
Chris Lattner [Tue, 21 Jul 2009 17:25:13 +0000 (17:25 +0000)]
fix indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76587 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove an unneeded override.
Chris Lattner [Tue, 21 Jul 2009 17:23:41 +0000 (17:23 +0000)]
remove an unneeded override.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76586 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomore random whitespace cleanup, eliminate #define, avoid copying
Chris Lattner [Tue, 21 Jul 2009 17:20:18 +0000 (17:20 +0000)]
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

14 years agoadd a testcase for the pic16 section handling stuff.
Chris Lattner [Tue, 21 Jul 2009 16:48:20 +0000 (16:48 +0000)]
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

14 years agosome simple whitespace cleanup, avoid copying vectors for no reason
Chris Lattner [Tue, 21 Jul 2009 16:44:47 +0000 (16:44 +0000)]
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

14 years agoAdd StringRef::{substr, startswith}.
Daniel Dunbar [Tue, 21 Jul 2009 09:18:49 +0000 (09:18 +0000)]
Add StringRef::{substr, startswith}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76559 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAnother rewriter bug exposed by recent coalescer changes. ReuseInfo::GetRegForReload...
Evan Cheng [Tue, 21 Jul 2009 09:15:00 +0000 (09:15 +0000)]
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

14 years agoAdd missing include.
Daniel Dunbar [Tue, 21 Jul 2009 08:58:44 +0000 (08:58 +0000)]
Add missing include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76555 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch this API to StringRef.
Daniel Dunbar [Tue, 21 Jul 2009 08:57:31 +0000 (08:57 +0000)]
Switch this API to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76554 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify / normalize some uses of Value::getName.
Daniel Dunbar [Tue, 21 Jul 2009 08:54:24 +0000 (08:54 +0000)]
Simplify / normalize some uses of Value::getName.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76553 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd StringRef class, with fixes.
Daniel Dunbar [Tue, 21 Jul 2009 07:28:51 +0000 (07:28 +0000)]
Add StringRef class, with fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76543 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agounbreak unit-tests on gcc-4.4.
Torok Edwin [Tue, 21 Jul 2009 07:09:05 +0000 (07:09 +0000)]
unbreak unit-tests on gcc-4.4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76542 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove some unused code.
Daniel Dunbar [Tue, 21 Jul 2009 07:08:59 +0000 (07:08 +0000)]
Remove some unused code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76541 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport adding relocations for data sections, handling the cases where
Bruno Cardoso Lopes [Tue, 21 Jul 2009 06:51:32 +0000 (06:51 +0000)]
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

14 years agoremove a very large testcase for now.
Chris Lattner [Tue, 21 Jul 2009 06:28:36 +0000 (06:28 +0000)]
remove a very large testcase for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76537 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd jumps with 8-bit relocation for assembler / disassembler. Patch by Sean Callanan.
Evan Cheng [Tue, 21 Jul 2009 06:00:18 +0000 (06:00 +0000)]
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

14 years agoFix a dagga combiner bug: avoid creating illegal constant.
Evan Cheng [Tue, 21 Jul 2009 05:40:15 +0000 (05:40 +0000)]
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

14 years agoMove a bit more state over to the LLVMContext.
Owen Anderson [Tue, 21 Jul 2009 02:47:59 +0000 (02:47 +0000)]
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

14 years agoAdd the following functions:
Bill Wendling [Tue, 21 Jul 2009 01:07:24 +0000 (01:07 +0000)]
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

14 years agoAdd a testcase for PR2831.
Dan Gohman [Tue, 21 Jul 2009 01:02:18 +0000 (01:02 +0000)]
Add a testcase for PR2831.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76527 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a testcase for PR4569, which is now fixed.
Dan Gohman [Tue, 21 Jul 2009 00:50:52 +0000 (00:50 +0000)]
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

14 years agoAdd an svn:ignore.
Dan Gohman [Tue, 21 Jul 2009 00:43:42 +0000 (00:43 +0000)]
Add an svn:ignore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76525 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake the range calculations for addrecs to be more conservative,
Dan Gohman [Tue, 21 Jul 2009 00:42:47 +0000 (00:42 +0000)]
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

14 years agoWhitespace cleanups.
Dan Gohman [Tue, 21 Jul 2009 00:38:55 +0000 (00:38 +0000)]
Whitespace cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76523 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMinor code simplification.
Dan Gohman [Tue, 21 Jul 2009 00:37:45 +0000 (00:37 +0000)]
Minor code simplification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76521 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix ARM isle code that optimize multiply by constants which are power-of-2 +/- 1.
Evan Cheng [Tue, 21 Jul 2009 00:31:12 +0000 (00:31 +0000)]
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

14 years agoCross RC coalescing is now on by default.
Evan Cheng [Tue, 21 Jul 2009 00:22:59 +0000 (00:22 +0000)]
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

14 years agorevert 76503 while I figure out what's going on
Dale Johannesen [Tue, 21 Jul 2009 00:12:29 +0000 (00:12 +0000)]
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

14 years agoAdd a comment to clarify why there isn't any code in this spot.
Dan Gohman [Mon, 20 Jul 2009 23:54:43 +0000 (23:54 +0000)]
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

14 years agoRemove the code that tried to evaluate whether (A pred B) is known
Dan Gohman [Mon, 20 Jul 2009 23:53:35 +0000 (23:53 +0000)]
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

14 years agoMake sure a global matching asm 'i' constraint gets its
Dale Johannesen [Mon, 20 Jul 2009 23:39:13 +0000 (23:39 +0000)]
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

14 years agoMove stripping of bitcasts in inline asm arguments
Dale Johannesen [Mon, 20 Jul 2009 23:27:39 +0000 (23:27 +0000)]
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

14 years agoMinor code simplification.
Dan Gohman [Mon, 20 Jul 2009 22:41:51 +0000 (22:41 +0000)]
Minor code simplification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76496 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDocumentation for the new non-overflow and exact keywords.
Dan Gohman [Mon, 20 Jul 2009 22:41:19 +0000 (22:41 +0000)]
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

14 years agoThe upper argument of ConstantRange is exclusive, not inclusive.
Dan Gohman [Mon, 20 Jul 2009 22:34:18 +0000 (22:34 +0000)]
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

14 years agoclean up some formatting, indent by 2 instead of 4.
Chris Lattner [Mon, 20 Jul 2009 22:23:48 +0000 (22:23 +0000)]
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

14 years agoCMP and TST define CPSR, not use it.
David Goodwin [Mon, 20 Jul 2009 22:13:31 +0000 (22:13 +0000)]
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

14 years agoRe-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comes
David Greene [Mon, 20 Jul 2009 22:02:59 +0000 (22:02 +0000)]
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

14 years agoForgot this test earlier.
Evan Cheng [Mon, 20 Jul 2009 21:46:42 +0000 (21:46 +0000)]
Forgot this test earlier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76485 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that humans can...
Bill Wendling [Mon, 20 Jul 2009 21:38:26 +0000 (21:38 +0000)]
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

14 years agoPass in the unfortunately named "LessPrivatePrefix" for the
Bill Wendling [Mon, 20 Jul 2009 21:30:28 +0000 (21:30 +0000)]
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

14 years agoAssembly and Bitcode support for unsigned/signed overflow flags and
Dan Gohman [Mon, 20 Jul 2009 21:19:07 +0000 (21:19 +0000)]
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

14 years agoUse TII->findCommutedOpIndices to find the commute operands (rather than guessing).
Evan Cheng [Mon, 20 Jul 2009 21:16:08 +0000 (21:16 +0000)]
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

14 years agoChange the casting of linkage types into a map. This makes this much more robust
Bill Wendling [Mon, 20 Jul 2009 20:34:46 +0000 (20:34 +0000)]
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

14 years agoClarify that OverflowingBinaryOperator is not used for SDiv, even though
Dan Gohman [Mon, 20 Jul 2009 20:32:43 +0000 (20:32 +0000)]
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

14 years agoRemoved the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as
Kevin Enderby [Mon, 20 Jul 2009 20:25:37 +0000 (20:25 +0000)]
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

14 years agoAdd MCAsmLexer interface.
Daniel Dunbar [Mon, 20 Jul 2009 20:01:54 +0000 (20:01 +0000)]
Add MCAsmLexer interface.
 - This provides the AsmLexer interface to the target specific assembly parsers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76460 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix some sub-reg coalescing bugs where the coalescer wasn't updating the resulting...
Evan Cheng [Mon, 20 Jul 2009 19:47:55 +0000 (19:47 +0000)]
Fix some sub-reg coalescing bugs where the coalescer wasn't updating the resulting interval's register class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76458 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove FIXME that was already fixed.
Eli Friedman [Mon, 20 Jul 2009 19:45:16 +0000 (19:45 +0000)]
Remove FIXME that was already fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76457 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename Mangler linkage enums to something less gross.
Bill Wendling [Mon, 20 Jul 2009 19:41:27 +0000 (19:41 +0000)]
Rename Mangler linkage enums to something less gross.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76456 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor metadata parsing routines into separate functions.
Devang Patel [Mon, 20 Jul 2009 19:00:08 +0000 (19:00 +0000)]
Refactor metadata parsing routines into separate functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76455 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd MCAsmParser interface.
Daniel Dunbar [Mon, 20 Jul 2009 18:55:04 +0000 (18:55 +0000)]
Add MCAsmParser interface.
 - This provides the AsmParser interface to the target specific assembly
   parsers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76453 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBuild FileCheck from with CMake
Douglas Gregor [Mon, 20 Jul 2009 18:30:25 +0000 (18:30 +0000)]
Build FileCheck from with CMake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76449 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPut new enum at end of list to avoid changing ABI.
Bill Wendling [Mon, 20 Jul 2009 18:22:52 +0000 (18:22 +0000)]
Put new enum at end of list to avoid changing ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76447 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove TargetAsmInfo::ExpandInlineAsm
Chris Lattner [Mon, 20 Jul 2009 17:59:32 +0000 (17:59 +0000)]
remove TargetAsmInfo::ExpandInlineAsm

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76445 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ExpandInlineAsm on TargetLowering instead of TargetAsmInfo.
Chris Lattner [Mon, 20 Jul 2009 17:52:52 +0000 (17:52 +0000)]
use ExpandInlineAsm on TargetLowering instead of TargetAsmInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76442 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCopy ExpandInlineAsm to TargetLowering from TargetAsmInfo.
Chris Lattner [Mon, 20 Jul 2009 17:51:36 +0000 (17:51 +0000)]
Copy ExpandInlineAsm to TargetLowering from TargetAsmInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76441 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDrop UDivOperator and introduce SDivOperator. Thanks to Chris
Dan Gohman [Mon, 20 Jul 2009 17:51:10 +0000 (17:51 +0000)]
Drop UDivOperator and introduce SDivOperator. Thanks to Chris
for noticing this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76440 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd some fixme's and cleanups. TargetAsmInfo shouldn't depend on VMCore eventually.
Chris Lattner [Mon, 20 Jul 2009 17:47:48 +0000 (17:47 +0000)]
add some fixme's and cleanups.  TargetAsmInfo shouldn't depend on VMCore eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76439 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate this comment.
Dan Gohman [Mon, 20 Jul 2009 17:44:17 +0000 (17:44 +0000)]
Update this comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76438 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert the addition of hasNoPointerOverflow to GEPOperator.
Dan Gohman [Mon, 20 Jul 2009 17:43:30 +0000 (17:43 +0000)]
Revert the addition of hasNoPointerOverflow to GEPOperator.
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.

Remove a few optimizations that depended on this flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76437 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove dead forward decl
Chris Lattner [Mon, 20 Jul 2009 17:23:00 +0000 (17:23 +0000)]
remove dead forward decl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76433 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFor remote execution, must cd to the executable directory since the exe expects to...
David Goodwin [Mon, 20 Jul 2009 17:15:03 +0000 (17:15 +0000)]
For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76432 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename TargetAsmInfo::getASDirective -> getDataASDirective
Chris Lattner [Mon, 20 Jul 2009 17:12:46 +0000 (17:12 +0000)]
rename TargetAsmInfo::getASDirective -> getDataASDirective

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76431 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix comment.
Daniel Dunbar [Mon, 20 Jul 2009 16:50:16 +0000 (16:50 +0000)]
Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76427 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHide the DOUT static variable behind a function interface.
David Greene [Mon, 20 Jul 2009 16:16:06 +0000 (16:16 +0000)]
Hide the DOUT static variable behind a function interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76425 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse t2LDRri12 for frame index loads.
David Goodwin [Mon, 20 Jul 2009 15:55:39 +0000 (15:55 +0000)]
Use t2LDRri12 for frame index loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76424 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoxfail for now.
Evan Cheng [Mon, 20 Jul 2009 15:33:09 +0000 (15:33 +0000)]
xfail for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76423 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPR4591: Make sure to initialize the pass manager before using it.
Eli Friedman [Mon, 20 Jul 2009 14:50:07 +0000 (14:50 +0000)]
PR4591: Make sure to initialize the pass manager before using it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76422 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFor PC relative relocations where symbols are defined in the same section they
Bruno Cardoso Lopes [Mon, 20 Jul 2009 08:52:02 +0000 (08:52 +0000)]
For PC relative relocations where symbols are defined in the same section they
are referenced, ignore the relocation entry and patch the relocatable field with
the computed symbol offset directly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76414 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd -std-{compile,link}-opts to bugpoint.
Daniel Dunbar [Mon, 20 Jul 2009 07:01:01 +0000 (07:01 +0000)]
Add -std-{compile,link}-opts to bugpoint.
 - Sheesh.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76402 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR4567. Thumb1 target was using the wrong instruction to handle sp = sub fp, #c.
Evan Cheng [Mon, 20 Jul 2009 06:59:32 +0000 (06:59 +0000)]
Fix PR4567. Thumb1 target was using the wrong instruction to handle sp = sub fp, #c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76401 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement a new magic global "llvm.compiler.used" which is like llvm.used, but
Chris Lattner [Mon, 20 Jul 2009 06:14:25 +0000 (06:14 +0000)]
implement a new magic global "llvm.compiler.used" which is like llvm.used, but
doesn't cause ".no_dead_strip" to be emitted on darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76399 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRestore AsmWriterEmitter.cpp back to 74742. The recent changes broke Thumb.
Evan Cheng [Mon, 20 Jul 2009 06:10:07 +0000 (06:10 +0000)]
Restore AsmWriterEmitter.cpp back to 74742. The recent changes broke Thumb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76398 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse stripPointerCasts to simplify some code.
Chris Lattner [Mon, 20 Jul 2009 06:05:50 +0000 (06:05 +0000)]
use stripPointerCasts to simplify some code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76397 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodocument llvm.used and llvm.metadata. Stub out llvm.global_[cd]tors
Chris Lattner [Mon, 20 Jul 2009 05:55:19 +0000 (05:55 +0000)]
document llvm.used and llvm.metadata.  Stub out llvm.global_[cd]tors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76396 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename the index to linkage types.
Bill Wendling [Mon, 20 Jul 2009 02:41:50 +0000 (02:41 +0000)]
Rename the index to linkage types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76394 91177308-0d34-0410-b5e6-96231b3b80d8