platform/upstream/llvm.git
10 years agoExtend AST dump to include 'used' and 'referenced' flags, and put 'invalid' flag...
Richard Smith [Fri, 13 Jun 2014 02:24:47 +0000 (02:24 +0000)]
Extend AST dump to include 'used' and 'referenced' flags, and put 'invalid' flag in the right place.

llvm-svn: 210872

10 years agoRemove 'using std::errro_code' from lib.
Rafael Espindola [Fri, 13 Jun 2014 02:24:39 +0000 (02:24 +0000)]
Remove 'using std::errro_code' from lib.

llvm-svn: 210871

10 years ago[FastISel][X86] Add support for cvttss2si/cvttsd2si intrinsics.
Juergen Ributzka [Fri, 13 Jun 2014 02:21:58 +0000 (02:21 +0000)]
[FastISel][X86] Add support for cvttss2si/cvttsd2si intrinsics.

This adds support for the cvttss2si/cvttsd2si intrinsics. Preceding
insertelement instructions are folded into the conversion instruction (if
possible).

llvm-svn: 210870

10 years agoR600: Move AMDGPUInstrInfo from AMDGPUTargetMachine into AMDGPUSubtarget
Tom Stellard [Fri, 13 Jun 2014 01:32:00 +0000 (01:32 +0000)]
R600: Move AMDGPUInstrInfo from AMDGPUTargetMachine into AMDGPUSubtarget

llvm-svn: 210869

10 years agoR600: Drop use of cached TargetMachine in R600InstrInfo.cpp
Tom Stellard [Fri, 13 Jun 2014 01:31:56 +0000 (01:31 +0000)]
R600: Drop use of cached TargetMachine in R600InstrInfo.cpp

llvm-svn: 210868

10 years agoprepare-builtins: Use std:: prefix for error_code
Tom Stellard [Fri, 13 Jun 2014 01:30:14 +0000 (01:30 +0000)]
prepare-builtins: Use std:: prefix for error_code

This fixes the build with with newer LLVM.

llvm-svn: 210867

10 years agoRemove all uses of 'using std::error_code' from headers.
Rafael Espindola [Fri, 13 Jun 2014 01:25:41 +0000 (01:25 +0000)]
Remove all uses of 'using std::error_code' from headers.

llvm-svn: 210866

10 years agoR600: Drop use of cached TargetMachine in AMDGPUInstrInfo.cpp
Tom Stellard [Fri, 13 Jun 2014 01:02:57 +0000 (01:02 +0000)]
R600: Drop use of cached TargetMachine in AMDGPUInstrInfo.cpp

llvm-svn: 210865

10 years agoAdded the ability to save core files:
Greg Clayton [Fri, 13 Jun 2014 00:54:12 +0000 (00:54 +0000)]
Added the ability to save core files:

(lldb) file /bin/ls
(lldb) b malloc
(lldb) run
(lldb) process save-core /tmp/ls.core

Each ObjectFile plug-in now has the option to save core files by registering a new static callback.

llvm-svn: 210864

10 years ago[FastISel][X86] - Add branch weights
Juergen Ributzka [Fri, 13 Jun 2014 00:45:11 +0000 (00:45 +0000)]
[FastISel][X86] - Add branch weights

Add branch weights to branch instructions, so that the following passes can
optimize based on it (i.e. basic block ordering).

llvm-svn: 210863

10 years agoMove ARMSelectionDAGInfo from the TargetMachine to the subtarget.
Eric Christopher [Fri, 13 Jun 2014 00:20:39 +0000 (00:20 +0000)]
Move ARMSelectionDAGInfo from the TargetMachine to the subtarget.

llvm-svn: 210862

10 years agoMove to a private function to initialize subtarget dependencies
Eric Christopher [Fri, 13 Jun 2014 00:20:35 +0000 (00:20 +0000)]
Move to a private function to initialize subtarget dependencies
so we can use initializer lists for the ARMSubtarget and then
use this to initialize a moved DataLayout on the subtarget from
the TargetMachine.

llvm-svn: 210861

10 years ago[DWARF parser] Fix broken address ranges construction.
Alexey Samsonov [Thu, 12 Jun 2014 23:58:49 +0000 (23:58 +0000)]
[DWARF parser] Fix broken address ranges construction.

Previous algorithm for constructing [Address ranges]->[Compile Units]
mapping was wrong. It somewhat relied on the assumption that address ranges
for different compile units may not overlap. It is not so.
For example, two compile units may contain the definition of the same
linkonce_odr function. These definitions will be merged at link-time,
resulting in equivalent .debug_ranges entries for both these units

Instead of sorting and merging original address ranges (from .debug_ranges
and .debug_aranges), implement a different approach: save endpoints
of all ranges, and then use a sweep-line approach to construct
the desired mapping. If we find that certain address maps to
several compilation units, we just pick any of them.

