platform/upstream/llvm.git
11 years agoAdd instruction encodings / disassembly support for l2r instructions.
Richard Osborne [Mon, 17 Dec 2012 16:28:02 +0000 (16:28 +0000)]
Add instruction encodings / disassembly support for l2r instructions.

llvm-svn: 170345

11 years agoAdded support for new property helpers (GNUstep runtime).
David Chisnall [Mon, 17 Dec 2012 15:59:29 +0000 (15:59 +0000)]
Added support for new property helpers (GNUstep runtime).

llvm-svn: 170344

11 years agoR600: enable S_*N2_* instructions
Tom Stellard [Mon, 17 Dec 2012 15:14:56 +0000 (15:14 +0000)]
R600: enable S_*N2_* instructions

They seem to work fine.

Patch by: Christian König

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
llvm-svn: 170343

11 years agoR600: BB operand support for SI
Tom Stellard [Mon, 17 Dec 2012 15:14:54 +0000 (15:14 +0000)]
R600: BB operand support for SI

Patch by: Christian König

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
llvm-svn: 170342

11 years agoR600: remove nonsense setPrefLoopAlignment
Tom Stellard [Mon, 17 Dec 2012 15:14:53 +0000 (15:14 +0000)]
R600: remove nonsense setPrefLoopAlignment

The Align parameter is a power of two, so 16 results in 64K
alignment. Additional to that even 16 byte alignment doesn't
make any sense, so just remove it.

Patch by: Christian König

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
llvm-svn: 170341

11 years ago[asan] asan_allocator2: implement malloc_usable_size and fix 32-bit
Kostya Serebryany [Mon, 17 Dec 2012 14:57:25 +0000 (14:57 +0000)]
[asan] asan_allocator2: implement malloc_usable_size and fix 32-bit

llvm-svn: 170339

11 years agoTeach the rewriting of memcpy calls to support subvector copies.
Chandler Carruth [Mon, 17 Dec 2012 14:51:24 +0000 (14:51 +0000)]
Teach the rewriting of memcpy calls to support subvector copies.

This also cleans up a bit of the memcpy call rewriting by sinking some
irrelevant code further down and making the call-emitting code a bit
more concrete.

Previously, memcpy of a subvector would actually miscompile (!!!) the
copy into a single vector element copy. I have no idea how this ever
worked. =/ This is the memcpy half of PR14478 which we probably weren't
noticing previously because it didn't actually assert.

The rewrite relies on the newly refactored insert- and extractVector
functions to do the heavy lifting, and those are the same as used for
loads and stores which makes the test coverage a bit more meaningful
here.

llvm-svn: 170338

11 years agoAdd basic support for splitting before function calls if it can't be
Daniel Jasper [Mon, 17 Dec 2012 14:34:14 +0000 (14:34 +0000)]
Add basic support for splitting before function calls if it can't be
avoided.

This required a minor modification of the memoization as now the
"CurrentPenalty" depends on whether or not we break before the current
token. Therefore, the CurrentPenalty should not be memoized but added
after retrieving a value from memory. This should not affect the runtime
behavior.

llvm-svn: 170337

