Reed Kotler [Sat, 23 Feb 2013 03:09:56 +0000 (03:09 +0000)]
Expand pseudos/macros for Selt. This is the last of the complex
macros.The rest is some small misc. stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175950
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 23 Feb 2013 00:52:09 +0000 (00:52 +0000)]
ARM: Convenience aliases for 'srs*' instructions.
Handle an implied 'sp' operand.
rdar://
11466783
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175940
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 23 Feb 2013 00:31:32 +0000 (00:31 +0000)]
Fixed a careless mistake.
rdar://
13273675.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175939
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 22 Feb 2013 23:50:08 +0000 (23:50 +0000)]
Use getSplitDebugFilename when constructing the skeleton cu and
update testcase accordingly to give the correct name to the cu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175934
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 22 Feb 2013 23:50:04 +0000 (23:50 +0000)]
Add a field to the compile unit of where we plan on splitting out
the debug info for -gsplit-dwarf so we can encode that location
in the skeleton cu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175933
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 22 Feb 2013 23:50:01 +0000 (23:50 +0000)]
Add a TODO and explain when we can get rid of the isMain field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175932
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 22 Feb 2013 23:49:58 +0000 (23:49 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175931
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 22 Feb 2013 23:33:30 +0000 (23:33 +0000)]
SelectionDAG compile time improvement.
One of the phases of SelectionDAG is LegalizeVectors. We don't need to sort the DAG and copy nodes around if there are no vector ops.
Speeds up the compilation time of SelectionDAG on a big scalar workload by ~8%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175929
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 22 Feb 2013 21:10:03 +0000 (21:10 +0000)]
[mips] Emit call16 operator instead of got_disp. The former allows lazy binding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175920
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 22 Feb 2013 19:53:30 +0000 (19:53 +0000)]
Fix test by matching movaps instead of AVX-only vmovaps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175914
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 22 Feb 2013 19:19:44 +0000 (19:19 +0000)]
x86_64: designate most general purpose and SSE registers as callee save under coldcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175911
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 22 Feb 2013 19:19:41 +0000 (19:19 +0000)]
Revert "Test commit"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175910
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 22 Feb 2013 19:18:15 +0000 (19:18 +0000)]
Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175909
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 22 Feb 2013 18:58:26 +0000 (18:58 +0000)]
An Optional<T> is pod-like if the inner type is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175908
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 22 Feb 2013 18:16:21 +0000 (18:16 +0000)]
Remove unused CHECK lines copied from another test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175905
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 22 Feb 2013 16:18:31 +0000 (16:18 +0000)]
More tests to global struct vectorizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175898
91177308-0d34-0410-b5e6-
96231b3b80d8
Pekka Jaaskelainen [Fri, 22 Feb 2013 12:03:07 +0000 (12:03 +0000)]
Made it more explicit that the self-referential llvm.loop identifier metadata
should be unique for each loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175888
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Fri, 22 Feb 2013 11:22:58 +0000 (11:22 +0000)]
R600/SI: Add pattern for sign extension of i1 to i32.
16 more little piglits with radeonsi.
NOTE: This is a candidate for the Mesa stable branch.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175887
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Fri, 22 Feb 2013 11:22:54 +0000 (11:22 +0000)]
R600/SI: Add pattern for logical or of i1 values.
24 more little piglits with radeonsi.
NOTE: This is a candidate for the Mesa stable branch.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175886
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Fri, 22 Feb 2013 11:22:49 +0000 (11:22 +0000)]
R600/SI: Add pattern for fceil.
9 more little piglits with radeonsi.
NOTE: This is a candidate for the Mesa stable branch.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175885
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Fri, 22 Feb 2013 10:01:33 +0000 (10:01 +0000)]
Make ARMAsmPrinter generate the correct alignment specifier syntax in instructions.
The Printer will now print instructions with the correct alignment specifier syntax, like
vld1.8 {d16}, [r0:64]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175884
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 22 Feb 2013 09:09:42 +0000 (09:09 +0000)]
Use references to attribute groups on the call/invoke instructions.
Listing all of the attributes for the callee of a call/invoke instruction is way
too much and makes the IR unreadable. Use references to attributes instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175877
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Fri, 22 Feb 2013 05:59:39 +0000 (05:59 +0000)]
Fix a nomenclature mistake. Slt->Slti in the functions. The "i" refers
to the immediate operand of sli or cmp function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175865
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Fri, 22 Feb 2013 05:10:51 +0000 (05:10 +0000)]
Expand mips16 SelT form pseudso/macros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175862
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 22 Feb 2013 01:50:38 +0000 (01:50 +0000)]
Fix isa<> check which could never be true.
It was incorrectly checking a Function* being an IntrinsicInst* which
isn't possible. It should always have been checking the CallInst* instead.
Added test case for x86 which ensures we only get one constant load.
It was 2 before this change.
rdar://problem/
13267920
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175853
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 22 Feb 2013 01:15:08 +0000 (01:15 +0000)]
Remove code copied from GenRegisterInfo.inc.
There's no apparent reason this code was copied from generated source
into a .cpp. It sets a bad example for those working on other targets
and trying to understand the register info API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175849
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 22 Feb 2013 00:50:48 +0000 (00:50 +0000)]
Code cleanup: pass Offset by pointer to parseInstruction to more explicitly
convey that it's a INOUT argument.
Also, if parsing of entry instructions fails, don't push the entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175847
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 22 Feb 2013 00:50:09 +0000 (00:50 +0000)]
Remove warning about default covering no cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175846
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 22 Feb 2013 00:40:12 +0000 (00:40 +0000)]
Add a bitmask for NoBuiltin. This should *not* be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175843
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 22 Feb 2013 00:12:35 +0000 (00:12 +0000)]
Implement the NoBuiltin attribute.
The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should
not treat the callee function as a built-in function. I.e., it shouldn't try to
replace that function with different code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175835
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 21 Feb 2013 22:58:42 +0000 (22:58 +0000)]
Stop relying on physical register kill flags in isKilled() in the two-address
pass. One of the callers of isKilled() can cope with overapproximation of kills
and the other can't, so I added a flag to indicate this.
In theory this could pessimize code slightly, but in practice most physical
register uses are kills, and most important kills of physical registers are the
only uses of that register prior to register allocation, so we can recognize
them as kills even without kill flags.
This is relevant because LiveIntervals gets rid of all kill flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175821
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 21 Feb 2013 22:53:19 +0000 (22:53 +0000)]
Previously, parsing capability of the .debug_frame section was added
to lib/DebugInfo, with dumping in llvm-dwarfdump. This patch adds
initial ability to parse and dump CFA instructions contained in
entries.
To keep it manageable, the patch omits some more advanced capabilities
(accounted in TODOs):
* Parsing of instructions with BLOCK arguments (expression lists)
* Dumping of actual instruction arguments (currently only names are
dumped). This is quite tricky since the dumper has to effectively
"interpret" the instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175820
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Feb 2013 22:48:34 +0000 (22:48 +0000)]
Limit cast machinery to preserve const and not accept temporaries
After cleaning up the following type hierarchies:
* TypeLoc: r175462
* SVal: r175594
* CFGElement: r175462
* ProgramPoint: r175812
that all invoked undefined behavior by causing a derived copy construction of a
base object through an invalid cast (thus supporting code that relied on
casting temporaries that were direct base objects) Clang/LLVM is now clean of
casts of temporaries. So here's some fun SFINAE machinery (courtesy of Eli
Friedman, with some porting back from C++11 to LLVM's traits by me) to cause
compile-time failures if llvm::cast & friends are ever passed an rvalue.
This should avoid a repeat of anything even remotely like PR14321/r168124.
Thanks to Jordan Rose for the help with the various Static Analyzer related
hierarchies that needed cleaning up, Eli for the SFINAE, Richard Smith, John
McCall, Ted Kremenek, and Anna Zaks for their input/reviews/patience along the
way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175819
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 21 Feb 2013 22:39:03 +0000 (22:39 +0000)]
Allow GlobalValues to vectorize with AliasAnalysis
Storing the load/store instructions with the values
and inspect them using Alias Analysis to make sure
they don't alias, since the GEP pointer operand doesn't
take the offset into account.
Trying hard to not add any extra cost to loads and stores
that don't overlap on global values, AA is *only* calculated
if all of the previous attempts failed.
Using biggest vector register size as the stride for the
vectorization access, as we're being conservative and
the cost model (which calculates the real vectorization
factor) is only run after the legalization phase.
We might re-think this relationship in the future, but
for now, I'd rather be safe than sorry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175818
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 21 Feb 2013 22:16:43 +0000 (22:16 +0000)]
Re-apply r175688, with the changes suggested by Jakob in PR15320.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175809
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 21 Feb 2013 21:40:51 +0000 (21:40 +0000)]
Remove dead code and whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175804
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Thu, 21 Feb 2013 21:32:00 +0000 (21:32 +0000)]
Clear the whole table including the tombstones, since the tombstone count will
be set to zero that is what it was intended. Should improve performance of
the data structure when clear is invoked frequently (both compile time and
memory usage).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175799
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 21 Feb 2013 20:05:00 +0000 (20:05 +0000)]
Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo
to TargetFrameLowering, where it belongs. Incidentally, this allows us
to delete some duplicated (and slightly different!) code in TRI.
There are potentially other layering problems that can be cleaned up
as a result, or in a similar manner.
The refactoring was OK'd by Anton Korobeynikov on llvmdev.
Note: this touches the target interfaces, so out-of-tree targets may
be affected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175788
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 21 Feb 2013 19:46:51 +0000 (19:46 +0000)]
Don't assert on empty attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175785
91177308-0d34-0410-b5e6-
96231b3b80d8
Anshuman Dasgupta [Thu, 21 Feb 2013 19:39:40 +0000 (19:39 +0000)]
Hexagon: Expand cttz, ctlz, and ctpop for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175783
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 21 Feb 2013 19:35:21 +0000 (19:35 +0000)]
Make RAFast::UsedInInstr indexed by register units.
This fixes some problems with too conservative checking where we were
marking all aliases of a register as used, and then also checking all
aliases when allocating a register.
<rdar://problem/
13249625>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175782
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 21 Feb 2013 18:37:54 +0000 (18:37 +0000)]
Radar numbers don't belong in source code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175775
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 21 Feb 2013 17:26:05 +0000 (17:26 +0000)]
Trivial cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175771
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Redmond [Thu, 21 Feb 2013 17:20:45 +0000 (17:20 +0000)]
add missing space which prevented the llvm.loop code-block from appearing in the
generated html.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175769
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 21 Feb 2013 17:12:27 +0000 (17:12 +0000)]
Large code model support for PowerPC.
Large code model is identical to medium code model except that the
addis/addi sequence for "local" accesses is never used. All accesses
use the addis/ld sequence.
The coding changes are straightforward; most of the patch is taken up
with creating variants of the medium model tests for large model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175767
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 21 Feb 2013 17:01:59 +0000 (17:01 +0000)]
Revert r175688 - It broke a test case (see PR15320).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175765
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 21 Feb 2013 16:40:18 +0000 (16:40 +0000)]
getX86SubSuperRegister has a special mode with High=true for i64 which
exists solely to enable it to call itself for i8 with some registers.
The proposed patch simplifies the function somewhat to make the High
bit only meaningful for the i8 mode, which makes sense. No functional
difference (getX86SubSuperRegister is not getting called from anywhere
outside with i64 and High=true).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175762
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 21 Feb 2013 15:24:35 +0000 (15:24 +0000)]
DAGCombiner: Make the post-legalize vector op optimization more aggressive.
A legal BUILD_VECTOR goes in and gets constant folded into another legal
BUILD_VECTOR so we don't lose any legality here. The problematic PPC
optimization that made this check necessary was fixed recently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175759
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:41 +0000 (15:17 +0000)]
R600/SI: inline V_ADD|SUB_F32 patterns
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175758
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:36 +0000 (15:17 +0000)]
R600/SI: replace IMPLICIT_DEF with SIOperand.ZERO
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175757
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:32 +0000 (15:17 +0000)]
R600/SI: replace SI_V_CNDLT with a pattern
It actually fixes quite a bunch of piglit tests.
This is a candidate for the mesa-stable branch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175756
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:27 +0000 (15:17 +0000)]
R600/SI: use patterns for clamp, fabs, fneg
Instead of using custom inserters, it's simpler and
should make DAG folding easier.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175755
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:22 +0000 (15:17 +0000)]
R600/SI: add all the other missing asm operands v2
v2: put implicit parameters in []
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175754
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:17 +0000 (15:17 +0000)]
R600/SI: add the missing M*BUF|IMG asm operands
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175753
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:13 +0000 (15:17 +0000)]
R600/SI: add the missing S_* asm operands
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175752
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:09 +0000 (15:17 +0000)]
R600/SI: rework VOP3 classes
Order the classes and add asm operands.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175751
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:17:04 +0000 (15:17 +0000)]
R600/SI: simplify VOPC_* pattern v2
Fixing asm operation names.
v2: fix name of the e64 encoding, also add asm operands
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175750
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:16:58 +0000 (15:16 +0000)]
R600/SI: rework VOP2_* pattern v2
Fixing asm operation names.
v2: use ZERO constant, also add asm operands
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175749
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:16:53 +0000 (15:16 +0000)]
R600/SI: rework VOP1_* patterns v2
Fixing asm operation names.
v2: use ZERO constant, also add asm operands
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175748
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:16:49 +0000 (15:16 +0000)]
R600/SI: add constant for inline zero operand
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175747
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Thu, 21 Feb 2013 15:16:44 +0000 (15:16 +0000)]
R600/SI: cleanup SIInstrInfo.td and SIInstrFormat.td
Those two files got mixed up.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175746
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 21 Feb 2013 15:06:59 +0000 (15:06 +0000)]
R600: Fix for Unigine when MachineSched is enabled
Fixes for-loop.cl piglit test
Patch By: Vincent Lejeune
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175742
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 21 Feb 2013 14:35:42 +0000 (14:35 +0000)]
Code review cleanup for r175697
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175739
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Thu, 21 Feb 2013 08:57:10 +0000 (08:57 +0000)]
R600/SI: Make sure M0 is loaded for V_INTERP_MOV_F32
NOTE: This is a candidate for the Mesa stable branch.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175733
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 21 Feb 2013 08:51:58 +0000 (08:51 +0000)]
Don't rely on the isDead() MachineOperand flag when updating LiveIntervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175732
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 21 Feb 2013 08:51:55 +0000 (08:51 +0000)]
Use getInterval() instead of getOrCreateInterval().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175731
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Feb 2013 07:58:45 +0000 (07:58 +0000)]
Only include move-related Optional<T> tests when rvalue references are available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175730
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Feb 2013 07:55:39 +0000 (07:55 +0000)]
Add move ctor/assignment to Optional<T>
Code review feedback for r175580 by Jordan Rose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175729
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 21 Feb 2013 07:02:30 +0000 (07:02 +0000)]
Make another kill check LiveIntervals-aware.
This brings the number of remaining failures in 'make check' without
LiveVariables down to 39, with 1 unexpectedly passing test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175727
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 21 Feb 2013 07:02:28 +0000 (07:02 +0000)]
Split part of isKilled() into a separate function for use elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175726
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Feb 2013 06:08:22 +0000 (06:08 +0000)]
Correct spelling of 'enumerator'.
Post commit code review feedback to r175705 from Jordan Rose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175724
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Feb 2013 06:05:57 +0000 (06:05 +0000)]
Make Optional<T>'s operator bool 'explicit' in C++11
Provides a general way to add 'explicit' for conversion operators (a no-op when
compiling as C++98).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175723
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 21 Feb 2013 04:33:02 +0000 (04:33 +0000)]
Update isKilledAt in TwoAddressInstructionPass.cpp to use LiveIntervals when
available.
With this commit there are no longer any assertion or verifier failures when
running 'make check' without LiveVariables. There are still 56 failing tests
with codegen differences and 1 unexpectedly passing test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175719
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Thu, 21 Feb 2013 04:22:38 +0000 (04:22 +0000)]
Expand the sel pseudo/macro. This generates basic blocks where previously
there were inline br .+4 instructions. Soon everything can enjoy the
full instruction scheduling experience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175718
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 21 Feb 2013 02:32:25 +0000 (02:32 +0000)]
ADT/Optional.h: Appease msvc. It reapplies r175626.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175710
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 21 Feb 2013 02:21:29 +0000 (02:21 +0000)]
[objdump] Add PT_PHDR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175709
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 21 Feb 2013 02:09:31 +0000 (02:09 +0000)]
Mips specific standalone assembler addressing mode %hi and %lo.
The constructs %hi() and %lo() represent the high and low 16
bits of the address.
Because the 16 bit offset field of an LW instruction is
interpreted as signed, if bit 15 of the low part is 1 then the
low part will act as a negative and 1 needs to be added to the
high part.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175707
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 21 Feb 2013 00:38:25 +0000 (00:38 +0000)]
PPCDAGToDAGISel::PostprocessISelDAG()
This patch implements the PPCDAGToDAGISel::PostprocessISelDAG virtual
method to perform post-selection peephole optimizations on the DAG
representation.
One optimization is implemented here: folds to clean up complex
addressing expressions for thread-local storage and medium code
model. It will also be useful for large code model sequences when
those are added later. I originally thought about doing this on the
MI representation prior to register assignment, but it's difficult to
do effective global dead code elimination at that point. DCE is
trivial on the DAG representation.
A typical example of a candidate code sequence in assembly:
addis 3, 2, globalvar@toc@ha
addi 3, 3, globalvar@toc@l
lwz 5, 0(3)
When the final instruction is a load or store with an immediate offset
of zero, the offset from the add-immediate can replace the zero,
provided the relocation information is carried along:
addis 3, 2, globalvar@toc@ha
lwz 5, globalvar@toc@l(3)
Since the addi can in general have multiple uses, we need to only
delete the instruction when the last use is removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175697
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Feb 2013 00:27:28 +0000 (00:27 +0000)]
Provide a "None" value for convenience when using Optional<T>()
This implementation of NoneType/None does have some holes but I haven't
found one that doesn't - open to improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175696
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 21 Feb 2013 00:05:29 +0000 (00:05 +0000)]
Relocation enablement for PPC DAG postprocessing pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175693
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Feb 2013 23:57:30 +0000 (23:57 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175692
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Feb 2013 23:51:10 +0000 (23:51 +0000)]
Don't allocate memory in LiveInterval::join().
Rewrite value numbers directly in the 'Other' LiveInterval which is
moribund anyway. This avoids allocating the OtherAssignments vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175690
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Feb 2013 23:36:57 +0000 (23:36 +0000)]
Kill of TransferDeadFlag - Dead copies and subreg-to-reg instructions should
just be turned into kills on the spot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175688
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Wed, 20 Feb 2013 23:30:56 +0000 (23:30 +0000)]
as the allocator is reset zero out the number of bytes allocated, this was just
missed before but probably what was intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175687
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 20 Feb 2013 23:11:17 +0000 (23:11 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.
Mips specific standalone assembler directive "set at".
This directive changes the general purpose register
that the assembler will use when given the symbolic
register name $at.
This does not include negative testing. That will come
in a future patch.
A side affect of this patch recognizes the different
GPR register names for temporaries between old abi
and new abi so a test case for that is included.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175686
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Feb 2013 23:08:26 +0000 (23:08 +0000)]
Copy single reaching defs directly into the LiveInterval.
When findReachingDefs() finds that only one value can reach the basic
block, just copy the work list of visited blocks directly into the live
interval.
Sort the block list and use a LiveRangeUpdater to make the bulk add
fast.
When multiple reaching defs are found, transfer the work list to the
updateSSA() work list as before. Also use LiveRangeUpdater in
updateLiveIns() following updateSSA().
This makes live interval analysis more than 3x faster on one huge test
case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175685
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Feb 2013 23:04:11 +0000 (23:04 +0000)]
Add and remove the attribute from the correct slot.
The slot that we're adding/removing the attribute from may not be the same as
the attribute coming in. Make sure that they match up before we try to
add/remove them.
PR15313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175684
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 20 Feb 2013 22:43:03 +0000 (22:43 +0000)]
Stabilize vec_constants.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175683
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Verbruggen [Wed, 20 Feb 2013 22:33:46 +0000 (22:33 +0000)]
Fix accidental concatenation for "outputuntil" in the -debug-buffer-size option description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175682
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 20 Feb 2013 22:21:35 +0000 (22:21 +0000)]
MCParser: Update method names per coding guidelines.
s/AddDirectiveHandler/addDirectiveHandler/
s/ParseMSInlineAsm/parseMSInlineAsm/
s/ParseIdentifier/parseIdentifier/
s/ParseStringToEndOfStatement/parseStringToEndOfStatement/
s/ParseEscapedString/parseEscapedString/
s/EatToEndOfStatement/eatToEndOfStatement/
s/ParseExpression/parseExpression/
s/ParseParenExpression/parseParenExpression/
s/ParseAbsoluteExpression/parseAbsoluteExpression/
s/CheckForValidSection/checkForValidSection/
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175675
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 22:10:02 +0000 (22:10 +0000)]
Only use LiveIntervals in TwoAddressInstructionPass, not a mix of Liveintervals
and SlotIndexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175674
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 22:10:00 +0000 (22:10 +0000)]
Find anchoring end points for repairIntervalsInRange and repairIndexesInRange
automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175673
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 22:09:57 +0000 (22:09 +0000)]
Make repairIntervalsInRange() more robust. There are now no longer any liveness-
related failures when running 'make check' without LiveVariables with the
verifier enabled. Some of the remaining failures elsewhere may still be fallout
from incorrect updating of LiveIntervals or the few missing cases left in the
two-address pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175672
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 20 Feb 2013 21:33:32 +0000 (21:33 +0000)]
DAGCombiner: Fold pointless truncate, bitcast, buildvector series
(2xi32) (truncate ((2xi64) bitcast (buildvector i32 a, i32 x, i32 b, i32 y)))
can be folded into a (2xi32) (buildvector i32 a, i32 b).
Such a DAG would cause uneccessary vdup instructions followed by vmovn
instructions.
We generate this code on ARM NEON for a setcc olt, 2xf64, 2xf64. For example, in
the vectorized version of the code below.
double A[N];
double B[N];
void test_double_compare_to_double() {
int i;
for(i=0;i<N;i++)
A[i] = (double)(A[i] < B[i]);
}
radar://
13191881
Fixes bug 15283.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175670
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 20 Feb 2013 21:31:28 +0000 (21:31 +0000)]
R600: Update for name changes from r175667.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175668
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 20 Feb 2013 21:13:59 +0000 (21:13 +0000)]
Update TargetLowering ivars for name policy.
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
ivars should be camel-case and start with an upper-case letter. A few in
TargetLowering were starting with a lower-case letter.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175667
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 20 Feb 2013 20:41:42 +0000 (20:41 +0000)]
Additional fixes for bug 15155.
This handles the cases where the 6-bit splat element is odd, converting
to a three-instruction sequence to add or subtract two splats. With this
fix, the XFAIL in test/CodeGen/PowerPC/vec_constants.ll is removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175663
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Wed, 20 Feb 2013 20:18:10 +0000 (20:18 +0000)]
[objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175659
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Feb 2013 20:15:55 +0000 (20:15 +0000)]
Update a comment that looks to have been accidentally deleted many moons ago.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175658
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Feb 2013 19:28:46 +0000 (19:28 +0000)]
Rewrite comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175651
91177308-0d34-0410-b5e6-
96231b3b80d8