Commit Graph

36481 Commits

Author SHA1 Message Date
Bob Wilson
60df9077eb Remove unused "NoPRE" parameter in GVN and createGVNPass().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 18:35:19 +00:00
Chris Lattner
f60e9bbbad pass in more section kinds, enough to get the .align 0x90
stuff to emit optimal nops in the right places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 18:32:26 +00:00
Sanjiv Gupta
20c51be30c The cloner has nothing to do if any of the main or ISR entrypoints are not
present in the module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97232 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 18:32:18 +00:00
Chris Lattner
3f5e0b8114 fix PR6435 another bug from the MallocInst elimination work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 18:23:13 +00:00
Sanjiv Gupta
2b0070211e Reapply things reverted back in 97220, with the fixed test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 17:59:28 +00:00
Dan Gohman
6fe0df2abb movl is a cheaper way to materialize 0 without clobbering EFLAGS than movabsq.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 16:49:27 +00:00
Richard Osborne
d712783492 Fix XCoreTargetLowering::isLegalAddressingMode() to handle VoidTy.
Previously LoopStrengthReduce would sometimes be unable to find
a legal formula, causing an assertion failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97226 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 16:44:51 +00:00
Chandler Carruth
727cf62123 Revert r97211 and r97213 to get the build green again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 08:43:09 +00:00
Sanjiv Gupta
651d85c2f2 Currently in LLVM, names of libcalls are assigned during TargetLowering
object construction. There is no provision to change them when the 
code for a function generated. 
So we have to change these names while printing assembly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97213 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 07:31:15 +00:00
Sanjiv Gupta
917733eca0 Before converting an operand to mem, check if it is legal to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97211 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 07:27:35 +00:00
Dan Gohman
e13709af60 Delete a bunch of redundant predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 01:14:30 +00:00
Bill Wendling
0b1d2f3012 Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97200 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 01:12:52 +00:00
Bill Wendling
bb4283ec13 Add another (and hopefully the last) exception case, where once we recalculate
the alignment requirement, if it no longer makes the TType base offset overflow
into extra bytes, then we need to pad to those bytes ourselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 00:43:54 +00:00
Bill Wendling
fdb2be8b09 And should use the correct variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 00:24:25 +00:00
Bill Wendling
a888645425 Got assertion check backwards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97192 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 00:22:42 +00:00
Bill Wendling
86f0d33f85 Catch a corner case where adding the padding to the "TType base offset" field
will eliminate the need for padding in the "Call site table length". E.g., if
we have this:

    GCC_except_table1:
    Lexception1:
        .byte   0xff  ## @LPStart Encoding = omit
        .byte   0x9b  ## @TType Encoding = indirect pcrel sdata4
        .byte   0x7f  ## @TType base offset
        .byte   0x03  ## Call site Encoding = udata4
        .byte   0x89  ## Call site table length

with padding of 1. We want to emit the padding like this:
 
    GCC_except_table1:
    Lexception1:
        .byte   0xff  ## @LPStart Encoding = omit
        .byte   0x9b  ## @TType Encoding = indirect pcrel sdata4
        .byte   0xff  ## @TType base offset
        .space  1,0   ## Padding
        .byte   0x03  ## Call site Encoding = udata4
        .byte   0x89  ## Call site table length

and not with padding on the "Call site table length" entry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 23:52:44 +00:00
Chris Lattner
a687465bae rewrite OptimizeGlobalAddressOfMalloc to fix PR6422, some bugs
introduced when mallocinst was eliminated. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 22:33:52 +00:00
Bill Wendling
f7e90ae205 Make comment more meaningful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97169 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 21:19:47 +00:00
Dan Gohman
9949dd612c Fix ExpandVectorBuildThroughStack for the case where the
operands are themselves vectors. Based on a patch by
Micah Villmow for PR6338.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 20:30:49 +00:00
Johnny Chen
6341c5a4c4 Added the following 32-bit Thumb instructions for disassembly only: SMC, RFE,
and SRS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 20:25:24 +00:00
Johnny Chen
ce6275fd2c Added the 32-bit Thumb instructions (BXJ) for disassembly only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 19:05:29 +00:00
Johnny Chen
2333655ed0 Added the 32-bit Thumb instructions (MRS and MSR) for disassembly only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97159 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 18:46:43 +00:00
Kevin Enderby
d74acb0c78 This is a patch to the assembler frontend to detect when aligning a text
section with TextAlignFillValue and calls EmitCodeAlignment() instead of
calling EmitValueToAlignment().  This allows x86 assembly code to be aligned
with optimal nops.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 18:46:04 +00:00
Daniel Dunbar
010b1b2a0d Fix TextAlignFillValue in a few places
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97151 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 18:07:10 +00:00
Johnny Chen
d86d269f08 Added the following 16-bit Thumb instructions for disassembly only: YIELD, WFE,
WFI, SEV, SETEND.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 17:51:03 +00:00
Dan Gohman
9ee0d8a917 Teach the constant folder about union types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97142 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 16:45:19 +00:00
Dan Gohman
2440cf1c6f Remove code which assumes it knows how vectors are stored in memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97141 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 16:05:33 +00:00
Dan Gohman
aa9d854b33 Revert r97064. Duncan pointed out that bitcasts are defined in
terms of store and load, which means bitcasting between scalar
integer and vector has endian-specific results, which undermines
this whole approach.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 15:20:39 +00:00
Nick Lewycky
9a49f1552d Make the side-numbering of instructions used by metadata (which is needed to
keep track of instructions that return void) per-function. This fixes PR5278.

