platform/upstream/llvm.git
11 years agodocs: Try out nosidebar.
Sean Silva [Thu, 20 Dec 2012 23:35:22 +0000 (23:35 +0000)]
docs: Try out nosidebar.

Please squawk if you find this appalling or otherwise don't like it.

llvm-svn: 170803

11 years agoEliminate errors when running the 'PrintFunctionNames' plugin, from Li Qun!
Douglas Gregor [Thu, 20 Dec 2012 23:11:42 +0000 (23:11 +0000)]
Eliminate errors when running the 'PrintFunctionNames' plugin, from Li Qun!

llvm-svn: 170801

11 years agoAdding eStopReasonThreadExiting and fixing the handling of this state on Linux.
Andrew Kaylor [Thu, 20 Dec 2012 23:08:03 +0000 (23:08 +0000)]
Adding eStopReasonThreadExiting and fixing the handling of this state on Linux.

llvm-svn: 170800

11 years agodocs: Cleanup trailing whitespace.
Sean Silva [Thu, 20 Dec 2012 22:59:36 +0000 (22:59 +0000)]
docs: Cleanup trailing whitespace.

llvm-svn: 170799

11 years agoRequire the two-argument MI::addOperand(MF, MO) for dangling instructions.
Jakob Stoklund Olesen [Thu, 20 Dec 2012 22:54:05 +0000 (22:54 +0000)]
Require the two-argument MI::addOperand(MF, MO) for dangling instructions.

Instructions that are inserted in a basic block can still be decorated
with addOperand(MO).

Make the two-argument addOperand() function contain the actual
implementation. This function will now always have a valid MF reference
that it can use for memory allocation.

llvm-svn: 170798

11 years agoAdd an MF argument to MI::copyImplicitOps().
Jakob Stoklund Olesen [Thu, 20 Dec 2012 22:54:02 +0000 (22:54 +0000)]
Add an MF argument to MI::copyImplicitOps().

This function is often used to decorate dangling instructions, so a
context reference is required to allocate memory for the operands.

Also add a corresponding MachineInstrBuilder method.

llvm-svn: 170797

11 years agoUse two-arg addOperand(MF, MO) internally in MachineInstr when possible.
Jakob Stoklund Olesen [Thu, 20 Dec 2012 22:53:58 +0000 (22:53 +0000)]
Use two-arg addOperand(MF, MO) internally in MachineInstr when possible.

llvm-svn: 170796

11 years agoMachineInstrBuilderize ARM.
Jakob Stoklund Olesen [Thu, 20 Dec 2012 22:53:55 +0000 (22:53 +0000)]
MachineInstrBuilderize ARM.

llvm-svn: 170795

11 years agoMachineInstrBuilderize NVPTX.
Jakob Stoklund Olesen [Thu, 20 Dec 2012 22:53:53 +0000 (22:53 +0000)]
MachineInstrBuilderize NVPTX.

llvm-svn: 170794

11 years agoFix an unitialized member variable that may have caused sporadic failures
Eli Bendersky [Thu, 20 Dec 2012 22:51:52 +0000 (22:51 +0000)]
Fix an unitialized member variable that may have caused sporadic failures
for code that wasn't even in bundling mode.

llvm-svn: 170793

11 years agodocs: actually indent these consistently
Sean Silva [Thu, 20 Dec 2012 22:49:13 +0000 (22:49 +0000)]
docs: actually indent these consistently

llvm-svn: 170792

11 years agodocs: Indent consistently in code examples.
Sean Silva [Thu, 20 Dec 2012 22:47:41 +0000 (22:47 +0000)]
docs: Indent consistently in code examples.

llvm-svn: 170791

11 years agodocs: Improve navigation for Vectorizers.rst
Sean Silva [Thu, 20 Dec 2012 22:42:20 +0000 (22:42 +0000)]
docs: Improve navigation for Vectorizers.rst

Add links in the intro paragraph.
Add table of contents.

llvm-svn: 170790

