OSDN Git Service

android-x86/external-llvm.git
14 years agoAdd support for parsing .size directives for ELF.
Eli Friedman [Sat, 17 Jul 2010 03:09:18 +0000 (03:09 +0000)]
Add support for parsing .size directives for ELF.

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

14 years agoMC/AsmParser: Lift Run() and TargetParser to base class.
Daniel Dunbar [Sat, 17 Jul 2010 02:26:10 +0000 (02:26 +0000)]
MC/AsmParser: Lift Run() and TargetParser to base class.

Also, add constructor function for creating AsmParser instances.

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

14 years agoadd BFI to getTargetNodeName()
Jim Grosbach [Sat, 17 Jul 2010 01:50:57 +0000 (01:50 +0000)]
add BFI to getTargetNodeName()

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

14 years agoFix logic think-o
Jim Grosbach [Sat, 17 Jul 2010 01:22:19 +0000 (01:22 +0000)]
Fix logic think-o

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

14 years agoRemove unnecessary check that was subsumed into canRealignStack.
Eric Christopher [Sat, 17 Jul 2010 00:33:04 +0000 (00:33 +0000)]
Remove unnecessary check that was subsumed into canRealignStack.

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

14 years agoPropagate alloca alignment information via variable size object frame
Eric Christopher [Sat, 17 Jul 2010 00:28:22 +0000 (00:28 +0000)]
Propagate alloca alignment information via variable size object frame
information.

No functional change yet.

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

14 years agoMake more explicit and add some currently disabled error messages for
Eric Christopher [Sat, 17 Jul 2010 00:27:24 +0000 (00:27 +0000)]
Make more explicit and add some currently disabled error messages for
stack realignment on ARM.

Also check for function attributes as we do on X86 as well as
make explicit that we're checking can as well as needs in this function.

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

14 years agoMake comment a bit more clear as well as return statement since
Eric Christopher [Sat, 17 Jul 2010 00:25:41 +0000 (00:25 +0000)]
Make comment a bit more clear as well as return statement since
needsStackRealignment is currently checking the can conditions as well.

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

14 years agoUpdate comment.
Bill Wendling [Fri, 16 Jul 2010 23:10:00 +0000 (23:10 +0000)]
Update comment.

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

14 years agoAdd basic support to code-gen the ARM/Thumb2 bit-field insert (BFI) instruction
Jim Grosbach [Fri, 16 Jul 2010 23:05:05 +0000 (23:05 +0000)]
Add basic support to code-gen the ARM/Thumb2 bit-field insert (BFI) instruction
and a combine pattern to use it for setting a bit-field to a constant
value. More to come for non-constant stores.

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

14 years agoFix whitespace.
Dan Gohman [Fri, 16 Jul 2010 22:58:39 +0000 (22:58 +0000)]
Fix whitespace.

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

14 years agoConsider this function:
Bill Wendling [Fri, 16 Jul 2010 22:51:10 +0000 (22:51 +0000)]
Consider this function:

  void foo() { __builtin_unreachable(); }

It will output the following on Darwin X86:

_func1:
Leh_func_begin0:
        pushq %rbp
Ltmp0:
        movq %rsp, %rbp
Ltmp1:
Leh_func_end0:

This prolog adds a new Call Frame Information (CFI) row to the FDE with an
address that is not within the address range of the code it describes -- part is
equal to the end of the function -- and therefore results in an invalid EH
frame. If we emit a nop in this situation, then the CFI row is now within the
address range.

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

14 years agoRemove the isMoveInstr() hook.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 22:35:46 +0000 (22:35 +0000)]
Remove the isMoveInstr() hook.

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

14 years agoAvoid isMoveInstr when printing XCore pseudo-moves.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 22:35:37 +0000 (22:35 +0000)]
Avoid isMoveInstr when printing XCore pseudo-moves.

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

14 years agoUse MI.isCopy.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 22:35:34 +0000 (22:35 +0000)]
Use MI.isCopy.

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

14 years agoUse a small local function for a single remaining late isMoveInstr call in
Jakob Stoklund Olesen [Fri, 16 Jul 2010 22:35:32 +0000 (22:35 +0000)]
Use a small local function for a single remaining late isMoveInstr call in
Thumb2ITBlockPass.

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

