oota-llvm.git
12 years agoAdd a TargetOption for disabling tail calls.
Nick Lewycky [Thu, 19 Jan 2012 00:34:10 +0000 (00:34 +0000)]
Add a TargetOption for disabling tail calls.

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

12 years agoRename Finalizebundle to finalizeBundle to conform to coding guideline.
Evan Cheng [Thu, 19 Jan 2012 00:06:10 +0000 (00:06 +0000)]
Rename Finalizebundle to finalizeBundle to conform to coding guideline.

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

12 years agoAdd experimental -x86-use-regmask command line option.
Jakob Stoklund Olesen [Wed, 18 Jan 2012 23:52:22 +0000 (23:52 +0000)]
Add experimental -x86-use-regmask command line option.

It adds register mask operands to x86 call instructions.  Once all the
backend passes support register mask operands, this will be permanently
enabled.

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

12 years agoIgnore register mask operands when lowering instructions to MC.
Jakob Stoklund Olesen [Wed, 18 Jan 2012 23:52:19 +0000 (23:52 +0000)]
Ignore register mask operands when lowering instructions to MC.

This is similar to implicit register operands.  MC doesn't understand
register liveness and call clobbers.

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

12 years agoAdd a RegisterMaskSDNode class.
Jakob Stoklund Olesen [Wed, 18 Jan 2012 23:52:12 +0000 (23:52 +0000)]
Add a RegisterMaskSDNode class.

This SelectionDAG node will be attached to call nodes by LowerCall(),
and eventually becomes a MO_RegisterMask MachineOperand on the
MachineInstr representing the call instruction.

LowerCall() will attach a register mask that depends on the calling
convention.

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

12 years agoAdd support for the gnueabihf environment. Patch by Sylvestre Ledru.
Rafael Espindola [Wed, 18 Jan 2012 23:35:29 +0000 (23:35 +0000)]
Add support for the gnueabihf environment. Patch by Sylvestre Ledru.

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

12 years agoThumb2 alternate syntax for LDR(literal) and friends.
Jim Grosbach [Wed, 18 Jan 2012 22:46:46 +0000 (22:46 +0000)]
Thumb2 alternate syntax for LDR(literal) and friends.

Explicit pc-relative syntax. For example, "ldrb r2, [pc, #-22]".

rdar://10250964

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

12 years agoProcess instructions after match to select alternative encoding which may be more...
Devang Patel [Wed, 18 Jan 2012 22:42:29 +0000 (22:42 +0000)]
Process instructions after match to select alternative encoding which may be more desirable.

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

12 years agoReplace FIXME with explanatory comment.
Jim Grosbach [Wed, 18 Jan 2012 22:04:42 +0000 (22:04 +0000)]
Replace FIXME with explanatory comment.

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

12 years agoThumb2 relaxation for LDR(literal).
Jim Grosbach [Wed, 18 Jan 2012 21:54:16 +0000 (21:54 +0000)]
Thumb2 relaxation for LDR(literal).

If the fixup is out of range for the Thumb1 instruction, relax it
to the Thumb2 encoding instead.

rdar://10711829

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

12 years agoMCAssembler tweak for determining when a symbol difference is resolved.
Jim Grosbach [Wed, 18 Jan 2012 21:54:12 +0000 (21:54 +0000)]
MCAssembler tweak for determining when a symbol difference is resolved.

If the two fragments are in the same Atom, then the difference
expression is resolvable at compile time. Previously we were checking
that they were in the same fragment, but that breaks down in the
presence of instruction relaxation which has multiple fragments in the
same atom.

rdar://10711829

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

12 years agoRename pattern for clarity.
Jim Grosbach [Wed, 18 Jan 2012 21:54:09 +0000 (21:54 +0000)]
Rename pattern for clarity.

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

12 years agoAdd a depth limit to avoid runaway recursion.
Dan Gohman [Wed, 18 Jan 2012 21:24:45 +0000 (21:24 +0000)]
Add a depth limit to avoid runaway recursion.

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