11 years agoRevert "Warn if a __weak variable is initialized with an Objective-C object literal."
Ted Kremenek [Thu, 20 Dec 2012 22:31:27 +0000 (22:31 +0000)]
Revert "Warn if a __weak variable is initialized with an Objective-C object literal."

Per code feedback, I want to see if there is a more general way to do this.

llvm-svn: 170777

11 years agodocs: bring back link for reddit.
Sean Silva [Thu, 20 Dec 2012 22:24:37 +0000 (22:24 +0000)]
docs: bring back link for reddit.

llvm-svn: 170776

11 years agoWhitespace and 80-column cleanup.
Eric Christopher [Thu, 20 Dec 2012 21:58:40 +0000 (21:58 +0000)]
Whitespace and 80-column cleanup.

llvm-svn: 170771

11 years agoStart splitting out the debug string section handling by moving it
Eric Christopher [Thu, 20 Dec 2012 21:58:36 +0000 (21:58 +0000)]
Start splitting out the debug string section handling by moving it
into the DwarfUnits class.

llvm-svn: 170770

11 years agodocs: Make document name congruent with title.
Sean Silva [Thu, 20 Dec 2012 21:50:41 +0000 (21:50 +0000)]
docs: Make document name congruent with title.

Hopefully nobody has linked to it yet...

OK'd by Nadav.

llvm-svn: 170768

11 years agoSome random comment, naming, and format changes.
Bill Wendling [Thu, 20 Dec 2012 21:28:43 +0000 (21:28 +0000)]
Some random comment, naming, and format changes.

Rename the AttributeImpl* from Attrs to pImpl to be consistent with other code.
Add comments where none were before. Or doxygen-ify other comments.

llvm-svn: 170767

11 years agoRemove two dead functions.
Jakob Stoklund Olesen [Thu, 20 Dec 2012 21:12:42 +0000 (21:12 +0000)]
Remove two dead functions.

llvm-svn: 170766

11 years agoRevert "Adding support for llvm.arm.neon.vaddl[su].* and"
Bob Wilson [Thu, 20 Dec 2012 21:09:38 +0000 (21:09 +0000)]
Revert "Adding support for llvm.arm.neon.vaddl[su].* and"

This reverts r170694.  The operations can be represented in IR without
adding any new intrinsics.

llvm-svn: 170765

11 years agoUse some heuristics so that when a fixit removes a source range, we try
Argyrios Kyrtzidis [Thu, 20 Dec 2012 21:05:53 +0000 (21:05 +0000)]
Use some heuristics so that when a fixit removes a source range, we try
to also remove a trailing space if possible.

For example, removing '__bridge' from:

i = (__bridge I*)p;

should result in:

i = (I*)p;

not:

i = ( I*)p;

rdar://11314821

llvm-svn: 170764

11 years agoWarn if a __weak variable is initialized with an Objective-C object literal.
Ted Kremenek [Thu, 20 Dec 2012 20:55:03 +0000 (20:55 +0000)]
Warn if a __weak variable is initialized with an Objective-C object literal.

Such variables may immediately become nil or may have unpredictable
behavior.

Fixes <rdar://problem/12569201>.

llvm-svn: 170763

11 years agoDocumentation: use monospaced font in BlockLanguageSpec, and fix a link to this
Dmitri Gribenko [Thu, 20 Dec 2012 20:51:59 +0000 (20:51 +0000)]
Documentation: use monospaced font in BlockLanguageSpec, and fix a link to this
document

llvm-svn: 170762

11 years agoUse the MaybeParseMicrosoftAttributes function.
Chad Rosier [Thu, 20 Dec 2012 20:37:53 +0000 (20:37 +0000)]
Use the MaybeParseMicrosoftAttributes function.

llvm-svn: 170761

11 years agoRemove namespace qualifier that lead to build breakage.
Daniel Jasper [Thu, 20 Dec 2012 20:31:38 +0000 (20:31 +0000)]
Remove namespace qualifier that lead to build breakage.

