Commit Graph

10185 Commits

Author SHA1 Message Date
Eric Christopher
f7a0c7bf8b Fix up -fstack-protector on linux to use the segment
registers.  Split out testcases per architecture and os
now.

Patch from Nelson Elhage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06 05:18:56 +00:00
Chris Lattner
32b4b5aea6 more tidying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-05 05:53:14 +00:00
Chris Lattner
598751ed25 random tidying
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-05 05:36:21 +00:00
Jakob Stoklund Olesen
b1e11455d1 Print symbolic subreg indices on REG_SEQUENCE and INSERT_SUBREG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107602 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 23:24:23 +00:00
Evan Cheng
f2f4903687 Infer alignments of fixed frame objects when they are constructed. This ensures remat'ed loads from fixed slots have the right alignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107591 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 18:52:05 +00:00
Bill Wendling
d9cb7ca388 Proper indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-04 08:58:43 +00:00
Eric Christopher
00e840f469 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107556 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-03 01:09:18 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Dan Gohman
63b95a6f82 Temporarily disable on-demand fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 12:15:30 +00:00
Dan Gohman
c6f00e701e Use FuncInfo's isExportedInst accessor method instead of
doing the work manually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107384 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 03:57:05 +00:00
Dan Gohman
ffda6bac11 Rename CreateRegForValue to CreateReg, and change its argument
from a Value to a Type, because it doesn't actually care about
the Value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107383 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 03:55:39 +00:00
Dan Gohman
a528bc0e8a Fast isel no longer needs DeadMachineInstrElim to clean up after it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107381 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 03:49:59 +00:00
Dan Gohman
7fbcc98f20 Teach fast-isel to avoid loading a value from memory when it's already
available in a register. This is pretty primitive, but it reduces the
number of instructions in common testcases by 4%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107380 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 03:49:38 +00:00
Dan Gohman
20d4be151b Enable on-demand fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 02:58:57 +00:00
Dan Gohman
28a173581c Reapply r106422, splitting the code for materializing a value out of
SelectionDAGBuilder::getValue into a helper function, with fixes to
use DenseMaps safely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107371 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 01:59:43 +00:00
Dan Gohman
c25ad63766 Don't use operator[] here, because it's not desirable to insert a default
value if the search fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107368 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 01:33:21 +00:00
Mikhail Glushenkov
dd2ad8432f Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107360 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 01:00:22 +00:00
Jakob Stoklund Olesen
e72a5c5e2e Add memory operand folding support to InlineSpiller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 00:13:04 +00:00
Jakob Stoklund Olesen
9e55afbf88 Add support for rematerialization to InlineSpiller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107351 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 23:03:52 +00:00
Bill Wendling
d9e3b2b547 Use the catch-all selectors we already found when converting them to use the
correct catch-all value. This saves having to iterate through all of the
selectors in the program again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 22:49:53 +00:00
Jim Grosbach
e70fc8ea64 Handle array and vector typed parameters in sjljehprepare like we do
structs. rdar://8145832

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107332 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 22:20:38 +00:00
Jim Grosbach
d27946d1d4 grammar tweak in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 21:27:56 +00:00
Jakob Stoklund Olesen
d540801e13 Some fool committed without testing (or even building) first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 18:41:20 +00:00
Jakob Stoklund Olesen
61e4a0bc10 Remember to track spill slot uses in VirtRegMap when inserting loads and stores.
LocalRewriter::runOnMachineFunction uses this information to mark dead spill
slots.

This means that InlineSpiller now also works for functions that spill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 18:19:08 +00:00
Duncan Sands
3f278ce999 Remove an unused variable. The call to getRoot has side-effects, so
this could break something (but doesn't seem to).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107295 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 17:22:28 +00:00
Gabor Greif
e767e6bbb7 use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 13:45:50 +00:00
Gabor Greif
37387d5288 use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 12:55:46 +00:00
Gabor Greif
d0fcab9154 use CallSite::arg_end instead of CallInst::op_end
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107276 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 12:39:23 +00:00
John Mosby
9f71f801b5 Remove trailing whitespace, no functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107244 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 03:40:54 +00:00
Devang Patel
90e19aad7d Do not construct DIE for already processed MDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 01:40:11 +00:00
Jakob Stoklund Olesen
170c41f3d5 Use skipInstruction() as a simpler way of iterating over instructions using SrcReg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 00:30:36 +00:00
Jakob Stoklund Olesen
d5bd68ed08 Use clEnumValN macro to work around keyword clash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 00:24:51 +00:00
Devang Patel
1d68d21bae Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 00:11:08 +00:00