Jakob Stoklund Olesen [Fri, 8 Mar 2013 18:08:57 +0000 (18:08 +0000)]
Rewrite the physreg part of findLastUseBefore().
To find the last use of a register unit, start from the bottom and scan
upwards until a user is found.
<rdar://problem/
13353090>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176706
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 8 Mar 2013 18:08:54 +0000 (18:08 +0000)]
Avoid creating a SlotIndex from the end() iterator.
No test case, spotted by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176705
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 8 Mar 2013 17:03:19 +0000 (17:03 +0000)]
Remove default from fully covered switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176703
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 8 Mar 2013 17:01:18 +0000 (17:01 +0000)]
Force cpu in test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176702
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 8 Mar 2013 16:58:37 +0000 (16:58 +0000)]
Insert the reduction start value into the first bypass block to preserve domination.
Fixes PR15344.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176701
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:11 +0000 (15:37 +0000)]
R600: Optimize another selectcc case
fold selectcc (selectcc x, y, a, b, cc), b, a, b, setne ->
selectcc x, y, a, b, cc
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176700
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:09 +0000 (15:37 +0000)]
R600: Improve custom lowering of select_cc
Two changes:
1. Prefer SET* instructions when possible
2. Handle the CND*_INT case with floating-point args
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176699
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:07 +0000 (15:37 +0000)]
R600: Change operation action from Custom to Expand for BR_CC
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176698
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:05 +0000 (15:37 +0000)]
R600: Change operation action from Custom to Expand for SETCC
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176697
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:03 +0000 (15:37 +0000)]
R600: Set BooleanContents to ZeroOrNegativeOneBooleanContent
Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176696
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:37:02 +0000 (15:37 +0000)]
LegalizeDAG: Respect the result of TLI.getBooleanContents() when expanding SETCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176695
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 8 Mar 2013 15:36:57 +0000 (15:36 +0000)]
DAGCombiner: Use correct value type for checking legality of BR_CC v3
LegalizeDAG.cpp uses the value of the comparison operands when checking
the legality of BR_CC, so DAGCombiner should do the same.
v2:
- Expand more BR_CC value types for NVPTX
v3:
- Expand correct BR_CC value types for Hexagon, Mips, and XCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176694
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Fri, 8 Mar 2013 15:34:07 +0000 (15:34 +0000)]
R600: Change addresspace in fold-kcache.ll
AddressSpace definition has changed in a previous commit, reflect it
to avoid false failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176693
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 8 Mar 2013 15:27:30 +0000 (15:27 +0000)]
AArch64: specify full triple in test as only Linux works for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176692
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Fri, 8 Mar 2013 14:44:00 +0000 (14:44 +0000)]
R600/SI: adjust test to recent changes
Signed-off-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176691
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 8 Mar 2013 14:15:15 +0000 (14:15 +0000)]
Hexagon: Add patterns for zero extended loads from i1->i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176689
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 8 Mar 2013 13:55:07 +0000 (13:55 +0000)]
AArch64: expand sincos operations, we don't support them.
Patch based on Mans Rullgard's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176688
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Fri, 8 Mar 2013 10:58:01 +0000 (10:58 +0000)]
R600/SI: Use source scheduler
This is certainly not the last word on scheduling for this target, but
right now this allows a few apps to run / finish with radeonsi, most
notably UT2004 / Lightsmark. They fail to compile some shaders with the
default scheduler because it ends up trying to spill registers, which
we don't support yet (and which is probably a bad idea in general for
performance if it can be avoided).
NOTE: This is a candidate for the Mesa stable branch.
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176687
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 8 Mar 2013 05:40:34 +0000 (05:40 +0000)]
Add -verify-misched option.
This verifies live intervals both before and after scheduling. It's
useful for anyone hacking on live interval update.
Note that we don't yet pass verification all the time. We don't yet
handle updating nonallocatable live intervals perfectly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176685
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 8 Mar 2013 02:27:40 +0000 (02:27 +0000)]
Another test fix for r176671.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176679
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 8 Mar 2013 02:26:16 +0000 (02:26 +0000)]
Couple of test fixes for r176671.
Not sure why these aren't failing on my linux machine, but this should cover
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176678
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 8 Mar 2013 02:21:08 +0000 (02:21 +0000)]
Revert r176154 in favor of a better approach.
Code generation makes some basic assumptions about the IR it's been given. In
particular, if there is only one 'invoke' in the function, then that invoke
won't be going away. However, with the advent of the `llvm.donothing' intrinsic,
those invokes may go away. If all of them go away, the landing pad no longer has
any users. This confuses the back-end, which asserts.
This happens with SjLj exceptions, because that's the model that modifies the IR
based on there being invokes, etc. in the function.
Remove any invokes of `llvm.donothing' during SjLj EH preparation. This will
give us a CFG that the back-end won't be confused about. If all of the invokes
in a function are removed, then the SjLj EH prepare pass won't insert the bogus
code the relies upon the invokes being there.
<rdar://problem/
13228754&
13316637>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176677
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 8 Mar 2013 01:26:10 +0000 (01:26 +0000)]
remove an ancient and quaint bit of commented out makefile goo from when
GCC was the system compiler on the mac.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176675
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 8 Mar 2013 00:23:31 +0000 (00:23 +0000)]
Upgrade tests to the latest debug info format.
Mostly this is just changing the named metadata (llvm.dbg.sp, llvm.dbg.gv,
llvm.dbg.<func>.lv, etc -> llvm.dbg.cu), adding a few fields to older records
(DIVariable: flags/inlined-at, DICompileUnit: sp/gv/types,
DISubprogram: local variables list)
The tests to update were discovered by a change I'm working on to remove debug
info version support - so any tests using old debug info versions I haven't
updated probably are bad tests or just not actually designed to test debug
info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176671
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 7 Mar 2013 23:55:51 +0000 (23:55 +0000)]
Add a getPassName() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176669
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 7 Mar 2013 23:55:49 +0000 (23:55 +0000)]
Rename isEarlierInSameTrace to isUsefulDominator.
In very rare cases caused by irreducible control flow, the dominating
block can have the same trace head without actually being part of the
trace.
As long as such a dominator still has valid instruction depths, it is OK
to use it for computing instruction depths.
Rename the function to avoid lying, and add a check that instruction
depths are computed for the dominator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176668
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 22:20:06 +0000 (22:20 +0000)]
Keep coding stanard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176661
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 22:10:33 +0000 (22:10 +0000)]
Don't create IRBuilder if we can return from the method earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176660
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 7 Mar 2013 21:38:33 +0000 (21:38 +0000)]
[fast-isel] Seriously, add support for the expect intrinsic.
rdar://
13370942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176659
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 20:56:18 +0000 (20:56 +0000)]
Fix tautological compare. Not sure why this didn't trigger any test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176652
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 20:53:34 +0000 (20:53 +0000)]
Replace temporary vectors with arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176651
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 7 Mar 2013 20:42:17 +0000 (20:42 +0000)]
[fast-isel] Add support for the expect intrinsic.
rdar://
13370942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176649
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 20:33:29 +0000 (20:33 +0000)]
ArrayRefize some code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176648
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 7 Mar 2013 20:28:34 +0000 (20:28 +0000)]
Hexagon: Handle i8, i16 and i1 Var Args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176647
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:22:39 +0000 (20:22 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176646
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:21:27 +0000 (20:21 +0000)]
Change Index type from unsigned long to unsigned. This should fix PR14980.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176645
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:04:17 +0000 (20:04 +0000)]
Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176643
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:01:47 +0000 (20:01 +0000)]
Change NULL to 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176642
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 7 Mar 2013 20:01:19 +0000 (20:01 +0000)]
ArrayRef ca accept one element. Simplify code a little bit, also it matches now
coding in the other places of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176641
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 7 Mar 2013 19:21:08 +0000 (19:21 +0000)]
pre-RA-sched debug-only fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176638
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 7 Mar 2013 19:10:28 +0000 (19:10 +0000)]
Hexagon: Add support to lower block address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176637
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 7 Mar 2013 19:07:57 +0000 (19:07 +0000)]
pre-RA-sched assertion fix. This bug was exposed by r176037.
rdar:
13370002 [pre-RA-sched] assertion: released too many times
I tracked this down to an earlier hack that is no longer applicable
and interfered with normal scheduler logic. With the changes in
r176037, it was causing an instruction to be scheduled multiple times.
I have an external test case that I tried hard to reduce and
failed. I can't even reproduce with llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176636
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 18:51:02 +0000 (18:51 +0000)]
Move testcase, this is testing extraction not inserting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176635
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 7 Mar 2013 18:48:40 +0000 (18:48 +0000)]
X86: Fold EXTRACT_SUBVECTORs of a BUILD_VECTOR into a smaller BUILD_VECTOR.
That can usually be lowered efficiently and is common in sandybridge code.
It would be nice to do this in DAGCombiner but we can't insert arbitrary
BUILD_VECTORs this late.
Fixes PR15462.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176634
91177308-0d34-0410-b5e6-
96231b3b80d8
Pekka Jaaskelainen [Thu, 7 Mar 2013 16:46:43 +0000 (16:46 +0000)]
Fixed a crash when cloning a function into a function with
different size argument list and without attributes in the
arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176632
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:04:14 +0000 (09:04 +0000)]
R600/SI: rework input interpolation v2
v2: update CMakeLists.txt as well
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176626
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:04:04 +0000 (09:04 +0000)]
R600/SI: remove SI_vs_load_buffer_index
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176625
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:59 +0000 (09:03 +0000)]
R600/SI: remove SGPR address space v2
v2: fix R600 regressions
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176624
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:52 +0000 (09:03 +0000)]
R600/SI: add proper formal parameter handling for SI
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176623
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:46 +0000 (09:03 +0000)]
R600/SI: remove shader type intrinsic
Just encode the type as target specific attribute.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176622
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:38 +0000 (09:03 +0000)]
R600/SI: switch types of SGPRs to v*i8
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176621
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 7 Mar 2013 09:03:30 +0000 (09:03 +0000)]
R600/SI: fix unused variable warning
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176620
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 7 Mar 2013 08:28:49 +0000 (08:28 +0000)]
Switch from a version 4.2/4.4 switch to a four-byte version string to be put
into the actual gcov file.
Instead of using the bottom 4 bytes as the function identifier, use a counter.
This makes the identifier numbers stable across multiple runs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176616
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 7 Mar 2013 06:34:49 +0000 (06:34 +0000)]
No need to go through int64 and APInt when generating a new constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176615
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 7 Mar 2013 05:47:54 +0000 (05:47 +0000)]
SDAG: Handle scalarizing an extend of a <1 x iN> vector.
Just scalarize the element and rebuild a vector of the result type
from that.
rdar://
13281568
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176614
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 7 Mar 2013 02:03:08 +0000 (02:03 +0000)]
Remove GCDAProfiling.c. This copy is old, the copy in compiler-rt is newer and
is the one that should be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176608
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 7 Mar 2013 01:42:00 +0000 (01:42 +0000)]
Debug Info: store the files and directories for each compile unit.
We now emit a line table for each compile unit. To reduce the prologue size
of each line table, the files and directories used by each compile unit are
stored in std::map<unsigned, std::vector< > > instead of std::vector< >.
The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each
compile unit causes a huge increase of debug info. With this patch, each
prologue will only emit the files required by the compile unit.
rdar://problem/
13342023
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176605
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 7 Mar 2013 01:38:04 +0000 (01:38 +0000)]
ArrayRef has a OneElt constructor. Beautify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176604
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 7 Mar 2013 01:30:40 +0000 (01:30 +0000)]
Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176602
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 7 Mar 2013 01:03:35 +0000 (01:03 +0000)]
SimplifyCFG fix for volatile load/store.
Fixes rdar:
13349374.
Volatile loads and stores need to be preserved even if the language
standard says they are undefined. "volatile" in this context means "get
out of the way compiler, let my platform handle it".
Additionally, this is the only way I know of with llvm to write to the
first page (when hardware allows) without dropping to assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176599
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 7 Mar 2013 01:01:29 +0000 (01:01 +0000)]
Fix two remaining issue after fixing PR15355 when CMOV is not available
- Phi nodes should be replaced/updated after lowering CMOV into branch
because 'mainMBB' updating operand in Phi node is changed.
- Add EFLAGS in livein before lowering the 2nd CMOV. It's necessary as
we will reuse the EFLAGS generated before the 1st lowered CMOV, which
won't clobber EFLAGS. However, we need explicitly specify that.
- '-attr=-cmov' test case are added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176598
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 6 Mar 2013 21:32:03 +0000 (21:32 +0000)]
[mips] Custom-legalize BR_JT.
In N64-static, GOT address is needed to compute the branch address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176580
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 6 Mar 2013 19:04:56 +0000 (19:04 +0000)]
Generalize my previous fix for -print-options.
Always print options that differ from their implicit default. At least
for simple option types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176572
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 6 Mar 2013 18:24:34 +0000 (18:24 +0000)]
Remove tailing whitespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176570
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 6 Mar 2013 18:22:22 +0000 (18:22 +0000)]
Give -loop-vectorize an explicit default.
This way, clang -mllvm -print-options shows that the driver is overriding it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176569
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Wed, 6 Mar 2013 17:48:48 +0000 (17:48 +0000)]
Memory Dependence Analysis (not mem-dep test) take advantage of "invariant.load" metadata.
The "invariant.load" metadata indicates the memory unit being accessed is immutable.
A load annotated with this metadata can be moved across any store.
As I am not sure if it is legal to move such loads across barrier/fence, this
change dose not allow such transformation.
rdar://
11311484
Thank Arnold for code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176562
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 6 Mar 2013 05:44:53 +0000 (05:44 +0000)]
InstCombine: Don't shrink allocas when combining with a bitcast.
When considering folding a bitcast of an alloca into the alloca itself,
make sure we don't shrink the amount of memory being allocated, or
things rapidly go sideways.
rdar://
13324424
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176547
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 6 Mar 2013 01:58:03 +0000 (01:58 +0000)]
[mips] Add a line which checks function name. Rename file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176543
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 6 Mar 2013 00:17:04 +0000 (00:17 +0000)]
Fix PR15355
- Clear 'mayStore' flag when loading from the atomic variable before the
spin loop
- Clear kill flag from one use to multiple use in registers forming the
address to that atomic variable
- don't use a physical register as live-in register in BB (neither entry
nor landing pad.) by copying it into virtual register
(patch by Cameron Zwarich)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176538
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 6 Mar 2013 00:16:16 +0000 (00:16 +0000)]
Use dyn_cast instead of isa && cast. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176537
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 6 Mar 2013 00:04:32 +0000 (00:04 +0000)]
Remove duplicated forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176536
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 23:22:30 +0000 (23:22 +0000)]
[mips] Remove android calling convention.
This calling convention was added just to handle functions which return vector
of floats. The fix committed in r165585 solves the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176530
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 22:54:59 +0000 (22:54 +0000)]
[mips] Fix MipsCC::analyzeReturn so that, in soft-float mode, fp128 gets
returned in registers $2 and $4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176527
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 22:41:55 +0000 (22:41 +0000)]
[mips] Fix MipsTargetLowering::LowerCallResult and LowerReturn to correctly
handle fp128 returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176523
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 22:20:28 +0000 (22:20 +0000)]
[mips] Fix MipsTargetLowering::LowerCall to pass fp128 arguments in floating
point registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176521
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 5 Mar 2013 22:13:04 +0000 (22:13 +0000)]
[mips] Correct handling of fp128 (long double) formals and read long double
parameters from floating point registers if target is mips64 hard float.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176520
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 5 Mar 2013 22:05:16 +0000 (22:05 +0000)]
Fix a few typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176519
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 5 Mar 2013 22:01:15 +0000 (22:01 +0000)]
Add some constantness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176518
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 5 Mar 2013 21:53:57 +0000 (21:53 +0000)]
std::distance() == 0 means that iterators are equal. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176516
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Tue, 5 Mar 2013 21:47:40 +0000 (21:47 +0000)]
Add more functions to the TLI.
This patch adds many more functions to the target library information.
All of the functions being added were discovered while doing the migration
of the simplify-libcalls attribute annotation functionality to the
functionattrs pass. As a part of that work the attribute annotation logic
will query TLI to determine if a function should be annotated or not.
Signed-off-by: Meador Inge <meadori@codesourcery.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176514
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Mar 2013 20:29:23 +0000 (20:29 +0000)]
reverting patch 176508.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176513
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Mar 2013 19:37:46 +0000 (19:37 +0000)]
Hexagon: Add support for lowering block address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176508
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 5 Mar 2013 19:12:06 +0000 (19:12 +0000)]
R600: Do not predicate vector op
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176507
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Mar 2013 19:04:47 +0000 (19:04 +0000)]
Hexagon: Expand addc, adde, subc and sube.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176505
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 5 Mar 2013 19:04:12 +0000 (19:04 +0000)]
Use the right number of slashes in comment string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176504
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 5 Mar 2013 18:56:14 +0000 (18:56 +0000)]
Fixes a test by replacing .align by .p2align and setting triples explicitly.
Patch by David Sehr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176502
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 5 Mar 2013 18:54:05 +0000 (18:54 +0000)]
Update cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176501
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Mar 2013 18:51:42 +0000 (18:51 +0000)]
Hexagon: Use MO operand flags to mark constant extended instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176500
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Mar 2013 18:42:28 +0000 (18:42 +0000)]
Hexagon: Add encoding bits to the TFR64 instructions.
Set imMoveImm, isAsCheapAsAMove flags for TFRI instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176499
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 5 Mar 2013 18:41:32 +0000 (18:41 +0000)]
R600: initial scheduler code
This is a skeleton for a pre-RA MachineInstr scheduler strategy. Currently
it only tries to expose more parallelism for ALU instructions (this also
makes the distribution of GPR channels more uniform and increases the
chances of ALU instructions to be packed together in a single VLIW group).
Also it tries to reduce clause switching by grouping instruction of the
same kind (ALU/FETCH/CF) together.
Vincent Lejeune:
- Support for VLIW4 Slot assignement
- Recomputation of ScheduleDAG to get more parallelism opportunities
Tom Stellard:
- Fix assertion failure when trying to determine an instruction's slot
based on its destination register's class
- Fix some compiler warnings
Vincent Lejeune: [v2]
- Remove recomputation of ScheduleDAG (will be provided in a later patch)
- Improve estimation of an ALU clause size so that heuristic does not emit cf
instructions at the wrong position.
- Make schedule heuristic smarter using SUnit Depth
- Take constant read limitations into account
Vincent Lejeune: [v3]
- Fix some uninitialized values in ConstPair
- Add asserts to ensure an ALU slot is always populated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176498
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 5 Mar 2013 16:53:24 +0000 (16:53 +0000)]
Clarify comment for function getObjectSize
Clarify that we mean the object starting at the pointer to the end of the
underlying object and not the size of the whole allocated object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176491
91177308-0d34-0410-b5e6-
96231b3b80d8
David Sehr [Tue, 5 Mar 2013 16:46:54 +0000 (16:46 +0000)]
Add a test that .align directives on capable processors use long NOPs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176490
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 5 Mar 2013 15:04:55 +0000 (15:04 +0000)]
R600: Remove LowerConstCopyPass and lower CONST_COPY right after ISel.
Maintaining CONST_COPY Instructions until Pre Emit may prevent some ifcvt case
and taking them in account for scheduling is difficult for no real benefit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176488
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 5 Mar 2013 15:04:49 +0000 (15:04 +0000)]
R600: Turn BUILD_VECTOR into Reg_Sequence
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176487
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 5 Mar 2013 15:04:42 +0000 (15:04 +0000)]
R600: CONST_ADDRESS node is not marked as mayLoad anymore
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
mayLoad complexify scheduling and does not bring any usefull info
as the location is not writeable at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176486
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 5 Mar 2013 15:04:37 +0000 (15:04 +0000)]
R600: Use MUL_IEEE for trig/fdiv intrinsic
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176485
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 5 Mar 2013 15:04:29 +0000 (15:04 +0000)]
R600: Add support for indirect addressing of non default const buffer
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176484
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 5 Mar 2013 14:43:07 +0000 (14:43 +0000)]
Print a warning message if compiler-rt can't be built because of old CMake version to make this requirement more visible to users
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176481
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 5 Mar 2013 02:18:59 +0000 (02:18 +0000)]
llvm/test/CodeGen/Mips/mips64-f128.ll: Add explicit -mtriple=mips64el-unknown-unknown to appease win32.
FIXME: Is it expected for win32 to affect mips targets?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176471
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 5 Mar 2013 02:18:52 +0000 (02:18 +0000)]
llvm/test/CodeGen/Thumb/iabs.ll: Add explicit -mtriple=thumb-unknown-unknown to appease win32 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176470
91177308-0d34-0410-b5e6-
96231b3b80d8