llvm-svn: 170759

11 years agoMove operator precedence calculation to new header
Daniel Jasper [Thu, 20 Dec 2012 20:25:19 +0000 (20:25 +0000)]
Move operator precedence calculation to new header

Thereby, it can be reused by clang-format and others.
Review: http://llvm-reviews.chandlerc.com/D229

llvm-svn: 170757

11 years agoLoopVectorize: Fix a bug in the scalarization of instructions.
Nadav Rotem [Thu, 20 Dec 2012 20:24:40 +0000 (20:24 +0000)]
LoopVectorize: Fix a bug in the scalarization of instructions.
Before if-conversion we could check if a value is loop invariant
if it was declared inside the basic block. Now that loops have
multiple blocks this check is incorrect.

This fixes External/SPEC/CINT95/099_go/099_go

llvm-svn: 170756

11 years agoIf we can't find the python function for a given summary, print the name of the funct...
Jim Ingham [Thu, 20 Dec 2012 20:08:17 +0000 (20:08 +0000)]
If we can't find the python function for a given summary, print the name of the function in the warning message.

llvm-svn: 170729

11 years agoOn some ARM cpus, flags setting movs with shifter operand, i.e. lsl, lsr, asr,
Evan Cheng [Thu, 20 Dec 2012 19:59:30 +0000 (19:59 +0000)]
On some ARM cpus, flags setting movs with shifter operand, i.e. lsl, lsr, asr,
are more expensive than the non-flag setting variant. Teach thumb2 size
reduction pass to avoid generating them unless we are optimizing for size.

rdar://12892707

llvm-svn: 170728

11 years agoAdd objective-C style formatting to clang format and
Fariborz Jahanian [Thu, 20 Dec 2012 19:54:13 +0000 (19:54 +0000)]
Add objective-C style formatting to clang format and
use it to format xml declaration tags.
// rdar://12378714

llvm-svn: 170727

11 years agoChange Lit error redirection to FileCheck to a more common syntax since it
Eli Bendersky [Thu, 20 Dec 2012 19:54:02 +0000 (19:54 +0000)]
Change Lit error redirection to FileCheck to a more common syntax since it
can potentially cause some bots to fail.

llvm-svn: 170726

11 years agoUpdate RetainCountChecker to understand attribute ns_returns_autoreleased.
Ted Kremenek [Thu, 20 Dec 2012 19:36:22 +0000 (19:36 +0000)]
Update RetainCountChecker to understand attribute ns_returns_autoreleased.

Fixes <rdar://problem/12887356>.

llvm-svn: 170724

11 years agoAttribute 'cf_returns_autoreleased' doesn't really exist.
Ted Kremenek [Thu, 20 Dec 2012 19:36:20 +0000 (19:36 +0000)]
Attribute 'cf_returns_autoreleased' doesn't really exist.

llvm-svn: 170723

11 years agoRename llvm::Attributes to llvm::Attribute.
Bill Wendling [Thu, 20 Dec 2012 19:27:06 +0000 (19:27 +0000)]
Rename llvm::Attributes to llvm::Attribute.

llvm-svn: 170722

11 years agoRevert r170500. It over-zealously converted *ALL* things named Attributes, which...
Bill Wendling [Thu, 20 Dec 2012 19:22:21 +0000 (19:22 +0000)]
Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.

llvm-svn: 170721

11 years agoAdd a largish auto-generated test for the aligned bundling feature, along with
Eli Bendersky [Thu, 20 Dec 2012 19:16:57 +0000 (19:16 +0000)]
Add a largish auto-generated test for the aligned bundling feature, along with
the script generating it. The test should never be modified manually. If anyone
needs to change it, please change the script and re-run it.

The script is placed into utils/testgen - I couldn't think of a better place,
and after some discussion on IRC this looked like a logical location.

llvm-svn: 170720