14 years agoRename DBG_LABEL PROLOG_LABEL, because it's only used during prolog emission and
Bill Wendling [Fri, 16 Jul 2010 22:20:36 +0000 (22:20 +0000)]
Rename DBG_LABEL PROLOG_LABEL, because it's only used during prolog emission and
thus is a much more meaningful name.

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

14 years agoKeep valgrind quiet.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 22:00:33 +0000 (22:00 +0000)]
Keep valgrind quiet.

The isLive() method can read uninitialized memory, but it still gives correct
results.

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

14 years agotidy up
Chris Lattner [Fri, 16 Jul 2010 21:20:46 +0000 (21:20 +0000)]
tidy up

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

14 years agoRemove remaining calls to TII::isMoveInstr.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 21:03:55 +0000 (21:03 +0000)]
Remove remaining calls to TII::isMoveInstr.

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

14 years agoEmit COPY instead of FMR/FMSD instructions for floating point conversion on
Jakob Stoklund Olesen [Fri, 16 Jul 2010 21:03:52 +0000 (21:03 +0000)]
Emit COPY instead of FMR/FMSD instructions for floating point conversion on
PowerPC.

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

14 years agoeliminate unlockedRefineAbstractTypeTo, types are all per-llvmcontext,
Chris Lattner [Fri, 16 Jul 2010 20:50:13 +0000 (20:50 +0000)]
eliminate unlockedRefineAbstractTypeTo, types are all per-llvmcontext,
so there is no locking involved in type refinement.

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

14 years agoget the first few tags from a precomputed table (count can be increased if desired)
Gabor Greif [Fri, 16 Jul 2010 20:35:19 +0000 (20:35 +0000)]
get the first few tags from a precomputed table (count can be increased if desired)

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

14 years agoAdd missing attributes to cpp backend.
Eli Friedman [Fri, 16 Jul 2010 18:47:20 +0000 (18:47 +0000)]
Add missing attributes to cpp backend.

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

14 years agoAccept registers with P modifier. PR 5314.
Dale Johannesen [Fri, 16 Jul 2010 18:35:46 +0000 (18:35 +0000)]
Accept registers with P modifier.  PR 5314.

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

14 years agoMake llvm-bcanalyzer print out the full enum name for all metadata
Dan Gohman [Fri, 16 Jul 2010 18:28:07 +0000 (18:28 +0000)]
Make llvm-bcanalyzer print out the full enum name for all metadata
code ids, not just some of them.

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

14 years agoTeach PPCInstrInfo::storeRegToStackSlot and loadRegFromStackSlot to add memory
Jakob Stoklund Olesen [Fri, 16 Jul 2010 18:22:00 +0000 (18:22 +0000)]
Teach PPCInstrInfo::storeRegToStackSlot and loadRegFromStackSlot to add memory
operands.

Hopefully this fixes the llvm-gcc-powerpc-darwin9 buildbot. It really shouldn't
since missing memoperands should not affect correctness.

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

14 years agoReorder the contents of various getAnalysisUsage functions, eliminating
Dan Gohman [Fri, 16 Jul 2010 17:58:45 +0000 (17:58 +0000)]
Reorder the contents of various getAnalysisUsage functions, eliminating
a redundant loopsimplify run from the default -O2 sequence.

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

14 years agoRevert r108369, sorting llvm.dbg.declare information by source position,
Dan Gohman [Fri, 16 Jul 2010 17:54:27 +0000 (17:54 +0000)]
Revert r108369, sorting llvm.dbg.declare information by source position,
since it doesn't work for front-ends which don't emit column information
(which includes llvm-gcc in its present configuration), and doesn't
work for clang for K&R style variables where the variables are declared
in a different order from the parameter list.

Instead, make a separate pass through the instructions to collect the
llvm.dbg.declare instructions in order. This ensures that the debug
information for variables is emitted in this order.

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