This breaks backwards compatibility with the metadata format. That's okay
because we haven't released the metadata bitcode yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97132 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 08:30:17 +00:00
Dan Gohman
8566963713 Make LoopSimplify change conditional branches in loop exiting blocks
which branch on undef to branch on a boolean constant for the edge
exiting the loop. This helps ScalarEvolution compute trip counts for
loops.

Teach ScalarEvolution to recognize single-value PHIs, when safe, and
ForgetSymbolicName to forget such single-value PHI nodes as apprpriate
in ForgetSymbolicName.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97126 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 06:57:05 +00:00
Nick Lewycky
fa0c54e3b8 Dump the presence of attached metadata even if we don't know what it is. This
format is not parsable, even if the module is legal. To get parsable output,
dump the module instead of the function or smaller, since metadata kind are
attached to the module (not the context).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97124 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 06:53:04 +00:00
Nick Lewycky
e7ee59b6a4 Modernize comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97121 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 06:39:10 +00:00
Nick Lewycky
813636a97b Correct whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 06:38:51 +00:00
Sanjiv Gupta
e6ba0b5762 Each field of auxiliary debug entry is only 1 byte long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97108 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 03:54:49 +00:00
Johnny Chen
bd2c623903 Added tNOP for disassembly only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 03:28:51 +00:00
Dan Gohman
377fbc073c Truncate from i64 to i32 is "free" on x86-32, because it involves
just discarding one of the registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97100 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 03:04:36 +00:00
Scott Michel
0d0840108f Revert this patch for the time being. Needs more testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97099 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 02:32:54 +00:00
Johnny Chen
4c61cdd307 Added tSVC and tTRAP for disassembly only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97098 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 02:21:11 +00:00
Scott Michel
3ce2b09797 Large stack frame patch for the CellSPU: handle stack frames that exceed 8176
(511*16) bytes register displacement (D-form).

NOTE: This is a potential headache, given the SPU's local core limitations,
allowing the software developer to commit stack overrun suicide unknowingly.
Also, large SPU stack frames will cause code size explosion. But, one presumes
that the software developer knows what they're doing...

Contributed by Kalle.Raiskila@nokia.com, edited slightly before commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97091 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 01:53:17 +00:00
Bill Wendling
f0bd4cc1b6 MC'ize padding when padding the ULEB128 value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 00:24:52 +00:00
Bill Wendling
3dc9b4872b LLVM puts padding bytes in the __gcc_except_tab section after the
GCC_except_table label but before the Lexception, which the FDE references.
This causes problems as the FDE does not point to the start of an LSDA chunk.

Use an unnormalized uleb128 for the call-site table length that includes the
padding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97078 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 23:34:35 +00:00
Chris Lattner
5cf0b6e4a9 clean up various VT manipulations, patch by Micah Villmow! PR6337
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97072 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 22:44:06 +00:00
Jakob Stoklund Olesen
657baec0af Create a stack frame on ARM when
- Function uses all scratch registers AND
- Function does not use any callee saved registers AND
- Stack size is too big to address with immediate offsets.

In this case a register must be scavenged to calculate the address of a stack
object, and the scavenger needs a spare register or emergency spill slot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97071 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 22:43:17 +00:00
Bob Wilson
e742bb53a3 Check for comparisons of +/- zero when optimizing less-than-or-equal and
greater-than-or-equal SELECT_CCs to NEON vmin/vmax instructions.  This is
only allowed when UnsafeFPMath is set or when at least one of the operands
is known to be nonzero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97065 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 22:15:53 +00:00
Dan Gohman
c382bc3c0f Make getTypeSizeInBits work correctly for array types; it should return
the number of value bits, not the number of bits of allocation for in-memory
storage.

Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and
vectors.

Fix several places in CodeGen which compute offsets into in-memory vectors
to use TargetData information.

This fixes PR1784.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97064 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 22:05:23 +00:00
Chris Lattner
46ca5efdd5 convert cycle checker to smallptrset, add comments and make it
more elegant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97059 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 21:34:04 +00:00
Chris Lattner
a1461ccfa0 revert david's patch which does not even build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97057 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 21:25:08 +00:00
David Greene
2f9b685198 Use a SmallPtrSet as suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97056 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 20:59:49 +00:00
Wesley Peck
173c5c40f6 Adding function "lookupGCCName" to MBlazeIntrinsicInfo
Adding the function "lookupGCCName" to the MBlazeIntrinsicInfo
class to support the Clang MicroBlaze target.

Additionally, minor fixes which remove some unused PIC code 
(PIC is not supported yet in the MicroBlaze backend) and
removed some unused variables.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97054 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 20:16:27 +00:00
Johnny Chen
d88360495a Added Vector Swap (VSWPd and VSWPq) instructions for disassembly only.
A8.6.405


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97052 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 20:06:07 +00:00