11 years agoTests for the aligned bundling support added in r170718
Eli Bendersky [Thu, 20 Dec 2012 19:07:30 +0000 (19:07 +0000)]
Tests for the aligned bundling support added in r170718

llvm-svn: 170719

11 years agoAligned bundling support. Following the discussion here:
Eli Bendersky [Thu, 20 Dec 2012 19:05:53 +0000 (19:05 +0000)]
Aligned bundling support. Following the discussion here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056754.html

The proposal and implementation are fully documented here:
https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm

Tests will follow shortly.

llvm-svn: 170718

11 years agoUse MachineInstrBuilder for PHI nodes in SelectionDAGISel.
Jakob Stoklund Olesen [Thu, 20 Dec 2012 18:46:29 +0000 (18:46 +0000)]
Use MachineInstrBuilder for PHI nodes in SelectionDAGISel.

llvm-svn: 170716

11 years agoFix inadvertant delete of 'has'.
Jim Grosbach [Thu, 20 Dec 2012 18:09:48 +0000 (18:09 +0000)]
Fix inadvertant delete of 'has'.

llvm-svn: 170713

11 years agoUse MachineInstrBuilder in InstrEmitter.
Jakob Stoklund Olesen [Thu, 20 Dec 2012 18:08:09 +0000 (18:08 +0000)]
Use MachineInstrBuilder in InstrEmitter.

This is supposed to be a mechanical change with no functional effects.

InstrEmitter can generate all types of MachineOperands which revealed
that MachineInstrBuilder was missing a few methods, added by this patch.

Besides providing a context pointer to MI::addOperand(),
MachineInstrBuilder seems like a better fit for this code.

llvm-svn: 170712

11 years agoUse MachineInstrBuilder in a few CodeGen passes.
Jakob Stoklund Olesen [Thu, 20 Dec 2012 18:08:06 +0000 (18:08 +0000)]
Use MachineInstrBuilder in a few CodeGen passes.

This automatically passes a context pointer to MI->addOperand().

llvm-svn: 170711

11 years agoSimplify the testcase a bit.
Rafael Espindola [Thu, 20 Dec 2012 17:47:27 +0000 (17:47 +0000)]
Simplify the testcase a bit.

I checked that it would still crash llc before the corresponding fix.

llvm-svn: 170709

11 years agoLoop Vectorizer: turn-off if-conversion.
Nadav Rotem [Thu, 20 Dec 2012 17:42:53 +0000 (17:42 +0000)]
Loop Vectorizer: turn-off if-conversion.

llvm-svn: 170708

11 years agotsan: java interface implementation skeleton
Dmitry Vyukov [Thu, 20 Dec 2012 17:29:34 +0000 (17:29 +0000)]
tsan: java interface implementation skeleton

llvm-svn: 170707

11 years agoTest case for http://llvm.org/bugs/show_bug.cgi?id=14670.
Howard Hinnant [Thu, 20 Dec 2012 16:50:07 +0000 (16:50 +0000)]
Test case for llvm.org/bugs/show_bug.cgi?id=14670.

llvm-svn: 170706

11 years agoFix Generic_GCC::GCCVersion::operator<
Rafael Espindola [Thu, 20 Dec 2012 16:15:07 +0000 (16:15 +0000)]
Fix Generic_GCC::GCCVersion::operator<

Without this patch comparing two equal versions without patch numbers (4.7 for
example) will result in A < B and B < A.

Patch by Simon Atanasyan.

llvm-svn: 170705

11 years agoAdd a new attribute, 'noduplicate'. If a function contains a noduplicate call, the...
James Molloy [Thu, 20 Dec 2012 16:04:27 +0000 (16:04 +0000)]
Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call.

Similarly inlining of the function is inhibited, if that would duplicate the call (in particular inlining is still allowed when there is only one callsite and the function has internal linkage).

llvm-svn: 170704