14 years agoRemove the X86::FP_REG_KILL pseudo-instruction and the X86FloatingPointRegKill
Jakob Stoklund Olesen [Fri, 16 Jul 2010 17:41:44 +0000 (17:41 +0000)]
Remove the X86::FP_REG_KILL pseudo-instruction and the X86FloatingPointRegKill
pass that inserted it.

It is no longer necessary to limit the live ranges of FP registers to a single
basic block.

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

14 years agoSearch for a free FP register instead of just assuming FP7 is not in use.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 17:41:40 +0000 (17:41 +0000)]
Search for a free FP register instead of just assuming FP7 is not in use.

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

14 years agoRemove the rest of my instcombine changes. Back to the drawing board on this one.
Owen Anderson [Fri, 16 Jul 2010 16:39:00 +0000 (16:39 +0000)]
Remove the rest of my instcombine changes.  Back to the drawing board on this one.

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

14 years agoAllow x87 FP registers to be alive globally in a function.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 16:38:12 +0000 (16:38 +0000)]
Allow x87 FP registers to be alive globally in a function.

FP_REG_KILL instructions are still inserted, but can be disabled by passing
-live-x87 to llc. The X87FPRegKillInserterPass is going to be removed shortly.

CFG edges are partioned into bundles where the x87 stack must be allocated
identically. Code is insertad at the end of each basic block that shuffles the
live FP registers to match the outgoing bundles expectations.

This fix is in preparation for some upcoming register allocator improvements
that may extend the live range of registers beyond a basic block, similar to
LICM. It also provides a nice runtime speedup if you are building with
-mfpmath=387.

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

14 years agoRemove extraneous semicolons after member functions
Douglas Gregor [Fri, 16 Jul 2010 15:03:23 +0000 (15:03 +0000)]
Remove extraneous semicolons after member functions

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

14 years agoFeed the right output into FileCheck.
Benjamin Kramer [Fri, 16 Jul 2010 10:58:02 +0000 (10:58 +0000)]
Feed the right output into FileCheck.

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

14 years agoeliminate CallInst::ArgOffset
Gabor Greif [Fri, 16 Jul 2010 09:38:02 +0000 (09:38 +0000)]
eliminate CallInst::ArgOffset

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

14 years agoGet rid of a bunch of duplicated ELF enum values.
Eli Friedman [Fri, 16 Jul 2010 07:53:29 +0000 (07:53 +0000)]
Get rid of a bunch of duplicated ELF enum values.

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

14 years agoA few more minor additions to ELF.h.
Eli Friedman [Fri, 16 Jul 2010 07:48:07 +0000 (07:48 +0000)]
A few more minor additions to ELF.h.

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

14 years agoRemove bogus link.
Eric Christopher [Fri, 16 Jul 2010 06:33:36 +0000 (06:33 +0000)]
Remove bogus link.

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

14 years agoArrays and vectors with different numbers of elements are not equivalent.
Nick Lewycky [Fri, 16 Jul 2010 06:31:12 +0000 (06:31 +0000)]
Arrays and vectors with different numbers of elements are not equivalent.

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

14 years agoRemove unnecessary conditional.
Eric Christopher [Fri, 16 Jul 2010 06:13:24 +0000 (06:13 +0000)]
Remove unnecessary conditional.

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

14 years agoLoopSimplify does not update domfrontier correctly.
Tobias Grosser [Fri, 16 Jul 2010 05:59:45 +0000 (05:59 +0000)]
LoopSimplify does not update domfrontier correctly.

This fixes PR7649.

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

14 years agoAdd dump() to DominanceFrontier
Tobias Grosser [Fri, 16 Jul 2010 05:59:39 +0000 (05:59 +0000)]
Add dump() to DominanceFrontier

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

14 years agoRemove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 04:45:42 +0000 (04:45 +0000)]
Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.

TII::isMoveInstr is going tobe completely removed.

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

14 years agoAdd forgotten test case.
Jakob Stoklund Olesen [Fri, 16 Jul 2010 04:45:35 +0000 (04:45 +0000)]
Add forgotten test case.

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

14 years agoUse the source-order scheduler instead of the "fast" scheduler at -O0,
Dan Gohman [Fri, 16 Jul 2010 02:01:19 +0000 (02:01 +0000)]
Use the source-order scheduler instead of the "fast" scheduler at -O0,
because it's more likely to keep debug line information in its original
order.

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

