Bill Wendling
2ee7de36b8
Now that we have the ReturnsTwice function attribute, this method is
...
obsolete. Check the attribute instead.
<rdar://problem/8031714>
llvm-svn: 142212
2011-10-17 18:22:52 +00:00
Akira Hatanaka
4243d8876b
Redefine multiply and divide instructions.
...
llvm-svn: 142211
2011-10-17 18:21:24 +00:00
Akira Hatanaka
6b17ee5b50
Add definition of a base class for logical shift/rotate instructions with two
...
source registers and redefine 32-bit and 64-bit instructions.
llvm-svn: 142210
2011-10-17 18:17:58 +00:00
Hal Finkel
df4af2dd0b
Remove >80-col line and unicode
...
llvm-svn: 142209
2011-10-17 18:10:08 +00:00
Akira Hatanaka
3b8c93eda7
Add definition of a base class for logical shift/rotate immediate instructions
...
and have 32-bit and 64-bit instructions derive from it.
llvm-svn: 142207
2011-10-17 18:06:56 +00:00
Chad Rosier
57b5189638
Removed set, but unused variable.
...
Patch by Joe Abbey <jabbey@arxan.com>.
llvm-svn: 142206
2011-10-17 18:01:59 +00:00
Akira Hatanaka
82a1bab4ab
Add definition of immZExt5_64 and redefine immZExt5 as an ImmLeaf.
...
llvm-svn: 142205
2011-10-17 18:01:00 +00:00
Michael J. Spencer
7ce30d63fd
Fix CMake build.
...
llvm-svn: 142204
2011-10-17 17:50:39 +00:00
Devang Patel
0b8b4b4a5c
It is safe to speculate load from GOT. This fixes performance regression caused by r141689.
...
Radar 10281206.
llvm-svn: 142202
2011-10-17 17:35:01 +00:00
Devang Patel
8f9c569a13
svn mv Target/ARM/ARMGlobalMerge.cpp Transforms/Scalar/GlobalMerge.cpp
...
There is no reason to have simple IR level pass in lib/Target.
llvm-svn: 142200
2011-10-17 17:17:43 +00:00
Hal Finkel
f5b7d5ea68
Instructions for Book E PPC should be word aligned, set function alignment to reflect this
...
llvm-svn: 142194
2011-10-17 17:01:41 +00:00
Craig Topper
29c4a473d0
Don't use inline assembly in 64-bit Visual Studio. Unfortunately, this means that cpuid leaf 7 can't be queried on versions of Visual Studio earlier than VS 2008 SP1. Fixes PR11147.
...
llvm-svn: 142177
2011-10-17 05:33:10 +00:00
Bill Wendling
76b62805ac
Add comment explaining that the order of processing doesn't matter here.
...
llvm-svn: 142176
2011-10-17 05:25:09 +00:00
Hal Finkel
b128cda81b
Add PPC 440 scheduler and some associated tests (new files)
...
llvm-svn: 142171
2011-10-17 04:03:55 +00:00
Hal Finkel
74543873a4
Add PPC 440 scheduler and some associated tests
...
llvm-svn: 142170
2011-10-17 04:03:49 +00:00
Chandler Carruth
9c33ff8a8b
Add a routine to swap branch instruction operands, and update any
...
profile metadata at the same time. Use it to preserve metadata attached
to a branch when re-writing it in InstCombine.
Add metadata to the canonicalize_branch InstCombine test, and check that
it is tranformed correctly.
Reviewed by Nick Lewycky!
llvm-svn: 142168
2011-10-17 01:11:57 +00:00
Chandler Carruth
0334d27ec8
Delete a dead member. Dunno if this was ever used, but the current code
...
directly manipulates the weights inside of the BranchProbabilityInfo
that is passed in.
llvm-svn: 142163
2011-10-16 22:27:54 +00:00
Chandler Carruth
aabf428f3c
Add a proper LLVM banner to this file.
...
llvm-svn: 142162
2011-10-16 22:15:07 +00:00
Nadav Rotem
8ed6f090ef
Enable element promotion type legalization by deafault.
...
Changed tests which assumed that vectors are legalized by widening them.
llvm-svn: 142152
2011-10-16 20:31:33 +00:00
Nick Lewycky
c8b7f776e6
When looking for dependencies on the src pointer, scan the src pointer. Scanning
...
on the memcpy call will pull up other unrelated stuff. Fixes PR11142.
llvm-svn: 142150
2011-10-16 20:13:32 +00:00
Craig Topper
6c900d9810
Add X86 PEXTR and PDEP instructions.
...
llvm-svn: 142141
2011-10-16 16:50:08 +00:00
Benjamin Kramer
6009b2df99
Let printf do the formatting instead aligning strings ourselves.
...
While at it, merge some format strings.
llvm-svn: 142140
2011-10-16 16:30:34 +00:00
Benjamin Kramer
55511d0bfe
Twinify better.
...
llvm-svn: 142139
2011-10-16 15:46:29 +00:00
Benjamin Kramer
3fed5faf01
Add AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.
...
<stdin>:1:12: error: register %rax is only available in 64-bit mode
incl %rax
^~~~
llvm-svn: 142137
2011-10-16 12:10:27 +00:00
Benjamin Kramer
2119dc8df2
X86AsmParser: Synthesize EndLoc for tokens out of StartLoc + Length and print ranges for invalid operands.
...
<stdin>:1:4: error: invalid instruction mnemonic 'abc'
abc incl %edi
^~~
llvm-svn: 142135
2011-10-16 11:28:29 +00:00
Benjamin Kramer
8f3fa2bc50
PR11143: Save the old diagnostic handler and call it when munging diagnostics for #line directives.
...
This reenables proper inline asm diagnostics in clang
llvm-svn: 142132
2011-10-16 10:48:29 +00:00
Nadav Rotem
a733f43137
Fix a bug in LowerV2I64Splat, which generated a BUILD_VECTOR for which there was
...
no pattern.
llvm-svn: 142130
2011-10-16 10:02:06 +00:00
Craig Topper
2cd868184c
Add X86 BZHI instruction as well as BMI2 feature detection.
...
llvm-svn: 142122
2011-10-16 07:55:05 +00:00
Craig Topper
91b4292682
Add X86 INVPCID instruction. Add 32/64-bit predicates to INVEPT, INVVPID, VMREAD, and VMWRITE to remove hack from X86RecognizableInstr.
...
llvm-svn: 142117
2011-10-16 07:05:40 +00:00
Cameron Zwarich
f4cddde4e1
Add flags on Thumb2 indexed stores paralleling the flags on the indexed loads.
...
These missing flags show up as errors when running -verify-coalescing on
test-suite.
llvm-svn: 142111
2011-10-16 06:38:10 +00:00
Cameron Zwarich
b3429a24c3
Fix an obvious typo found when looking at nearby code.
...
llvm-svn: 142110
2011-10-16 06:38:06 +00:00
Chris Lattner
0ab0d49640
remove the dead 'ShowLine' argument from SMDiagnostic.
...
llvm-svn: 142108
2011-10-16 05:47:55 +00:00
Chris Lattner
391d90c9a6
Make SMDiagnostic a little more sane. Instead of passing around note/warning/error as a
...
string, pass it around as an enum.
llvm-svn: 142107
2011-10-16 05:43:57 +00:00
Chris Lattner
321335142c
Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
...
the X86 asmparser to produce ranges in the one case that was annoying me, for example:
test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
^~~~~~~
It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.
llvm-svn: 142106
2011-10-16 04:47:35 +00:00
Craig Topper
4c6357d4af
Add X86 BEXTR instruction. This instruction uses VEX.vvvv to encode Operand 3 instead of Operand 2 so needs special casing in the disassembler and code emitter. Ultimately, should pass this information from tablegen
...
llvm-svn: 142105
2011-10-16 03:51:13 +00:00
Craig Topper
dab0c92a4f
Add X86 feature detection support for BMI instructions. Added new cpuid function for accessing leafs with sub leafs specified in ECX. Also added code to keep track of the max cpuid level supported in both basic and extended leaves and qualified the existing cpuid calls and the new call to leaf 7.
...
llvm-svn: 142089
2011-10-16 00:21:51 +00:00
Craig Topper
62e63d9bb9
Add support for X86 blsr, blsmsk, and blsi instructions. Required extra work because these are the first VEX encoded instructions to use the reg field as an opcode extension.
...
llvm-svn: 142082
2011-10-15 20:46:47 +00:00
Nadav Rotem
a623eb2a7d
The CELL backend cannot select patterns for vector trunc-store and shl on v2i64; CellSPU/shift_ops.ll fails when promoting elements.
...
llvm-svn: 142081
2011-10-15 20:05:17 +00:00
Nadav Rotem
6906c738f3
ARM cannot select a pattern for trunc-store v4i8; /ARM/vrev.ll fails when promoting elements.
...
llvm-svn: 142080
2011-10-15 20:03:12 +00:00
Benjamin Kramer
2b5e0cc68a
SmallVector -> array
...
llvm-svn: 142073
2011-10-15 13:28:31 +00:00
Duncan Sands
c4a6aaa716
Don't replace all dominated uses if there is only one use, since that
...
use can't be dominated, saving one domtree lookup.
llvm-svn: 142066
2011-10-15 11:13:42 +00:00
Benjamin Kramer
0c20486517
Add a bad char heuristic to StringRef::find.
...
Based on Horspool's simplified version of Boyer-Moore. We use a constant-sized table of
uint8_ts to keep cache thrashing low, needles bigger than 255 bytes are uncommon anyways.
The worst case is still O(n*m) but we do a lot better on the average case now.
llvm-svn: 142061
2011-10-15 10:08:31 +00:00
Nadav Rotem
f20613916b
Move the legalization of vector loads and stores into LegalizeVectorOps. In some
...
cases we need the second type-legalization pass in order to support all cases.
llvm-svn: 142060
2011-10-15 07:41:10 +00:00
Andrew Trick
0ef2965563
Fix SCEVExpander assert during LSR: "argument of incompatible type".
...
Just because we're dealing with a GEP doesn't mean we can assert the
SCEV has a pointer type. The fix is simply to ignore the SCEV pointer
type, which we really didn't need.
Fixes PR11138 webkit crash.
llvm-svn: 142058
2011-10-15 06:19:55 +00:00
NAKAMURA Takumi
f7ee2603c2
Revert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple"
...
It extremely breaks builds when optimization is enabled. Twine should not hold temporary objects.
By the way, I might feel sad if I saw "i786-" "i1586-" or "iF86-".
llvm-svn: 142055
2011-10-15 04:29:36 +00:00
Chad Rosier
6e6dd4880b
Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple
...
from config.h, it discovers the triple based on the execution environment.
Patch by Aaron Ballman <aaron@aaronballman.com>
llvm-svn: 142046
2011-10-15 02:10:06 +00:00
NAKAMURA Takumi
88ad0d5a50
Windows/Memory.inc: Support the ability to allocate memory "near" another block of memory on Win32. It has fixed FIXME.
...
Thanks to Aaron Ballman!
llvm-svn: 142039
2011-10-15 01:58:16 +00:00
Andrew Trick
7cc89bde59
Fix indvars randomness by removing iteration over a map.
...
I rewrote the algorithm a while back so it doesn't require map lookup,
but neglected to change the data structure. This was caught by
llvm-gcc self host, not because there's anything special about
llvm-gcc, but because it is the only test for nondeterminism we
currently have. Unit tests don't work well for everything; we should
always try to have a nondeterminism stress test running.
Fixes PR11133: llvm-gcc self host .o mismatch after enable-iv-rewrite=false
llvm-svn: 142036
2011-10-15 01:38:14 +00:00
Bill Wendling
0dd89843fc
Clear out the landing pad to call site map for each function.
...
This isn't put into the 'clear()' method because the information needs to stick
around (at least for a little bit) after the selection DAG is built.
llvm-svn: 142032
2011-10-15 01:00:26 +00:00
Jakob Stoklund Olesen
b0f487f367
Mark tADDrSPi as having side effects again.
...
It really doesn't, but when r141929 removed the hasSideEffects flag from
this instruction, it caused miscompilations. I am guessing that it got
moved across a stack pointer update.
Also clear isRematerializable after checking that this instruction is
in fact never rematerialized in the nightly test suite.
llvm-svn: 142030
2011-10-15 00:57:13 +00:00