11 years agoHyeon-Bin Jeong: readsome() need to reset gcount to zero. This fixes http://llvm...
Howard Hinnant [Thu, 20 Dec 2012 15:40:28 +0000 (15:40 +0000)]
Hyeon-Bin Jeong:  readsome() need to reset gcount to zero.  This fixes llvm.org/bugs/show_bug.cgi?id=14670.

llvm-svn: 170703

11 years ago[ASan] remove duplicate entry in shadow byte legend
Alexey Samsonov [Thu, 20 Dec 2012 15:19:10 +0000 (15:19 +0000)]
[ASan] remove duplicate entry in shadow byte legend

llvm-svn: 170701

11 years agoRemove MCTargetAsmLexer and its derived classes now that edis,
Roman Divacky [Thu, 20 Dec 2012 14:43:30 +0000 (14:43 +0000)]
Remove MCTargetAsmLexer and its derived classes now that edis,
its only user, is gone.

llvm-svn: 170699

11 years ago[Sanitizer] Fix CMake build rules for sanitizer_common tests to respect universal...
Alexey Samsonov [Thu, 20 Dec 2012 14:38:02 +0000 (14:38 +0000)]
[Sanitizer] Fix CMake build rules for sanitizer_common tests to respect universal static libraries on Mac

llvm-svn: 170698

11 years ago[asan] asan_allocator2: implement memalign
Kostya Serebryany [Thu, 20 Dec 2012 14:35:06 +0000 (14:35 +0000)]
[asan] asan_allocator2: implement memalign

llvm-svn: 170697

11 years ago[*san] Create unittests output directory, if it does not exist.
Evgeniy Stepanov [Thu, 20 Dec 2012 14:34:09 +0000 (14:34 +0000)]
[*san] Create unittests output directory, if it does not exist.

llvm-svn: 170696

11 years agotsan: add cmake build and tests into presubmit script
Dmitry Vyukov [Thu, 20 Dec 2012 14:10:27 +0000 (14:10 +0000)]
tsan: add cmake build and tests into presubmit script

llvm-svn: 170695

11 years agoAdding support for llvm.arm.neon.vaddl[su].* and
Renato Golin [Thu, 20 Dec 2012 13:52:11 +0000 (13:52 +0000)]
Adding support for llvm.arm.neon.vaddl[su].* and
llvm.arm.neon.vsub[su].* intrinsics.

Patch by Pete Couperus <pjcoup@gmail.com>

llvm-svn: 170694

11 years agoc-index-test/Makefile: Add clangFormat to USEDLIBS for libclang-unavailable hosts.
NAKAMURA Takumi [Thu, 20 Dec 2012 13:30:10 +0000 (13:30 +0000)]
c-index-test/Makefile: Add clangFormat to USEDLIBS for libclang-unavailable hosts.

llvm-svn: 170693

11 years agoc-index-test/Makefile: Reformat.
NAKAMURA Takumi [Thu, 20 Dec 2012 13:30:05 +0000 (13:30 +0000)]
c-index-test/Makefile: Reformat.

llvm-svn: 170692

11 years ago[Sanitizer] Modify CMake build rules for sanitizer_common unit tests: build them...
Alexey Samsonov [Thu, 20 Dec 2012 13:24:21 +0000 (13:24 +0000)]
[Sanitizer] Modify CMake build rules for sanitizer_common unit tests: build them with fresh Clang for both 32- and 64-bits (if possible)

llvm-svn: 170691

11 years ago[ASan] Make the FileCheck pattern more c++filt-resistant.
Alexander Potapenko [Thu, 20 Dec 2012 13:17:49 +0000 (13:17 +0000)]
[ASan] Make the FileCheck pattern more c++filt-resistant.

This test didn't pass for me locally because of "T0's stack" being converted to "T0'short stack" by c++filt.
Strange enough this doesn't show up on our bots.

llvm-svn: 170690

11 years ago[tsan] fix cmake build
Kostya Serebryany [Thu, 20 Dec 2012 12:26:09 +0000 (12:26 +0000)]
[tsan] fix cmake build

llvm-svn: 170689