12 years agoUse llvm.global_ctors to locate global constructors instead
Dan Gohman [Wed, 18 Jan 2012 21:19:38 +0000 (21:19 +0000)]
Use llvm.global_ctors to locate global constructors instead
of recognizing them by name.

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

12 years agoRemove trailing spaces and unneeded includes.
Jakub Staszak [Wed, 18 Jan 2012 21:16:33 +0000 (21:16 +0000)]
Remove trailing spaces and unneeded includes.

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

12 years agoDocument the fact that the selection dag changes the vselect condition type
Nadav Rotem [Wed, 18 Jan 2012 20:50:30 +0000 (20:50 +0000)]
Document the fact that the selection dag changes the vselect condition type

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

12 years agoFixed macro condition.
Lang Hames [Wed, 18 Jan 2012 19:48:31 +0000 (19:48 +0000)]
Fixed macro condition.

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

12 years agoTidy up. 80 columns.
Jim Grosbach [Wed, 18 Jan 2012 18:52:20 +0000 (18:52 +0000)]
Tidy up. 80 columns.

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

12 years agoTidy up. MCAsmBackend naming conventions.
Jim Grosbach [Wed, 18 Jan 2012 18:52:16 +0000 (18:52 +0000)]
Tidy up. MCAsmBackend naming conventions.

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

12 years agoRemove dead code.
Bill Wendling [Wed, 18 Jan 2012 10:10:28 +0000 (10:10 +0000)]
Remove dead code.

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

12 years agoFix a bug in the type-legalization of vector integers. When we bitcast one vector...
Nadav Rotem [Wed, 18 Jan 2012 08:33:18 +0000 (08:33 +0000)]
Fix a bug in the type-legalization of vector integers. When we bitcast one vector type to another, we must not bitcast the result if one type is widened while the other is promoted.

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

12 years agoFix ISD::REG_SEQUENCE to accept physical registers and change TwoAddressInstructionPa...
Pete Cooper [Wed, 18 Jan 2012 04:16:16 +0000 (04:16 +0000)]
Fix ISD::REG_SEQUENCE to accept physical registers and change TwoAddressInstructionPass to insert copies for any physical reg operands of the REG_SEQUENCE

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

12 years agoThumb2 load/store fixups don't set the thumb bit.
Jim Grosbach [Wed, 18 Jan 2012 00:40:25 +0000 (00:40 +0000)]
Thumb2 load/store fixups don't set the thumb bit.

Load/store instructions w/ a fixup to be relative a function marked as thumb
don't use the low bit to specify thumb vs. non-thumb like interworking
branches do, so don't set it when dealing with those fixups.

rdar://10348687.

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

12 years agoMove some ARM specific MCAssmebler bits into the ARMAsmBackend.
Jim Grosbach [Wed, 18 Jan 2012 00:23:57 +0000 (00:23 +0000)]
Move some ARM specific MCAssmebler bits into the ARMAsmBackend.

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

12 years agoAdd a CoveredBySubRegs property to Register descriptions.
Jakob Stoklund Olesen [Wed, 18 Jan 2012 00:16:39 +0000 (00:16 +0000)]
Add a CoveredBySubRegs property to Register descriptions.

When set, this bit indicates that a register is completely defined by
the value of its sub-registers.

Use the CoveredBySubRegs property to infer which super-registers are
call-preserved given a list of callee-saved registers.  For example, the
ARM registers D8-D15 are callee-saved.  This now automatically implies
that Q4-Q7 are call-preserved.

Conversely, Win64 callees save XMM6-XMM15, but the corresponding
YMM6-YMM15 registers are not call-preserved because they are not fully
defined by their sub-registers.

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

12 years ago[lit] Add a --filter option which is useful when dealing with virtual test
Daniel Dunbar [Wed, 18 Jan 2012 00:03:12 +0000 (00:03 +0000)]
[lit] Add a --filter option which is useful when dealing with virtual test
paths.

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

12 years agoRemove unneeded include.
Jakub Staszak [Tue, 17 Jan 2012 23:53:08 +0000 (23:53 +0000)]
Remove unneeded include.

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

