oota-llvm.git
12 years agoContinue factoring computeOperandLatency. Use it for ARM hasHighOperandLatency.
Andrew Trick [Thu, 7 Jun 2012 19:42:04 +0000 (19:42 +0000)]
Continue factoring computeOperandLatency. Use it for ARM hasHighOperandLatency.

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

12 years agoARM getOperandLatency rewrite.
Andrew Trick [Thu, 7 Jun 2012 19:42:00 +0000 (19:42 +0000)]
ARM getOperandLatency rewrite.

Match expectations of the new latency API. Cleanup and make the logic consistent.

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

12 years agoARM getOperandLatency should return -1 for unknown, consistent with API
Andrew Trick [Thu, 7 Jun 2012 19:41:58 +0000 (19:41 +0000)]
ARM getOperandLatency should return -1 for unknown, consistent with API

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

12 years agoFix ARM getInstrLatency logic to work with the current API.
Andrew Trick [Thu, 7 Jun 2012 19:41:55 +0000 (19:41 +0000)]
Fix ARM getInstrLatency logic to work with the current API.

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

12 years agoPR13046: we can't replace usage of SUB with CMP in the lowering phase.
Manman Ren [Thu, 7 Jun 2012 19:27:33 +0000 (19:27 +0000)]
PR13046: we can't replace usage of SUB with CMP in the lowering phase.

It will cause assertion failure later on.

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

12 years agoUse a base register instead of an index register with the local dynamic model.
Rafael Espindola [Thu, 7 Jun 2012 18:39:19 +0000 (18:39 +0000)]
Use a base register instead of an index register with the local dynamic model.
Fixes pr13048.

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

12 years agoMove terminator machine verification to check MachineBasicBlock::instr_iterator inste...
Pete Cooper [Thu, 7 Jun 2012 17:41:39 +0000 (17:41 +0000)]
Move terminator machine verification to check MachineBasicBlock::instr_iterator instead of MBB::iterator

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

12 years agoAdd internal read flags to MachineInstrBuilder and hook them into the MachineOperand...
Pete Cooper [Thu, 7 Jun 2012 04:43:52 +0000 (04:43 +0000)]
Add internal read flags to MachineInstrBuilder and hook them into the MachineOperand flag of the same name

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

12 years agoAdding a missing -S to the opt invocation.
Meador Inge [Thu, 7 Jun 2012 01:02:13 +0000 (01:02 +0000)]
Adding a missing -S to the opt invocation.

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

12 years agoX86: replace SUB with CMP if possible
Manman Ren [Thu, 7 Jun 2012 00:42:47 +0000 (00:42 +0000)]
X86: replace SUB with CMP if possible

This patch will optimize the following
    movq    %rdi, %rax
    subq    %rsi, %rax
    cmovsq  %rsi, %rdi
    movq    %rdi, %rax
to
    cmpq    %rsi, %rdi
    cmovsq  %rsi, %rdi
    movq    %rdi, %rax

Perform this optimization if the actual result of SUB is not used.

rdar: 11540023

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

12 years agoSpell optimization name correclty.
Bill Wendling [Wed, 6 Jun 2012 23:53:23 +0000 (23:53 +0000)]
Spell optimization name correclty.

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

12 years agoRevert r157755.
Manman Ren [Wed, 6 Jun 2012 23:53:03 +0000 (23:53 +0000)]
Revert r157755.

The commit is intended to fix rdar://11540023.
It is implemented as part of peephole optimization. We can actually implement
this in the SelectionDAG lowering phase.

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

12 years agoAnother testcase for r156548.
Bill Wendling [Wed, 6 Jun 2012 23:36:22 +0000 (23:36 +0000)]
Another testcase for r156548.
<rdar://problem/10889741>

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

12 years ago[llvm-nm] Update documentation to cover object file support and arguments.
Michael J. Spencer [Wed, 6 Jun 2012 23:34:10 +0000 (23:34 +0000)]
[llvm-nm] Update documentation to cover object file support and arguments.

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

12 years agoProperly verify liveness with bundled machine instructions.
Jakob Stoklund Olesen [Wed, 6 Jun 2012 22:34:30 +0000 (22:34 +0000)]
Properly verify liveness with bundled machine instructions.

