Craig Topper
e20793a4f1
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
26d2780d07
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
ad677b64db
Add PPC 440 scheduler and some associated tests (new files)
...
llvm-svn: 142171
2011-10-17 04:03:55 +00:00
Hal Finkel
6fa5697af0
Add PPC 440 scheduler and some associated tests
...
llvm-svn: 142170
2011-10-17 04:03:49 +00:00
Chandler Carruth
3e8aa65bc2
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
91f4faf877
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
47e1db1e59
Add a proper LLVM banner to this file.
...
llvm-svn: 142162
2011-10-16 22:15:07 +00:00
Nadav Rotem
486ff59a9f
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
0a7e9ccf04
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
96fa597828
Add X86 PEXTR and PDEP instructions.
...
llvm-svn: 142141
2011-10-16 16:50:08 +00:00
Benjamin Kramer
cc863b2bb6
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
cb6b02a086
Twinify better.
...
llvm-svn: 142139
2011-10-16 15:46:29 +00:00
Benjamin Kramer
1930b003fe
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
d416bae5f2
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
47f5e30e78
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
bc25b6eb67
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
aea148c366
Add X86 BZHI instruction as well as BMI2 feature detection.
...
llvm-svn: 142122
2011-10-16 07:55:05 +00:00
Craig Topper
0ae8d4d738
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
434b3bff44
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
08ca5d35bd
Fix an obvious typo found when looking at nearby code.
...
llvm-svn: 142110
2011-10-16 06:38:06 +00:00
Chris Lattner
7284526aff
remove the dead 'ShowLine' argument from SMDiagnostic.
...
llvm-svn: 142108
2011-10-16 05:47:55 +00:00
Chris Lattner
03b80a4027
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
a3a0681083
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
25ea4e5ad3
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
6c8879e3ab
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
27ad12539d
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
45f0f87af5
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
097106b77a
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
5fb5e3b384
SmallVector -> array
...
llvm-svn: 142073
2011-10-15 13:28:31 +00:00
Duncan Sands
f537a6edd4
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
4d681d7dc4
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
ebe13bc3f1
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
fd4ca0f4ac
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
ea97a05fc5
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
559b8f2ae9
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
7bc976a8ef
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
d50861c831
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
2730a0099a
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
dd2b39d989
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
Chad Rosier
1809d6c0d5
Thumb1 does not support dynamic stack realignment.
...
rdar://10288916 is tracking this fix.
In the past, instcombine and other passes were promoting alloca alignment past
the natural alignment, resulting in dynamic stack realignment. Lang's work now
prevents this from happening (LLVM commit r141599). Now that this really
shouldn't happen report a fatal error rather than silently generate bad code.
llvm-svn: 142028
2011-10-15 00:28:24 +00:00
Bill Wendling
9c1019c6c7
Mark registers as DEAD because they're really just clobbers.
...
llvm-svn: 142027
2011-10-15 00:27:44 +00:00
Eli Friedman
74d1da5a05
Add missing correctness check to ARMTargetLowering::ReconstructShuffle. Fixes PR11129.
...
llvm-svn: 142022
2011-10-14 23:58:49 +00:00
Bill Wendling
9e0cd1ee17
Make sure that the register is in the register class before adding it as a machine op.
...
llvm-svn: 142021
2011-10-14 23:55:44 +00:00
Bill Wendling
6f3f9a391e
Mark the invoke call instruction as implicitly defining the callee-saved registers.
...
The callee-saved registers cannot be live across an invoke call because the
control flow may continue along the exceptional edge. When this happens, all of
the callee-saved registers are no longer valid.
llvm-svn: 142018
2011-10-14 23:34:37 +00:00
Chris Lattner
8a038652f2
constify array itself, don't iterate multiple times.
...
llvm-svn: 142013
2011-10-14 22:50:21 +00:00
Tanya Lattner
ea166d44e7
Allow the source module to be materialized during the linking process.
...
llvm-svn: 142010
2011-10-14 22:17:46 +00:00
Richard Trieu
8b478360ef
Fix a non-firing assert. Change:
...
assert("bad SymbolicOp.VariantKind");
To:
assert(0 && "bad SymbolicOp.VariantKind");
llvm-svn: 142000
2011-10-14 20:50:26 +00:00
Torok Edwin
ab6158e2e3
ocaml bindings: add getopcode for constant and instruction, and int64_of_const.
...
llvm-svn: 141990
2011-10-14 20:37:49 +00:00
Torok Edwin
2e9affec15
bindings: tab and indentation fixes of my previous commits
...
llvm-svn: 141989
2011-10-14 20:37:42 +00:00
Evan Cheng
06fdaeb5d9
A few 80-col violations.
...
llvm-svn: 141988
2011-10-14 20:36:23 +00:00