12 years agoImplement ARMBaseRegisterInfo::getCallPreservedMask().
Jakob Stoklund Olesen [Tue, 17 Jan 2012 23:09:00 +0000 (23:09 +0000)]
Implement ARMBaseRegisterInfo::getCallPreservedMask().

Move ARM callee-saved lists into ARMCallingConv.td.

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

12 years agoFix MCJIT memory leak of owned TargetMachine.
Jim Grosbach [Tue, 17 Jan 2012 23:08:46 +0000 (23:08 +0000)]
Fix MCJIT memory leak of owned TargetMachine.

The JIT is expected to take ownership of the TM that's passed in. The MCJIT
wasn't freeing it, resulting in leaks.

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

12 years agoMove X86 callee saved register lists to the X86CallConv .td file.
Jakob Stoklund Olesen [Tue, 17 Jan 2012 22:47:01 +0000 (22:47 +0000)]
Move X86 callee saved register lists to the X86CallConv .td file.

Add a trivial implementation of the getCallPreservedMask() hook.

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

12 years agoAdd TableGen support for callee saved registers.
Jakob Stoklund Olesen [Tue, 17 Jan 2012 22:46:58 +0000 (22:46 +0000)]
Add TableGen support for callee saved registers.

Targets can now add CalleeSavedRegs defs to their *CallingConv.td file.
TableGen will use this to create a *_SaveList array suitable for
returning from getCalleeSavedRegs() as well as a *_RegMask bit mask
suitable for returning from getCallPreservedMask().

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

12 years agoTest case rename
Andrew Trick [Tue, 17 Jan 2012 22:27:45 +0000 (22:27 +0000)]
Test case rename

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

12 years agoMove includes to the .cpp file.
Jakub Staszak [Tue, 17 Jan 2012 22:16:31 +0000 (22:16 +0000)]
Move includes to the .cpp file.

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

12 years agoMC tweak symbol difference resolution for non-local symbols.
Jim Grosbach [Tue, 17 Jan 2012 22:14:39 +0000 (22:14 +0000)]
MC tweak symbol difference resolution for non-local symbols.

When the non-local symbol in the expression is in the same fragment
as the second symbol, the assembler can still evaluate the expression
without needing a relocation.

For example, on ARM:
_foo:
ldr lr, (_foo - 4)

rdar://10348687

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

12 years agoTidy up.
Jim Grosbach [Tue, 17 Jan 2012 22:03:42 +0000 (22:03 +0000)]
Tidy up.

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

12 years agoIntel syntax: Fix parser match class to check memory operand size.
Devang Patel [Tue, 17 Jan 2012 21:48:03 +0000 (21:48 +0000)]
Intel syntax: Fix parser match class to check memory operand size.

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

12 years agoTransform: (EXTRACT_VECTOR_ELT( VECTOR_SHUFFLE )) -> EXTRACT_VECTOR_ELT.
Nadav Rotem [Tue, 17 Jan 2012 21:44:01 +0000 (21:44 +0000)]
Transform: (EXTRACT_VECTOR_ELT( VECTOR_SHUFFLE )) -> EXTRACT_VECTOR_ELT.

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

12 years agoIntel syntax: Parse "BYTE PTR [RDX + RCX]"
Devang Patel [Tue, 17 Jan 2012 21:25:10 +0000 (21:25 +0000)]
Intel syntax: Parse "BYTE PTR [RDX + RCX]"

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

12 years agoTrailing spaces.
Jakub Staszak [Tue, 17 Jan 2012 20:58:08 +0000 (20:58 +0000)]
Trailing spaces.

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

12 years agoAdd a new ObjC ARC optimization pass to eliminate unneeded
Dan Gohman [Tue, 17 Jan 2012 20:52:24 +0000 (20:52 +0000)]
Add a new ObjC ARC optimization pass to eliminate unneeded
autorelease push+pop pairs.

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

