Commit Graph

62076 Commits

Author SHA1 Message Date
Evan Cheng
ed2ae136d2 Remove isSS argument from CreateFixedObject. Fixed objects cannot be spill slots so it's always false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107550 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 00:40:23 +00:00
Bruno Cardoso Lopes
2c70d4ad35 Add AVX SSE4.1 round instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107549 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 00:37:44 +00:00
Jakob Stoklund Olesen
273f7e4299 Detect and handle COPY in many places.
This code is transitional, it will soon be possible to eliminate
isExtractSubreg, isInsertSubreg, and isMoveInstr in most places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107547 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 00:04:37 +00:00
Dan Gohman
43b8fd728b Document that BasicAA respects noalias, while InterproceduralBasicAA
does not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107546 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 23:52:36 +00:00
Dan Gohman
efca7f9681 Describe which dependencies are relevant to noalias, and document how
AliasAnalyses have the choice to respect noalias.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107544 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 23:46:54 +00:00
Bruno Cardoso Lopes
03560600b4 Simple refactoring of SSE4.1 instructions, making room for the AVX forms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107540 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 23:27:59 +00:00
Dan Gohman
ff23535df6 Add some html anchors, to allow attributes to be linked to directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107538 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 23:18:08 +00:00
Eric Christopher
cd075a4fb3 80-col fixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 23:17:38 +00:00
Jakob Stoklund Olesen
a4e1ba53dd Add a new target independent COPY instruction and code to lower it.
The COPY instruction is intended to replace the target specific copy
instructions for virtual registers as well as the EXTRACT_SUBREG and
INSERT_SUBREG instructions in MachineFunctions. It won't we used in a selection
DAG.

COPY is lowered to native register copies by LowerSubregs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107529 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 22:29:50 +00:00
Bruno Cardoso Lopes
f5cd8c51e3 - Add support for the rest of AVX SSE3 instructions
- Fix VEX prefix to be emitted with 3 bytes whenever VEX_5M
represents a REX equivalent two byte leading opcode



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 22:06:54 +00:00
Jakob Stoklund Olesen
65766ce7df Clean up TargetOpcodes.h a bit, and limit the number of places where the full
list of predefined instructions appear. Add some consistency checks.