llvm-svn: 210860

10 years agoHave ARMSelectionDAGInfo take a DataLayout as it's argument as the
Eric Christopher [Thu, 12 Jun 2014 23:39:49 +0000 (23:39 +0000)]
Have ARMSelectionDAGInfo take a DataLayout as it's argument as the
DAG has access to the subtarget and TargetSelectionDAGInfo only
needs a DataLayout.

llvm-svn: 210859

10 years ago[FastISel][X86] Add MachineMemOperand to load/store instructions.
Juergen Ributzka [Thu, 12 Jun 2014 23:27:57 +0000 (23:27 +0000)]
[FastISel][X86] Add MachineMemOperand to load/store instructions.

This commit adds MachineMemOperands to load and store instructions. This allows
the peephole optimizer to fold load instructions. Unfortunatelly the peephole
optimizer currently doesn't run at -O0.

llvm-svn: 210858

10 years agoRevert "fixes duplicate header installation"
David Fang [Thu, 12 Jun 2014 23:19:55 +0000 (23:19 +0000)]
Revert "fixes duplicate header installation"

This reverts commit 0bd40d6c3da6719fecf77038673d453ff1eab25b.

llvm-svn: 210857

10 years agoRecover from missing 'typename' in sizeof(T::InnerType)
Reid Kleckner [Thu, 12 Jun 2014 23:03:48 +0000 (23:03 +0000)]
Recover from missing 'typename' in sizeof(T::InnerType)

Summary:
'sizeof' is a UnaryExprOrTypeTrait, and it can contain either a type or
an expression.  This change threads a RecoveryTSI parameter through the
layers between TransformUnaryExprOrTypeTrait the point at which we look
up the type.  If lookup finds a single type result after instantiation,
we now build TypeSourceInfo for it just like a normal transformation
would.

This fixes the last error in the hello world ATL app that I've been
working with, and it now links and runs with clang.  Please try it and
file bugs!

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4108

llvm-svn: 210855

10 years agoMove the PPCSelectionDAGInfo off the TargetMachine and onto the
Eric Christopher [Thu, 12 Jun 2014 23:02:32 +0000 (23:02 +0000)]
Move the PPCSelectionDAGInfo off the TargetMachine and onto the
subtarget.

llvm-svn: 210854

10 years agoMake PPCSelectionDAGInfo take a DataLayout instead of a TargetMachine
Eric Christopher [Thu, 12 Jun 2014 22:56:48 +0000 (22:56 +0000)]
Make PPCSelectionDAGInfo take a DataLayout instead of a TargetMachine
since that's all it needs.

llvm-svn: 210853

10 years agoMove PPCTargetLowering off of the TargetMachine and onto the subtarget.
Eric Christopher [Thu, 12 Jun 2014 22:50:10 +0000 (22:50 +0000)]
Move PPCTargetLowering off of the TargetMachine and onto the subtarget.

llvm-svn: 210852

10 years agoRemove stale part of comment.
Eli Bendersky [Thu, 12 Jun 2014 22:47:08 +0000 (22:47 +0000)]
Remove stale part of comment.

llvm-svn: 210851

10 years agoCheck the access of operator delete from the destructor context
Reid Kleckner [Thu, 12 Jun 2014 22:39:12 +0000 (22:39 +0000)]
Check the access of operator delete from the destructor context

Previously we would do the access check from the context of
MarkVTableUsed.

Also update this test to C++11, since that is typically used with the MS
C++ ABI.

Fixes PR20005.

llvm-svn: 210850

10 years agoRemove an extraneous this-> to access the subtarget.
Eric Christopher [Thu, 12 Jun 2014 22:38:20 +0000 (22:38 +0000)]
Remove an extraneous this-> to access the subtarget.

llvm-svn: 210849

10 years agoRename PPCSubTarget to Subtarget in PPCTargetLowering for consistency.
Eric Christopher [Thu, 12 Jun 2014 22:38:18 +0000 (22:38 +0000)]
Rename PPCSubTarget to Subtarget in PPCTargetLowering for consistency.
Also remove an extra local subtarget in the initialization functions.

llvm-svn: 210848

10 years agoFix the polly build.
Rafael Espindola [Thu, 12 Jun 2014 22:37:15 +0000 (22:37 +0000)]
Fix the polly build.

llvm-svn: 210847

10 years agoFix the scheduler's MaxObservedStall computation.
Andrew Trick [Thu, 12 Jun 2014 22:36:28 +0000 (22:36 +0000)]
Fix the scheduler's MaxObservedStall computation.

WenHan Gu pointed out this bug that results in an assert
not being effective in some cases.

