platform/upstream/llvm.git
10 years ago[AArch64] Add some more regression tests for load pre-index update folding in the...
Tilmann Scheller [Mon, 2 Jun 2014 11:57:09 +0000 (11:57 +0000)]
[AArch64] Add some more regression tests for load pre-index update folding in the load/store optimizer.

Add tests for the following transform:

 add x8, x8, #16
  ...
 ldr X, [x8]
  ->
 ldr X, [x8, #16]!

with X being either w0, x0, s0, d0 or q0.

llvm-svn: 210018

10 years agoclang-format: Fix special case of binary operator detection.
Daniel Jasper [Mon, 2 Jun 2014 11:54:20 +0000 (11:54 +0000)]
clang-format: Fix special case of binary operator detection.

There is a pattern where evaluation order is used as control flow.
This patch special-cases a commonly occuring version of this pattern.

Before:
  Aaaaa *aaa = nullptr;
  // ...
  aaa &&aaa->f();

After:
  Aaaaa *aaa = nullptr;
  // ...
  aaa && aaa->f();

llvm-svn: 210017

10 years agoRemove superfluous semicolon confusing clang-format.
Daniel Jasper [Mon, 2 Jun 2014 11:29:58 +0000 (11:29 +0000)]
Remove superfluous semicolon confusing clang-format.

llvm-svn: 210016

10 years agoRun clang-format.
Rui Ueyama [Mon, 2 Jun 2014 11:13:11 +0000 (11:13 +0000)]
Run clang-format.

llvm-svn: 210015

10 years agos/vector/std::vector/
Rui Ueyama [Mon, 2 Jun 2014 10:58:47 +0000 (10:58 +0000)]
s/vector/std::vector/

llvm-svn: 210014

10 years agoclang-format: No space between ")" and braced init list.
Daniel Jasper [Mon, 2 Jun 2014 10:57:55 +0000 (10:57 +0000)]
clang-format: No space between ")" and braced init list.

Before:
  auto j = decltype(i) {};

After:
  auto j = decltype(i){};

This fixes llvm.org/PR19892.

llvm-svn: 210013

10 years ago[asan] Improve vDSO check in AsanCheckDynamicRTPrereqs; patch by Yuri Gribov
Kostya Serebryany [Mon, 2 Jun 2014 10:39:40 +0000 (10:39 +0000)]
[asan] Improve vDSO check in AsanCheckDynamicRTPrereqs; patch by  Yuri Gribov

llvm-svn: 210012

10 years agoclang-format: Fix Allman brace breaking of enums.
Daniel Jasper [Mon, 2 Jun 2014 10:17:32 +0000 (10:17 +0000)]
clang-format: Fix Allman brace breaking of enums.

Before:
  enum Side
  { LEFT,
    RIGHT };

After:
  enum Side
  {
    LEFT,
    RIGHT
  };

This fixes llvm.org/PR19911.

llvm-svn: 210011

10 years agoclang-format: Fix trailing const (etc.) with Allman brace style.
Daniel Jasper [Mon, 2 Jun 2014 09:52:08 +0000 (09:52 +0000)]
clang-format: Fix trailing const (etc.) with Allman brace style.

Before:
  void someLongFunction(int someLongParameter)
      const
  {
  }

After:
  void someLongFunction(
      int someLongParameter) const
  {
  }

This fixes llvm.org/PR19912.

llvm-svn: 210010

10 years ago[sancov] Remove debug leftovers and update usage text.
Evgeniy Stepanov [Mon, 2 Jun 2014 09:04:45 +0000 (09:04 +0000)]
[sancov] Remove debug leftovers and update usage text.

llvm-svn: 210009

10 years agoSimplify markLive().
Rui Ueyama [Mon, 2 Jun 2014 08:06:57 +0000 (08:06 +0000)]
Simplify markLive().

Reference::target() never returns a nullptr, so NULL check
is not needed and is more harmful than doing nothing.
No functionality change.

llvm-svn: 210008

10 years agoAdded inst combine tarnsform for (1 << X) & C pattrens where C is (some PowerOf2...
Dinesh Dwivedi [Mon, 2 Jun 2014 07:57:24 +0000 (07:57 +0000)]
Added inst combine tarnsform for (1 << X) & C pattrens where C is (some PowerOf2 - 1)

This patch can handles following cases from http://nondot.org/sabre/LLVMNotes/InstCombine.txt
  "((1 << X) & 7) == 0" ==> "X > 2"
  "((1 << X) & 7) != 0" ==> "X < 3".

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

llvm-svn: 210007

10 years agoAdded inst combine transforms for single bit tests from Chris's note
Dinesh Dwivedi [Mon, 2 Jun 2014 07:24:36 +0000 (07:24 +0000)]
Added inst combine transforms for single bit tests from Chris's note

if ((x & C) == 0) x |= C becomes x |= C
if ((x & C) != 0) x ^= C becomes x &= ~C
if ((x & C) == 0) x ^= C becomes x |= C
if ((x & C) != 0) x &= ~C becomes x &= ~C
if ((x & C) == 0) x &= ~C becomes nothing

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

llvm-svn: 210006

10 years agoSilence -Wreturn-type warning
Alp Toker [Mon, 2 Jun 2014 04:34:10 +0000 (04:34 +0000)]
Silence -Wreturn-type warning

llvm-svn: 210005

10 years ago[Mips] Reduce number of input files used my Mips tests.
Simon Atanasyan [Mon, 2 Jun 2014 04:20:01 +0000 (04:20 +0000)]
[Mips] Reduce number of input files used my Mips tests.

No functional changes.

llvm-svn: 210004

10 years agoGraphWriter: tweak the program fallback order
Alp Toker [Mon, 2 Jun 2014 04:14:23 +0000 (04:14 +0000)]
GraphWriter: tweak the program fallback order

Amend r210001 to use the classic fallback order behaviour if the requested
graphing program isn't found.

llvm-svn: 210003

10 years agoPreparation for <string_view>. More helper functions that can be shared between ...
Marshall Clow [Mon, 2 Jun 2014 02:22:49 +0000 (02:22 +0000)]
Preparation for <string_view>. More helper functions that can be shared between <string> and <string_view>. No functionality change

llvm-svn: 210002

10 years agoGraphWriter: detect graph viewer programs at runtime
Alp Toker [Mon, 2 Jun 2014 01:40:04 +0000 (01:40 +0000)]
GraphWriter: detect graph viewer programs at runtime

Replace the crufty build-time configure checks for program paths with
equivalent runtime logic.

This lets users install graphing tools as needed without having to reconfigure
and rebuild LLVM, while eliminating a long chain of inappropriate compile
dependencies that included GUI programs and the windowing system.

Additional features:

 * Support the OS X 'open' command to view graphs generated by any of the
   Graphviz utilities. This is an alternative to the Graphviz OS X UI which is
   no longer available on Mountain Lion.

 * Produce informative log output upon failure to indicate which programs can
   be installed to view graphs.

Ping me if this doesn't work for your particular environment.

llvm-svn: 210001

10 years agoInstruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance of std...
NAKAMURA Takumi [Mon, 2 Jun 2014 01:35:34 +0000 (01:35 +0000)]
Instruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance of std::equal(op) to appease MSVC Debug build.

MSVC Debug build is confused with (possibly invalid) op_begin(), if op_begin() == op_end().

llvm-svn: 210000

10 years agoSupport: add 6-parameter format
Saleem Abdulrasool [Mon, 2 Jun 2014 01:17:54 +0000 (01:17 +0000)]
Support: add 6-parameter format

Since we cannot yet use variadic templates, add a specialisation for
6-parameters to format.  This is motivated by a need for the additional
parameter for formatting information for an unwind decoder for Windows on ARM.

llvm-svn: 209999

10 years agoSupport: add Windows ARM EH data structures
Saleem Abdulrasool [Mon, 2 Jun 2014 01:17:49 +0000 (01:17 +0000)]
Support: add Windows ARM EH data structures

Introduce the support structures necessary to deal with the Windows ARM EH data.
These definitions are extremely aggressive about assertions to aid future use
for generation of the entries and subsequent decoding.

The names for the various fields are meant to reflect the names used by the
Visual Studio toolchain to aid communication.

Due to the complexity in reading a few of the values, there are a couple of
additional utility functions to decode the information.

In general, there are two ways to encode the unwinding information:
- packed, which places the data inline into the
  _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY structure.
- unpacked, which places the data into auxiliary structures placed into the
  .xdata section.

The set of structures allow reading of data in either encoding, with the minor
caveat that epilogue scopes need to be decoded manually by constructing the
structure from the data returned by the RuntimeFunction structure.

These definitions are meant for read-only access at the current point as the
first use of them will be to decode the exception information.

llvm-svn: 209998

10 years agoRevert "Fix the undefined-but-used odr-use marker (DR48)"
Alp Toker [Sun, 1 Jun 2014 19:13:44 +0000 (19:13 +0000)]
Revert "Fix the undefined-but-used odr-use marker (DR48)"

Wrong patch got committed (this one isn't ready for prime time).

This reverts commit r209996.

llvm-svn: 209997

10 years agoFix the undefined-but-used odr-use marker (DR48)
Alp Toker [Sun, 1 Jun 2014 18:49:32 +0000 (18:49 +0000)]
Fix the undefined-but-used odr-use marker (DR48)

We should treat tentative definitions as undefined for the purpose of
ODR-use linkage checking.

This broke somewhere around r149731 when tests were disabled.

Note that test coverage for these diagnostics is generally lacking due to a
separate issue (PR19910: Don't suppress unused/undefined warnings when there
are errors).

llvm-svn: 209996

10 years agoFix typos
Alp Toker [Sun, 1 Jun 2014 18:28:36 +0000 (18:28 +0000)]
Fix typos

llvm-svn: 209995

10 years agoAdd initial CMake build system
Alp Toker [Sun, 1 Jun 2014 18:01:33 +0000 (18:01 +0000)]
Add initial CMake build system

This is not yet supported for production builds but can already produce working
binaries on OS X and Linux with clang and gcc.

The intention is to improve support to the point where it can integrate with
the LLVM runtime platform, cover all platforms, runtime/release build
configurations and run the tests.

Patch by Jack Howarth!

llvm-svn: 209994

10 years agoDon't compare an error_code with nullptr.
Rafael Espindola [Sun, 1 Jun 2014 16:16:02 +0000 (16:16 +0000)]
Don't compare an error_code with nullptr.

llvm-svn: 209993

10 years agoFix PR18498: Support explicit template arguments with variadic generic lambdas
Faisal Vali [Sun, 1 Jun 2014 16:11:54 +0000 (16:11 +0000)]
Fix PR18498: Support explicit template arguments with variadic generic lambdas

http://llvm.org/bugs/show_bug.cgi?id=18498

This code was resulting in a crash:

auto L = [](auto ... v) { };
L.operator()<int>(3);

The reason is that the partially-substituted-pack is incorrectly retained within the current-instantiation-scope during template-argument-finalization, and because lambda's are local, there parent instantiation scopes are merged, which leads to the expansion-pattern being retained in the finalized specialization.

This patch ensures that once we have finalized deduction of a parameter-pack, we remove the partially-substituted-pack so that it doesn't cause CheckParameterPacksForExpansion to incorrectly inform the caller that it needs to retain the expansion pattern.

Thanks to Richard Smith for the review!

http://reviews.llvm.org/D2135

llvm-svn: 209992

10 years agoTest fixes and improvements.
Rafael Espindola [Sun, 1 Jun 2014 13:45:09 +0000 (13:45 +0000)]
Test fixes and improvements.

Remove redundant -fno-stack-protector run with openbsd.
Add -target to the -fstack-protector tests so they pass on openbsd.

Patch by Brad Smith.

llvm-svn: 209991

10 years agoARMEB: Fix function return type f64
Christian Pirker [Sun, 1 Jun 2014 09:30:52 +0000 (09:30 +0000)]
ARMEB: Fix function return type f64

Reviewed at http://reviews.llvm.org/D3968

llvm-svn: 209990

10 years agoUpdates in IntelJITEventListener.cpp - by Arch Robison.
Elena Demikhovsky [Sun, 1 Jun 2014 08:45:11 +0000 (08:45 +0000)]
Updates in IntelJITEventListener.cpp - by Arch Robison.

This patch updates IntelJITEventListener.cpp to account for revision 206654, which removed some methods from DILineInfo.

llvm-svn: 209989

10 years agoR600: Set all float vector expands in the same place
Matt Arsenault [Sun, 1 Jun 2014 07:38:21 +0000 (07:38 +0000)]
R600: Set all float vector expands in the same place

llvm-svn: 209988

10 years ago[Mips] Implement .{ctors,dtors}.<priority> sections ordering.
Simon Atanasyan [Sun, 1 Jun 2014 06:28:42 +0000 (06:28 +0000)]
[Mips] Implement .{ctors,dtors}.<priority> sections ordering.

Arrange .ctors/.dtors sections in the following order:
  .ctors from crtbegin.o or crtbegin?.o
  .ctors from regular object files
  .ctors.* (sorted) from regular object files
  .ctors from crtend.o or crtend?.o

This order is specific for MIPS traget. For example, on X86
the .ctors.* sections are merged into the .init_array section.

llvm-svn: 209987

10 years agocompiler-rt: prefer .rodata for non MachO targets
Saleem Abdulrasool [Sun, 1 Jun 2014 04:07:07 +0000 (04:07 +0000)]
compiler-rt: prefer .rodata for non MachO targets

Place constants into .rdata if targeting ELF or COFF/PE.  This should be
functionally identical, however, the data would be placed into a different
section.  This is purely a cleanup change.

llvm-svn: 209986

10 years agocompiler-rt: whitespace and uniformity for arm
Saleem Abdulrasool [Sun, 1 Jun 2014 04:07:03 +0000 (04:07 +0000)]
compiler-rt: whitespace and uniformity for arm

Make the whitespace a bit more uniform in the various assembly routines.  This
also makes the assembly files a bit more uniform on the ARM side by explicitly
stating that it is using the unified syntax and that the contents of the code is
in the text section (or segment).  No functional change.

llvm-svn: 209985

10 years agoDebugInfo: Assert that DbgVariables have associated DIEs
David Blaikie [Sun, 1 Jun 2014 03:38:13 +0000 (03:38 +0000)]
DebugInfo: Assert that DbgVariables have associated DIEs

This was previously committed in r209680 and reverted in r209683 after
it caused sanitizer builds to crash.

The issue seems to be that the DebugLoc associated with dbg.value IR
intrinsics isn't necessarily accurate. Instead, we duplicate the
DIVariables and add an InlinedAt field to them to record their
location.

We were using this InlinedAt field to compute the LexicalScope for the
variable, but not using it in the abstract DbgVariable construction and
mapping. This resulted in a formal parameter to the current concrete
function, correctly having no InlinedAt information, but incorrectly
having a DebugLoc that described an inlined location within the
function... thus an abstract DbgVariable was created for the variable,
but its DIE was never constructed (since the LexicalScope had no such
variable). This DbgVariable was silently ignored (by testing for a
non-null DIE on the abstract DbgVariable).

So, fix this by using the right scoping information when constructing
abstract DbgVariables.

In the long run, I suspect we want to undo the work that added this
second kind of location tracking and fix the places where the DebugLoc
propagation on the dbg.value intrinsic fails. This will shrink debug
info (by not duplicating DIVariables), make it more efficient (by not
having to construct new DIVariable metadata nodes to try to map back to
a single variable), and benefit all instructions.

But perhaps there are insurmountable issues with DebugLoc quality that
I'm unaware of... I just don't know how we can't /just keep the DebugLoc
from the dbg.declare to the dbg.values and never get this wrong/.

Some history context:

http://llvm.org/viewvc/llvm-project?view=revision&revision=135629
http://llvm.org/viewvc/llvm-project?view=revision&revision=137253

llvm-svn: 209984

10 years agoDon't add examples to the check-clang dependencies unless requested
Alp Toker [Sun, 1 Jun 2014 02:02:23 +0000 (02:02 +0000)]
Don't add examples to the check-clang dependencies unless requested

The tests were correctly getting skipped but the targets still mistakenly got
built.

llvm-svn: 209983

10 years agoFix typos
Alp Toker [Sat, 31 May 2014 21:26:28 +0000 (21:26 +0000)]
Fix typos

llvm-svn: 209982

10 years agoExecutionEngine: avoid NDEBUG in headers
Alp Toker [Sat, 31 May 2014 21:26:17 +0000 (21:26 +0000)]
ExecutionEngine: avoid NDEBUG in headers

llvm-svn: 209981

10 years agoUpdate a couple of header inclusion guards
Alp Toker [Sat, 31 May 2014 21:26:09 +0000 (21:26 +0000)]
Update a couple of header inclusion guards

llvm-svn: 209980

10 years agoR600/SI: Remove redundant patterns
Matt Arsenault [Sat, 31 May 2014 19:25:17 +0000 (19:25 +0000)]
R600/SI: Remove redundant patterns

These patterns are already handled in the instruction definition.

llvm-svn: 209979

10 years agoPreprocessor: make C++ operator names as macro identifiers a compatible extension
Alp Toker [Sat, 31 May 2014 16:32:22 +0000 (16:32 +0000)]
Preprocessor: make C++ operator names as macro identifiers a compatible extension

With recent changes, this is now a compatible language extension and can be
safely enabled with -ms-extensions instead of requiring the full
-ms-compatibility MSVC drop-in mode. As such we can now also emit an extension
warning under -Wmicrosoft to help users port their code.

llvm-svn: 209978

10 years ago[SelectionDAG] Force cycle detection in AssignTopologicalOrder before aborting
Adam Nemet [Sat, 31 May 2014 16:23:20 +0000 (16:23 +0000)]
[SelectionDAG] Force cycle detection in AssignTopologicalOrder before aborting

DAG cycle detection is only enabled with ENABLE_EXPENSIVE_CHECKS.  However we
can run it just before we would crash in order to provide more informative
diagnostics.

Now in addition to the "Overran sorted position" message we also get the Node
printed if a cycle was detected.

Tested by building several configs: Debug+Assert, Debug+Assert+Check (this is
ENABLE_EXPENSIVE_CHECKS), Release+Assert and Release.  Also tried that the
AssignTopologicalOrder assert produces the expected results.

llvm-svn: 209977

10 years ago[SelectionDAG] Pass DAG to checkForCycles
Adam Nemet [Sat, 31 May 2014 16:23:17 +0000 (16:23 +0000)]
[SelectionDAG] Pass DAG to checkForCycles

Pass the DAG down to checkForCycles from all callers where we have it.  This
allows target-specific nodes to be printed properly.

Also print some missing newlines.

llvm-svn: 209976

10 years ago[SelectionDAG] Remove duplicate declaration
Adam Nemet [Sat, 31 May 2014 16:23:13 +0000 (16:23 +0000)]
[SelectionDAG] Remove duplicate declaration

Prefer the decl in SelectionDAGNodes.h because it's used there and
SelectionDAG.h includes SelectionDAGNodes.h.

llvm-svn: 209975

10 years agoFix test on platforms where size_t is not 'unsigned long'.
Benjamin Kramer [Sat, 31 May 2014 15:06:33 +0000 (15:06 +0000)]
Fix test on platforms where size_t is not 'unsigned long'.

llvm-svn: 209974

10 years ago[Reassociate] Similar to "X + -X" -> "0", added code to handle "X + ~X" -> "-1".
Benjamin Kramer [Sat, 31 May 2014 15:01:54 +0000 (15:01 +0000)]
[Reassociate] Similar to "X + -X" -> "0", added code to handle "X + ~X" -> "-1".

Handle "X + ~X" -> "-1" in the function Value *Reassociate::OptimizeAdd(Instruction *I, SmallVectorImpl<ValueEntry> &Ops);
This patch implements:
TODO: We could handle "X + ~X" -> "-1" if we wanted, since "-X = ~X+1".

Patch by Rahul Jain!

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

llvm-svn: 209973

10 years agoFix XFAIL condition from r208840
Justin Bogner [Sat, 31 May 2014 07:59:03 +0000 (07:59 +0000)]
Fix XFAIL condition from r208840

The XFAILs in r208840 were too general. They were meant to only apply
to testing when use_system_lib was set.

llvm-svn: 209972

10 years agoR600/SI: Fix [s|u]int_to_fp for i1
Matt Arsenault [Sat, 31 May 2014 06:47:42 +0000 (06:47 +0000)]
R600/SI: Fix [s|u]int_to_fp for i1

llvm-svn: 209971

10 years agoSupport C++11 scoped enums in NamedDecl::isCXXClassMember()
Alp Toker [Sat, 31 May 2014 06:11:09 +0000 (06:11 +0000)]
Support C++11 scoped enums in NamedDecl::isCXXClassMember()

Resolves an old FIXME.

No callers depend on this giving the right answer so I haven't been able to
cook up a useful test case.

llvm-svn: 209970

10 years agoRename utility function templates
Alp Toker [Sat, 31 May 2014 06:11:02 +0000 (06:11 +0000)]
Rename utility function templates

isExternCTemplate() and getLanguageLinkageTemplate() have nothing to do with
templates despite the dubious naming scheme.

llvm-svn: 209969

10 years agoFix typos in tablegen error messages
Matt Arsenault [Sat, 31 May 2014 05:18:52 +0000 (05:18 +0000)]
Fix typos in tablegen error messages

llvm-svn: 209968

10 years ago[yaml2obj] Add new command line option `-docnum`.
Simon Atanasyan [Sat, 31 May 2014 04:51:07 +0000 (04:51 +0000)]
[yaml2obj] Add new command line option `-docnum`.

Input YAML file might contain multiple object file definitions.
New option `-docnum` allows to specify an ordinal number (starting from 1)
of definition used for an object file generation.

Patch reviewed by Sean Silva.

llvm-svn: 209967

10 years agoFormat strings: check against an enum's underlying type.
Jordan Rose [Sat, 31 May 2014 04:12:14 +0000 (04:12 +0000)]
Format strings: check against an enum's underlying type.

This allows us to be more careful when dealing with enums whose fixed
underlying type requires special handling in a format string, like
NSInteger.

A refinement of r163266 from a year and a half ago, which added the
special handling for NSInteger and friends in the first place.

<rdar://problem/16616623>

llvm-svn: 209966

10 years agoAST Dump: print the Inherited flag on attributes
Hans Wennborg [Sat, 31 May 2014 04:05:57 +0000 (04:05 +0000)]
AST Dump: print the Inherited flag on attributes

Also move the attribute-specific dumping to after dumping this and
the Implicit flag.

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

llvm-svn: 209965

10 years agoreally fix the windows build.
Rafael Espindola [Sat, 31 May 2014 03:40:00 +0000 (03:40 +0000)]
really fix the windows build.

llvm-svn: 209964

10 years agoPreprocessor: recover gracefully when C++ operator names are used as macro identifiers
Alp Toker [Sat, 31 May 2014 03:38:17 +0000 (03:38 +0000)]
Preprocessor: recover gracefully when C++ operator names are used as macro identifiers

This failure mode shows up occasionally when users try to include C headers in
C++ projects or when porting from Windows. We might as well recover in the way
the user expected, thus avoiding confusing diagnostic messages at point of use.

llvm-svn: 209963

10 years agoPreprocessor: don't exit early in CheckMacroName()
Alp Toker [Sat, 31 May 2014 03:38:08 +0000 (03:38 +0000)]
Preprocessor: don't exit early in CheckMacroName()

The checks below can hypothetically apply to converted operator name
identifiers.

In practice there are no builtin macros etc. with those names so there's no
behavioural change to test.

llvm-svn: 209962

10 years agoFix windows build.
Rafael Espindola [Sat, 31 May 2014 03:26:57 +0000 (03:26 +0000)]
Fix windows build.

llvm-svn: 209961

10 years agoThere is no std::errc::success, remove the llvm one.
Rafael Espindola [Sat, 31 May 2014 03:21:04 +0000 (03:21 +0000)]
There is no std::errc::success, remove the llvm one.

llvm-svn: 209960

10 years agoThere is no std::errc:success, remove the llvm one.
Rafael Espindola [Sat, 31 May 2014 03:20:52 +0000 (03:20 +0000)]
There is no std::errc:success, remove the llvm one.

llvm-svn: 209959

10 years agoThere is no std::errc:success, remove the llvm one.
Rafael Espindola [Sat, 31 May 2014 03:20:37 +0000 (03:20 +0000)]
There is no std::errc:success, remove the llvm one.

llvm-svn: 209958

10 years agoTurn errc and windows_error into enum classes.
Rafael Espindola [Sat, 31 May 2014 02:29:28 +0000 (02:29 +0000)]
Turn errc and windows_error into enum classes.

llvm-svn: 209957

10 years agoUse make_error_code in preparation for making errc an enum class.
Rafael Espindola [Sat, 31 May 2014 02:23:01 +0000 (02:23 +0000)]
Use make_error_code in preparation for making errc an enum class.

llvm-svn: 209956

10 years agoPR12961 - Extend DR532 to cover C++98/03.
Nikola Smiljanic [Sat, 31 May 2014 02:10:59 +0000 (02:10 +0000)]
PR12961 - Extend DR532 to cover C++98/03.

llvm-svn: 209955

10 years agoDiagnose dll attribute on member of class that already has a dll attribute
Hans Wennborg [Sat, 31 May 2014 02:08:49 +0000 (02:08 +0000)]
Diagnose dll attribute on member of class that already has a dll attribute

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

llvm-svn: 209954

10 years agoUse error_code() instead of error_code::succes()
Rafael Espindola [Sat, 31 May 2014 02:00:59 +0000 (02:00 +0000)]
Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

llvm-svn: 209953

10 years agoUse error_code() instead of error_code::succes()
Rafael Espindola [Sat, 31 May 2014 01:37:45 +0000 (01:37 +0000)]
Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

llvm-svn: 209952

10 years agoFix the behavior of ExecuteAndWait with a non-zero timeout.
Peter Collingbourne [Sat, 31 May 2014 01:36:02 +0000 (01:36 +0000)]
Fix the behavior of ExecuteAndWait with a non-zero timeout.

llvm-svn: 209951

10 years agoMake Attr::Clone() also clone the Inherited, IsPackExpansion and Implicit flags
Hans Wennborg [Sat, 31 May 2014 01:30:30 +0000 (01:30 +0000)]
Make Attr::Clone() also clone the Inherited, IsPackExpansion and Implicit flags

I was bitten by this when working with the dll attributes: when a dll
attribute was cloned from a class template declaration to its
specialization, the Inherited flag didn't get cloned.

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

llvm-svn: 209950

10 years agoUse error_code() instead of error_code::succes()
Rafael Espindola [Sat, 31 May 2014 01:26:30 +0000 (01:26 +0000)]
Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

llvm-svn: 209949

10 years agoUse error_code() instead of error_code::succes()
Rafael Espindola [Sat, 31 May 2014 01:22:21 +0000 (01:22 +0000)]
Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

llvm-svn: 209948

10 years agoMake blend tests more specific
Filipe Cabecinhas [Sat, 31 May 2014 00:52:23 +0000 (00:52 +0000)]
Make blend tests more specific

Following the lead set by r209324, I'm making these tests match the whole
instruction, so we can be sure we're lowering them correctly.

llvm-svn: 209947

10 years ago[ASan] Behave the same for functions w/o sanitize_address attribute and blacklisted...
Alexey Samsonov [Sat, 31 May 2014 00:33:05 +0000 (00:33 +0000)]
[ASan] Behave the same for functions w/o sanitize_address attribute and blacklisted functions

llvm-svn: 209946

10 years ago[TSan] Fixup a test case after r209939
Alexey Samsonov [Sat, 31 May 2014 00:26:03 +0000 (00:26 +0000)]
[TSan] Fixup a test case after r209939

llvm-svn: 209945

10 years agoAdd EH test case checking that handlers in noexcept functions can still unwind
Jonathan Roelofs [Sat, 31 May 2014 00:25:59 +0000 (00:25 +0000)]
Add EH test case checking that handlers in noexcept functions can still unwind

llvm-svn: 209944

10 years agoAdd EH test cases corresponding to C++ ABI # 15.3.3
Jonathan Roelofs [Sat, 31 May 2014 00:24:58 +0000 (00:24 +0000)]
Add EH test cases corresponding to C++ ABI # 15.3.3

llvm-svn: 209943

10 years ago[CodeGen] Don't cast and use SizeTy instead of Int32Ty when constructing {extract...
Michael J. Spencer [Sat, 31 May 2014 00:22:12 +0000 (00:22 +0000)]
[CodeGen] Don't cast and use SizeTy instead of Int32Ty when constructing {extract,insert} vector element instructions.

llvm-svn: 209942

10 years agoRefactor: use the DeclarationNameInfo form of BuildMemberReferenceExpr
Richard Smith [Sat, 31 May 2014 00:18:32 +0000 (00:18 +0000)]
Refactor: use the DeclarationNameInfo form of BuildMemberReferenceExpr
consistently, rather than sometimes performing lookup and calling the
LookupResult form. No functionality change intended.

llvm-svn: 209941

10 years ago[TSan] Add a test case for r209939
Alexey Samsonov [Sat, 31 May 2014 00:12:20 +0000 (00:12 +0000)]
[TSan] Add a test case for r209939

llvm-svn: 209940

10 years ago[TSan] Behave the same for functions w/o sanitize_thread attribute and blacklisted...
Alexey Samsonov [Sat, 31 May 2014 00:11:37 +0000 (00:11 +0000)]
[TSan] Behave the same for functions w/o sanitize_thread attribute and blacklisted functions

llvm-svn: 209939

10 years agodelete dead code.
Rafael Espindola [Sat, 31 May 2014 00:10:47 +0000 (00:10 +0000)]
delete dead code.

llvm-svn: 209938

10 years agoHave the TLOF creation take a Triple rather than needing a subtarget.
Eric Christopher [Sat, 31 May 2014 00:07:32 +0000 (00:07 +0000)]
Have the TLOF creation take a Triple rather than needing a subtarget.

llvm-svn: 209937

10 years agocc1as: invert return bool to indicate failure
Alp Toker [Sat, 31 May 2014 00:02:27 +0000 (00:02 +0000)]
cc1as: invert return bool to indicate failure

This simplifies code flow and matches the convention used in surrounding code.

No functional change.

llvm-svn: 209936

10 years agocc1as: fix a potential leak and unremoved output file in error conditions
Alp Toker [Sat, 31 May 2014 00:02:21 +0000 (00:02 +0000)]
cc1as: fix a potential leak and unremoved output file in error conditions

llvm-svn: 209935

10 years ago[X86] Add two combine rules to simplify dag nodes introduced during type legalization...
Andrea Di Biagio [Fri, 30 May 2014 23:17:53 +0000 (23:17 +0000)]
[X86] Add two combine rules to simplify dag nodes introduced during type legalization when promoting nodes with illegal vector type.

This patch teaches the backend how to simplify/canonicalize dag node
sequences normally introduced by the backend when promoting certain dag nodes
with illegal vector type.

This patch adds two new combine rules:
1) fold (shuffle (bitcast (BINOP A, B)), Undef, <Mask>) ->
        (shuffle (BINOP (bitcast A), (bitcast B)), Undef, <Mask>)

2) fold (BINOP (shuffle (A, Undef, <Mask>)), (shuffle (B, Undef, <Mask>))) ->
        (shuffle (BINOP A, B), Undef, <Mask>).

Both rules are only triggered on the type-legalized DAG.
In particular, rule 1. is a target specific combine rule that attempts
to sink a bitconvert into the operands of a binary operation.
Rule 2. is a target independet rule that attempts to move a shuffle
immediately after a binary operation.

llvm-svn: 209930

10 years agoConvert a vselect into a concat_vector if possible
Filipe Cabecinhas [Fri, 30 May 2014 23:03:11 +0000 (23:03 +0000)]
Convert a vselect into a concat_vector if possible

Summary:
If both vector args to vselect are concat_vectors and the condition is
constant and picks half a vector from each argument, convert the vselect
into a concat_vectors.

Added a test.

The ConvertSelectToConcatVector is assuming it doesn't get vselects with
arguments of, for example, <undef, undef, true, true>. Those get taken
care of in the checks above its call.

Reviewers: nadav, delena, grosbach, hfinkel

Subscribers: llvm-commits

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

llvm-svn: 209929

10 years ago[mach-o] Add support for custom sections
Nick Kledzik [Fri, 30 May 2014 22:51:04 +0000 (22:51 +0000)]
[mach-o] Add support for custom sections

llvm-svn: 209928

10 years agoisSVR4ABI() returned !isDarwin() so just move that to the else
Eric Christopher [Fri, 30 May 2014 22:47:53 +0000 (22:47 +0000)]
isSVR4ABI() returned !isDarwin() so just move that to the else
block and remove the unreachable code.

llvm-svn: 209927

10 years agoRename CreateTLOF->createTLOF to match the rest of the file and the
Eric Christopher [Fri, 30 May 2014 22:47:48 +0000 (22:47 +0000)]
Rename CreateTLOF->createTLOF to match the rest of the file and the
rest of the targets with a similar function name.

llvm-svn: 209926

10 years agoDisable stack-overflow test on ARM
Greg Fitzgerald [Fri, 30 May 2014 22:44:35 +0000 (22:44 +0000)]
Disable stack-overflow test on ARM

llvm-svn: 209925

10 years agoTake PrintingPolicy::SuppressUnwrittenScope into account when printing the
Richard Smith [Fri, 30 May 2014 22:16:51 +0000 (22:16 +0000)]
Take PrintingPolicy::SuppressUnwrittenScope into account when printing the
qualified name of a NamedDecl. Patch by Volodymyr Sapsai!

llvm-svn: 209924

10 years agoSeparate the check for blend shuffle_vector masks
Filipe Cabecinhas [Fri, 30 May 2014 21:31:21 +0000 (21:31 +0000)]
Separate the check for blend shuffle_vector masks

Summary:
Separate the check for blend shuffle_vector masks into isBlendMask.
This function will also be used to check if a vector shuffle is legal. No
change in functionality was intended, but we ended up improving codegen on
two tests, which were being (more) optimized only if the resulting shuffle
was legal.

Reviewers: nadav, delena, andreadb

Subscribers: llvm-commits

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

llvm-svn: 209923

10 years agoInvalidate the file system cache entries for files that may rebuild
Ben Langmuir [Fri, 30 May 2014 21:20:54 +0000 (21:20 +0000)]
Invalidate the file system cache entries for files that may rebuild

This reapplies r209910 with a fix for the assertion failures hit on the
buildbots.

original commit message:
I thought we could get away without this, but it means that the
FileEntry objects actually refer to the wrong files, since pcms are not
updated inplace, they are atomically renamed into place after compiling
a module.

So we are close to the original behaviour of invalidating the cache for
all modules being removed, but now we should only invalidate the ones
that depend on whichever module failed to load.

Unfortunately I haven't come up with a new test that didn't require
a race between parallel invocations of clang.

<rdar://problem/17038180>

llvm-svn: 209922

10 years agofixed more typos
Sanjay Patel [Fri, 30 May 2014 21:18:13 +0000 (21:18 +0000)]
fixed more typos

llvm-svn: 209921

10 years agoRoll DbgVariable::setMInsn into the constructor. No functional changes.
Adrian Prantl [Fri, 30 May 2014 21:10:13 +0000 (21:10 +0000)]
Roll DbgVariable::setMInsn into the constructor. No functional changes.

llvm-svn: 209920

10 years agoRemove unused struct from test
Alp Toker [Fri, 30 May 2014 21:07:40 +0000 (21:07 +0000)]
Remove unused struct from test

This presumably got inadvertently copied from dllimport-members.cpp.

llvm-svn: 209919

10 years agoadded link to CMake page
Sanjay Patel [Fri, 30 May 2014 21:07:25 +0000 (21:07 +0000)]
added link to CMake page

llvm-svn: 209918

10 years agoDon't use libc's "char *basename(char *)" or "char *dirname(char *)" as they are...
Greg Clayton [Fri, 30 May 2014 21:06:57 +0000 (21:06 +0000)]
Don't use libc's "char *basename(char *)" or "char *dirname(char *)" as they are not thread safe.

I switched the lldb_private::FileSpec code over to use "llvm::StringRef llvm::sys::path::filename(llvm::StringRef)" for basename() and "llvm::StringRef llvm::sys::path::parent_path(llvm::StringRef)" for dirname().

<rdar://problem/16870083>

llvm-svn: 209917

10 years agofixed typo
Sanjay Patel [Fri, 30 May 2014 20:55:55 +0000 (20:55 +0000)]
fixed typo

llvm-svn: 209916

10 years agoAdd a FIXME for a bug Doug pointed out in code review.
Richard Smith [Fri, 30 May 2014 19:44:17 +0000 (19:44 +0000)]
Add a FIXME for a bug Doug pointed out in code review.

llvm-svn: 209915