Commit Graph

83170 Commits

Author SHA1 Message Date
Andrew Trick
397f4e3583 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
2012-06-07 19:42:04 +00:00
Andrew Trick
68b16541cc 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
2012-06-07 19:42:00 +00:00
Andrew Trick
f377071bf8 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
2012-06-07 19:41:58 +00:00
Andrew Trick
ed7a51e692 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
2012-06-07 19:41:55 +00:00
Manman Ren
e6fc9d40b3 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
2012-06-07 19:27:33 +00:00
Rafael Espindola
c07f5bbd3b 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
2012-06-07 18:39:19 +00:00
Pete Cooper
83569cb062 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
2012-06-07 17:41:39 +00:00
Pete Cooper
4efea94fa5 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
2012-06-07 04:43:52 +00:00
Meador Inge
13a53e6495 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
2012-06-07 01:02:13 +00:00
Manman Ren
87253c2ebd 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
2012-06-07 00:42:47 +00:00
Bill Wendling
d66ec52b62 Spell optimization name correclty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158123 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06 23:53:23 +00:00
Manman Ren
2afde7782d 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
2012-06-06 23:53:03 +00:00
Bill Wendling
aed04d12f8 Another testcase for r156548.
<rdar://problem/10889741>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158121 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06 23:36:22 +00:00
Michael J. Spencer
4d61664696 [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
2012-06-06 23:34:10 +00:00
Jakob Stoklund Olesen
1f9c3ec831 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
2012-06-06 22:34:30 +00:00
Benjamin Kramer
8e5271d462 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
2012-06-06 20:45:10 +00:00
Andrew Trick
1525260b3e 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
2012-06-06 20:29:31 +00:00
Benjamin Kramer
955f938751 Remove dead private member variables from gtest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158101 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06 20:23:00 +00:00
Andrew Trick
afc2657cc3 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
2012-06-06 19:47:35 +00:00
Benjamin Kramer
95a9d93772 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
2012-06-06 19:47:08 +00:00
Benjamin Kramer
a7542d5f87 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
2012-06-06 18:25:08 +00:00
Chad Rosier
a97b180fc4 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
2012-06-06 17:37:40 +00:00
Chad Rosier
8b421c8eb2 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
2012-06-06 17:22:40 +00:00
Jakob Stoklund Olesen
461e7eaa6f 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
2012-06-06 16:22:41 +00:00
Duncan Sands
b933586592 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
2012-06-06 14:53:10 +00:00
Benjamin Kramer
d14e4e133f Stop leaking RegScavengers from TailDuplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158069 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06 13:53:41 +00:00
Richard Barton
c8f2fcc9a3 Correct decoder for T1 conditional B encoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158055 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06 09:12:53 +00:00
Duncan Sands
12e959c8da Add a new broken compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158053 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06 07:39:39 +00:00
Craig Topper
3949b8382d 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
2012-06-06 06:45:27 +00:00
Justin Holewinski
c82fd37bcf 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
2012-06-06 03:11:20 +00:00
Chad Rosier
4ddf8871ce 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
2012-06-06 02:12:17 +00:00
Chad Rosier
b169e2d19a FileCheckize this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158044 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06 01:38:32 +00:00
Jakob Stoklund Olesen
0e5a60b4eb 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
2012-06-05 23:57:30 +00:00
Jakob Stoklund Olesen
2fd0923593 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
2012-06-05 23:07:19 +00:00
Matt Beaumont-Gay
05b46f05c3 Suppress -Wunused-variable in -Asserts build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158037 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05 23:00:03 +00:00
Jakob Stoklund Olesen
b77ec7d264 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
2012-06-05 22:51:54 +00:00
Jakob Stoklund Olesen
34c6f98034 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
2012-06-05 22:02:15 +00:00
Jakob Stoklund Olesen
4e53a40ea3 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
2012-06-05 21:54:09 +00:00
Andrew Trick
d88d27868b 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
2012-06-05 21:44:23 +00:00
Andrew Trick
b7e0289fb3 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
2012-06-05 21:11:27 +00:00
Benjamin Kramer
1d72dadddb 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
2012-06-05 20:35:50 +00:00
Lang Hames
5afba6f00c 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
2012-06-05 19:07:46 +00:00
Yuan Lin
09b5df8996 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
2012-06-05 19:06:13 +00:00
Andrew Trick
1247376856 LoopUnroll: always check for NULL LoopPassManager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158007 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05 17:51:05 +00:00
Jakob Stoklund Olesen
9a314da581 Remove dead function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158005 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05 17:19:07 +00:00
Roman Divacky
3e77af4318 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
2012-06-05 17:14:17 +00:00
Stepan Dyatkovskiy
5d59b0b38e 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
2012-06-05 07:57:36 +00:00
Stepan Dyatkovskiy
20cb4919cd 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
2012-06-05 07:43:08 +00:00
Andrew Trick
1d98530196 X86 itinerary properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157981 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05 03:44:46 +00:00
Andrew Trick
f94f051cf5 ARM itinerary properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157980 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-05 03:44:43 +00:00