Ideally, TargetOpcodes.h should be produced by TableGen from Target.td, but it
is hardly worth the effort.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 21:44:22 +00:00
Jim Grosbach
6627ac040a Custom inserters (e.g., conditional moves in Thumb1 can introduce
new basic blocks, and if used as a function argument, that can cause call frame
setup / destroy pairs to be split across a basic block boundary. That prevents
us from doing a simple assertion to check that the pairs match and alloc/
dealloc the same amount of space. Modify the assertion to only check the
amount allocated when there are matching pairs in the same basic block.

rdar://8022442

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 21:23:37 +00:00
Devang Patel
1192d4d0a5 MDString is already checked earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 21:13:23 +00:00
Evan Cheng
dca653951c Remove early IT block formation. It's not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 21:07:09 +00:00
Evan Cheng
98ec91ea80 - Two-address pass should not assume unfolding is always successful.
- X86 unfolding should check if the instructions being unfolded has memoperands.
  If there is no memoperands, then it must assume conservative alignment. If this
  would introduce an expensive sse unaligned load / store, then unfoldMemoryOperand
  etc. should not unfold the instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 20:36:18 +00:00
Dan Gohman
541481f34c Remove an unused enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 20:20:50 +00:00
Dale Johannesen
f1e309eb48 Propagate the AlignStack bit in InlineAsm's to the
PrologEpilog code, and use it to determine whether
the asm forces stack alignment or not.  gcc consistently
does not do this for GCC-style asms; Apple gcc inconsistently
sometimes does it for asm blocks.  There is no
convenient place to put a bit in either the SDNode or
the MachineInstr form, so I've added an extra operand
to each; unlovely, but it does allow for expansion for
more bits, should we need it.  PR 5125.  Some
existing testcases are affected.
The operand lists of the SDNode and MachineInstr forms
are indexed with awesome mnemonics, like "2"; I may
fix this someday, but not now.  I'm not making it any
worse.  If anyone is inspired I think you can find all
the right places from this patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107506 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 20:16:09 +00:00
Jakob Stoklund Olesen
6bae55017c Remove invalid assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:54:47 +00:00
Jakob Stoklund Olesen
ec8c3e8ccc Handle unindexed instructions in SlotIndices.
SlotIndexes::insertMachineInstrInMaps would crash when trying to insert an
instruction imediately after an unmapped debug value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:54:45 +00:00
Jakob Stoklund Olesen
3b9c7ebc44 Properly handle debug values during inline spilling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:54:40 +00:00
Gabor Greif
135d7fe9bb beautify output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107500 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:26:28 +00:00
Gabor Greif
53ba550df1 use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 19:08:46 +00:00
Dan Gohman
8c1ffae068 Don't claim to preserve AliasAnalysis. First, this is doesn't actually
have any effect, and second, deleting stores can potentially invalidate
an AliasAnalysis, and there's currently no notification for this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 18:43:05 +00:00
Dan Gohman
1e109621f1 Reword the definition of the noalias attribute. The intention is for
the noalias argument on function attributes be usable to model the
C99 restrict keyword on arguments, and to allow AliasAnalysis to
consider a noalias-attributed argument to be an "identified object".

To support this, refactor a new "based on" concept out of the current
pointer aliasing "associated" concept. This "based on" concept is very
similar to (though it is not identical with) the "based on" concept
in C99.

Also, reword the definition of NoAlias to more closely describe the
concept that the optimizer uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107495 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 18:41:32 +00:00
Jakob Stoklund Olesen
8de3b1eb86 Rematerialize as much as possible before inserting spills and reloads.
This allows us to recognize the common case where all uses could be
rematerialized, and no stack slot allocation is necessary.

If some values could be fully rematerialized, remove them from the live range
before allocating a stack slot for the rest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107492 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 17:44:57 +00:00
Jim Grosbach
6e9926108a 80-column and trailing whitespace cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 17:41:59 +00:00
Jim Grosbach
ee7f8b5f05 grammar tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 17:38:34 +00:00
Bob Wilson
e45f72c833 Fix incorrect asm-printing of some NEON immediates. Fix weak testcase so
that it checks the immediate values, not just the instructions opcodes.
Radar 8110263.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107487 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 17:23:44 +00:00
Gabor Greif
9d135f0ba5 use ArgOperand API (found by my previous commit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 13:37:16 +00:00
Gabor Greif
524e92b0fd back out r107480, it was just testing the waters anyway...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 13:27:50 +00:00
Gabor Greif
033e75f030 [test commit, just to tickle the selfhost buildbots; I'll back out in a few minutes]
second round of low-level interface squeeze-out:
making all of CallInst's low-level operand accessors
private

If you get compile errors I strongly urge you to
update your code.


I tried to write the necessary clues into the
header where the compiler may point to, but no
guarantees. It works for my GCC.

You have several options to update your code:

- you can use the v2.8 ArgOperand accessors
- you can go via a temporary CallSite
- you can upcast to, say, User and call its
  low-level accessors if your code is definitely
  operand-order agnostic.

If you run into serious problems, please
comment in below thread (and back out this
revision only if absolutely necessary):

<http://groups.google.com/group/llvm-dev/browse_thread/thread/64650cf343b28271>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 13:21:55 +00:00
Dan Gohman
9342c176a7 Comment a non-obvious member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107458 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 01:20:16 +00:00
Dan Gohman
108e3707fa IndirectBr is not safe to speculatively execute (!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 00:35:34 +00:00
Dan Gohman
89496d0eb7 Rename CreateReg to CreateRegs, and MakeReg to CreateReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 00:10:16 +00:00
Bruno Cardoso Lopes
f12ad66741 Shrink down SSE3 code by more multiclass refactoring
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107448 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 23:10:49 +00:00
Dale Johannesen
cf22493496 Prevent test from hanging waiting for input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107446 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 22:57:11 +00:00
Bill Wendling
eabd735c9a Make the "linker_private" linkage type emit a non-weak symbol to the file. It
will still be stripped by the linker when it generates the final image.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 22:38:24 +00:00
Bruno Cardoso Lopes
944facac2e Shrink down SSE3 code by some multiclass refactoring - 1st part
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 22:33:18 +00:00
Bob Wilson
b5b5057a70 ARM function alignments were off by a power of two. svn 83242 changed
getFunctionAlignment and the corresponding use of that value in the ARM
asm printer, but now we're using the standard asm printer.  The result of
this was that function alignments were dropped completely for Thumb functions.
Radar 8143571.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 22:26:26 +00:00
Bill Wendling
5e721d7682 Implement the "linker_private_weak" linkage type. This will be used for
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.

For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:

      .globl l_objc_msgSend_fixup_alloc
      .weak_definition l_objc_msgSend_fixup_alloc
      .section __DATA, __objc_msgrefs, coalesced
      .align 3
l_objc_msgSend_fixup_alloc:
       .quad   _objc_msgSend_fixup
       .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

Currently only supported on Darwin platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 21:55:59 +00:00
Gabor Greif
0f66d4be04 evil hack to coerce external users (projects)
to update their code to high-level interfaces

If you get compile errors in your project
please update your code according to the
comments.

This is a re-commit of r107396 which causes
compile errors for the indicated usage patterns
instead of link errors (which are less easy to
fix because of missing source location).

If you get compile errors please perform
following functionally equivalent transformations:
  - getOperand(0)  --->  getCalledValue()
  - setOperand(0, V)  --->  setCalledFunction(V)

This will make your code more future-proof
and avoid potentially hard-to-debug bugs.

please refer to this thread on llvm-dev:

<http://groups.google.com/group/llvm-dev/browse_thread/thread/64650cf343b28271>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 21:46:41 +00:00
Devang Patel
7fb231cbec Do not require line number entry for undefined local variable.
This is a regression caused by r106792 and caught by gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107430 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 21:38:08 +00:00
Daniel Dunbar
b570968424 MC: Fix some stray hunks I didn't intend to commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:48:51 +00:00
Daniel Dunbar
9186fa6b0c MC: Pass the target instance to the AsmParser constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:41:56 +00:00
Daniel Dunbar
eb89c90f0b Remove stray comma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:20:05 +00:00
Daniel Dunbar
839348a9f0 MC: Fix an error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107424 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:20:01 +00:00
Dan Gohman
21de4c0daf Remove context sensitivity concerns from interprocedural-basic-aa, and
make it more aggressive in cases where both pointers are known to live
in the same function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:08:40 +00:00
Daniel Dunbar
94610588af MC: Move COFF enumeration constants to llvm/Support/COFF.h, patch by Michael
Spencer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107418 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:07:24 +00:00
Devang Patel
c1874b7a7c Preserve debug info for only extracted symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107417 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 19:58:05 +00:00
Devang Patel
26d14294de Debugging infomration is encoded in llvm IR using metadata. This is designed
such a way that debug info for symbols preserved even if symbols are
optimized away by the optimizer. 

Add new special pass to remove debug info for such symbols.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107416 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 19:49:20 +00:00