llvm-svn: 210846

10 years agoMove PPCJITInfo off of the TargetMachine and onto the subtarget.
Eric Christopher [Thu, 12 Jun 2014 22:28:06 +0000 (22:28 +0000)]
Move PPCJITInfo off of the TargetMachine and onto the subtarget.
Needed to migrate a few functions around to avoid circular header
dependencies.

llvm-svn: 210845

10 years agoRemove the use of TargetMachine from PPCJITInfo and replace with
Eric Christopher [Thu, 12 Jun 2014 22:19:51 +0000 (22:19 +0000)]
Remove the use of TargetMachine from PPCJITInfo and replace with
the subtarget. Also remove unnecessary argument to the constructor
at the same time, we already have access via the subtarget.

llvm-svn: 210844

10 years agoFix the build of KillTheDoctor.
Rafael Espindola [Thu, 12 Jun 2014 22:16:55 +0000 (22:16 +0000)]
Fix the build of KillTheDoctor.

llvm-svn: 210843

10 years ago[modules] The LLVM C API does not require C++!
Richard Smith [Thu, 12 Jun 2014 22:09:39 +0000 (22:09 +0000)]
[modules] The LLVM C API does not require C++!

llvm-svn: 210842

10 years agoThe Clang C API does not require C++. Thanks to Jordan Rose for pointing out this...
Richard Smith [Thu, 12 Jun 2014 22:09:11 +0000 (22:09 +0000)]
The Clang C API does not require C++. Thanks to Jordan Rose for pointing out this error!

llvm-svn: 210841

10 years agoPrefix error_code with std.
Rafael Espindola [Thu, 12 Jun 2014 22:08:48 +0000 (22:08 +0000)]
Prefix error_code with std.

llvm-svn: 210840

10 years agoMove PPCInstrInfo off of the target machine and onto the subtarget.
Eric Christopher [Thu, 12 Jun 2014 22:05:46 +0000 (22:05 +0000)]
Move PPCInstrInfo off of the target machine and onto the subtarget.

llvm-svn: 210839

10 years agoQuick build fix.
Rafael Espindola [Thu, 12 Jun 2014 22:01:48 +0000 (22:01 +0000)]
Quick build fix.

llvm-svn: 210838

10 years agoTry to fix the windows build.
Rafael Espindola [Thu, 12 Jun 2014 21:53:57 +0000 (21:53 +0000)]
Try to fix the windows build.

llvm-svn: 210837

10 years agoRemove TargetMachine from PPCInstrInfo and all dependencies and
Eric Christopher [Thu, 12 Jun 2014 21:48:52 +0000 (21:48 +0000)]
Remove TargetMachine from PPCInstrInfo and all dependencies and
replace with the current subtarget.

llvm-svn: 210836

10 years agoDon't use 'using std::error_code' in include/llvm.
Rafael Espindola [Thu, 12 Jun 2014 21:46:39 +0000 (21:46 +0000)]
Don't use 'using std::error_code' in include/llvm.

This should make sure that most new uses use the std prefix.

llvm-svn: 210835

10 years agos/pr2007/20007/ in a test
Reid Kleckner [Thu, 12 Jun 2014 21:46:38 +0000 (21:46 +0000)]
s/pr2007/20007/ in a test

llvm-svn: 210834

10 years agoMove test for r210734 to Feature/aliases.ll.
Bob Wilson [Thu, 12 Jun 2014 21:37:30 +0000 (21:37 +0000)]
Move test for r210734 to Feature/aliases.ll.

llvm-svn: 210833

10 years agoPrefix another use of error_code.
Rafael Espindola [Thu, 12 Jun 2014 21:36:35 +0000 (21:36 +0000)]
Prefix another use of error_code.

llvm-svn: 210832

10 years agoMore prefixing of error_code.
Rafael Espindola [Thu, 12 Jun 2014 21:35:33 +0000 (21:35 +0000)]
More prefixing of error_code.

llvm-svn: 210831

10 years agoDelete trailing whitespace.
Matt Arsenault [Thu, 12 Jun 2014 21:27:03 +0000 (21:27 +0000)]
Delete trailing whitespace.

Hopefully this forces cmake to re-run.

llvm-svn: 210830

10 years agoUpdate test case to use "not" instead of "XFAIL".
Juergen Ributzka [Thu, 12 Jun 2014 21:17:40 +0000 (21:17 +0000)]
Update test case to use "not" instead of "XFAIL".

llvm-svn: 210829

10 years agoGVN: Enable value forwarding for calloc
Duncan P. N. Exon Smith [Thu, 12 Jun 2014 21:16:19 +0000 (21:16 +0000)]
GVN: Enable value forwarding for calloc

Enable value forwarding for loads from `calloc()` without an intervening
store.