Bundles should be treated as one atomic transaction when checking
liveness. That is how the register allocator (and VLIW targets) treats
bundles.

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

12 years agoAdd accessors for all private members of DisasmContext.
Benjamin Kramer [Wed, 6 Jun 2012 20:45:10 +0000 (20:45 +0000)]
Add accessors for all private members of DisasmContext.

LLVM should be -Wunused-private-field clean now.

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

12 years agoMove RegisterClassInfo.h.
Andrew Trick [Wed, 6 Jun 2012 20:29:31 +0000 (20:29 +0000)]
Move RegisterClassInfo.h.

Allow targets to access this API. It's required for RegisterPressure.

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

12 years agoRemove dead private member variables from gtest.
Benjamin Kramer [Wed, 6 Jun 2012 20:23:00 +0000 (20:23 +0000)]
Remove dead private member variables from gtest.

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

12 years agoMove RegisterPressure.h.
Andrew Trick [Wed, 6 Jun 2012 19:47:35 +0000 (19:47 +0000)]
Move RegisterPressure.h.

Make it a general utility for use by Targets.

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

12 years agoRound 2 of dead private variable removal.
Benjamin Kramer [Wed, 6 Jun 2012 19:47:08 +0000 (19:47 +0000)]
Round 2 of dead private variable removal.

LLVM is now -Wunused-private-field clean except for
- lib/MC/MCDisassembler/Disassembler.h. Not sure why it keeps all those unaccessible fields.
- gtest.

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

12 years agoRemove unused private fields found by clang's new -Wunused-private-field.
Benjamin Kramer [Wed, 6 Jun 2012 18:25:08 +0000 (18:25 +0000)]
Remove unused private fields found by clang's new -Wunused-private-field.

There are some that I didn't remove this round because they looked like
obvious stubs. There are dead variables in gtest too, they should be
fixed upstream.

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

12 years agoAdd support for dynamic stack realignment in the presence of dynamic allocas on
Chad Rosier [Wed, 6 Jun 2012 17:37:40 +0000 (17:37 +0000)]
Add support for dynamic stack realignment in the presence of dynamic allocas on
X86.
rdar://11496434

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

12 years agoFix combine of uno && ord -> false so that the ordering of the fcmps doesn't
Chad Rosier [Wed, 6 Jun 2012 17:22:40 +0000 (17:22 +0000)]
Fix combine of uno && ord -> false so that the ordering of the fcmps doesn't
matter.
rdar://11579835

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

12 years agoRemove dead debug option -disable-rematerialization.
Jakob Stoklund Olesen [Wed, 6 Jun 2012 16:22:41 +0000 (16:22 +0000)]
Remove dead debug option -disable-rematerialization.

Remat has been stable for years, and it isn't done by
LiveIntervalAnalysis any longer. (See LiveRangeEdit).

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

12 years agoGrab-bag of reassociate tweaks. Unify handling of dead instructions and
Duncan Sands [Wed, 6 Jun 2012 14:53:10 +0000 (14:53 +0000)]
Grab-bag of reassociate tweaks.  Unify handling of dead instructions and
instructions to reoptimize.  Exploit this to more systematically eliminate
dead instructions (this isn't very useful in practice but is convenient for
analysing some testcase I am working on).  No need for WeakVH any more: use
an AssertingVH instead.

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

12 years agoStop leaking RegScavengers from TailDuplication.
Benjamin Kramer [Wed, 6 Jun 2012 13:53:41 +0000 (13:53 +0000)]
Stop leaking RegScavengers from TailDuplication.

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

12 years agoCorrect decoder for T1 conditional B encoding
Richard Barton [Wed, 6 Jun 2012 09:12:53 +0000 (09:12 +0000)]
Correct decoder for T1 conditional B encoding

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

12 years agoAdd a new broken compiler.
Duncan Sands [Wed, 6 Jun 2012 07:39:39 +0000 (07:39 +0000)]
Add a new broken compiler.

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

12 years agoMark several instructions SSE2 instead of SSE3 as they should be.
Craig Topper [Wed, 6 Jun 2012 06:45:27 +0000 (06:45 +0000)]
Mark several instructions SSE2 instead of SSE3 as they should be.

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