14 years agobuild/Darwin: Add an LLVM_LTO_VERSION_OFFSET make variable to allow offsetting
Daniel Dunbar [Fri, 16 Jul 2010 01:41:38 +0000 (01:41 +0000)]
build/Darwin: Add an LLVM_LTO_VERSION_OFFSET make variable to allow offsetting
the libLTO library version from the actual build version.

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

14 years agoAlso revert 108422, it's causing some test failures.
Eric Christopher [Fri, 16 Jul 2010 01:36:12 +0000 (01:36 +0000)]
Also revert 108422, it's causing some test failures.

Working on testcases for Owen.

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

14 years agobuild/Clang: Build and install libLTO as part of clang-only/install-clang targets.
Daniel Dunbar [Fri, 16 Jul 2010 01:29:50 +0000 (01:29 +0000)]
build/Clang: Build and install libLTO as part of clang-only/install-clang targets.

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

14 years agoFix this test.
Dan Gohman [Fri, 16 Jul 2010 01:28:45 +0000 (01:28 +0000)]
Fix this test.

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

14 years agoThe SelectionDAGBuilder's handling of debug info, on rare
Dale Johannesen [Fri, 16 Jul 2010 00:02:08 +0000 (00:02 +0000)]
The SelectionDAGBuilder's handling of debug info, on rare
occasions, caused code to be generated in a different order.
All cases I've seen involved float softening in the type
legalizer, and this could be perhaps be fixed there, but
it's better not to generate things differently in the first
place.  7797940 (6/29/2010..7/15/2010).

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

14 years agoRevert. This isn't the correct way to go.
Bill Wendling [Thu, 15 Jul 2010 23:42:21 +0000 (23:42 +0000)]
Revert. This isn't the correct way to go.

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

14 years agoFix the order that SCEVExpander considers add operands in so that
Dan Gohman [Thu, 15 Jul 2010 23:38:13 +0000 (23:38 +0000)]
Fix the order that SCEVExpander considers add operands in so that
it doesn't miss an opportunity to form a GEP, regardless of the
relative loop depths of the operands. This fixes rdar://8197217.

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

14 years agoHandle code gen for the unreachable instruction if it's the only instruction in
Bill Wendling [Thu, 15 Jul 2010 23:32:40 +0000 (23:32 +0000)]
Handle code gen for the unreachable instruction if it's the only instruction in
the function. We'll just turn it into a "trap" instruction instead.

The problem with not handling this is that it might generate a prologue without
the equivalent epilogue to go with it:

$ cat t.ll
define void @foo() {
entry:
  unreachable
}
$ llc -o - t.ll -relocation-model=pic -disable-fp-elim -unwind-tables
        .section        __TEXT,__text,regular,pure_instructions
        .globl  _foo
        .align  4, 0x90
_foo:                                   ## @foo
Leh_func_begin0:
## BB#0:                                ## %entry
        pushq   %rbp
Ltmp0:
        movq    %rsp, %rbp
Ltmp1:
Leh_func_end0:
...

The unwind tables then have bad data in them causing all sorts of problems.

Fixes <rdar://problem/8096481>.

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

14 years agoSplit -enable-finite-only-fp-math to two options:
Evan Cheng [Thu, 15 Jul 2010 22:07:12 +0000 (22:07 +0000)]
Split -enable-finite-only-fp-math to two options:
-enable-no-nans-fp-math and -enable-no-infs-fp-math. All of the current codegen fp math optimizations only care whether the fp arithmetics arguments and results can never be NaN.

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

14 years agobuild/Darwin: Add a missing directory dependency.
Daniel Dunbar [Thu, 15 Jul 2010 21:51:52 +0000 (21:51 +0000)]
build/Darwin: Add a missing directory dependency.

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

14 years agoremove some unneeded overloads that were causing
Chris Lattner [Thu, 15 Jul 2010 21:24:02 +0000 (21:24 +0000)]
remove some unneeded overloads that were causing
ambiguity problems on some systems.

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