This change extends GVN to handle the following case:

    %1 = tail call noalias i8* @calloc(i64 1, i64 4)
    %2 = bitcast i8* %1 to i32*
    ; This load is trivially constant zero
    %3 = load i32* %2, align 4

This is analogous to the handling for `malloc()` in the same places.
`malloc()` returns `undef`; `calloc()` returns a zero value.  Note that
it is correct to return zero even for out of bounds GEPs since the
result of such a GEP would be undefined.

Patch by Philip Reames!

llvm-svn: 210828

10 years agoR600: Mostly remove remaining AMDIL intrinsics.
Matt Arsenault [Thu, 12 Jun 2014 21:15:44 +0000 (21:15 +0000)]
R600: Mostly remove remaining AMDIL intrinsics.

Delete all unused ones, and add new AMDGPU named intrinsics for
the ones that are. Handle the old AMDIL names for comptability (although
remove their GCCBuiltin names) and add tests since there weren't any
for these before.

llvm-svn: 210827

10 years agoTweak documentation.
Nico Weber [Thu, 12 Jun 2014 21:15:10 +0000 (21:15 +0000)]
Tweak documentation.

1. Having "get started", "get involved", and "hacking" makes it hard to find
   how to send patches, so add a link from "get involved" to "hacking".
2. Remove an almost 5 year old note on the test running meachanism changing
   soon.
3. Let "hacking" link to the LLVM developer policy.

llvm-svn: 210826

10 years agoRemove unused include which breaks build after r210803
Jeroen Ketema [Thu, 12 Jun 2014 21:10:17 +0000 (21:10 +0000)]
Remove unused include which breaks build after r210803

Tested with llvm 3.4 and trunk.

llvm-svn: 210825

10 years agoMove DataLayout from the PPCTargetMachine to the subtarget.
Eric Christopher [Thu, 12 Jun 2014 21:08:06 +0000 (21:08 +0000)]
Move DataLayout from the PPCTargetMachine to the subtarget.

llvm-svn: 210824

10 years agoObjective-C ARC. Blocks that strongly capture themselves
Fariborz Jahanian [Thu, 12 Jun 2014 20:57:14 +0000 (20:57 +0000)]
Objective-C ARC. Blocks that strongly capture themselves
to call themselves will get the warning:
"Capturing <itself> strongly in this block is likely to
lead to a retain cycle". Cut down on the amount of noise
by noticing that user at some point sets the captured variable
to null in order to release it (and break the cycle).
// rdar://16944538

llvm-svn: 210823

10 years agoMove PPCFrameLowering into PPCSubtarget from PPCTargetMachine. Use
Eric Christopher [Thu, 12 Jun 2014 20:54:11 +0000 (20:54 +0000)]
Move PPCFrameLowering into PPCSubtarget from PPCTargetMachine. Use
the initializeSubtargetDependencies code to obtain an initialized
subtarget and migrate a couple of subtarget using functions to the
.cpp file to avoid circular includes.

llvm-svn: 210822

10 years agoFix up extra whitespace from previous commit.
Todd Fiala [Thu, 12 Jun 2014 20:50:30 +0000 (20:50 +0000)]
Fix up extra whitespace from previous commit.

llvm-svn: 210821

10 years agoRefer to error_code with an std prefix.
Rafael Espindola [Thu, 12 Jun 2014 20:42:12 +0000 (20:42 +0000)]
Refer to error_code with an std prefix.

llvm-svn: 210820

10 years agoLangRef: clarify that global declarations can have section and alignment info.
Bob Wilson [Thu, 12 Jun 2014 20:40:33 +0000 (20:40 +0000)]
LangRef: clarify that global declarations can have section and alignment info.

I'm not sure what it means to set a section for a declaration in another
translation unit, but there are some tests in the tree that do it so it seems
to be legal now regardless.

llvm-svn: 210819

10 years agoAdded gdb-remote P/p thread suffix test.
Todd Fiala [Thu, 12 Jun 2014 20:38:56 +0000 (20:38 +0000)]
Added gdb-remote P/p thread suffix test.

Improved the P writes all GPR register values test.  It now
limits itself to GPR registers that are not containers for
other registers.  Pulled in improvements from the llgs branch.

Note on Linux llgs I'm able to write a much wider range
of registers successfully with $P using the bitflip test than I am able
to write with debugserver.  Might be worth drilling into.

llvm-svn: 210818

10 years agoRefer to error_code with the std prefix.
Rafael Espindola [Thu, 12 Jun 2014 20:37:59 +0000 (20:37 +0000)]
Refer to error_code with the std prefix.

llvm-svn: 210817