12 years agoFix gtest build issue on Visual Studio 2012 RC
Justin Holewinski [Wed, 6 Jun 2012 03:11:20 +0000 (03:11 +0000)]
Fix gtest build issue on Visual Studio 2012 RC

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

12 years agoRemove extraneous CHECK-NOTs from previous commit and add a new test case.
Chad Rosier [Wed, 6 Jun 2012 02:12:17 +0000 (02:12 +0000)]
Remove extraneous CHECK-NOTs from previous commit and add a new test case.

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

12 years agoFileCheckize this test.
Chad Rosier [Wed, 6 Jun 2012 01:38:32 +0000 (01:38 +0000)]
FileCheckize this test.

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

12 years agoMove LiveUnionArray into LiveIntervalUnion.h
Jakob Stoklund Olesen [Tue, 5 Jun 2012 23:57:30 +0000 (23:57 +0000)]
Move LiveUnionArray into LiveIntervalUnion.h

It is useful outside RegAllocBase.

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

12 years agoDon't print register names in LiveIntervalUnion::print().
Jakob Stoklund Olesen [Tue, 5 Jun 2012 23:07:19 +0000 (23:07 +0000)]
Don't print register names in LiveIntervalUnion::print().

Soon we'll be making LiveIntervalUnions for register units as well.

This was the only place using the RepReg member, so just remove it.

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

12 years agoSuppress -Wunused-variable in -Asserts build
Matt Beaumont-Gay [Tue, 5 Jun 2012 23:00:03 +0000 (23:00 +0000)]
Suppress -Wunused-variable in -Asserts build

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

12 years agoSimplify LiveInterval::print().
Jakob Stoklund Olesen [Tue, 5 Jun 2012 22:51:54 +0000 (22:51 +0000)]
Simplify LiveInterval::print().

Don't print out the register number and spill weight, making the TRI
argument unnecessary.

This allows callers to interpret the reg field. It can currently be a
virtual register, a physical register, a spill slot, or a register unit.

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

12 years agoAdd experimental support for register unit liveness.
Jakob Stoklund Olesen [Tue, 5 Jun 2012 22:02:15 +0000 (22:02 +0000)]
Add experimental support for register unit liveness.

Instead of computing a live interval per physreg, LiveIntervals can
compute live intervals per register unit. This makes impossible the
confusing situation where aliasing registers could have overlapping live
intervals. It should also make fixed interferernce checking cheaper
since registers have fewer register units than aliases.

Live intervals for regunits are computed on demand, using MRI use-def
chains and the new LiveRangeCalc class. Only regunits live in to ABI
blocks are precomputed during LiveIntervals::runOnMachineFunction().

The regunit liveness computations don't depend on LiveVariables.

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

12 years agoImplement LiveRangeCalc::extendToUses() and createDeadDefs().
Jakob Stoklund Olesen [Tue, 5 Jun 2012 21:54:09 +0000 (21:54 +0000)]
Implement LiveRangeCalc::extendToUses() and createDeadDefs().

These LiveRangeCalc methods are to be used when computing a live range
from scratch.

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

12 years agoMachineInstr::eraseFromParent fix for removing bundled instrs.
Andrew Trick [Tue, 5 Jun 2012 21:44:23 +0000 (21:44 +0000)]
MachineInstr::eraseFromParent fix for removing bundled instrs.

Patch by Ivan Llopard.

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

12 years agomisched: API for minimum vs. expected latency.
Andrew Trick [Tue, 5 Jun 2012 21:11:27 +0000 (21:11 +0000)]
misched: API for minimum vs. expected latency.

Minimum latency determines per-cycle scheduling groups.
Expected latency determines critical path and cost.

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

12 years agoAdd 3.0 and 3.1 tags to the getting started guide.
Benjamin Kramer [Tue, 5 Jun 2012 20:35:50 +0000 (20:35 +0000)]
Add 3.0 and 3.1 tags to the getting started guide.

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

12 years agoAdd a new intrinsic: llvm.fmuladd. This intrinsic represents a multiply-add
Lang Hames [Tue, 5 Jun 2012 19:07:46 +0000 (19:07 +0000)]
Add a new intrinsic: llvm.fmuladd. This intrinsic represents a multiply-add
expression (a * b + c) that can be implemented as a fused multiply-add (fma)
if the target determines that this will be more efficient. This intrinsic
will be used to implement FP_CONTRACT support and an aggressive FMA formation
mode.