14 years agofix the definitions of ConstTextCoalSection/ConstDataCoalSection
Chris Lattner [Thu, 15 Jul 2010 21:22:00 +0000 (21:22 +0000)]
fix the definitions of ConstTextCoalSection/ConstDataCoalSection
to keep "Text" in sync with the "pure instructions" section attribute.
Lack of this attribute was preventing the assembler from emitting
multibyte noops instructions for templates (and inlines, and other
coalesced stuff) and was causing the assembler to mismatch .o files.

This fixes rdar://8018335

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

14 years agofix indentation and 80 cols
Chris Lattner [Thu, 15 Jul 2010 21:19:31 +0000 (21:19 +0000)]
fix indentation and 80 cols

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

14 years agoRevert 108456. i.e. bring back r108444.
Devang Patel [Thu, 15 Jul 2010 20:57:09 +0000 (20:57 +0000)]
Revert 108456.  i.e. bring back r108444.

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

14 years agoRevert 108444. It breaks a build.
Devang Patel [Thu, 15 Jul 2010 20:25:51 +0000 (20:25 +0000)]
Revert 108444. It breaks a build.

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

14 years agoDon't merge uses when they are targetting fixup sites with
Dan Gohman [Thu, 15 Jul 2010 20:24:58 +0000 (20:24 +0000)]
Don't merge uses when they are targetting fixup sites with
different widths. In a use with a narrower fixup, formulae
may be wider than the fixup, in which case the high bits
aren't necessarily meaningful, so it isn't safe to reuse
them for uses with wider fixups.

This fixes PR7618, though the testcase is too large for a
reasonable regression test, since it heavily dependes on
hitting LSR's heuristics in a certain way.

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

14 years agofix the encoding of MMX_MOVFR642Qrr, it starts with 0xF2 not 0xF3,
Chris Lattner [Thu, 15 Jul 2010 20:13:34 +0000 (20:13 +0000)]
fix the encoding of MMX_MOVFR642Qrr, it starts with 0xF2 not 0xF3,
this fixes rdar://8192860.  Unfortunately it can only be triggered
with llc because llvm-mc matches another (correctly encoded) version
of this, so no testcase.

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

14 years agoUse dbgs() instead of errs() in a DEBUG.
Dan Gohman [Thu, 15 Jul 2010 20:12:42 +0000 (20:12 +0000)]
Use dbgs() instead of errs() in a DEBUG.

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

14 years agoUse std::vector instead of TargetRegisterInfo::FirstVirtualRegister.
Bill Wendling [Thu, 15 Jul 2010 20:04:36 +0000 (20:04 +0000)]
Use std::vector instead of TargetRegisterInfo::FirstVirtualRegister.

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

14 years agoTeach ScalarEvolution how to fold trunc(undef) and anyext(undef) to undef.
Dan Gohman [Thu, 15 Jul 2010 20:02:11 +0000 (20:02 +0000)]
Teach ScalarEvolution how to fold trunc(undef) and anyext(undef) to undef.
This helps LSR behave more consistently on bugpoint-reduced testcases.

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

14 years agoUse std::vector instead of TargetRegisterInfo::FirstVirtualRegister.
Bill Wendling [Thu, 15 Jul 2010 20:01:02 +0000 (20:01 +0000)]
Use std::vector instead of TargetRegisterInfo::FirstVirtualRegister.

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

14 years agoUse std::vector instead of TargetRegisterInfo::FirstVirtualRegister. This time
Bill Wendling [Thu, 15 Jul 2010 19:58:14 +0000 (19:58 +0000)]
Use std::vector instead of TargetRegisterInfo::FirstVirtualRegister. This time
make sure to allocate enough space in the std::vector.

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

14 years agoReserve a goodly amount of room for the vectors.
Bill Wendling [Thu, 15 Jul 2010 19:41:20 +0000 (19:41 +0000)]
Reserve a goodly amount of room for the vectors.

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

14 years agobuild/Darwin: Add support for embedding version information in tool executables.
Daniel Dunbar [Thu, 15 Jul 2010 19:33:38 +0000 (19:33 +0000)]
build/Darwin: Add support for embedding version information in tool executables.

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