10 years ago[FastISel][X86] Argument lowering test case
Juergen Ributzka [Thu, 12 Jun 2014 20:34:09 +0000 (20:34 +0000)]
[FastISel][X86] Argument lowering test case

This test case is supposed to xfail, because we do not handle structs or byval
arguments.

llvm-svn: 210816

10 years ago[FastIsel][X86] Add support for lowering the first 8 floating-point arguments.
Juergen Ributzka [Thu, 12 Jun 2014 20:12:34 +0000 (20:12 +0000)]
[FastIsel][X86] Add support for lowering the first 8 floating-point arguments.

Recommit with fixed argument attribute checking code, which is required to bail
out of all the cases we don't handle yet.

llvm-svn: 210815

10 years agoCodeGen: enable mov.w/mov.t pairs with minsize for WoA
Saleem Abdulrasool [Thu, 12 Jun 2014 20:06:33 +0000 (20:06 +0000)]
CodeGen: enable mov.w/mov.t pairs with minsize for WoA

Windows on ARM uses COFF/PE which is intrinsically position independent.  For
the case of 32-bit immediates, use a pair-wise relocation as otherwise we may
exceed the range of operators.  This fixes a code generation crash when using
-Oz when targeting Windows on ARM.

llvm-svn: 210814

10 years agoMS ABI: Fix forming pointers to members of a base class
Reid Kleckner [Thu, 12 Jun 2014 19:49:17 +0000 (19:49 +0000)]
MS ABI: Fix forming pointers to members of a base class

Previously we would calculate the inheritance model of a class when
requiring a pointer to member type of that class to be complete.  The
inheritance model is used to figure out how many fields are used by the
member pointer.

However, once we require a pointer to member of a derived class type to
be complete, we can form pointers to members of bases without
calculating the inheritance model for those bases.  This was causing
crashes on this simple test case:

  struct A {
    void f();
    void f(int);
  };
  struct B : public A {};
  void g() { void (B::*a)() = &B::f; }

Now we calculate the inheritance models of all base classes when
completing a member pointer type.

Fixes PR2007.

llvm-svn: 210813

10 years agoPermit -Wswitch coverage for enumerations.
Saleem Abdulrasool [Thu, 12 Jun 2014 19:33:26 +0000 (19:33 +0000)]
Permit -Wswitch coverage for enumerations.

Thanks to David Blakie and Richard Smith for pointing out that we can retain the
-Wswitch coverage while avoiding the warning from GCC by pushing the unreachable
outside of the switch!

llvm-svn: 210812

10 years agoTry to fix the polly build.
Rafael Espindola [Thu, 12 Jun 2014 19:22:17 +0000 (19:22 +0000)]
Try to fix the polly build.

llvm-svn: 210811

10 years agoRevert "[FastIsel][X86] Add support for lowering the first 8 floating-point arguments."
Juergen Ributzka [Thu, 12 Jun 2014 19:21:43 +0000 (19:21 +0000)]
Revert "[FastIsel][X86] Add support for lowering the first 8 floating-point arguments."

Reverting it because it breaks several tests.

llvm-svn: 210810

10 years ago[llvm-symbolizer] Fix parsing DW_AT_ranges in Fission skeleton compile unit DIEs.
Alexey Samsonov [Thu, 12 Jun 2014 18:52:35 +0000 (18:52 +0000)]
[llvm-symbolizer] Fix parsing DW_AT_ranges in Fission skeleton compile unit DIEs.

Turns out that DW_AT_ranges_base attribute sets the offset for
DW_AT_ranges values specified in the .dwo file, but not for DW_AT_ranges specified
in the skeleton compile unit DIE in the main executable. This is extremely confusing,
and would hopefully be fixed in DWARF-5 when it's finalized. For now this
behavior makes sense, as otherwise Fission would break DWARF consumers who
doesn't know anything about DW_AT_ranges_base.

llvm-svn: 210809

10 years agoAdd missing "InitializerConstant" to global variable syntax in LangRef.
Bob Wilson [Thu, 12 Jun 2014 18:42:55 +0000 (18:42 +0000)]
Add missing "InitializerConstant" to global variable syntax in LangRef.

The syntax for Global Variables in LangRef is missing the initializer.
This syntax section was added in r199218 along with changes to the
dllexport/dllimport handling, and I guess it was just an oversight to omit the
initializer values. I’ve marked the initializer as optional because this syntax
is used for both declarations and definitions.

llvm-svn: 210808

10 years agoRevert r210721 as it causes breakage in internal builds (and possibly GDB).
Eli Bendersky [Thu, 12 Jun 2014 18:05:39 +0000 (18:05 +0000)]
Revert r210721 as it causes breakage in internal builds (and possibly GDB).

llvm-svn: 210807