11 years agoRevert/correct some FastISel changes in r170104 (EVT->MVT for
Patrik Hagglund [Mon, 17 Dec 2012 14:30:06 +0000 (14:30 +0000)]
Revert/correct some FastISel changes in r170104 (EVT->MVT for
TargetLowering::getRegClassFor).

Some isSimple() guards were missing, or getSimpleVT() were hoisted too
far, resulting in asserts on valid LLVM assembly input.

llvm-svn: 170336

11 years agoOptimize tree walking in markAliveBlocks.
Evgeniy Stepanov [Mon, 17 Dec 2012 14:28:00 +0000 (14:28 +0000)]
Optimize tree walking in markAliveBlocks.

Check whether a BB is known as reachable before adding it to the worklist.
This way BB's with multiple predecessors are added to the list no more than
once.

llvm-svn: 170335

11 years agoAdd instruction encodings for PEEK and ENDIN.
Richard Osborne [Mon, 17 Dec 2012 14:23:54 +0000 (14:23 +0000)]
Add instruction encodings for PEEK and ENDIN.

Previously these were marked with the wrong format.

llvm-svn: 170334

11 years agoFix a secondary bug I introduced while fixing the first part of PR14478.
Chandler Carruth [Mon, 17 Dec 2012 14:03:01 +0000 (14:03 +0000)]
Fix a secondary bug I introduced while fixing the first part of PR14478.

The first half of fixing this bug was actually in r170328, but was
entirely coincidental. It did however get me to realize the nature of
the bug, and adapt the test case to test more interesting behavior. In
turn, that uncovered the rest of the bug which I've fixed here.

This should fix two new asserts that showed up in the vectorize nightly
tester.

llvm-svn: 170333

11 years agoFix parameter name in prototypes in XCoreDisassembler.
Richard Osborne [Mon, 17 Dec 2012 13:55:49 +0000 (13:55 +0000)]
Fix parameter name in prototypes in XCoreDisassembler.

llvm-svn: 170332

11 years agoHoist a convertValue call to the two paths where it is needed.
Chandler Carruth [Mon, 17 Dec 2012 13:51:03 +0000 (13:51 +0000)]
Hoist a convertValue call to the two paths where it is needed.

I noticed this while looking at r170328. We only ever do a vector
rewrite when the alloca *is* the vector type, so it's good to not paper
over bugs here by doing a convertValue that isn't needed.

llvm-svn: 170331

11 years agoAdd instruction encodings / disassembly support for rus instructions.
Richard Osborne [Mon, 17 Dec 2012 13:50:04 +0000 (13:50 +0000)]
Add instruction encodings / disassembly support for rus instructions.

llvm-svn: 170330

11 years ago[asan] asan_allocator2: don't use TLS and fix calloc
Kostya Serebryany [Mon, 17 Dec 2012 13:43:47 +0000 (13:43 +0000)]
[asan] asan_allocator2: don't use TLS and fix calloc

llvm-svn: 170329

11 years agoHoist the insertVector helper to be a static helper.
Chandler Carruth [Mon, 17 Dec 2012 13:41:21 +0000 (13:41 +0000)]
Hoist the insertVector helper to be a static helper.

This will allow its use inside of memcpy rewriting as well. This routine
is more complex than extractVector, and some of its uses are not 100%
where I want them to be so there is still some work to do here.

While this can technically change the output in some cases, it shouldn't
be a change that matters -- IE, it can leave some dead code lying around
that prior versions did not, etc.

Yet another step in the refactorings leading up to the solution to the
last component of PR14478.

llvm-svn: 170328

11 years agoAdd instruction encodings for ZEXT and SEXT.
Richard Osborne [Mon, 17 Dec 2012 13:20:37 +0000 (13:20 +0000)]
Add instruction encodings for ZEXT and SEXT.

Previously these were marked with the wrong format.

llvm-svn: 170327

11 years agotsan: correct llvm libc++ name
Dmitry Vyukov [Mon, 17 Dec 2012 13:07:35 +0000 (13:07 +0000)]
tsan: correct llvm libc++ name

llvm-svn: 170326

11 years agoLift the extractVector helper all the way out to a static helper function.
Chandler Carruth [Mon, 17 Dec 2012 13:07:30 +0000 (13:07 +0000)]
Lift the extractVector helper all the way out to a static helper function.

The method helpers all implicitly act upon the alloca, and what we
really want is a fully generic helper. Doing memcpy rewrites is more
special than all other rewrites because we are at times rewriting
instructions which touch pointers *other* than the alloca. As
a consequence all of the helpers needed by memcpy rewriting of
sub-vector copies will need to be generalized fully.

Note that all of these helpers ({insert,extract}{Integer,Vector}) are
woefully uncommented. I'm going to go back through and document them
once I get the factoring correct.

No functionality changed.

llvm-svn: 170325

11 years agoFactor the vector load rewriting into a more generic form.
Chandler Carruth [Mon, 17 Dec 2012 12:50:21 +0000 (12:50 +0000)]
Factor the vector load rewriting into a more generic form.

This makes it suitable for use in rewriting memcpy in the presence of
subvector memcpy intrinsics.

No functionality changed.

llvm-svn: 170324

11 years agoAdd instruction encodings / disassembly support for 2r instructions.
Richard Osborne [Mon, 17 Dec 2012 12:29:31 +0000 (12:29 +0000)]
Add instruction encodings / disassembly support for 2r instructions.

llvm-svn: 170323

11 years agoAdd instruction encodings / disassembly support for 0r instructions.
Richard Osborne [Mon, 17 Dec 2012 12:26:29 +0000 (12:26 +0000)]
Add instruction encodings / disassembly support for 0r instructions.

llvm-svn: 170322

11 years agoSimplify assertion in XCoreInstPrinter.
Richard Osborne [Mon, 17 Dec 2012 12:13:46 +0000 (12:13 +0000)]
Simplify assertion in XCoreInstPrinter.

llvm-svn: 170321

11 years agoUpdate comments to match recommended doxygen style.
Richard Osborne [Mon, 17 Dec 2012 12:13:41 +0000 (12:13 +0000)]
Update comments to match recommended doxygen style.

llvm-svn: 170320

11 years agoRemove unnecessary include.
Richard Osborne [Mon, 17 Dec 2012 12:13:32 +0000 (12:13 +0000)]
Remove unnecessary include.

llvm-svn: 170319

11 years agoFix typo that results in new landing pads not getting a name, fixing PR14617.
Duncan Sands [Mon, 17 Dec 2012 12:02:36 +0000 (12:02 +0000)]
Fix typo that results in new landing pads not getting a name, fixing PR14617.
Patch by Chris Toshok.

llvm-svn: 170318

11 years agoFix comment typo.
Duncan Sands [Mon, 17 Dec 2012 11:43:15 +0000 (11:43 +0000)]
Fix comment typo.

llvm-svn: 170317

11 years agoFix several formatting problems.
Daniel Jasper [Mon, 17 Dec 2012 11:29:41 +0000 (11:29 +0000)]
Fix several formatting problems.

More specifically:
- Improve formatting of static initializers.
- Fix formatting of lines comments in enums.
- Fix formmating of trailing line comments.

llvm-svn: 170316

11 years ago[asan] asan_alocator2: implement quarantine and Reallocate
Kostya Serebryany [Mon, 17 Dec 2012 09:06:25 +0000 (09:06 +0000)]
[asan] asan_alocator2: implement quarantine and Reallocate

llvm-svn: 170315

11 years agotsan: add __has_feature(thread_sanitizer)
Dmitry Vyukov [Mon, 17 Dec 2012 08:52:05 +0000 (08:52 +0000)]
tsan: add __has_feature(thread_sanitizer)

llvm-svn: 170314

11 years ago[asan] implement AsanChunkFifoList via IntrusiveList<AsanChunk>
Kostya Serebryany [Mon, 17 Dec 2012 07:54:29 +0000 (07:54 +0000)]
[asan] implement AsanChunkFifoList via IntrusiveList<AsanChunk>

llvm-svn: 170313

11 years ago<rdar://problem/12890901>
Han Ming Ong [Mon, 17 Dec 2012 07:33:07 +0000 (07:33 +0000)]
<rdar://problem/12890901>

Capturing thread name during profiling.

llvm-svn: 170312

11 years agotsan: update docs
Dmitry Vyukov [Mon, 17 Dec 2012 07:16:54 +0000 (07:16 +0000)]
tsan: update docs

llvm-svn: 170311

11 years ago[asan] asan_alocator2: implement free() stacks and actually make malloc/free stacks...
Kostya Serebryany [Mon, 17 Dec 2012 06:31:53 +0000 (06:31 +0000)]
[asan] asan_alocator2: implement free() stacks and actually make malloc/free stacks work

llvm-svn: 170310

11 years agoClean up a small (messy) section of Clang's release notes for 3.2.
Chandler Carruth [Mon, 17 Dec 2012 06:24:36 +0000 (06:24 +0000)]
Clean up a small (messy) section of Clang's release notes for 3.2.

llvm-svn: 170309

11 years agoRemove EFLAGS from the BLSI/BLSMSK/BLSR patterns. The nodes created by DAG combine...
Craig Topper [Mon, 17 Dec 2012 06:13:48 +0000 (06:13 +0000)]
Remove EFLAGS from the BLSI/BLSMSK/BLSR patterns. The nodes created by DAG combine don't contain an EFLAGS def.

llvm-svn: 170308

11 years agoSimplify BMI ANDN matching to use patterns instead of a DAG combine. Also add ANDN...
Craig Topper [Mon, 17 Dec 2012 05:12:30 +0000 (05:12 +0000)]
Simplify BMI ANDN matching to use patterns instead of a DAG combine. Also add ANDN to isDefConvertible.

llvm-svn: 170305

11 years agoAdd rest of BMI/BMI2 instructions to the folding tables as well as popcnt and lzcnt.
Craig Topper [Mon, 17 Dec 2012 05:02:29 +0000 (05:02 +0000)]
Add rest of BMI/BMI2 instructions to the folding tables as well as popcnt and lzcnt.

llvm-svn: 170304

11 years agoRemove store forms of DEC/INC from isDefConvertible. Since they are stores they don...
Craig Topper [Mon, 17 Dec 2012 04:55:07 +0000 (04:55 +0000)]
Remove store forms of DEC/INC from isDefConvertible. Since they are stores they don't have a register def.

llvm-svn: 170303

11 years agoThis patch fixes PR13624, which notes a 64-bit PowerPC ELF ABI
Bill Schmidt [Mon, 17 Dec 2012 04:20:17 +0000 (04:20 +0000)]
This patch fixes PR13624, which notes a 64-bit PowerPC ELF ABI
incompatibility with how complex values are returned.  It is sufficient
to flag all complex types as direct rather than indirect.

A new test case is provided that checks correct IR generation for the
various supported flavors of _Complex.

llvm-svn: 170302

11 years agoFix the first part of PR14478: memset now works.
Chandler Carruth [Mon, 17 Dec 2012 04:07:37 +0000 (04:07 +0000)]
Fix the first part of PR14478: memset now works.

PR14478 highlights a serious problem in SROA that simply wasn't being
exercised due to a lack of vector input code mixed with C-library
function calls. Part of SROA was written carefully to handle subvector
accesses via memset and memcpy, but the rewriter never grew support for
this. Fixing it required refactoring the subvector access code in other
parts of SROA so it could be shared, and then fixing the splat formation
logic and using subvector insertion (this patch).

The PR isn't quite fixed yet, as memcpy is still broken in the same way.
I'm starting on that series of patches now.

Hopefully this will be enough to bring the bullet benchmark back to life
with the bb-vectorizer enabled, but that may require fixing memcpy as
well.

llvm-svn: 170301

11 years agoExtract the logic for inserting a subvector into a vector alloca.
Chandler Carruth [Mon, 17 Dec 2012 04:07:35 +0000 (04:07 +0000)]
Extract the logic for inserting a subvector into a vector alloca.

No functionality changed. Another step of refactoring toward solving
PR14487.

llvm-svn: 170300

11 years agoLift the integer splat computation into a helper function.
Chandler Carruth [Mon, 17 Dec 2012 04:07:30 +0000 (04:07 +0000)]
Lift the integer splat computation into a helper function.

No functionality changed. Refactoring leading up to the fix for PR14478
which requires some significant changes to the memset and memcpy
rewriting.

llvm-svn: 170299

11 years agoAdd debug prints for when optimizeLoadInstr folds a load.
Craig Topper [Mon, 17 Dec 2012 03:56:00 +0000 (03:56 +0000)]
Add debug prints for when optimizeLoadInstr folds a load.

llvm-svn: 170298

11 years agoIdentifierResolver: Remove an unnecessary include and an unused parameter.
Nico Weber [Mon, 17 Dec 2012 03:51:09 +0000 (03:51 +0000)]
IdentifierResolver: Remove an unnecessary include and an unused parameter.

llvm-svn: 170297

11 years agoDocumentation: add a missing word
Dmitri Gribenko [Sun, 16 Dec 2012 19:55:39 +0000 (19:55 +0000)]
Documentation: add a missing word

llvm-svn: 170296

11 years agoAdd tests for disassembly of 1r XCore instructions.
Richard Osborne [Sun, 16 Dec 2012 18:06:30 +0000 (18:06 +0000)]
Add tests for disassembly of 1r XCore instructions.

llvm-svn: 170295

11 years agoClang ReleaseNotes: add information about documentation comments support
Dmitri Gribenko [Sun, 16 Dec 2012 17:38:09 +0000 (17:38 +0000)]
Clang ReleaseNotes: add information about documentation comments support

llvm-svn: 170294

11 years agoAdd instruction encodings and disassembly for 1r instructions.
Richard Osborne [Sun, 16 Dec 2012 17:37:34 +0000 (17:37 +0000)]
Add instruction encodings and disassembly for 1r instructions.

llvm-svn: 170293

11 years agoAdd XCore disassembler.
Richard Osborne [Sun, 16 Dec 2012 17:29:14 +0000 (17:29 +0000)]
Add XCore disassembler.

Currently there is no instruction encoding info and
XCoreDisassembler::getInstruction() always returns Fail. I intend to add
instruction encodings and tests in follow on commits.

llvm-svn: 170292

11 years agoRemove invalid instruction encodings.
Richard Osborne [Sun, 16 Dec 2012 16:46:31 +0000 (16:46 +0000)]
Remove invalid instruction encodings.

llvm-svn: 170291

11 years agoMark anything deriving from PseudoInstXCore as a pseudo instruction.
Richard Osborne [Sun, 16 Dec 2012 16:46:28 +0000 (16:46 +0000)]
Mark anything deriving from PseudoInstXCore as a pseudo instruction.

llvm-svn: 170290

11 years agoSet instruction size correctly in XCoreInstrFormats.td
Richard Osborne [Sun, 16 Dec 2012 16:46:24 +0000 (16:46 +0000)]
Set instruction size correctly in XCoreInstrFormats.td

llvm-svn: 170289

11 years agoChange XCoreAsmPrinter to lower MachineInstrs to MCInsts before emission.
Richard Osborne [Sun, 16 Dec 2012 16:20:48 +0000 (16:20 +0000)]
Change XCoreAsmPrinter to lower MachineInstrs to MCInsts before emission.

This change adds XCoreMCInstLower to do the lowering to MCInst and
XCoreInstPrinter to print the MCInsts.

llvm-svn: 170288

11 years agoReplace ${:comment} with the comment symbol.
Richard Osborne [Sun, 16 Dec 2012 15:59:02 +0000 (15:59 +0000)]
Replace ${:comment} with the comment symbol.

llvm-svn: 170286

11 years agoDeclare class DwarfDebug before use instead of relying on a forward declaration
Dmitri Gribenko [Sun, 16 Dec 2012 12:57:36 +0000 (12:57 +0000)]
Declare class DwarfDebug before use instead of relying on a forward declaration
from some other unrelated header.

Patch by Kai.

llvm-svn: 170284

11 years agoDocumentation: AutomaticReferenceCounting.rst: use CSS section numbering.
Dmitri Gribenko [Sun, 16 Dec 2012 11:25:45 +0000 (11:25 +0000)]
Documentation: AutomaticReferenceCounting.rst: use CSS section numbering.
This enables us to use the same document structure as in other files.

llvm-svn: 170283

11 years agoDon't use SourceLineCache in getColumnNumber if LastLineNoResult is past the end...
Craig Topper [Sun, 16 Dec 2012 05:58:32 +0000 (05:58 +0000)]
Don't use SourceLineCache in getColumnNumber if LastLineNoResult is past the end of the cache. Fixes PR14570.

llvm-svn: 170281

11 years agoMCPureStreamer.cpp: Try to fix build, pruning EmitDebugLabel().
NAKAMURA Takumi [Sun, 16 Dec 2012 04:23:20 +0000 (04:23 +0000)]
MCPureStreamer.cpp: Try to fix build, pruning EmitDebugLabel().

llvm-svn: 170280

11 years agoThis patch is needed to make c++ exceptions work for mips16.
Reed Kotler [Sun, 16 Dec 2012 04:00:45 +0000 (04:00 +0000)]
This patch is needed to make c++ exceptions work for mips16.

Mips16 is really a processor decoding mode (ala thumb 1) and in the same
program, mips16 and mips32 functions can exist and can call each other.

If a jal type instruction encounters an address with the lower bit set, then
the processor switches to mips16 mode (if it is not already in it). If the
lower bit is not set, then it switches to mips32 mode.

The linker knows which functions are mips16 and which are mips32.
When relocation is performed on code labels, this lower order bit is
set if the code label is a mips16 code label.

In general this works just fine, however when creating exception handling
tables and dwarf, there are cases where you don't want this lower order
bit added in.

This has been traditionally distinguished in gas assembly source by using a
different syntax for the label.

lab1:      ; this will cause the lower order bit to be added
lab2=.     ; this will not cause the lower order bit to be added

In some cases, it does not matter because in dwarf and debug tables
the difference of two labels is used and in that case the lower order
bits subtract each other out.

To fix this, I have added to mcstreamer the notion of a debuglabel.
The default is for label and debug label to be the same. So calling
EmitLabel and EmitDebugLabel produce the same result.

For various reasons, there is only one set of labels that needs to be
modified for the mips exceptions to work. These are the "$eh_func_beginXXX"
labels.

Mips overrides the debug label suffix from ":" to "=." .

This initial patch fixes exceptions. More changes most likely
will be needed to DwarfCFException to make all of this work
for actual debugging. These changes will be to emit debug labels in some
places where a simple label is emitted now.

Some historical discussion on this from gcc can be found at:
http://gcc.gnu.org/ml/gcc-patches/2008-08/msg00623.html
http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01273.html

llvm-svn: 170279

11 years agodocs: Fix completely broken adornment structure.
Sean Silva [Sun, 16 Dec 2012 00:23:40 +0000 (00:23 +0000)]
docs: Fix completely broken adornment structure.

The adornment:

===
Foo
===

is for titles, not sections.

llvm-svn: 170278

11 years agoDocumentation: random cleanups. Use monospaced font where appropriate,
Dmitri Gribenko [Sat, 15 Dec 2012 21:10:51 +0000 (21:10 +0000)]
Documentation: random cleanups.  Use monospaced font where appropriate,
highlight console output with "code-block:: console", etc.

llvm-svn: 170276

11 years agoDocumentation: convert InternalsManual.html to reST
Dmitri Gribenko [Sat, 15 Dec 2012 20:41:17 +0000 (20:41 +0000)]
Documentation: convert InternalsManual.html to reST

Patch by Anastasi Voitova with with small fixes by me.

llvm-svn: 170275

11 years ago[sanitizer] fix a bug that has crept into the sanitizer allocator and caused SEGV...
Kostya Serebryany [Sat, 15 Dec 2012 18:36:23 +0000 (18:36 +0000)]
[sanitizer] fix a bug that has crept into the sanitizer allocator and caused SEGV on allocations between 1Mb and 2Mb, improve the test

llvm-svn: 170274

11 years agoX86: Add a couple of target-specific dag combines that turn VSELECTS into psubus...
Benjamin Kramer [Sat, 15 Dec 2012 16:47:44 +0000 (16:47 +0000)]
X86: Add a couple of target-specific dag combines that turn VSELECTS into psubus if possible.

We match the pattern "x >= y ? x-y : 0" into "subus x, y" and two special cases
if y is a constant. DAGCombiner canonicalizes those so we first have to undo the
canonicalization for those cases. The pattern occurs in gzip when the loop
vectorizer is enabled. Part of PR14613.

llvm-svn: 170273

11 years agoDocumentation: LanguageExtensions.rst: convert link to :doc: style and fix up
Dmitri Gribenko [Sat, 15 Dec 2012 14:25:25 +0000 (14:25 +0000)]
Documentation: LanguageExtensions.rst: convert link to :doc: style and fix up
heading underline.

llvm-svn: 170272

11 years agoAdd a corollary test for PR14572. We got this code path correct already.
Chandler Carruth [Sat, 15 Dec 2012 09:31:54 +0000 (09:31 +0000)]
Add a corollary test for PR14572. We got this code path correct already.

llvm-svn: 170271

11 years agoRelax an overly aggressive assert to fix PR14572.
Chandler Carruth [Sat, 15 Dec 2012 09:26:06 +0000 (09:26 +0000)]
Relax an overly aggressive assert to fix PR14572.

The alloca width is based on the alloc size, not the type size.

llvm-svn: 170270

11 years agoMake '-mtune=x86_64' assume fast unaligned memory accesses.
Chandler Carruth [Sat, 15 Dec 2012 09:01:13 +0000 (09:01 +0000)]
Make '-mtune=x86_64' assume fast unaligned memory accesses.

Not all chips targeted by x86_64 have this feature, but a dramatically
increasing number do. Specifying a chip-specific tuning parameter will
continue to turn the feature on or off as appropriate for that
particular chip, but the generic flag should try to achieve the best
performance on the most widely available hardware. Today, the number of
chips with fast UA access dwarfs those without in the x86-64 space.

Note that this also brings LLVM's code generation for this '-march' flag
more in line with that of modern GCCs. Reviewed by Dan Gohman.

llvm-svn: 170269

11 years agoActually update the grammar of this sentence to reflect the removal of CellSPU.
Chandler Carruth [Sat, 15 Dec 2012 08:56:20 +0000 (08:56 +0000)]
Actually update the grammar of this sentence to reflect the removal of CellSPU.

llvm-svn: 170268

11 years agoRevert r170246, "Enable the loop vectorizer by default."
NAKAMURA Takumi [Sat, 15 Dec 2012 06:11:13 +0000 (06:11 +0000)]
Revert r170246, "Enable the loop vectorizer by default."

llvm-svn: 170267

11 years agoRemove the “len” defaulted parameter from CommandReturnObject::AppendMessage, AppendW...
Jim Ingham [Sat, 15 Dec 2012 02:40:54 +0000 (02:40 +0000)]
Remove the “len” defaulted parameter from CommandReturnObject::AppendMessage, AppendWarning and AppendError.  Nobody was using them, and it meant if you accidentally used the AppendWarning when you meant AppendWarningWithFormat with an integer in the format string, it would compile and then return your string plus some unknown amount of junk.

llvm-svn: 170266

11 years ago<rdar://problem/11990131>
Greg Clayton [Sat, 15 Dec 2012 02:08:17 +0000 (02:08 +0000)]
<rdar://problem/11990131>

Memory read's "repeat" behavior forgets "-t" option. It also formatted the type as hex bytes + ASCII. Now we revert to the default format when displaying types unless the user sets the format option manually.

llvm-svn: 170265

11 years ago<rdar://problem/12156204>
Greg Clayton [Sat, 15 Dec 2012 01:44:51 +0000 (01:44 +0000)]
<rdar://problem/12156204>

x/a print wouldn't always reset the word size to the size of a pointer if a previous memory read using x/<gdb-format> had been used that set it to another width.

llvm-svn: 170264

11 years ago[ubsan] Emit branch weight metadata to hint towards common case.
Will Dietz [Sat, 15 Dec 2012 01:39:14 +0000 (01:39 +0000)]
[ubsan] Emit branch weight metadata to hint towards common case.

Results in better block placement that helps close the
performance gap when making ubsan checks recoverable.

llvm-svn: 170263

11 years ago<rdar://problem/12582041>
Greg Clayton [Sat, 15 Dec 2012 01:19:07 +0000 (01:19 +0000)]
<rdar://problem/12582041>

_regexp_attach doesn't handle the case where no arguments are provided. It now also handles the case you were you pass options.

llvm-svn: 170262

11 years agoDocs: redirect "static analysis extensions" section to the analyzer site.
Jordan Rose [Sat, 15 Dec 2012 00:37:01 +0000 (00:37 +0000)]
Docs: redirect "static analysis extensions" section to the analyzer site.

The notes on the objc_method_family and ns_returns_retained-type attributes
have been moved to the Objective-C section, since both are used by ARC.
The notes on analyzer_noreturn are now only on the analyzer site.

The inadequacy of these docs was noticed months ago by Jonathan Sauer;
I'm only just now getting around to cleaning them up.

llvm-svn: 170261

11 years agoRemove old description of analyzer internals from public docs.
Jordan Rose [Sat, 15 Dec 2012 00:36:53 +0000 (00:36 +0000)]
Remove old description of analyzer internals from public docs.

The file still exists in docs/analyzer/, but it won't be linked to from
clang.llvm.org or processed as part of the default Sphinx doc-build.
RegionStore has changed a lot from what Ted and Zhongxing describe here!

llvm-svn: 170260

11 years agoThis code implements most of mips16 hardfloat as it is done by gcc.
Reed Kotler [Sat, 15 Dec 2012 00:20:05 +0000 (00:20 +0000)]
This code implements most of mips16 hardfloat as it is done by gcc.
In this case, essentially it is soft float with different library routines.
The next step will be to make this fully interoperational with mips32 floating
point and that requires creating stubs for functions with signatures that
contain floating point types.

I have a more sophisticated design for mips16 hardfloat which I hope to
implement at a later time that directly does floating point without the need
for function calls.

The mips16 encoding has no floating point instructions so one needs to
switch to mips32 mode to execute floating point instructions.

llvm-svn: 170259

11 years agoTo simplify some code move the unit emission into the holders.
Eric Christopher [Sat, 15 Dec 2012 00:04:07 +0000 (00:04 +0000)]
To simplify some code move the unit emission into the holders.
Make emitDIE public accordingly. No functional change.

llvm-svn: 170258

11 years agoUse begin and end label names from the section for info.
Eric Christopher [Sat, 15 Dec 2012 00:04:04 +0000 (00:04 +0000)]
Use begin and end label names from the section for info.

llvm-svn: 170257

11 years agoFixed two conditionals that I accidentally
Sean Callanan [Fri, 14 Dec 2012 23:43:03 +0000 (23:43 +0000)]
Fixed two conditionals that I accidentally
reversed in r170152.

<rdar://problem/12886584>

llvm-svn: 170256

11 years agoMake sure the alternate PC+imm syntax of LDR instruction with a small
Kevin Enderby [Fri, 14 Dec 2012 23:04:25 +0000 (23:04 +0000)]
Make sure the alternate PC+imm syntax of LDR instruction with a small
immediate generates the narrow version.  Needed when doing round-trip
assemble/disassemble testing using the alternate syntax that specifies
'pc' directly.

llvm-svn: 170255

11 years agoSwitch "disassemble" with no arguments or options to disassemble the current frame...
Greg Clayton [Fri, 14 Dec 2012 22:36:35 +0000 (22:36 +0000)]
Switch "disassemble" with no arguments or options to disassemble the current frame instead of around the current PC.

llvm-svn: 170254

11 years agoRemove unused variable.
Greg Clayton [Fri, 14 Dec 2012 22:35:50 +0000 (22:35 +0000)]
Remove unused variable.

llvm-svn: 170253

11 years agoRemove references to files that Sean recently removed from the Xcode project.
Greg Clayton [Fri, 14 Dec 2012 22:17:58 +0000 (22:17 +0000)]
Remove references to files that Sean recently removed from the Xcode project.

llvm-svn: 170250

11 years agoAdd back FoldOpIntoPhi optimizations with fix. Included test cases to help catch...
Michael Ilseman [Fri, 14 Dec 2012 22:08:26 +0000 (22:08 +0000)]
Add back FoldOpIntoPhi optimizations with fix. Included test cases to help catch these errors and to test the presence of the optimization itself

llvm-svn: 170248

11 years agoEnable the loop vectorizer by default.
Nadav Rotem [Fri, 14 Dec 2012 21:30:23 +0000 (21:30 +0000)]
Enable the loop vectorizer by default.

llvm-svn: 170246

11 years agoTypeLegalizer: Do not generate target specific nodes with illegal types, because...
Nadav Rotem [Fri, 14 Dec 2012 21:20:37 +0000 (21:20 +0000)]
TypeLegalizer: Do not generate target specific nodes with illegal types, because we cant type-legalize them.

llvm-svn: 170245

11 years agoSkipping the DeadStripTestCase.test_with_dwarf test on Linux because the Linux ld...
Andrew Kaylor [Fri, 14 Dec 2012 21:11:46 +0000 (21:11 +0000)]
Skipping the DeadStripTestCase.test_with_dwarf test on Linux because the Linux ld lacks support for the -dead_strip option.

llvm-svn: 170244

11 years agoRelease notes for dragonegg 3.2.
Duncan Sands [Fri, 14 Dec 2012 21:10:59 +0000 (21:10 +0000)]
Release notes for dragonegg 3.2.

llvm-svn: 170243

11 years agoAvoid possible overflow when reading inferior memory (and logging is enabled)
Daniel Malea [Fri, 14 Dec 2012 21:07:07 +0000 (21:07 +0000)]
Avoid possible overflow when reading inferior memory (and logging is enabled)

Patch by Matt Kopec!

llvm-svn: 170242

11 years agoEnabling ItaniumABILanguageRuntime and SymbolFileDWARFDebugMap plugins on non-Apple...
Andrew Kaylor [Fri, 14 Dec 2012 21:03:37 +0000 (21:03 +0000)]
Enabling ItaniumABILanguageRuntime and SymbolFileDWARFDebugMap plugins on non-Apple platforms.

llvm-svn: 170241

11 years agoFix a crash in ValueTracking on vectors of pointers.
Nadav Rotem [Fri, 14 Dec 2012 20:43:49 +0000 (20:43 +0000)]
Fix a crash in ValueTracking on vectors of pointers.

llvm-svn: 170240

11 years agoFixed a typo.
Filipe Cabecinhas [Fri, 14 Dec 2012 20:38:58 +0000 (20:38 +0000)]
Fixed a typo.

llvm-svn: 170239

11 years agofixed line endings
Anton Yartsev [Fri, 14 Dec 2012 20:28:48 +0000 (20:28 +0000)]
fixed line endings

llvm-svn: 170238

11 years agoThis patch removes some nondeterminism from direct object file output
Bill Schmidt [Fri, 14 Dec 2012 20:28:38 +0000 (20:28 +0000)]
This patch removes some nondeterminism from direct object file output
for TLS dynamic models on 64-bit PowerPC ELF.  The default sort routine
for relocations only sorts on the r_offset field; but with TLS, there
can be two relocations with the same r_offset.  For PowerPC, this patch
sorts secondarily on descending r_type, which matches the behavior
expected by the linker.

llvm-svn: 170237

11 years agoAdd GCC instructions to build section of website
Daniel Malea [Fri, 14 Dec 2012 20:02:21 +0000 (20:02 +0000)]
Add GCC instructions to build section of website

llvm-svn: 170236

11 years agotsan: synchronize connect->accept calls
Dmitry Vyukov [Fri, 14 Dec 2012 20:01:58 +0000 (20:01 +0000)]
tsan: synchronize connect->accept calls

llvm-svn: 170235