14 years agoFix crash reported in PR7653.
Devang Patel [Thu, 15 Jul 2010 18:45:27 +0000 (18:45 +0000)]
Fix crash reported in PR7653.

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

14 years agoUse std::vector instead of TargetRegisterInfo::FirstVirtualRegister.
Bill Wendling [Thu, 15 Jul 2010 18:43:09 +0000 (18:43 +0000)]
Use std::vector instead of TargetRegisterInfo::FirstVirtualRegister.

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

14 years agoUse std::vector instead of TargetRegisterInfo::FirstVirtualRegister.
Bill Wendling [Thu, 15 Jul 2010 18:40:50 +0000 (18:40 +0000)]
Use std::vector instead of TargetRegisterInfo::FirstVirtualRegister.

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

14 years agoSpeculatively revert r108429 to fix the clang self-host.
Owen Anderson [Thu, 15 Jul 2010 18:18:57 +0000 (18:18 +0000)]
Speculatively revert r108429 to fix the clang self-host.

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

14 years agoPer Chris' suggestion, get rid of the select canonicalization and just add
Owen Anderson [Thu, 15 Jul 2010 17:24:23 +0000 (17:24 +0000)]
Per Chris' suggestion, get rid of the select canonicalization and just add
the corresponding or-icmp-and pattern.  This has the added benefit of doing
the matching earlier, and thus being less susceptible to being confused by
earlier transforms.

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

14 years agoRemove unneeded check, and correct style.
Owen Anderson [Thu, 15 Jul 2010 16:38:22 +0000 (16:38 +0000)]
Remove unneeded check, and correct style.

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

14 years agoWatch out for a constant offset cancelling out a base register, forming
Dan Gohman [Thu, 15 Jul 2010 15:14:45 +0000 (15:14 +0000)]
Watch out for a constant offset cancelling out a base register, forming
a zero. This situation arrises in Fortran code with induction variables
that start at 1 instead of 0. This fixes PR7651.

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

14 years agoReapply r108378, with bugfixes, testcase, and improved comment formatting.
Owen Anderson [Thu, 15 Jul 2010 15:00:23 +0000 (15:00 +0000)]
Reapply r108378, with bugfixes, testcase, and improved comment formatting.
This now passes LIT, nighty test, and llvm-gcc bootstrap on my machine.

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

14 years agocache another dereferenced iterator
Gabor Greif [Thu, 15 Jul 2010 10:19:23 +0000 (10:19 +0000)]
cache another dereferenced iterator

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

14 years ago80-col.
Eric Christopher [Thu, 15 Jul 2010 07:49:30 +0000 (07:49 +0000)]
80-col.

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

14 years agorevert bill's patches in an attempt to fix the buildbot.
Chris Lattner [Thu, 15 Jul 2010 06:51:46 +0000 (06:51 +0000)]
revert bill's patches in an attempt to fix the buildbot.

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

14 years agoThis is a full sentence.
Nick Lewycky [Thu, 15 Jul 2010 06:51:22 +0000 (06:51 +0000)]
This is a full sentence.

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

14 years agoDisable aliases on all platforms.
Nick Lewycky [Thu, 15 Jul 2010 06:48:56 +0000 (06:48 +0000)]
Disable aliases on all platforms.

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

14 years agoCorrectly set rpath on Mac OS X for executable tools. Note that I am not certain...
Ted Kremenek [Thu, 15 Jul 2010 06:36:57 +0000 (06:36 +0000)]
Correctly set rpath on Mac OS X for executable tools.  Note that I am not certain this is the best fix; the code immediately above looks confused, as it first checks to see if we are NOT on Darwin and then checks the Darwin version number.  This fix allows c-index-test (in Clang) to run outside of running the regression test suite.  I would appreciate if someone reviewed this.

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

14 years agoFix PR7647, handling the case when 'To' ends up being
Chris Lattner [Thu, 15 Jul 2010 06:36:08 +0000 (06:36 +0000)]
Fix PR7647, handling the case when 'To' ends up being
mutated by recursive simplification.  This also enhances
ReplaceAndSimplifyAllUses to actually do a real RAUW
at the end of it, which updates any value handles
pointing to "From" to start pointing to "To".  This
seems useful for debug info and random other VH users.

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