10 years agoX86: stifle GCC warning
Saleem Abdulrasool [Thu, 12 Jun 2014 17:56:18 +0000 (17:56 +0000)]
X86: stifle GCC warning

lib/Target/X86/X86TargetTransformInfo.cpp: In member function ‘virtual unsigned int {anonymous}::X86TTI::getIntImmCost(unsigned int, unsigned int, const llvm::APInt&, llvm::Type*) const’:
lib/Target/X86/X86TargetTransformInfo.cpp:920:60: warning: enumeral and non-enumeral type in conditional expression [enabled by default]

This seems like an unhelpful warning, but there doesnt seem to be a controlling
flag, so add an explicit cast to silence the warning.

llvm-svn: 210806

10 years agoTrying to fix the windows build.
Rafael Espindola [Thu, 12 Jun 2014 17:49:35 +0000 (17:49 +0000)]
Trying to fix the windows build.

llvm-svn: 210805

10 years agoBasic: fix warnings from GCC
Saleem Abdulrasool [Thu, 12 Jun 2014 17:43:37 +0000 (17:43 +0000)]
Basic: fix warnings from GCC

tools/clang/lib/Basic/DiagnosticIDs.cpp: In function ‘clang::DiagnosticIDs::Level toLevel(clang::diag::Severity)’:
tools/clang/lib/Basic/DiagnosticIDs.cpp:382:1: warning: control reaches end of non-void function [-Wreturn-type]

tools/clang/lib/Format/Format.cpp: In member function ‘virtual std::string clang::format::ParseErrorCategory::message(int) const’:
tools/clang/lib/Format/Format.cpp:282:1: warning: control reaches end of non-void function [-Wreturn-type]

Add a default cases that asserts that we handle the severity, parse error.

llvm-svn: 210804

10 years agoRemove system_error.h.
Rafael Espindola [Thu, 12 Jun 2014 17:38:55 +0000 (17:38 +0000)]
Remove system_error.h.

This is a minimal change to remove the header. I will remove the occurrences
of "using std::error_code" in a followup patch.

llvm-svn: 210803

10 years agoInclude system_error directly.
Rafael Espindola [Thu, 12 Jun 2014 17:19:42 +0000 (17:19 +0000)]
Include system_error directly.

llvm-svn: 210802

10 years agoinclude system_error directly.
Rafael Espindola [Thu, 12 Jun 2014 17:15:58 +0000 (17:15 +0000)]
include system_error directly.

llvm-svn: 210801

10 years agoRun llvm/utils/sort_includes.py in a few files.
Rafael Espindola [Thu, 12 Jun 2014 17:12:28 +0000 (17:12 +0000)]
Run llvm/utils/sort_includes.py in a few files.

This will reduce the noise in a followup patch.

llvm-svn: 210800

10 years agoUses #include "..." instead of #include <...> for llvm headers.
Rafael Espindola [Thu, 12 Jun 2014 17:08:11 +0000 (17:08 +0000)]
Uses #include "..." instead of #include <...> for llvm headers.

llvm-svn: 210799

10 years agoMore tests for // rdar://17259812
Fariborz Jahanian [Thu, 12 Jun 2014 16:55:43 +0000 (16:55 +0000)]
More tests for // rdar://17259812

llvm-svn: 210798

10 years agoinclude system_error directly.
Rafael Espindola [Thu, 12 Jun 2014 16:53:02 +0000 (16:53 +0000)]
include system_error directly.

llvm-svn: 210797

10 years ago[Mips] Make exe-dynamic.test test case independent from external input files.
Simon Atanasyan [Thu, 12 Jun 2014 16:46:47 +0000 (16:46 +0000)]
[Mips] Make exe-dynamic.test test case independent from external input files.

llvm-svn: 210796

10 years agoObjective-C. Use isObjCRetainableType in my last
Fariborz Jahanian [Thu, 12 Jun 2014 16:12:30 +0000 (16:12 +0000)]
Objective-C. Use isObjCRetainableType in my last
patch. NFC.

llvm-svn: 210795

10 years agoadding re-include guards into lib/Support/reg*.h
Artyom Skrobov [Thu, 12 Jun 2014 16:07:56 +0000 (16:07 +0000)]
adding re-include guards into lib/Support/reg*.h

llvm-svn: 210794

10 years agoRemove pimpl class from PassRegistry.
Zachary Turner [Thu, 12 Jun 2014 16:06:51 +0000 (16:06 +0000)]
Remove pimpl class from PassRegistry.

Since removeRegistrationListener is no longer called during static
destruction, we can get rid of the pimpl in PassRegistry.

This should clean up the code somewhat, increase clarity, and also
allows us to put the Lock as a member of the class, instead of as a
ManagedStatic.