12 years agoAdd a new PassManagerBuilder customization point,
Dan Gohman [Tue, 17 Jan 2012 20:51:32 +0000 (20:51 +0000)]
Add a new PassManagerBuilder customization point,
EP_ModuleOptimizerEarly, to allow passes to be added before the
main ModulePass optimizers.

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

12 years agoUntabify.
Devang Patel [Tue, 17 Jan 2012 19:09:22 +0000 (19:09 +0000)]
Untabify.

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

12 years agoIntel syntax: Do not unncessarily create plus expression for memory operand displacement.
Devang Patel [Tue, 17 Jan 2012 19:08:07 +0000 (19:08 +0000)]
Intel syntax: Do not unncessarily create plus expression for memory operand displacement.

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

12 years agoIntel syntax: Ignore mnemonic aliases.
Devang Patel [Tue, 17 Jan 2012 18:30:45 +0000 (18:30 +0000)]
Intel syntax: Ignore mnemonic aliases.

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

12 years agoRemove "XFAIL: arm" from test/ExecutionEngine/test-return.ll
Eli Bendersky [Tue, 17 Jan 2012 18:21:05 +0000 (18:21 +0000)]
Remove "XFAIL: arm" from test/ExecutionEngine/test-return.ll

The test passes on ARM bots

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

12 years agoIntel syntax: Robustify memory operand parsing.
Devang Patel [Tue, 17 Jan 2012 18:00:18 +0000 (18:00 +0000)]
Intel syntax: Robustify memory operand parsing.

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

12 years agoAdd an LLDB data formatter script for llvm::SmallVector, maybe this is helpful to...
Benjamin Kramer [Tue, 17 Jan 2012 14:52:12 +0000 (14:52 +0000)]
Add an LLDB data formatter script for llvm::SmallVector, maybe this is helpful to someone else.

