Jim Grosbach [Mon, 13 Aug 2012 22:25:44 +0000 (22:25 +0000)]
ARM: Move Thumb2 tests to Thumb2 test file and fix CHECK lines.
These tests weren't actually being run before (missing ':' after CHECK).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161800
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 13 Aug 2012 21:52:57 +0000 (21:52 +0000)]
Remove the TII::scheduleTwoAddrSource() hook.
It never does anything when running 'make check', and it get's in the
way of updating live intervals in 2-addr.
The hook was originally added to help form IT blocks in Thumb2 code
before register allocation, but the pass ordering has changed since
then, and we run if-conversion after register allocation now.
When the MI scheduler is enabled, there will be no less than two
schedulers between 2-addr and Thumb2ITBlockPass, so this hook is
unlikely to help anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161794
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 13 Aug 2012 21:32:42 +0000 (21:32 +0000)]
Rename test since it's not linux-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161792
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 13 Aug 2012 21:22:50 +0000 (21:22 +0000)]
ARM: enable struct byval for AAPCS-VFP.
This change is to be enabled in clang.
rdar://
9877866
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161789
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 13 Aug 2012 21:20:43 +0000 (21:20 +0000)]
Whitespace cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161788
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 13 Aug 2012 21:03:27 +0000 (21:03 +0000)]
Count triangles and diamonds in early if-conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161783
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 13 Aug 2012 21:03:25 +0000 (21:03 +0000)]
Delete dead typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161782
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 13 Aug 2012 20:49:04 +0000 (20:49 +0000)]
Handle extra Tail predecessors in if-conversion.
It is still possible to if-convert if the tail block has extra
predecessors, but the tail phis must be rewritten instead of being
removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161781
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Mon, 13 Aug 2012 19:54:01 +0000 (19:54 +0000)]
[Hexagon] Don't mark callee saved registers as clobbered by a tail call
This was causing unnecessary spills/restores of callee saved registers.
Fixes PR13572.
Patch by Pranav Bhandarkar!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161778
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 13 Aug 2012 19:34:29 +0000 (19:34 +0000)]
Fix failure on Atom bot due to r161769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161777
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 13 Aug 2012 18:52:44 +0000 (18:52 +0000)]
Do not optimize (or (and X,Y), Z) into BFI and other sequences if the AND ISDNode has more than one user.
rdar://
11876519
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161775
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 13 Aug 2012 18:29:41 +0000 (18:29 +0000)]
X86: move Int_CVTSD2SSrr, Int_CVTSI2SSrr, Int_CVTSI2SDrr, Int_CVTSS2SDrr from
OpTbl1 to OpTbl2 since they have 3 operands and the last operand can be changed
to a memory operand.
PR13576
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161769
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 13 Aug 2012 18:18:52 +0000 (18:18 +0000)]
Add support for the %H output modifier.
Patch by Weiming Zhao.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161768
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 13 Aug 2012 17:50:44 +0000 (17:50 +0000)]
Ignore known externally-homed tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161765
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 13 Aug 2012 17:26:46 +0000 (17:26 +0000)]
X86: when auto-detecting the subtarget features, make sure use IsIntel to detect
Nehalem, Westmere and Sandy Bridge. AMD also has processor family 6.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161763
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 13 Aug 2012 15:29:53 +0000 (15:29 +0000)]
Fix a documentation typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161758
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 13 Aug 2012 14:08:46 +0000 (14:08 +0000)]
[asan] remove the code for --asan-merge-callbacks as it appears to be a bad idea. (partly related to Bug 13225)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161757
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Mon, 13 Aug 2012 10:43:36 +0000 (10:43 +0000)]
Added test for non-static use of cl::opt (fixed in r160170)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161751
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 13 Aug 2012 10:38:45 +0000 (10:38 +0000)]
Add test for previous commit correcting NEON load patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161750
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 13 Aug 2012 09:06:31 +0000 (09:06 +0000)]
Use correct loads for vector types during extending-load operations.
Previously, we used VLD1.32 in all cases, however there are both 16 and 64-bit
accesses being selected, so we need to use an appropriate width load in those
cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161748
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 13 Aug 2012 03:42:38 +0000 (03:42 +0000)]
Tidy up VSETCC lowering code a bit more by adding an llvm_unreachable and putting an a couple if conditions in a better order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161746
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 13 Aug 2012 02:34:03 +0000 (02:34 +0000)]
Refactor code a bit to share commonalities. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161745
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 13 Aug 2012 01:26:45 +0000 (01:26 +0000)]
Fix an unused variable warning from r161742.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161743
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 13 Aug 2012 01:23:55 +0000 (01:23 +0000)]
Remove the LowerMMXCONCAT_VECTORS function. It could never execute because there are no legal 64-bit vector types that could be used as inputs to a 128-bit concat_vectors. Remove a target specific SDNode and its patterns that become unused as a result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161742
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 12 Aug 2012 08:21:27 +0000 (08:21 +0000)]
Give this test an explicit triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161740
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 12 Aug 2012 08:09:45 +0000 (08:09 +0000)]
When emitting the PC range in an FDE, use the same data encoding for both ends
of the range. Fixes PR13581!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161739
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 12 Aug 2012 05:31:32 +0000 (05:31 +0000)]
Remove call to setOperationAction for SETCC of v4f32. SETCC returns an integer type not an FP type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161738
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 12 Aug 2012 05:15:16 +0000 (05:15 +0000)]
Remove unnecessary call to setOperationAction for SETCC of v2i64 under SSE42. It was already called for the same under SSE2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161737
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sun, 12 Aug 2012 05:11:56 +0000 (05:11 +0000)]
Revert 161581: Patch to implement UMLAL/SMLAL instructions for the ARM
architecture
It broke MultiSource/Applications/JM/ldecod/ldecod on armv7 thumb O0 g and armv7
thumb O3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161736
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 12 Aug 2012 03:16:37 +0000 (03:16 +0000)]
Change addTypeForNeon to use MVT instead of EVT so all the calls to getSimpleVT can be removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161735
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 12 Aug 2012 02:23:29 +0000 (02:23 +0000)]
Make replace many calls to getSizeInBits() with is128BitVector/is256BitVector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161734
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 12 Aug 2012 00:34:56 +0000 (00:34 +0000)]
Use MVT.isXBitVector instead of EVT.isXBitVector when setting up operation actions. Compiles to smaller code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161733
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Sat, 11 Aug 2012 23:47:06 +0000 (23:47 +0000)]
fix PR13577, an issue introduced by r161687
- FCMOV only supports a subset of X86 conditions. Skip boolean
simplification if X86 condition is not valid for FCMOV.
- add a minimal test case for PR13577.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161732
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 11 Aug 2012 23:31:18 +0000 (23:31 +0000)]
Create isXBitVector methods in MVT and call them from EVT. This allows targets to call them with an MVT without needing to convert to EVT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161731
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 11 Aug 2012 22:34:26 +0000 (22:34 +0000)]
Move setOperationAction for CONCAT_VECTORS for 256-bit vectors into loop since all 256-bit types are supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161730
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 11 Aug 2012 20:42:59 +0000 (20:42 +0000)]
MachineCSE: Hoist isConstantPhysReg out of the loop, it checks for overlaps already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161729
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 11 Aug 2012 19:05:13 +0000 (19:05 +0000)]
PR13578: Teach MachineCSE that instructions that use a constant register can be CSE'd safely.
This is common e.g. when doing rip-relative addressing on x86_64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161728
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 11 Aug 2012 17:53:00 +0000 (17:53 +0000)]
Tidy up indentation. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161727
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 11 Aug 2012 17:46:16 +0000 (17:46 +0000)]
Fix a cast that was casting away 'const' unnecessarily
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161726
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 11 Aug 2012 17:44:14 +0000 (17:44 +0000)]
Add a couple default: llvm_unreachable() to some switch statements. Fix a bad message in an existing llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161725
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 10 Aug 2012 23:43:32 +0000 (23:43 +0000)]
X86: when we are auto-detecting the subtarget features, make sure we turn on
FeatureFastUAMem for Nehalem, Westmere and Sandy Bridge.
FeatureFastUAMem is already on if we pass in nehalem or westmere as a command
argument.
rdar:
7252306
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161717
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Aug 2012 22:27:31 +0000 (22:27 +0000)]
Add a proper if-conversion cost model.
Detect when there is not enough available ILP, so if-conversion can't
speculate instructions for free.
Compute the lengthening of the critical path when inserting a select
instruction that depends on the condition as well as both sides of the
if.
Reject conversions that would stretch the critical path by more than
half a mispredict penalty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161713
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Aug 2012 22:27:29 +0000 (22:27 +0000)]
Give MachineTraceMetrics its own debug tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161712
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Aug 2012 22:27:27 +0000 (22:27 +0000)]
Add more trace query functions.
Trace::getResourceLength() computes the number of cycles required to
execute the trace when ignoring data dependencies. The number can be
compared to the critical path to estimate the trace ILP.
Trace::getPHIDepth() computes the data dependency depth of a PHI in a
trace successor that isn't necessarily part of the trace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161711
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 10 Aug 2012 20:55:20 +0000 (20:55 +0000)]
The normal edge of an invoke is not allowed to branch to a block with a
landingpad. Enforce it in the verifier, and fix the regression tests to match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161697
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 10 Aug 2012 20:39:38 +0000 (20:39 +0000)]
ARM: enable struct byval for AAPCS.
This change is to be enabled in clang.
rdar://
9877866
PR://13350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161693
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Aug 2012 20:19:17 +0000 (20:19 +0000)]
Add getTPred() and getFPred() functions.
They identify the PHI predecessors in both diamonds and triangles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161689
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Aug 2012 20:11:38 +0000 (20:11 +0000)]
Include loop-carried dependencies when computing instr heights.
When a trace ends with a back-edge, include PHIs in the loop header in
the height computations. This makes the critical path through a loop
more accurate by including the latencies of the last instructions in the
loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161688
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 10 Aug 2012 19:58:13 +0000 (19:58 +0000)]
add X86-specific DAG optimization to simplify boolean test
- if a boolean test (X86ISD::CMP or X86ISD:SUB) checks a boolean value
generated from X86ISD::SETCC, try to simplify the boolean value
generation and checking by reusing the original EFLAGS with proper
condition code
- add hooks to X86 specific SETCC/BRCOND/CMOV, the major 3 places
consuming EFLAGS
part of patches fixing PR12312
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161687
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 10 Aug 2012 18:30:44 +0000 (18:30 +0000)]
A couple of addition comment fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161678
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 10 Aug 2012 18:26:20 +0000 (18:26 +0000)]
Fix a couple of typos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161677
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Aug 2012 15:55:25 +0000 (15:55 +0000)]
Constify some basic blocks, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161668
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 10 Aug 2012 14:39:24 +0000 (14:39 +0000)]
remove tailing whitespaces and test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161664
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Aug 2012 14:05:55 +0000 (14:05 +0000)]
Move BasicBlockEdge to the cpp file. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161663
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 10 Aug 2012 10:56:09 +0000 (10:56 +0000)]
stdcxx's cstdio doesn't include stdio.h, but the code using PathV2.inc
includes both. Deal with feof and ferror potentially being macros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161658
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 10 Aug 2012 10:53:56 +0000 (10:53 +0000)]
Add some missing includes for the build against stdcxx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161657
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 10 Aug 2012 03:26:36 +0000 (03:26 +0000)]
Fix crash when when do lto on Bullet. Dynamic GEPs in SROA were incorrectly being applied to all accesses to an alloca, not just the ones which read from the GEP. Thanks to Evan for reducing the test. rdar://
11861001
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161654
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Aug 2012 03:23:27 +0000 (03:23 +0000)]
Update edge weights correctly in replaceSuccessor().
When replacing Old with New, it can happen that New is already a
successor. Add the old and new edge weights instead of creating a
duplicate edge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161653
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Aug 2012 01:57:52 +0000 (01:57 +0000)]
Remove references to compression in llvm-ar. It has been a long time since we
switched from a bytecode+bzip2 to the current bitcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161651
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 10 Aug 2012 00:25:30 +0000 (00:25 +0000)]
Use the final .version number for LLVM_MINOR_VERSION in Apple llvmCore builds.
We've switched to a 3-component version numbering scheme for Apple releases,
and with this scheme, the final number is the one most relevant for setting
LLVM_MINOR_VERSION. <rdar://problem/
12071459>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161645
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Aug 2012 00:21:30 +0000 (00:21 +0000)]
Reapply r161633-161634 "Partition use lists so defs always come before uses.""
No changes to these patches, MRI needed to be notified when changing
uses into defs and vice versa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161644
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Aug 2012 00:21:26 +0000 (00:21 +0000)]
Also update MRI use lists when changing a use to a def and vice versa.
This was the cause of the buildbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161643
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 10 Aug 2012 00:00:22 +0000 (00:00 +0000)]
[ms-inline asm] Add a new Inline Asm Non-Standard Dialect attribute.
This new attribute is intended to be used by the backend to determine how
the inline asm string should be parsed/printed. This patch adds the
ia_nsdialect attribute and also adds a test case to ensure the IR is
correctly parsed, but there is no functional change at this time.
The standard dialect is assumed to be AT&T. Therefore, this attribute
should only be added to MS-style inline assembly statements, which use
the Intel dialect. If we ever support more dialects we'll need to
add additional state to the attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161641
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 9 Aug 2012 23:31:36 +0000 (23:31 +0000)]
Revert r161633-161634 "Partition use lists so defs always come before uses."
These commits broke a number of buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161640
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 9 Aug 2012 22:49:46 +0000 (22:49 +0000)]
Partition use lists so defs always come before uses.
This makes it possible to speed up def_iterator by stopping at the first
use. This makes def_empty() and getUniqueVRegDef() much faster when
there are many uses.
In a +Asserts build, LiveVariables is 100x faster in one case because
getVRegDef() has an assertion that would scan to the end of a
def_iterator chain.
Spill weight calculation is significantly faster (300x in one case)
because isTriviallyReMaterializable() calls MRI->isConstantPhysReg(%RIP)
which calls def_empty(%RIP).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161634
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 9 Aug 2012 22:49:42 +0000 (22:49 +0000)]
Don't use pointer-pointers for the register use lists.
Use a more conventional doubly linked list where the Prev pointers form
a cycle. This means it is no longer necessary to adjust the Prev
pointers when reallocating the VRegInfo array.
The test changes are required because the register allocation hint is
using the use-list order to break ties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161633
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 9 Aug 2012 22:49:37 +0000 (22:49 +0000)]
Move use list management into MachineRegisterInfo.
Register MachineOperands are kept in linked lists accessible via MRI's
reg_iterator interfaces. The linked list management was handled partly
by MachineOperand methods, partly by MRI methods.
Move all of the list management into MRI, delete
MO::AddRegOperandToRegInfo() and MO::RemoveRegOperandFromRegInfo().
Be more explicit about handling the cases where an MRI pointer isn't
available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161632
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 9 Aug 2012 22:10:21 +0000 (22:10 +0000)]
Remove getARMRegisterNumbering and replace with calls into
the register info for getEncodingValue. This builds on the
small patch of yesterday to set HWEncoding in the register
file.
One (deprecated) use was turned into a hard number to avoid
needing register info in the old JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161628
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 9 Aug 2012 22:08:26 +0000 (22:08 +0000)]
Fix a future TwoAddressInstructionPass crash.
No test case, the crash only happens when the default use list order is
changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161627
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 9 Aug 2012 22:08:24 +0000 (22:08 +0000)]
Don't modify MO while use_iterator is still pointing to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 9 Aug 2012 22:04:55 +0000 (22:04 +0000)]
[ms-inline asm] Extend the MC AsmParser API to match MCInsts (but not emit).
This new API will be used by clang to parse ms-style inline asms.
One goal of this project is to use this style of inline asm for targets other
then x86. Therefore, this API needs to be implemented for non-x86 targets at
some point in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161624
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 9 Aug 2012 20:26:41 +0000 (20:26 +0000)]
Teach the LLVM test makefile to run the extra Clang tools' test suites
as part of check-all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161610
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 9 Aug 2012 19:43:18 +0000 (19:43 +0000)]
Another 32 to 64 bit sign extension bug.
The fields in the td definition were switched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161607
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 9 Aug 2012 15:25:52 +0000 (15:25 +0000)]
Patch to implement UMLAL/SMLAL instructions for the ARM architecture
This patch corrects the definition of umlal/smlal instructions and adds support
for matching them to the ARM dag combiner.
Bug 12213
Patch by Yin Ma!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161581
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 9 Aug 2012 01:56:44 +0000 (01:56 +0000)]
Fix the legalization of ExtLoad on ARM. ExpandUnalignedLoad did not properly
handle the cases where the memory value type was illegal.
PR 13111.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161565
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 9 Aug 2012 01:39:32 +0000 (01:39 +0000)]
This field isn't used anymore, use it with HWEncoding instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161564
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Oliveira [Thu, 9 Aug 2012 01:13:59 +0000 (01:13 +0000)]
Support for experimental targets
Added LLVM_EXPERIMENTAL_TARGETS_TO_BUILD in CMake and --enable-experimental-targets in configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161561
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 9 Aug 2012 00:30:39 +0000 (00:30 +0000)]
MachineRegisterInfo was already a friend of MachineOperand, and GCC complains
about repeated friending.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161553
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 8 Aug 2012 23:56:06 +0000 (23:56 +0000)]
Move [SU]LEB128 encoding to a utility header.
These functions are very generic. There's no reason for them to
be tied to MCObjectWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161545
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 8 Aug 2012 23:44:07 +0000 (23:44 +0000)]
Move getNextOperandForReg() into MachineRegisterInfo.
MRI provides iterators for traversing the use-def chains. They should
not be accessible from anywhere else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161543
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 8 Aug 2012 23:44:04 +0000 (23:44 +0000)]
Don't use getNextOperandForReg().
This way of using getNextOperandForReg() was unlikely to work as
intended. We don't give any guarantees about the order of operands in
the use-def chains, so looking only at operands following a given
operand in the chain doesn't make sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161542
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 8 Aug 2012 23:44:01 +0000 (23:44 +0000)]
Don't use getNextOperandForReg() in RAFast.
That particular optimization was probably premature anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161541
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 8 Aug 2012 23:31:14 +0000 (23:31 +0000)]
Allow legalization of target-specific SDNodes, provided that the target itself provide a legalization hook for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161536
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 8 Aug 2012 22:12:01 +0000 (22:12 +0000)]
Deal with irreducible control flow when building traces.
We filter out MachineLoop back-edges during the trace-building PO
traversals, but it is possible to have CFG cycles that aren't natural
loops, and MachineLoopInfo doesn't include such cycles.
Use a standard visited set to detect such CFG cycles, and completely
ignore them when picking traces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161532
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 8 Aug 2012 22:03:50 +0000 (22:03 +0000)]
Remove some coding violations. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161530
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 8 Aug 2012 22:01:55 +0000 (22:01 +0000)]
Cache a commonly used reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161529
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 8 Aug 2012 20:31:37 +0000 (20:31 +0000)]
Add test triples to fix win32 failures. Revert workaround from r161292.
I don't have a win32 system to test, so hopefully I got them all fixed here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161519
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 8 Aug 2012 18:37:39 +0000 (18:37 +0000)]
Remove OpenBSD defines:
- The defines are in stddint.h, which is #include'd already.
- The block wasn't used anyway, since it was _OpenBSD_, and not __OpenBSD__
Patch by David Hill!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161515
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 8 Aug 2012 18:24:23 +0000 (18:24 +0000)]
Heed -stress-early-ifcvt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161513
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 8 Aug 2012 18:19:58 +0000 (18:19 +0000)]
Get the MispredictPenalty from MCSchedModel.
Thanks, Andy!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161507
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Wed, 8 Aug 2012 18:04:45 +0000 (18:04 +0000)]
revert my previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161505
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Wed, 8 Aug 2012 17:45:43 +0000 (17:45 +0000)]
enable Hexagon target from cmake
This patch allows us to use cmake to specify a cross compiler for Hexagon.
In particular, the patch adds a missing case for the target Hexagon in
cmake/config-ix.cmake, and it moves LLVM_DEFAULT_TARGET_TRIPLE and TARGET_TRIPLE
variables from cmake/config-ix.cmake to the toplevel CMakeLists.txt to make them
available at configure time. Here is the command line that I have used to test
my patches:
$ cmake -G Ninja -D BUILD_SHARED_LIBS:BOOL=ON -D LLVM_TARGETS_TO_BUILD:STRING=Hexagon -D TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_DEFAULT_TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_TARGET_ARCH:STRING=hexagon-unknown-linux-gnu -D LLVM_ENABLE_PIC:BOOL=OFF ..
$ ninja check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161504
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 8 Aug 2012 14:51:03 +0000 (14:51 +0000)]
Typedefs and indentation fixes from the Andy Zhang/PAX macro argument patch.
Committing it first as it makes the "real" patch a lot easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161491
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 8 Aug 2012 13:27:04 +0000 (13:27 +0000)]
llvm/test/MC/COFF/seh.s: Fixup corresponding to r161487.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161489
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 8 Aug 2012 12:46:46 +0000 (12:46 +0000)]
Fix for .pdata and .xdata section attributes on COFF.
Patch by kai@redstar.de !
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161487
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 8 Aug 2012 08:21:24 +0000 (08:21 +0000)]
Sphinxify the CommandLine document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161479
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 8 Aug 2012 06:42:30 +0000 (06:42 +0000)]
Move header so that it can be picked up by other .rst files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161478
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 8 Aug 2012 06:30:30 +0000 (06:30 +0000)]
Add `.pushsection', `.popsection', and `.previous' directives to Darwin ASM.
There are situations where inline ASM may want to change the section -- for
instance, to create a variable in the .data section. However, it cannot do this
without (potentially) restoring to the wrong section. E.g.:
asm volatile (".section __DATA, __data\n\t"
".globl _fnord\n\t"
"_fnord: .quad 1f\n\t"
".text\n\t"
"1:" :::);
This may be wrong if this is inlined into a function that has a "section"
attribute. The user should use `.pushsection' and `.popsection' here instead.
The addition of `.previous' is added for completeness.
<rdar://problem/
12048387>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161477
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 8 Aug 2012 02:44:16 +0000 (02:44 +0000)]
Added MispredictPenalty to SchedMachineModel.
This replaces an existing subtarget hook on ARM and allows standard
CodeGen passes to potentially use the property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161471
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 8 Aug 2012 02:44:11 +0000 (02:44 +0000)]
Minor cleanup of defaultDefLatency API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161470
91177308-0d34-0410-b5e6-
96231b3b80d8