11 years agoMinor coding style issue: NULL -> 0
Alexander Kornienko [Thu, 20 Dec 2012 12:23:54 +0000 (12:23 +0000)]
Minor coding style issue: NULL -> 0

llvm-svn: 170688

11 years ago[asan] add memalign tests
Kostya Serebryany [Thu, 20 Dec 2012 12:11:52 +0000 (12:11 +0000)]
[asan] add memalign tests

llvm-svn: 170687

11 years agoAdd __has_feature(memory_sanitizer).
Evgeniy Stepanov [Thu, 20 Dec 2012 12:03:13 +0000 (12:03 +0000)]
Add __has_feature(memory_sanitizer).

llvm-svn: 170686

11 years ago[asan] add a flag poison_heap to allow better allocator benchmarking, implemenet...
Kostya Serebryany [Thu, 20 Dec 2012 11:54:21 +0000 (11:54 +0000)]
[asan] add a flag poison_heap to allow better allocator benchmarking, implemenet malloc_stats() on Linux

llvm-svn: 170685

11 years agoASTDumper coding style fixes.
Alexander Kornienko [Thu, 20 Dec 2012 11:08:38 +0000 (11:08 +0000)]
ASTDumper coding style fixes.
http://llvm-reviews.chandlerc.com/D226

Patch by Philip Craig!

llvm-svn: 170684

11 years agoclang/test/Driver/warning-options.cpp: Appease MSYS bash.
NAKAMURA Takumi [Thu, 20 Dec 2012 11:08:13 +0000 (11:08 +0000)]
clang/test/Driver/warning-options.cpp: Appease MSYS bash.

llvm-svn: 170683

11 years agollvmbuild/main.py: Let LibraryDependencies.inc deterministic.
NAKAMURA Takumi [Thu, 20 Dec 2012 10:35:18 +0000 (10:35 +0000)]
llvmbuild/main.py: Let LibraryDependencies.inc deterministic.

FYI, llvm and clang can be built deterministically between stage 2 and stage3, among iterative clean rebuilds, with GNU ar;

configure --disable-timestamps
make AR.Flags=crsD RANLIB=echo

llvm-svn: 170682

11 years agotsan: add java interface implementation stub
Dmitry Vyukov [Thu, 20 Dec 2012 10:21:30 +0000 (10:21 +0000)]
tsan: add java interface implementation stub

llvm-svn: 170681

11 years ago[asan] asan_allocator2: make all remaining tests pass.
Kostya Serebryany [Thu, 20 Dec 2012 08:53:41 +0000 (08:53 +0000)]
[asan] asan_allocator2: make all remaining tests pass.

llvm-svn: 170680

11 years agotsan: add Java interface
Dmitry Vyukov [Thu, 20 Dec 2012 07:47:04 +0000 (07:47 +0000)]
tsan: add Java interface

llvm-svn: 170679

11 years ago[asan] add ASAN_PCRE_DOTALL to two new multi-line regexps
Kostya Serebryany [Thu, 20 Dec 2012 07:26:33 +0000 (07:26 +0000)]
[asan] add ASAN_PCRE_DOTALL to two new multi-line regexps

llvm-svn: 170677

11 years agoFormatting fixes. Remove some unnecessary 'else' after 'return'. No functional change.
Craig Topper [Thu, 20 Dec 2012 07:15:54 +0000 (07:15 +0000)]
Formatting fixes. Remove some unnecessary 'else' after 'return'. No functional change.

llvm-svn: 170676

11 years agoRemoving trailing whitespace
Craig Topper [Thu, 20 Dec 2012 07:09:41 +0000 (07:09 +0000)]
Removing trailing whitespace

llvm-svn: 170675

11 years agoImplement cfi_def_cfa_offset. "Make check" test case for this comming in the
Reed Kotler [Thu, 20 Dec 2012 06:59:37 +0000 (06:59 +0000)]
Implement cfi_def_cfa_offset. "Make check" test case for this comming in the
next few days but it's already tested a lot from test-suite and works fine.
This patch completes almost 100% pass of test-suite for mips 16.