If your target has a fast FMA instruction you should override the
isFMAFasterThanMulAndAdd method in TargetLowering to return true.

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

12 years agoFix header file include order in NVPTX backend NV_CONTRIB
Yuan Lin [Tue, 5 Jun 2012 19:06:13 +0000 (19:06 +0000)]
Fix header file include order in NVPTX backend   NV_CONTRIB

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

12 years agoLoopUnroll: always check for NULL LoopPassManager
Andrew Trick [Tue, 5 Jun 2012 17:51:05 +0000 (17:51 +0000)]
LoopUnroll: always check for NULL LoopPassManager

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

12 years agoRemove dead function.
Jakob Stoklund Olesen [Tue, 5 Jun 2012 17:19:07 +0000 (17:19 +0000)]
Remove dead function.

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

12 years agoPPC32 uses R2 as the TLS register. Fix the copy and paste.
Roman Divacky [Tue, 5 Jun 2012 17:14:17 +0000 (17:14 +0000)]
PPC32 uses R2 as the TLS register. Fix the copy and paste.

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

12 years agoIntegersSubsetMapping: added exclude operation, that allows to exclude subset of...
Stepan Dyatkovskiy [Tue, 5 Jun 2012 07:57:36 +0000 (07:57 +0000)]
IntegersSubsetMapping: added exclude operation, that allows to exclude subset of integers from current mapping.

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

12 years agoIntegersSubsetMapping:
Stepan Dyatkovskiy [Tue, 5 Jun 2012 07:43:08 +0000 (07:43 +0000)]
IntegersSubsetMapping:
Changed type of Items collection: from std::vector to std::list.
Also some small fixes made in IntegersSubset.h, IntegersSubsetMapping.h and IntegersSubsetTest.cpp.

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

12 years agoX86 itinerary properties.
Andrew Trick [Tue, 5 Jun 2012 03:44:46 +0000 (03:44 +0000)]
X86 itinerary properties.

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

12 years agoARM itinerary properties.
Andrew Trick [Tue, 5 Jun 2012 03:44:43 +0000 (03:44 +0000)]
ARM itinerary properties.

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

12 years agomisched: Added MultiIssueItineraries.
Andrew Trick [Tue, 5 Jun 2012 03:44:40 +0000 (03:44 +0000)]
misched: Added MultiIssueItineraries.

This allows a subtarget to explicitly specify the issue width and
other properties without providing pipeline stage details for every
instruction.

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

12 years agosdsched: Use the right heuristics when -mcpu is not provided and we have no itinerary.
Andrew Trick [Tue, 5 Jun 2012 03:44:34 +0000 (03:44 +0000)]
sdsched: Use the right heuristics when -mcpu is not provided and we have no itinerary.
Use ILP heuristics for long latency instrs if no scoreboard exists.

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

12 years agomisched: Allow disabling scoreboard hazard checking for subtargets with a
Andrew Trick [Tue, 5 Jun 2012 03:44:32 +0000 (03:44 +0000)]
misched: Allow disabling scoreboard hazard checking for subtargets with a
valid itinerary but no pipeline stages.

An itinerary can contain useful scheduling information without specifying pipeline stages for each instruction.

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

12 years agowhitespace
Andrew Trick [Tue, 5 Jun 2012 03:44:29 +0000 (03:44 +0000)]
whitespace

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

12 years agomisched: comments from code review.
Andrew Trick [Tue, 5 Jun 2012 03:44:26 +0000 (03:44 +0000)]
misched: comments from code review.

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

12 years agoRemove the last remat-related code from LiveIntervalAnalysis.
Jakob Stoklund Olesen [Tue, 5 Jun 2012 01:06:15 +0000 (01:06 +0000)]
Remove the last remat-related code from LiveIntervalAnalysis.

Rematerialization is handled by LiveRangeEdit now.

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

12 years agoStop using LiveIntervals::isReMaterializable().
Jakob Stoklund Olesen [Tue, 5 Jun 2012 01:06:12 +0000 (01:06 +0000)]
Stop using LiveIntervals::isReMaterializable().

It is an old function that does a lot more than required by
CalcSpillWeights, which was the only remaining caller.

