Stepan Dyatkovskiy [Tue, 26 Jun 2012 11:41:47 +0000 (11:41 +0000)]
IntegersSubsetMapping: removed exclude operation, it will replaced with more universal "diff" operation in next commit.
Changes was separated onto two commits for better readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159200
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 26 Jun 2012 11:37:00 +0000 (11:37 +0000)]
Sphyinxify the Bugpoint document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159199
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 26 Jun 2012 10:50:07 +0000 (10:50 +0000)]
Removed unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159197
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 26 Jun 2012 10:05:06 +0000 (10:05 +0000)]
Rename to match other X86_64* names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159196
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 26 Jun 2012 08:04:10 +0000 (08:04 +0000)]
Shuffle optimization for AVX/AVX2.
The current patch optimizes frequently used shuffle patterns and gives these instruction sequence reduction.
Before:
vshufps $-35, %xmm1, %xmm0, %xmm2 ## xmm2 = xmm0[1,3],xmm1[1,3]
vpermilps $-40, %xmm2, %xmm2 ## xmm2 = xmm2[0,2,1,3]
vextractf128 $1, %ymm1, %xmm1
vextractf128 $1, %ymm0, %xmm0
vshufps $-35, %xmm1, %xmm0, %xmm0 ## xmm0 = xmm0[1,3],xmm1[1,3]
vpermilps $-40, %xmm0, %xmm0 ## xmm0 = xmm0[0,2,1,3]
vinsertf128 $1, %xmm0, %ymm2, %ymm0
After:
vshufps $13, %ymm0, %ymm1, %ymm1 ## ymm1 = ymm1[1,3],ymm0[0,0],ymm1[5,7],ymm0[4,4]
vshufps $13, %ymm0, %ymm0, %ymm0 ## ymm0 = ymm0[1,3,0,0,5,7,4,4]
vunpcklps %ymm1, %ymm0, %ymm0 ## ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159188
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 26 Jun 2012 05:16:37 +0000 (05:16 +0000)]
Update a bunch of stale comments that dated from when this folled the
very first (and worst) placement algorithm. These should now more
accurately reflect the reality of the pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159185
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 26 Jun 2012 04:12:49 +0000 (04:12 +0000)]
Remove some duplicate instructions that exist only to given different mnemonics for the assembler. Use InstAlias instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159184
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 26 Jun 2012 04:11:38 +0000 (04:11 +0000)]
Enable the new LoopInfo algorithm by default.
The primary advantage is that loop optimizations will be applied in a
stable order. This helps debugging and unit test creation. It is also
a better overall implementation without pathologically bad performance
on deep functions.
On large functions (llvm-stress --size=200000 | opt -loops)
Before: 0.1263s
After: 0.0225s
On deep functions (after tweaking llvm-stress, thanks Nadav):
Before: 0.2281s
After: 0.0227s
See r158790 for more comments.
The loop tree is now consistently generated in forward order, but loop
passes are applied in reverse order over the program. If we have a
loop optimization that prefers forward order, that can easily be
achieved by adding a different type of LoopPassManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159183
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 26 Jun 2012 04:11:34 +0000 (04:11 +0000)]
Remove unnecessary FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159182
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 26 Jun 2012 01:19:33 +0000 (01:19 +0000)]
Make sure type is not extended or untyped before create a constant of the type. No test case. Found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159179
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 26 Jun 2012 00:28:15 +0000 (00:28 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159178
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 25 Jun 2012 23:42:33 +0000 (23:42 +0000)]
Make some ugly hacks for inline asm operands which name a specific register a bit more thorough. PR13196.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159176
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 25 Jun 2012 23:26:10 +0000 (23:26 +0000)]
revert my previous commit (r159173), since as Eli pointed out, it's perfectly ok to mark realloc as noalias
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159175
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 25 Jun 2012 22:55:50 +0000 (22:55 +0000)]
do not set realloc() as NotAlias, since it can return the same pointer. This whole thing should be upgraded to use the MemoryBuiltin interface anyway..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159173
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 25 Jun 2012 21:49:38 +0000 (21:49 +0000)]
ARM: update peephole optimization.
More condition codes are included when deciding whether to remove cmp after
a sub instruction. Specifically, we extend from GE|LT|GT|LE to
GE|LT|GT|LE|HS|LS|HI|LO|EQ|NE. If we have "sub a, b; cmp b, a; movhs", we
should be able to replace with "sub a, b; movls".
rdar:
11725965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159166
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 25 Jun 2012 21:25:16 +0000 (21:25 +0000)]
Define DAGOperand, an empty base class for RegisterClass and Operand. This allows one to write multiclasses that are polymorphic over both registers and non-register operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159162
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 25 Jun 2012 19:47:37 +0000 (19:47 +0000)]
Fix the objc_autoreleasedReturnValue optimization code to locate
the call correctly even in the case where it is an invoke. This
fixes rdar://
11714057.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159157
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 25 Jun 2012 18:18:27 +0000 (18:18 +0000)]
Enforce stricter liveness rules for PHIs.
Verify that all paths from the entry block to a virtual register read
pass through a def. Enable this check even when MRI->isSSA() is false.
Verify that the live range of a virtual register is live out of all
predecessor blocks, even for PHI-values.
This requires that PHIElimination sometimes inserts IMPLICIT_DEF
instruction in predecessor blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159150
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 25 Jun 2012 18:12:18 +0000 (18:12 +0000)]
Run ProcessImplicitDefs on SSA form where it can be much simpler.
Implicitly defined virtual registers can simply have the <undef> bit set
on all uses, and copies can be turned into implicit defs recursively.
Physical registers are a bit trickier. We handle the common case where a
physreg def is used by a nearby instruction in the same basic block. For
more complicated cases, just leave the IMPLICIT_DEF instruction in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159149
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 25 Jun 2012 17:11:47 +0000 (17:11 +0000)]
improve optimization of invoke instructions:
- simplifycfg: invoke undef/null -> unreachable
- instcombine: invoke new -> invoke expect(0, 0) (an arbitrary NOOP intrinsic; only done if the allocated memory is unused, of course)
- verifier: allow invoke of intrinsics (to make the previous step work)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159146
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 25 Jun 2012 16:17:54 +0000 (16:17 +0000)]
check for the NoAlias attribute through CallSite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159145
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 25 Jun 2012 16:16:58 +0000 (16:16 +0000)]
add CallSite/CallInst/InvokeInst::hasFnAttr()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159144
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Mon, 25 Jun 2012 14:48:43 +0000 (14:48 +0000)]
PR13013: ELF Type identification fails for MSB type ELF files.
Fix 'sys::IdentifyFileType' to work with big and little endian byte orderings
when reading the ELF object file type.
Initial patch by Stefan Hepp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159138
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 25 Jun 2012 14:30:31 +0000 (14:30 +0000)]
If a constant or a function has linkonce_odr linkage and unnamed_addr, mark it
hidden. Being linkonce_odr guarantees that it is available in every dso that
needs it. Being a constant/function with unnamed_addr guarantees that the
copies don't have to be merged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159136
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 25 Jun 2012 10:13:14 +0000 (10:13 +0000)]
The name (and comment describing) of llvm::GetFirstDebuigLocInBasicBlock no longer represents what the function does. Therefore, the function is removed and its functionality is folded into the only place in the code-base where it was being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159133
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2012 06:51:42 +0000 (06:51 +0000)]
Add SSE2 predicate to CVTPS2PD instructions. Doesn't matter much because there are no patterns in the instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159127
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2012 06:16:00 +0000 (06:16 +0000)]
Remove codegen only instruction in favor of one that has the same definition. Make some pattern operands more explicit about types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159126
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 25 Jun 2012 05:20:13 +0000 (05:20 +0000)]
Just remove generic support for C++11 alignas -- GCC is already
advertising complete support w/o alignas implemented, and its
implementation of alignas in the latest versions is so convoluted as to
be unusable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159125
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 25 Jun 2012 03:36:12 +0000 (03:36 +0000)]
Teach PHIElimination to handle <undef> operands.
When a PHI use is <undef>, don't emit a copy in the predecessor block,
but insert an IMPLICIT_DEF instruction instead. This ensures that
virtual register uses are always jointly dominated by defs, even if some
of them are IMPLICIT_DEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159121
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 25 Jun 2012 03:27:12 +0000 (03:27 +0000)]
Handle <undef> operands in TwoAddressInstructionPass.
When the source register to a 2-addr instruction is undefined, there is
no need to attempt any transformations - simply replace the source
register with the destination register.
This also comes up when lowering IMPLICIT_DEF instructions - make sure
the <undef> flag is moved to the new partial register def operand:
%vreg8<def> = INSERT_SUBREG %vreg9<undef>, %vreg0<kill>, sub_16bit
rewrite undef:
%vreg8<def> = INSERT_SUBREG %vreg8<undef>, %vreg0<kill>, sub_16bit
convert to:
%vreg8:sub_16bit<def,read-undef> = COPY %vreg0<kill>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159120
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 24 Jun 2012 15:53:01 +0000 (15:53 +0000)]
%RCX is not a function live-out in eh.return functions.
The function live-out registers must be live at all function returns,
and %RCX is only used by eh.return. When a function also has a normal
return, only %RAX holds a return value.
This fixes PR13188.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159116
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Jun 2012 13:32:01 +0000 (13:32 +0000)]
llvm/lib: [CMake] Add explicit dependency to intrinsics_gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159112
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 24 Jun 2012 13:28:01 +0000 (13:28 +0000)]
Allow controlling vectorization of boolean values separately from other integer types.
These are used as the result of comparisons, and often handled differently from larger integer types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159111
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 24 Jun 2012 10:15:42 +0000 (10:15 +0000)]
Remove dyn_cast + dereference pattern by replacing it with a cast and changing
the safety check to look for the same type we're going to actually cast to.
Fixes PR13180!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159110
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jun 2012 07:07:16 +0000 (07:07 +0000)]
Remove intrinsic specific instructions for (V)CVTPS2DQ and replace with patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159109
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jun 2012 06:55:37 +0000 (06:55 +0000)]
Remove intrinsic specific instructions for (V)CVTPS2DQ and replace with patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159108
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jun 2012 06:08:31 +0000 (06:08 +0000)]
Fix build failures from r159106.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159107
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jun 2012 05:44:31 +0000 (05:44 +0000)]
Remove intrinsic specific instructions for CVTPD2PS and replace with just patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159106
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jun 2012 05:33:24 +0000 (05:33 +0000)]
Remove intrinsic specific instructions for CVTPD2DQ. Replace with patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159105
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 24 Jun 2012 04:07:14 +0000 (04:07 +0000)]
Tab to spaces. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159104
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Jun 2012 03:51:04 +0000 (03:51 +0000)]
llvm/lib/Support/Errno.cpp: [Win32] Fix usage of strerror_s().
FYI, two arguments of strerror_s() is provided in C++ on msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159103
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Jun 2012 03:50:58 +0000 (03:50 +0000)]
LLVMProcessSources.cmake: [MSVC] Don't add "PROPERTIES HEADER_FILE_ONLY" to *.def.
FIXME: Shall we put *.def(s) to the folder?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159102
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Jun 2012 03:48:53 +0000 (03:48 +0000)]
llvm/Support/IntegersSubset.h: Add a copy constructor on IntegersSubset to appease msvc.
msvc mis-infers ParentTy(RHS) to (const RangesCollectionTy &).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159101
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Jun 2012 03:48:47 +0000 (03:48 +0000)]
llvm/Support/IntegersSubset.h: Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159100
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Jun 2012 03:48:40 +0000 (03:48 +0000)]
unittests/Support/Path.cpp: [Win32] Suppress FileSystemTest.FileMapping for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159099
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Jun 2012 03:48:34 +0000 (03:48 +0000)]
unittests/Support/Path.cpp: [Win32] Suppress FileSystemTest.Permissions for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159098
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Jun 2012 03:48:29 +0000 (03:48 +0000)]
VMCore/CMakeLists.txt: [CMake][MSVC] Add "/Og-" to Function.cpp on msvc10. Otherwise, it took over 20 minutes to compile.
FIXME: Suppressing optimizations to core libraries would not be good thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159097
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 24 Jun 2012 01:44:08 +0000 (01:44 +0000)]
Remove a dangling reference to a deleted instruction. Fixes PR13185!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159096
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Sun, 24 Jun 2012 00:08:36 +0000 (00:08 +0000)]
Remove code i'd been testing with but didn't mean to commit. Oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159094
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Sun, 24 Jun 2012 00:05:44 +0000 (00:05 +0000)]
DAG legalisation can now handle illegal fma vector types by scalarisation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159092
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2012 22:33:14 +0000 (22:33 +0000)]
Remove intrinsic specific instructions for (V)CVTDQ2PS. Use a Pat instead instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159090
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 23 Jun 2012 21:52:50 +0000 (21:52 +0000)]
Allow BBVectorize to fuse compare instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159088
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2012 20:52:45 +0000 (20:52 +0000)]
Make CVTDQ2PS instruction use SSE2 predicate instead of SSE1. No functional change because there are no patterns in the instructions. Also fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159087
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2012 20:15:42 +0000 (20:15 +0000)]
Move CVTPD2DQ to use SSE2 predicate instead of SSE3. Move DQ2PD and PD2DQ to the SSE2 section of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159086
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jun 2012 15:19:31 +0000 (15:19 +0000)]
Add a microoptimization note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159082
91177308-0d34-0410-b5e6-
96231b3b80d8
Marshall Clow [Sat, 23 Jun 2012 14:46:18 +0000 (14:46 +0000)]
Add relocation types for Hexagon processor; patch by Sidney Manning <sidneym@codeaurora.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159081
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 23 Jun 2012 12:14:23 +0000 (12:14 +0000)]
Clean-up after r159077.
Remove temporary GlobalVariable constructors now that Clang has been
updated (r159078).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159079
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 23 Jun 2012 11:37:03 +0000 (11:37 +0000)]
Extend the IL for selecting TLS models (PR9788)
This allows the user/front-end to specify a model that is better
than what LLVM would choose by default. For example, a variable
might be declared as
@x = thread_local(initialexec) global i32 42
if it will not be used in a shared library that is dlopen'ed.
If the specified model isn't supported by the target, or if LLVM can
make a better choice, a different model may be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159077
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Sat, 23 Jun 2012 10:58:58 +0000 (10:58 +0000)]
Optimized usage of new SwitchInst case values (IntegersSubset type) in Local.cpp, Execution.cpp and BitcodeWriter.cpp.
I got about 1% of compile-time improvement on my machines (Ubuntu 11.10 i386 and Ubuntu 12.04 x64).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159076
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2012 08:30:27 +0000 (08:30 +0000)]
Use correct memory types for (V)CVTDQ2PD instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159075
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2012 08:09:30 +0000 (08:09 +0000)]
Silence an unused variable warning on release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159074
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2012 08:01:18 +0000 (08:01 +0000)]
Compress flags in X86 op folding to reduce space in static tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159073
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2012 04:58:41 +0000 (04:58 +0000)]
Make helper method static since it doesn't use anything in the class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159071
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2012 04:23:36 +0000 (04:23 +0000)]
Remove intrinsic specific instructions for 128-bit (V)CVTDQ2PD. Replace with intrinsic patterns. Mem forms omitted because the load size is only 64-bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159070
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 23 Jun 2012 02:23:00 +0000 (02:23 +0000)]
Teach LiveVariables to handle <undef> operands.
It's simple: Don't treat <undef> operands as uses, and don't assume a
virtual register has a defining instruction unless a real use has been
seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159061
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 23 Jun 2012 00:30:03 +0000 (00:30 +0000)]
Handle aliases to tls variables in all architectures, not just x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159058
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 23 Jun 2012 00:29:06 +0000 (00:29 +0000)]
(sub X, imm) gets canonicalized to (add X, -imm)
There are patterns to handle immediates when they fit in the immediate field.
e.g. %sub = add i32 %x, -123
=> sub r0, r0, #123
Add patterns to catch immediates that do not fit but should be materialized
with a single movw instruction rather than movw + movt pair.
e.g. %sub = add i32 %x, -65535
=> movw r1, #65535
sub r0, r0, r1
rdar://
11726136
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159057
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sat, 23 Jun 2012 00:12:34 +0000 (00:12 +0000)]
BoundsChecking: attach debug info to traps to make my life a bit more sane
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159055
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 22 Jun 2012 23:56:48 +0000 (23:56 +0000)]
ARM: Add a better diagnostic for some out of range immediates.
As an example of how the custom DiagnosticType can be used to provide
better operand-mismatch diagnostics, add a custom diagnostic for
the imm0_15 operand class used for several system instructions.
Update the tests to expect the improved diagnostic.
rdar://
8987109
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159051
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 22 Jun 2012 23:56:44 +0000 (23:56 +0000)]
TableGen: AsmMatcher support for better operand diagnostics.
"Invalid operand" may be a completely correct diagnostic, but it's often
insufficiently specific to really help identify and fix the problem in
assembly source. Allow a target to specify a more-specific diagnostic kind
for each AsmOperandClass derived definition and use that to provide
more detailed diagnostics when an operant of that class resulted in a
match failure.
rdar://
8987109
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159050
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 22 Jun 2012 23:10:08 +0000 (23:10 +0000)]
Add support for the PPC isel instruction.
The isel (integer select) instruction is supported on the 440 and A2
embedded cores and on the POWER7.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159045
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 22 Jun 2012 23:04:02 +0000 (23:04 +0000)]
FileCheckize tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159044
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 22 Jun 2012 22:31:00 +0000 (22:31 +0000)]
Rename fp-op fusion option (yet again) for compatibility with GCC option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159042
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 22:27:36 +0000 (22:27 +0000)]
Remove ProcessImplicitDefs.h which was unused.
The ProcessImplicitDefs class can be local to its implementation file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159041
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 22:23:58 +0000 (22:23 +0000)]
Also verify the def index for early clobbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159039
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 22 Jun 2012 22:07:19 +0000 (22:07 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159035
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 20:40:15 +0000 (20:40 +0000)]
Delete a boring statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159030
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 20:37:52 +0000 (20:37 +0000)]
Store live intervals in an IndexedMap.
It is both smaller and faster than DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159029
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 22 Jun 2012 20:30:39 +0000 (20:30 +0000)]
Forgot this patch in r159023.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159028
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 22 Jun 2012 20:27:13 +0000 (20:27 +0000)]
Revert r158679 - use case is unclear (and it increases the memory footprint).
Original commit message:
Allow up to 64 functional units per processor itinerary.
This patch changes the type used to hold the FU bitset from unsigned to uint64_t.
This will be needed for some upcoming PowerPC itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159027
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 22 Jun 2012 20:14:46 +0000 (20:14 +0000)]
EmitZerofill should take a 64-bit size or else it's chopping off large zero-filled global. rdar://
11729134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159023
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 19:51:41 +0000 (19:51 +0000)]
Fix a crash in --debug code.
Don't try to print out the live range of a physreg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159021
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 18:51:35 +0000 (18:51 +0000)]
Don't depend on live ranges being present.
DBG_VALUE instructions could be referring to non-existing virtual
registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159020
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 18:38:57 +0000 (18:38 +0000)]
Simplify handleMove() a bit.
There is no need to check for physreg live ranges. They don't exist any
more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159019
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 18:20:50 +0000 (18:20 +0000)]
Stop computing physreg live ranges.
Everyone is using on-demand regunit ranges now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159018
91177308-0d34-0410-b5e6-
96231b3b80d8
Marshall Clow [Fri, 22 Jun 2012 18:12:28 +0000 (18:12 +0000)]
Reverting makefile change wile I figure out what the heck happened
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159017
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 17:49:44 +0000 (17:49 +0000)]
Remove some redundant LIS->hasInterval() checks.
These functions only operate on virtual registers now, and they all have
live ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159015
91177308-0d34-0410-b5e6-
96231b3b80d8
Marshall Clow [Fri, 22 Jun 2012 17:43:40 +0000 (17:43 +0000)]
Added building yaml2obj to the configure+make build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159014
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 17:31:01 +0000 (17:31 +0000)]
Use MRI::isConstantPhysReg() to check remat feasibility.
Don't depend on LiveIntervals::hasInterval() to determine if a physreg
is reserved and constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159013
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Fri, 22 Jun 2012 17:18:15 +0000 (17:18 +0000)]
Remove a variable that is unused when assertions aren't enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159011
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 17:15:32 +0000 (17:15 +0000)]
Use regunit liveness to guide LiveDebugVariables.
This should produce the same results as using physreg liveness directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159009
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 16:46:44 +0000 (16:46 +0000)]
Remove LiveIntervals::trackingRegUnits().
With regunit liveness permanently enabled, this function would always
return true.
Also remove now obsolete code for checking physreg interference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159006
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 22 Jun 2012 16:36:43 +0000 (16:36 +0000)]
Revert remaining part of r93200: "Disable folding sext(trunc(x)) -> x"
This fixes PR5997.
These transforms were disabled because codegen couldn't deal with other
uses of trunc(x). This is now handled by the peephole pass.
This causes no regressions on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159003
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 22 Jun 2012 16:00:48 +0000 (16:00 +0000)]
Change comment into proper Doxygen member comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159000
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 22 Jun 2012 15:50:53 +0000 (15:50 +0000)]
simplify code from previous commits (Thanks Duncan)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158999
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Fri, 22 Jun 2012 14:53:30 +0000 (14:53 +0000)]
Fixed r158979.
Original message:
Performance optimizations:
- SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges.
- Optimized IntItem, added APInt value caching.
- Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158997
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 22 Jun 2012 13:41:00 +0000 (13:41 +0000)]
test/CodeGen/Generic/asm-large-immediate.ll: Mark it as XFAIL: powerpc, possibly due to r158939.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158994
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 22 Jun 2012 13:32:49 +0000 (13:32 +0000)]
Remove another duplicated variable. We only need one to tell us if the linker
knows dwarf or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158993
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 22 Jun 2012 13:24:07 +0000 (13:24 +0000)]
Fix a FIXME: DwarfRequiresRelocationForSectionOffset is the same as
DwarfUsesRelocationsAcrossSections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158992
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 22 Jun 2012 10:35:06 +0000 (10:35 +0000)]
Revert commit 158979 (dyatkovskiy) since it is causing several buildbots to
fail. Original commit message:
Performance optimizations:
- SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges.
- Optimized IntItem, added APInt value caching.
- Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only.
On my machine these optimizations gave about 4-6% of compile-time improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158986
91177308-0d34-0410-b5e6-
96231b3b80d8