As part of this change, the PassInfo class is moved from
PassSupport.h to its own file, to eliminate the otherwise circular
header dependency between PassRegistry.h and PassSupport.h

Reviewed by: rnk, dblaikie

Differential Revision: http://reviews.llvm.org/D4107

llvm-svn: 210793

10 years agoRevert "SelectionDAG: Enable (and (setcc x), (setcc y)) -> (setcc (and x, y)) for...
Tom Stellard [Thu, 12 Jun 2014 16:04:47 +0000 (16:04 +0000)]
Revert "SelectionDAG: Enable (and (setcc x), (setcc y)) -> (setcc (and x, y)) for vectors"

This reverts commit r210540, adds a testcase for the regression it
caused, and marks the R600 test it was supposed to fix as XFAIL.

llvm-svn: 210792

10 years agoExplicitly initialize all fields to avoid -Wmissing-field-initializers warning.
Eli Bendersky [Thu, 12 Jun 2014 15:47:57 +0000 (15:47 +0000)]
Explicitly initialize all fields to avoid -Wmissing-field-initializers warning.

llvm-svn: 210791

10 years agoDisable the load/store optimization pass for Thumb-1.
James Molloy [Thu, 12 Jun 2014 15:18:33 +0000 (15:18 +0000)]
Disable the load/store optimization pass for Thumb-1.

Moritz's changes have improved codegen a lot, but further testing showed significant correctness problems. Disable by default until these have been worked out.

Patch by Moritz Roth!

llvm-svn: 210789

10 years ago[mips][mips64r6] bc1[tf] are not available on MIPS32r6/MIPS64r6
Daniel Sanders [Thu, 12 Jun 2014 15:00:17 +0000 (15:00 +0000)]
[mips][mips64r6] bc1[tf] are not available on MIPS32r6/MIPS64r6

Summary:
Also tightened up the acceptable condition operand for these instructions
on MIPS-I to MIPS-III. Support for $fcc[1-7] was added in MIPS-IV. Prior
to that only $fcc0 is acceptable.

We currently don't optimize (BEQZ (NOT $a), $target) and similar. It's
probably best to do this in InstCombine.

Depends on D4111

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D4112

llvm-svn: 210787

10 years ago[mips][mips64r6] bc2[ft] are not available on MIPS32r6/MIPS64r6
Daniel Sanders [Thu, 12 Jun 2014 14:54:13 +0000 (14:54 +0000)]
[mips][mips64r6] bc2[ft] are not available on MIPS32r6/MIPS64r6

Summary:
These instructions are not implemented for any MIPS ISA so we only need
testcases.

Depends on D4110

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D4111

llvm-svn: 210786

10 years agoDon't import error_code into the lld namespace.
Rafael Espindola [Thu, 12 Jun 2014 14:53:47 +0000 (14:53 +0000)]
Don't import error_code into the lld namespace.

llvm-svn: 210785

10 years ago[mips][mips64r6] [sl][duw]xc1 are not available on MIPS32r6/MIPS64r6
Daniel Sanders [Thu, 12 Jun 2014 14:19:28 +0000 (14:19 +0000)]
[mips][mips64r6] [sl][duw]xc1 are not available on MIPS32r6/MIPS64r6

Summary:
Folded mips64-fp-indexed-ls.ll into fp-indexed-ls.ll. To do so, the zext's in
mips64-fp-indexed-ls.ll were changed to implicit sign extensions (performed
by getelementptr). This does not affect the purpose of the test.

Depends on D4004

Reviewers: zoran.jovanovic, jkolek, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D4110

llvm-svn: 210784

10 years agoReplace llvm::error_code with std::error_code.
Rafael Espindola [Thu, 12 Jun 2014 14:11:22 +0000 (14:11 +0000)]
Replace llvm::error_code with std::error_code.

llvm-svn: 210783

10 years agoThis removes TODO added in http://reviews.llvm.org/D3658
Dinesh Dwivedi [Thu, 12 Jun 2014 14:06:00 +0000 (14:06 +0000)]
This removes TODO added in reviews.llvm.org/D3658

The patch transforms

ABS(NABS(X)) -> ABS(X)
NABS(ABS(X)) -> NABS(X)

Differential Revision: http://reviews.llvm.org/D4040

llvm-svn: 210782

10 years agoreplace llvm::error_code with std::error_code.
Rafael Espindola [Thu, 12 Jun 2014 14:04:54 +0000 (14:04 +0000)]
replace llvm::error_code with std::error_code.

llvm-svn: 210781

10 years agoReplace llvm::error_code with std::error_code.
Rafael Espindola [Thu, 12 Jun 2014 14:02:15 +0000 (14:02 +0000)]
Replace llvm::error_code with std::error_code.

llvm-svn: 210780