The isRematerializable() function never actually sets the isLoad
argument, so don't try to compute that.

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

12 years agoRevert commit r157966
Joel Jones [Tue, 5 Jun 2012 00:47:21 +0000 (00:47 +0000)]
Revert commit r157966

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

12 years agoThis change handles a another case for generating the bic instruction
Joel Jones [Mon, 4 Jun 2012 23:38:57 +0000 (23:38 +0000)]
This change handles a another case for generating the bic instruction
when a compile time constant is known.  This occurs when implicitly zero
extending function arguments from 16 bits to 32 bits.

<rdar://problem/11481151>

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

12 years agoDelete dead code.
Jakob Stoklund Olesen [Mon, 4 Jun 2012 23:01:41 +0000 (23:01 +0000)]
Delete dead code.

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

12 years agoWhen gvn decides to replace an instruction with another, we have to patch the
Rafael Espindola [Mon, 4 Jun 2012 22:44:21 +0000 (22:44 +0000)]
When gvn decides to replace an instruction with another, we have to patch the
replacement to make it at least as generic as the instruction being replaced.
This includes:
* dropping nsw/nuw flags
* getting the least restrictive tbaa and fpmath metadata
* merging ranges

Fixes PR12979.

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

12 years agoSwitch LiveIntervals member variable to LLVM naming standards.
Jakob Stoklund Olesen [Mon, 4 Jun 2012 22:39:14 +0000 (22:39 +0000)]
Switch LiveIntervals member variable to LLVM naming standards.

No functional change.

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

12 years agoPass context pointers to LiveRangeCalc::reset().
Jakob Stoklund Olesen [Mon, 4 Jun 2012 18:21:16 +0000 (18:21 +0000)]
Pass context pointers to LiveRangeCalc::reset().

Remove the same pointers from all the other LiveRangeCalc functions,
simplifying the interface.

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

12 years agoAdd a test case for mips64 unaligned load/store instructions.
Akira Hatanaka [Mon, 4 Jun 2012 17:57:06 +0000 (17:57 +0000)]
Add a test case for mips64 unaligned load/store instructions.

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

12 years agoRename test/CodeGen/Mips/load-shift-left-right.ll.
Akira Hatanaka [Mon, 4 Jun 2012 17:50:36 +0000 (17:50 +0000)]
Rename test/CodeGen/Mips/load-shift-left-right.ll.

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

12 years agoFix a bug in MipsTargetLowering::LowerLOAD. A shift-right-logical node is
Akira Hatanaka [Mon, 4 Jun 2012 17:46:29 +0000 (17:46 +0000)]
Fix a bug in MipsTargetLowering::LowerLOAD. A shift-right-logical node is
inserted after the shift-left-logical node.

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

12 years agoImplement local-exec TLS on PowerPC.
Roman Divacky [Mon, 4 Jun 2012 17:36:38 +0000 (17:36 +0000)]
Implement local-exec TLS on PowerPC.

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

12 years agoMIPS TLS: use the model selected by TargetMachine::getTLSModel().
Hans Wennborg [Mon, 4 Jun 2012 14:02:08 +0000 (14:02 +0000)]
MIPS TLS: use the model selected by TargetMachine::getTLSModel().

This was mostly done already in r156162, but I missed one place.

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

12 years agoRemove the "-promote-elements" flag. This flag is now enabled by default.
Nadav Rotem [Mon, 4 Jun 2012 11:27:21 +0000 (11:27 +0000)]
Remove the "-promote-elements" flag. This flag is now enabled by default.

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

12 years agoBetter comments for TLS-related X86 MachineOperand flags.
Hans Wennborg [Mon, 4 Jun 2012 09:55:36 +0000 (09:55 +0000)]
Better comments for TLS-related X86 MachineOperand flags.

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

12 years agoAdd intrinsic forms for FMA instructions to opcode folding tables.
Craig Topper [Mon, 4 Jun 2012 07:46:16 +0000 (07:46 +0000)]
Add intrinsic forms for FMA instructions to opcode folding tables.

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

12 years agogetAllOnesValue also works for vectors of integers.
Duncan Sands [Mon, 4 Jun 2012 07:18:12 +0000 (07:18 +0000)]
getAllOnesValue also works for vectors of integers.

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