14 years agomake various clients of ReplaceAndSimplifyAllUses tolerate
Chris Lattner [Thu, 15 Jul 2010 06:06:04 +0000 (06:06 +0000)]
make various clients of ReplaceAndSimplifyAllUses tolerate
it *changing* the things it replaces, not just causing them
to drop to null.  There is no functionality change yet, but
this is required for a subsequent patch.

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

14 years agoFix headers.
Bill Wendling [Thu, 15 Jul 2010 06:05:18 +0000 (06:05 +0000)]
Fix headers.

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

14 years agoUse std::vector instead of a hard-coded array. The length of that array could
Bill Wendling [Thu, 15 Jul 2010 06:04:38 +0000 (06:04 +0000)]
Use std::vector instead of a hard-coded array. The length of that array could
get *very* large, but we only need it to be the size of the number of pregs.

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

14 years agoUse std::vector instead of a hard-coded array. The length of that array could
Bill Wendling [Thu, 15 Jul 2010 05:56:32 +0000 (05:56 +0000)]
Use std::vector instead of a hard-coded array. The length of that array could
get *very* large, but we only need it to be the size of thenumber of pregs.

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

14 years agosee comment.
Chris Lattner [Thu, 15 Jul 2010 05:17:36 +0000 (05:17 +0000)]
see comment.

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

14 years agoadd an accessor.
Chris Lattner [Thu, 15 Jul 2010 05:14:01 +0000 (05:14 +0000)]
add an accessor.

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

14 years agoRevert r108401; it breaks bootstrap :(
Eli Friedman [Thu, 15 Jul 2010 05:09:31 +0000 (05:09 +0000)]
Revert r108401; it breaks bootstrap :(

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

14 years agoAdd AssertingVH which makes PR7647 break consistently.
Eli Friedman [Thu, 15 Jul 2010 04:46:14 +0000 (04:46 +0000)]
Add AssertingVH which makes PR7647 break consistently.

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

14 years agoRandom note about bswap.
Eli Friedman [Thu, 15 Jul 2010 02:20:38 +0000 (02:20 +0000)]
Random note about bswap.

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

14 years agoa more graceful fix for test/Other/inline-asm-newline-terminator.ll,
Chris Lattner [Thu, 15 Jul 2010 00:37:34 +0000 (00:37 +0000)]
a more graceful fix for test/Other/inline-asm-newline-terminator.ll,
follow on to r103765

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

14 years agoSpeculatively revert r108378; may be causing bootstrap failures.
Eli Friedman [Thu, 15 Jul 2010 00:33:00 +0000 (00:33 +0000)]
Speculatively revert r108378; may be causing bootstrap failures.

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

14 years agoLast COPY conversion.
Jakob Stoklund Olesen [Wed, 14 Jul 2010 23:58:21 +0000 (23:58 +0000)]
Last COPY conversion.

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

14 years agoRemove restriction on NEON alignment values. Some of the NEON ld/st
Bob Wilson [Wed, 14 Jul 2010 23:54:43 +0000 (23:54 +0000)]
Remove restriction on NEON alignment values.  Some of the NEON ld/st
instructions use different values (e.g., 2-byte or 4-byte alignment).
Also fix ARMInstPrinter to print these alignments as bits instead of bytes.

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

14 years agoUse TargetOpcode::COPY instead of X86-native register copy instructions when
Jakob Stoklund Olesen [Wed, 14 Jul 2010 23:50:27 +0000 (23:50 +0000)]
Use TargetOpcode::COPY instead of X86-native register copy instructions when
lowering atomics. This will allow those copies to still be coalesced after
TII::isMoveInstr is removed.

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

14 years agoRemove the entire docs directory from Apple-style builds.
Bob Wilson [Wed, 14 Jul 2010 23:49:18 +0000 (23:49 +0000)]
Remove the entire docs directory from Apple-style builds.
This fixes a "usr_junk" verification failure when installing into /usr.

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