10 years ago[mips][mips64r6] prefx is not available on MIPS32r6/MIPS64r6
Daniel Sanders [Thu, 12 Jun 2014 13:51:27 +0000 (13:51 +0000)]
[mips][mips64r6] prefx is not available on MIPS32r6/MIPS64r6

Summary: We haven't implemented this instruction so we only add a test case.

Reviewers: vmedic, zoran.jovanovic, jkolek

Reviewed By: jkolek

Differential Revision: http://reviews.llvm.org/D4004

llvm-svn: 210779

10 years ago[mips][mips64r6] 80 col corrections that should have been in r210777.
Daniel Sanders [Thu, 12 Jun 2014 13:42:04 +0000 (13:42 +0000)]
[mips][mips64r6] 80 col corrections that should have been in r210777.

llvm-svn: 210778

10 years ago[mips][mips64r6] c.cond.fmt, mov[fntz], and mov[fntz].[ds] are not available on MIPS3...
Daniel Sanders [Thu, 12 Jun 2014 13:39:06 +0000 (13:39 +0000)]
[mips][mips64r6] c.cond.fmt, mov[fntz], and mov[fntz].[ds] are not available on MIPS32r6/MIPS64r6

Summary:
c.cond.fmt has been replaced by cmp.cond.fmt. Where c.cond.fmt wrote to
dedicated condition registers, cmp.cond.fmt writes 1 or 0 to normal FGR's
(like the GPR comparisons).

mov[fntz] have been replaced by seleqz and selnez. These instructions
conditionally zero a register based on a bool in a GPR. The results can
then be or'd together to act as a select without, for example, requiring a third
register read port.

mov[fntz].[ds] have been replaced with sel.[ds]

MIPS64r6 currently generates unnecessary sign-extensions for most selects.
This is because the result of a SETCC is currently an i32. Bits 32-63 are
undefined in i32 and the behaviour of seleqz/selnez would otherwise depend
on undefined bits. Later, we will fix this by making the result of SETCC an
i64 on MIPS64 targets.

Depends on D3958

Reviewers: jkolek, vmedic, zoran.jovanovic

Reviewed By: vmedic, zoran.jovanovic

Differential Revision: http://reviews.llvm.org/D4003

llvm-svn: 210777

10 years agoReplace llvm::error_code with std::error_code.
Rafael Espindola [Thu, 12 Jun 2014 13:32:11 +0000 (13:32 +0000)]
Replace llvm::error_code with std::error_code.

llvm-svn: 210776

10 years ago[mips][mips64r6] jalx is not available on MIPS32r6/MIPS64r6
Daniel Sanders [Thu, 12 Jun 2014 12:58:20 +0000 (12:58 +0000)]
[mips][mips64r6] jalx is not available on MIPS32r6/MIPS64r6

Summary: Depends on D3957

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3958

llvm-svn: 210775

10 years agoAllow lowercase messages in this test again.
Rafael Espindola [Thu, 12 Jun 2014 12:40:04 +0000 (12:40 +0000)]
Allow lowercase messages in this test again.

I misunderstood where the message was being converted.

llvm-svn: 210774

10 years ago[mips][mips64r6] Add R_MIPS_PC19_S2
Zoran Jovanovic [Thu, 12 Jun 2014 12:40:00 +0000 (12:40 +0000)]
[mips][mips64r6] Add R_MIPS_PC19_S2
Differential Revision: http://reviews.llvm.org/D3866

llvm-svn: 210773

10 years agoDon't import make_error_code into the llvm namespace.
Rafael Espindola [Thu, 12 Jun 2014 11:58:49 +0000 (11:58 +0000)]
Don't import make_error_code into the llvm namespace.

llvm-svn: 210772

10 years ago[mips] Use MTHC1 when it is available (MIPS32r2 and later) for both FP32 and FP64
Daniel Sanders [Thu, 12 Jun 2014 11:55:58 +0000 (11:55 +0000)]
[mips] Use MTHC1 when it is available (MIPS32r2 and later) for both FP32 and FP64

Summary:
To make this work for both AFGR64 and FGR64 register sets, I've had to make the
instruction definition consistent with the white lie (that it reads the lower
32-bits of the register) when they are generated by expandBuildPairF64().

Corrected the definition of hasMips32r2() and hasMips64r2() to include
MIPS32r6 and MIPS64r6.

Depends on D3956

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

Differential Revision: http://reviews.llvm.org/D3957

llvm-svn: 210771

10 years ago[mips][mips64r6] Add bgec and bgeuc instructions
Zoran Jovanovic [Thu, 12 Jun 2014 11:47:44 +0000 (11:47 +0000)]
[mips][mips64r6] Add bgec and bgeuc instructions
Differential Revision: http://reviews.llvm.org/D4017

llvm-svn: 210770