12 years agoAdd VFMADDSUB and VFMSUBADD FMA instructions to folding tables. Also add 213 forms...
Craig Topper [Mon, 4 Jun 2012 07:08:21 +0000 (07:08 +0000)]
Add VFMADDSUB and VFMSUBADD FMA instructions to folding tables. Also add 213 forms of scalar FMA instructions.

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

12 years agoFix a copy-and-paste duplication error in the PPC 440 and A2 schedules (no functional...
Hal Finkel [Mon, 4 Jun 2012 02:39:52 +0000 (02:39 +0000)]
Fix a copy-and-paste duplication error in the PPC 440 and A2 schedules (no functionality change).

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

12 years agoEnable generating PPC pre-increment (r+imm) instructions by default.
Hal Finkel [Mon, 4 Jun 2012 02:21:00 +0000 (02:21 +0000)]
Enable generating PPC pre-increment (r+imm) instructions by default.

It seems that this no longer causes test suite failures on PPC64 (after r157159),
and often gives a performance benefit, so it can be enabled by default.

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

12 years agoRepresent .rept as an anonymous macro. This removes the need for the ActiveRept
Rafael Espindola [Sun, 3 Jun 2012 23:57:14 +0000 (23:57 +0000)]
Represent .rept as an anonymous macro. This removes the need for the ActiveRept
vector. No functionality change.
Extracted from a patch by the PaX Team.

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

12 years agoAdd a typedef to simplify the code a bit. Not functionality change.
Rafael Espindola [Sun, 3 Jun 2012 22:41:23 +0000 (22:41 +0000)]
Add a typedef to simplify the code a bit. Not functionality change.
Part of a patch by the PaX Team.

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

12 years agoRename FMA3 feature flag to just FMA to match gcc so it can be added to clang.
Craig Topper [Sun, 3 Jun 2012 18:58:46 +0000 (18:58 +0000)]
Rename FMA3 feature flag to just FMA to match gcc so it can be added to clang.

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

12 years agoSimplify the fma4 renaming code.
Craig Topper [Sun, 3 Jun 2012 16:48:52 +0000 (16:48 +0000)]
Simplify the fma4 renaming code.

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

12 years agoIntRange: Restore the copy constuctor explicitly to appase buildbot.
NAKAMURA Takumi [Sun, 3 Jun 2012 15:42:12 +0000 (15:42 +0000)]
IntRange: Restore the copy constuctor explicitly to appase buildbot.

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

12 years agoAutoupgrade support the rename of x86.fma4 intrinsics to x86.fma from r157898.
Craig Topper [Sun, 3 Jun 2012 08:07:25 +0000 (08:07 +0000)]
Autoupgrade support the rename of x86.fma4 intrinsics to x86.fma from r157898.

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

12 years agoRename fma4 intrinsics to just fma since they are now used for both FMA4 and FMA3...
Craig Topper [Sun, 3 Jun 2012 07:26:46 +0000 (07:26 +0000)]
Rename fma4 intrinsics to just fma since they are now used for both FMA4 and FMA3. Autoupgrade support coming in a separate commit.

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

12 years agoRevert r157831
Manman Ren [Sun, 3 Jun 2012 03:14:24 +0000 (03:14 +0000)]
Revert r157831

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

12 years agoUse sse_load_f32/64 for scalar FMA3 intrinsic patterns instead of 128-bit loads to...
Craig Topper [Sun, 3 Jun 2012 01:40:43 +0000 (01:40 +0000)]
Use sse_load_f32/64 for scalar FMA3 intrinsic patterns instead of 128-bit loads to match instruction behavior.

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

12 years agoAdd neverHasSideEffects and mayLoad to FMA3 instructions.
Craig Topper [Sun, 3 Jun 2012 00:30:49 +0000 (00:30 +0000)]
Add neverHasSideEffects and mayLoad to FMA3 instructions.

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

12 years agoUse access(2) instead of stat(2) to check if a file exists.
Benjamin Kramer [Sat, 2 Jun 2012 16:28:09 +0000 (16:28 +0000)]
Use access(2) instead of stat(2) to check if a file exists.

Apart from being slightly cheaper, this fixes a real bug that hits 32 bit
linux systems. When passing a file larger than 2G to be linked (which isn't
that uncommon with large projects such as WebKit), clang's driver checks
if the file exists but the file size doesn't fit in an off_t and stat(2)
fails with EOVERFLOW. Clang then says that the file doesn't exist instead
of passing it to the linker.

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

12 years agoAdded unittests for IntegersSubset and IntegersSubsetMapping.
Stepan Dyatkovskiy [Sat, 2 Jun 2012 13:47:12 +0000 (13:47 +0000)]
Added unittests for IntegersSubset and IntegersSubsetMapping.
- Fixed IntegersSubsetGeneric copy/assignment behaviour.
- Fixed IntegersSubsetGeneric::getSize/getSingleValue methods.
- Fixed IntegersSubsetGeneric::verify method.

Also IntegersSubset.h and IntegersSubsetMapping.h headers was fixed.

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

12 years agoFix typos found by http://github.com/lyda/misspell-check
Benjamin Kramer [Sat, 2 Jun 2012 10:20:22 +0000 (10:20 +0000)]
Fix typos found by github.com/lyda/misspell-check

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

12 years agoPR1255: case ranges.
Stepan Dyatkovskiy [Sat, 2 Jun 2012 09:42:43 +0000 (09:42 +0000)]
PR1255: case ranges.
IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()"

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

12 years agoAdd move semantics to APInt.
Benjamin Kramer [Sat, 2 Jun 2012 08:39:08 +0000 (08:39 +0000)]
Add move semantics to APInt.

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

12 years agoAdditional change for 157881. Forget to fix another IntegerSubset constructor.
Stepan Dyatkovskiy [Sat, 2 Jun 2012 08:03:34 +0000 (08:03 +0000)]
Additional change for 157881. Forget to fix another IntegerSubset constructor.

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

12 years agoSmall fix due to buildbot failures on mingw32. Fixed call of parent constructor for...
Stepan Dyatkovskiy [Sat, 2 Jun 2012 07:44:19 +0000 (07:44 +0000)]
Small fix due to buildbot failures on mingw32. Fixed call of parent constructor for case when parent is template.

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

12 years agoPR1255: case ranges.
Stepan Dyatkovskiy [Sat, 2 Jun 2012 07:26:00 +0000 (07:26 +0000)]
PR1255: case ranges.
IntegersSubsetGeneric, IntegersSubsetMapping: added IntTy template parameter, that allows use either APInt or IntItem. This change allows to write unittest for these classes.

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

12 years agoARM: add testing case for struct byval
Manman Ren [Sat, 2 Jun 2012 05:37:44 +0000 (05:37 +0000)]
ARM: add testing case for struct byval

rdar://9877866

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

12 years agoAdd another test case which tests Mips' unaligned load/store instructions.
Akira Hatanaka [Sat, 2 Jun 2012 01:13:10 +0000 (01:13 +0000)]
Add another test case which tests Mips' unaligned load/store instructions.

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

12 years agoFix a bug in the code which custom-lowers truncating stores in LegalizeDAG.
Akira Hatanaka [Sat, 2 Jun 2012 01:10:34 +0000 (01:10 +0000)]
Fix a bug in the code which custom-lowers truncating stores in LegalizeDAG.

Check that the SDValue TargetLowering::LowerOperation returns is not null
before replacing the original node with the returned node.

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

12 years agoremove an unused variable.
Chris Lattner [Sat, 2 Jun 2012 01:03:42 +0000 (01:03 +0000)]
remove an unused variable.

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

12 years agoFix test cases in test/CodeGen/Mips.
Akira Hatanaka [Sat, 2 Jun 2012 00:05:45 +0000 (00:05 +0000)]
Fix test cases in test/CodeGen/Mips.

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

12 years agoRemove code which is no longer needed in MipsAsmPrinter and MipsMCInstLower.
Akira Hatanaka [Sat, 2 Jun 2012 00:05:11 +0000 (00:05 +0000)]
Remove code which is no longer needed in MipsAsmPrinter and MipsMCInstLower.

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

12 years agoSet operation actions for load/store nodes in the Mips backend.
Akira Hatanaka [Sat, 2 Jun 2012 00:04:42 +0000 (00:04 +0000)]
Set operation actions for load/store nodes in the Mips backend.

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