llvm-svn: 170674

11 years agoThere is one more patch to finish large frames. Make sure we assert
Reed Kotler [Thu, 20 Dec 2012 06:57:00 +0000 (06:57 +0000)]
There is one more patch to finish large frames. Make sure we assert
on code that has large frames which will not yet compile correctly.

llvm-svn: 170673

11 years agoAdd constant extender support to GP-relative load/store instructions.
Jyotsna Verma [Thu, 20 Dec 2012 06:52:46 +0000 (06:52 +0000)]
Add constant extender support to GP-relative load/store instructions.

llvm-svn: 170672

11 years agoAdd TSFlags to ALU32 type instructions for constant-extender/Relationship maps.
Jyotsna Verma [Thu, 20 Dec 2012 06:45:39 +0000 (06:45 +0000)]
Add TSFlags to ALU32 type instructions for constant-extender/Relationship maps.

llvm-svn: 170671

11 years ago[ASan] don't use -fsanitize=address linker flag for unit tests on Android
Alexey Samsonov [Thu, 20 Dec 2012 06:16:50 +0000 (06:16 +0000)]
[ASan] don't use -fsanitize=address linker flag for unit tests on Android

llvm-svn: 170670

11 years agoset register class properly for mips16 here
Reed Kotler [Thu, 20 Dec 2012 06:06:35 +0000 (06:06 +0000)]
set register class properly for mips16 here

llvm-svn: 170669

11 years agoUndefine PPC harder.
Rafael Espindola [Thu, 20 Dec 2012 05:13:09 +0000 (05:13 +0000)]
Undefine PPC harder.

This was causing a build failure while trying to build on ppc ubuntu 12.10 with
cmake.

llvm-svn: 170668

11 years agoThis assert is overly restrictive and does not work for mips16.
Reed Kotler [Thu, 20 Dec 2012 05:09:15 +0000 (05:09 +0000)]
This assert is overly restrictive and does not work for mips16.

llvm-svn: 170667

11 years agoMove C++ name demangling support from ubsan into sanitizer_common.
Richard Smith [Thu, 20 Dec 2012 05:00:13 +0000 (05:00 +0000)]
Move C++ name demangling support from ubsan into sanitizer_common.

llvm-svn: 170666

11 years agoTurn on register scavenger for Mips 16
Reed Kotler [Thu, 20 Dec 2012 04:44:58 +0000 (04:44 +0000)]
Turn on register scavenger for Mips 16
We use an unused Mips 32 register for the emergency slot
instead of using the stack.

llvm-svn: 170665

11 years ago[mips] Refactor SLT (set on less than) instructions. Separate encoding
Akira Hatanaka [Thu, 20 Dec 2012 04:27:52 +0000 (04:27 +0000)]
[mips] Refactor SLT (set on less than) instructions. Separate encoding
information from the rest.

llvm-svn: 170664

11 years ago[mips] Refactor unconditional branch instruction. Separate encoding information
Akira Hatanaka [Thu, 20 Dec 2012 04:22:39 +0000 (04:22 +0000)]
[mips] Refactor unconditional branch instruction. Separate encoding information
from the rest.

llvm-svn: 170663

11 years agoImplement std::is_base_of for the case where we don't have a compiler
Richard Smith [Thu, 20 Dec 2012 04:20:28 +0000 (04:20 +0000)]
Implement std::is_base_of for the case where we don't have a compiler
intrinsic. This relies upon the fact that overload resolution does not check
access and ambiguity for a derived-to-base conversion. This passes all
is_base_of tests in the test suite.

llvm-svn: 170662

11 years ago[mips] Remove asm string parameter from pseudo instructions. Add InstrItinClass
Akira Hatanaka [Thu, 20 Dec 2012 04:20:09 +0000 (04:20 +0000)]
[mips] Remove asm string parameter from pseudo instructions. Add InstrItinClass
parameter.