This lets lldb give sane output for SmallVectors, e.g.
Before:
(lldb) p sv
(llvm::SmallVector<int, 10>) $0 = {
  (llvm::SmallVectorImpl<int>) llvm::SmallVectorImpl<int> = {
    (llvm::SmallVectorTemplateBase<int>) llvm::SmallVectorTemplateBase<int> = {
      (llvm::SmallVectorTemplateCommon<int>) llvm::SmallVectorTemplateCommon<int> = {
        (llvm::SmallVectorBase) llvm::SmallVectorBase = {
          (void *) BeginX = 0x00007fff5fbff960
...
}

After:
(lldb) p sv
(llvm::SmallVector<int, 10>) $0 = {
  (int) [0] = 42
  (int) [1] = 23
...
}

The script is still a bit rough so expect crashes for vectors of complex types.
Synthetic children are _not_ available in xcode 4.2, newer LLDBs should work though.

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

12 years agoRemoves template magic to build up containers.
Manuel Klimek [Tue, 17 Jan 2012 09:34:07 +0000 (09:34 +0000)]
Removes template magic to build up containers.

Instead, we now put the attributes of the container into members.

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

12 years agoFix warning.
Nadav Rotem [Tue, 17 Jan 2012 09:31:09 +0000 (09:31 +0000)]
Fix warning.

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

12 years agoAdditional ExecutionEngine tests, as part of bringing up the MCJIT on ELF
Eli Bendersky [Tue, 17 Jan 2012 09:14:54 +0000 (09:14 +0000)]
Additional ExecutionEngine tests, as part of bringing up the MCJIT on ELF
implementation.
Currently lit still executes ExecutionEngine tests with JIT (not MCJIT) by
default. MCJIT tests can be executed manually by calling llvm-lit with
--param jit_impl=mcjit

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

12 years agoFix 11769.
Nadav Rotem [Tue, 17 Jan 2012 09:13:19 +0000 (09:13 +0000)]
Fix 11769.

In CanXFormVExtractWithShuffleIntoLoad we assumed that EXTRACT_VECTOR_ELT can be later handled by the DAGCombiner.
However, in some cases on AVX, the EXTRACT_VECTOR_ELT is legalized to EXTRACT_SUBVECTOR + EXTRACT_VECTOR_ELT, which
currently is not handled by the DAGCombiner. In this patch I added a check that we only extract from the XMM part.

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

12 years agoTeach DAG combiner to turn a BUILD_VECTOR of UNDEFs into an UNDEF of vector type.
Craig Topper [Tue, 17 Jan 2012 09:09:48 +0000 (09:09 +0000)]
Teach DAG combiner to turn a BUILD_VECTOR of UNDEFs into an UNDEF of vector type.

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

12 years agoRemove unnecessary AVX check from an assert. hasSSE2 is enough.
Craig Topper [Tue, 17 Jan 2012 08:23:44 +0000 (08:23 +0000)]
Remove unnecessary AVX check from an assert. hasSSE2 is enough.

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

12 years agoProvide better messages in llvm_unreachable.
David Blaikie [Tue, 17 Jan 2012 07:00:13 +0000 (07:00 +0000)]
Provide better messages in llvm_unreachable.

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

12 years agomisched: Inital interface and implementation for ScheduleTopDownLive and ShuffleInstr...
Andrew Trick [Tue, 17 Jan 2012 06:55:07 +0000 (06:55 +0000)]
misched: Inital interface and implementation for ScheduleTopDownLive and ShuffleInstructions.

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

12 years agoRenamed MachineScheduler to ScheduleTopDownLive.
Andrew Trick [Tue, 17 Jan 2012 06:55:03 +0000 (06:55 +0000)]
Renamed MachineScheduler to ScheduleTopDownLive.

Responding to code review.

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

12 years agoMoving options declarations around.
Andrew Trick [Tue, 17 Jan 2012 06:54:59 +0000 (06:54 +0000)]
Moving options declarations around.

More short term hackery until we have a way to configure passes that work on LiveIntervals.

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

12 years agoLSR fix: broaden the check for loop preheaders.
Andrew Trick [Tue, 17 Jan 2012 06:45:52 +0000 (06:45 +0000)]
LSR fix: broaden the check for loop preheaders.

It's becoming clear that LoopSimplify needs to unconditionally create loop preheaders. But that is a bigger fix. For now, continuing to hack LSR.
Fixes rdar://10701050 "Cannot split an edge from an IndirectBrInst" assert.

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

12 years agoFix a crasher when PerformShiftCombine receives a BUILD_VECTOR of all UNDEF. Probably...
Craig Topper [Tue, 17 Jan 2012 04:44:50 +0000 (04:44 +0000)]
Fix a crasher when PerformShiftCombine receives a BUILD_VECTOR of all UNDEF. Probably could use better handling in DAG combine or getNode. Fixes PR11772.

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

12 years agoRemove unreachable code. (replace with llvm_unreachable to help GCC where necessary)
David Blaikie [Tue, 17 Jan 2012 04:43:56 +0000 (04:43 +0000)]
Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary)

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

12 years agoAdd 148175 back. I am unable to reproduce any non determinism in a dragonegg
Rafael Espindola [Tue, 17 Jan 2012 04:19:20 +0000 (04:19 +0000)]
Add 148175 back. I am unable to reproduce any non determinism in a dragonegg
or clang bootstrap.

I will keep an eye on the bots.

Original message:
Only emit the Leh_func_endN symbol when needed.

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

12 years agoMakefile: add missing files to FilesToConfig
Dylan Noblesmith [Tue, 17 Jan 2012 02:56:49 +0000 (02:56 +0000)]
Makefile: add missing files to FilesToConfig

And fix the comment about where the FilesToConfig variable
is.

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

12 years agoChanged flag operand of ISD::FP_ROUND to TargetConstant as it should not get checked...
Pete Cooper [Tue, 17 Jan 2012 01:54:07 +0000 (01:54 +0000)]
Changed flag operand of ISD::FP_ROUND to TargetConstant as it should not get checked for legalisation

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

12 years agoadd some missing const qualifiers.
Chris Lattner [Tue, 17 Jan 2012 01:31:32 +0000 (01:31 +0000)]
add some missing const qualifiers.

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

12 years agoAdd portable bit mask operations to BitVector.
Jakob Stoklund Olesen [Tue, 17 Jan 2012 01:24:32 +0000 (01:24 +0000)]
Add portable bit mask operations to BitVector.

BitVector uses the native word size for its internal representation.
That doesn't work well for literal bit masks in source code.

This patch adds BitVector operations to efficiently apply literal bit
masks specified as arrays of uint32_t.  Since each array entry always
holds exactly 32 bits, these portable bit masks can be source code
literals, probably produced by TableGen.

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

12 years agoFix typo in comment.
Lang Hames [Tue, 17 Jan 2012 00:39:29 +0000 (00:39 +0000)]
Fix typo in comment.

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

12 years agoTidy up.
Jim Grosbach [Mon, 16 Jan 2012 23:50:58 +0000 (23:50 +0000)]
Tidy up.

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

12 years agoExecutionEngine interface to re-map addresses for engines that support it.
Jim Grosbach [Mon, 16 Jan 2012 23:50:55 +0000 (23:50 +0000)]
ExecutionEngine interface to re-map addresses for engines that support it.

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

12 years agoMCJIT handle a few more simple x86 relocations for MachO.
Jim Grosbach [Mon, 16 Jan 2012 23:50:49 +0000 (23:50 +0000)]
MCJIT handle a few more simple x86 relocations for MachO.

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

12 years agoRemoving unused default switch cases in switches over enums that already account...
David Blaikie [Mon, 16 Jan 2012 23:24:27 +0000 (23:24 +0000)]
Removing unused default switch cases in switches over enums that already account for all enumeration values explicitly.

(This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them)

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

12 years agoCleanup PPC RLWINM8 vs RLWINM
Hal Finkel [Mon, 16 Jan 2012 23:22:50 +0000 (23:22 +0000)]
Cleanup PPC RLWINM8 vs RLWINM

No test case: output assembly will be identical.

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

12 years agoAggressiveAntiDepBreaker needs to skip debug values because a debug value does not...
Hal Finkel [Mon, 16 Jan 2012 22:53:41 +0000 (22:53 +0000)]
AggressiveAntiDepBreaker needs to skip debug values because a debug value does not have a corresponding SUnit

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

12 years agoExtract method for detecting constant unallocatable physregs.
Jakob Stoklund Olesen [Mon, 16 Jan 2012 22:34:08 +0000 (22:34 +0000)]
Extract method for detecting constant unallocatable physregs.

It is safe to move uses of such registers.

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

12 years agoMCJIT support for non-function sections.
Jim Grosbach [Mon, 16 Jan 2012 22:26:39 +0000 (22:26 +0000)]
MCJIT support for non-function sections.

Move to a by-section allocation and relocation scheme. This allows
better support for sections which do not contain externally visible
symbols.

Flesh out the relocation address vs. local storage address separation a
bit more as well. Remote process JITs use this to tell the relocation
resolution code where the code will live when it executes.

The startFunctionBody/endFunctionBody interfaces to the JIT and the
memory manager are deprecated. They'll stick around for as long as the
old JIT does, but the MCJIT doesn't use them anymore.

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

12 years agoFixed comment in loop-unswitch.
Stepan Dyatkovskiy [Mon, 16 Jan 2012 20:48:04 +0000 (20:48 +0000)]
Fixed comment in loop-unswitch.

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

12 years agoGive better scavenger errors by invoking the verifier.
Jakob Stoklund Olesen [Mon, 16 Jan 2012 20:38:31 +0000 (20:38 +0000)]
Give better scavenger errors by invoking the verifier.

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

12 years agoAdd a new kind of MachineOperand: MO_RegisterMask.
Jakob Stoklund Olesen [Mon, 16 Jan 2012 19:22:00 +0000 (19:22 +0000)]
Add a new kind of MachineOperand: MO_RegisterMask.

Register masks will be used as a compact representation of large clobber
lists.  Currently, an x86 call instruction has some 40 operands
representing call-clobbered registers.  That's more than 1kB of useless
operands per call site.

A register mask operand references a bit mask of call-preserved
registers, everything else is clobbered.  The bit mask will typically
come from TargetRegisterInfo::getCallPreservedMask().

By abandoning ImplicitDefs for call-clobbered registers, it also becomes
possible to share call instruction descriptions between calling
conventions, and we can get rid of the WINCALL* instructions.

This patch introduces the new operand kind.  Future patches will add
RegMask support to target-independent passes before finally the fixed
clobber lists can be removed from call instruction descriptions.

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

12 years agoMake sure the non-SSE lowering for fences correctly clobbers EFLAGS. PR11768.
Eli Friedman [Mon, 16 Jan 2012 16:42:21 +0000 (16:42 +0000)]
Make sure the non-SSE lowering for fences correctly clobbers EFLAGS.  PR11768.

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

12 years agoGet rid of unused codegen-only instruction.
Eli Friedman [Mon, 16 Jan 2012 16:29:35 +0000 (16:29 +0000)]
Get rid of unused codegen-only instruction.

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

12 years agoAdding a Hexagon cell for segmented stacks, as they have been implemented for X86...
Joe Abbey [Mon, 16 Jan 2012 13:16:05 +0000 (13:16 +0000)]
Adding a Hexagon cell for segmented stacks, as they have been implemented for X86 and not Sparc...

Committed as obvious

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

12 years agoGive priority to AVX over SSE for 128-bit floating point unpck instructions.
Craig Topper [Mon, 16 Jan 2012 09:56:42 +0000 (09:56 +0000)]
Give priority to AVX over SSE for 128-bit floating point unpck instructions.

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

12 years agoA fix for the previous commit: "integer constant is too large for ‘long’ type" error...
Eli Bendersky [Mon, 16 Jan 2012 09:31:10 +0000 (09:31 +0000)]
A fix for the previous commit: "integer constant is too large for ‘long’ type" error on some 32-bit bots

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

12 years agoAdding a basic ELF dynamic loader and MC-JIT for ELF. Functionality is currently...
Eli Bendersky [Mon, 16 Jan 2012 08:56:09 +0000 (08:56 +0000)]
Adding a basic ELF dynamic loader and MC-JIT for ELF. Functionality is currently basic and will be enhanced with future patches.
Patch developed by Andy Kaylor and Daniel Malea. Reviewed on llvm-commits.

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

12 years agoRefactor variables unused under non-assert builds (& remove two entirely unused varia...
David Blaikie [Mon, 16 Jan 2012 05:17:39 +0000 (05:17 +0000)]
Refactor variables unused under non-assert builds (& remove two entirely unused variables).

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

12 years agoChanged intrinsic ID operand to a target constant as its not used in any arithmetic...
Pete Cooper [Mon, 16 Jan 2012 04:08:12 +0000 (04:08 +0000)]
Changed intrinsic ID operand to a target constant as its not used in any arithmetic so should not be checked in legalisation

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

12 years ago[AVX] Optimize x86 VSELECT instructions using SimplifyDemandedBits.
Nadav Rotem [Sun, 15 Jan 2012 19:27:55 +0000 (19:27 +0000)]
[AVX] Optimize x86 VSELECT instructions using SimplifyDemandedBits.
We know that the blend instructions only use the MSB, so if the mask is
sign-extended then we can convert it into a SHL instruction. This is a
common pattern because the type-legalizer sign-extends the i1 type which
is used by the LLVM-IR for the condition.

Added a new optimization in SimplifyDemandedBits for SIGN_EXTEND_INREG -> SHL.

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

12 years agoReturn an ArrayRef from ShuffleVectorSDNode::getMask and push it through CodeGen.
Benjamin Kramer [Sun, 15 Jan 2012 13:16:05 +0000 (13:16 +0000)]
Return an ArrayRef from ShuffleVectorSDNode::getMask and push it through CodeGen.

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

12 years agoDAGCombiner: Deduplicate code.
Benjamin Kramer [Sun, 15 Jan 2012 11:50:43 +0000 (11:50 +0000)]
DAGCombiner: Deduplicate code.

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

12 years agoCosmetic patch for r148215.
Stepan Dyatkovskiy [Sun, 15 Jan 2012 09:45:11 +0000 (09:45 +0000)]
Cosmetic patch for r148215.

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

12 years agoFixup for r148132. Type replacement for LoopsProperties: from DenseMap to std::map...
Stepan Dyatkovskiy [Sun, 15 Jan 2012 09:44:07 +0000 (09:44 +0000)]
Fixup for r148132. Type replacement for LoopsProperties: from DenseMap to std::map, since we need to keep a valid pointer to properties of current loop.

Message for r148132:
LoopUnswitch: All helper data that is collected during loop-unswitch iterations was moved to separated class (LUAnalysisCache).

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

12 years agoRelax the FileCheck assertion a bit -- all we really care about is that
Chandler Carruth [Sun, 15 Jan 2012 09:38:59 +0000 (09:38 +0000)]
Relax the FileCheck assertion a bit -- all we really care about is that
we're loading from the global array, not how it is spelled in the asm.
This should fix the MSVC bots.

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

12 years agoFileCheck-ize a test, make it more specific to directly test the shift
Chandler Carruth [Sun, 15 Jan 2012 09:32:57 +0000 (09:32 +0000)]
FileCheck-ize a test, make it more specific to directly test the shift
removal desired.

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

12 years agoRemove SetWorkingDirectory from the Process interface. Nothing in LLVM
Chandler Carruth [Sun, 15 Jan 2012 08:41:35 +0000 (08:41 +0000)]
Remove SetWorkingDirectory from the Process interface. Nothing in LLVM
or Clang is using this, and it would be hard to use it correctly given
the thread hostility of the function. Also, it never checked the return
which is rather dangerous with chdir. If someone was in fact using this,
please let me know, as well as what the usecase actually is so that
I can add it back and make it more correct and secure to use. (That
said, it's never going to be "safe" per-se, but we could at least
document the risks...)

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

12 years agoRemove dead code.
David Blaikie [Sun, 15 Jan 2012 01:09:13 +0000 (01:09 +0000)]
Remove dead code.

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

12 years agoTruncate of undef is just undef of smaller size.
Craig Topper [Sun, 15 Jan 2012 01:05:11 +0000 (01:05 +0000)]
Truncate of undef is just undef of smaller size.

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

12 years agoFix the memop type on a couple 256-bit AVX instructions that were using f128mem inste...
Craig Topper [Sat, 14 Jan 2012 18:29:57 +0000 (18:29 +0000)]
Fix the memop type on a couple 256-bit AVX instructions that were using f128mem instead of f256mem.

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

12 years agoAdd a bunch of AVX instructions to the folding tables. Also fixed the alignment on...
Craig Topper [Sat, 14 Jan 2012 18:14:53 +0000 (18:14 +0000)]
Add a bunch of AVX instructions to the folding tables. Also fixed the alignment on 256-bit AVX2 instructions.

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

12 years agoSpeculatively revert commit 148175 (rafael), to see if this fixes
Duncan Sands [Sat, 14 Jan 2012 17:16:48 +0000 (17:16 +0000)]
Speculatively revert commit 148175 (rafael), to see if this fixes
non-determinism in the 32 bit dragonegg buildbot.  Original commit
message:
Only emit the Leh_func_endN symbol when needed.

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

12 years agoFix a corner case hit by redundant phi elimination running after LSR.
Andrew Trick [Sat, 14 Jan 2012 03:17:23 +0000 (03:17 +0000)]
Fix a corner case hit by redundant phi elimination running after LSR.

Fixes PR11761: bad IR w/ redundant Phi elim

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

12 years agoOnly emit the Leh_func_endN symbol when needed.
Rafael Espindola [Sat, 14 Jan 2012 02:36:51 +0000 (02:36 +0000)]
Only emit the Leh_func_endN symbol when needed.

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