llvm-svn: 170661

11 years ago[mips] Delete definition of CPRESTORE instruction.
Akira Hatanaka [Thu, 20 Dec 2012 04:15:30 +0000 (04:15 +0000)]
[mips] Delete definition of CPRESTORE instruction.

llvm-svn: 170660

11 years ago[mips] Refactor conditional branch instructions with one register operand.
Akira Hatanaka [Thu, 20 Dec 2012 04:13:23 +0000 (04:13 +0000)]
[mips] Refactor conditional branch instructions with one register operand.
Separate encoding information from the rest.

llvm-svn: 170659

11 years agoDon't use isa<CallInst>(this) in the constructor for CallInst's base class.
Richard Smith [Thu, 20 Dec 2012 04:11:02 +0000 (04:11 +0000)]
Don't use isa<CallInst>(this) in the constructor for CallInst's base class.
This has undefined behavior, because the classof implementation attempts to
access parts of the not-yet-constructed derived class. Found by clang
-fsanitize=vptr.

llvm-svn: 170658

11 years ago[mips] Refactor conditional branch instructions with two register operands.
Akira Hatanaka [Thu, 20 Dec 2012 04:10:13 +0000 (04:10 +0000)]
[mips] Refactor conditional branch instructions with two register operands.
Separate encoding information from the rest.

llvm-svn: 170657

11 years agofix most of remaining issues with large frames.
Reed Kotler [Thu, 20 Dec 2012 04:07:42 +0000 (04:07 +0000)]
fix most of remaining issues with large frames.
these patches are tested a lot by test-suite but
make check tests are forthcoming once the next
few patches that complete this are committed.
with the next few patches the pass rate for mips16 is
near 100%

llvm-svn: 170656

11 years ago[mips] Use "or $r0, $r1, $zero" instead of "addu $r0, $zero, $r1" to copy
Akira Hatanaka [Thu, 20 Dec 2012 04:06:06 +0000 (04:06 +0000)]
[mips] Use "or $r0, $r1, $zero" instead of "addu $r0, $zero, $r1" to copy
physical register $r1 to $r0.

GNU disassembler recognizes an "or" instruction as a "move", and this change
makes the disassembled code easier to read.

Original patch by Reed Kotler.

llvm-svn: 170655

11 years agoFix use-before-construction of X86TargetLowering.
Richard Smith [Thu, 20 Dec 2012 04:04:17 +0000 (04:04 +0000)]
Fix use-before-construction of X86TargetLowering.

llvm-svn: 170654

11 years agoDon't use -1 as a value of an unsigned 7-bit enumeration; that has undefined
Richard Smith [Thu, 20 Dec 2012 04:02:58 +0000 (04:02 +0000)]
Don't use -1 as a value of an unsigned 7-bit enumeration; that has undefined
behavior and violates the !range constraints we put on loads of this enum.
Found by clang -fsanitize=enum.

llvm-svn: 170653

11 years agoDon't leave IsUnsigned uninitialized in a default-constructed APSInt. Copying
Richard Smith [Thu, 20 Dec 2012 03:59:24 +0000 (03:59 +0000)]
Don't leave IsUnsigned uninitialized in a default-constructed APSInt. Copying
such a structure has undefined behavior. Caught by -fsanitize=bool.

llvm-svn: 170652

11 years ago[mips] Change the order of template parameters. Move the default parameters to
Akira Hatanaka [Thu, 20 Dec 2012 03:52:08 +0000 (03:52 +0000)]
[mips] Change the order of template parameters. Move the default parameters to
the end.

llvm-svn: 170651

11 years ago[mips] Refactor shift instructions with register operands. Separate encoding
Akira Hatanaka [Thu, 20 Dec 2012 03:48:24 +0000 (03:48 +0000)]
[mips] Refactor shift instructions with register operands. Separate encoding
information from the rest.

llvm-svn: 170650