Commit Graph

175635 Commits

Author SHA1 Message Date
Alp Toker 1feec4b81f Silence -Wreturn-type warning
llvm-svn: 210005
2014-06-02 04:34:10 +00:00
Simon Atanasyan 2c2486446c [Mips] Reduce number of input files used my Mips tests.
No functional changes.

llvm-svn: 210004
2014-06-02 04:20:01 +00:00
Alp Toker 54b6ab0edf 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
2014-06-02 04:14:23 +00:00
Marshall Clow 5f0701f270 Preparation for <string_view>. More helper functions that can be shared between <string> and <string_view>. No functionality change
llvm-svn: 210002
2014-06-02 02:22:49 +00:00
Alp Toker 125be8465d 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
2014-06-02 01:40:04 +00:00
NAKAMURA Takumi aaffd70609 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
2014-06-02 01:35:34 +00:00
Saleem Abdulrasool 0021013b0a 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
2014-06-02 01:17:54 +00:00
Saleem Abdulrasool b327103fdc 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
2014-06-02 01:17:49 +00:00
Alp Toker 7f02e53f5a 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
2014-06-01 19:13:44 +00:00
Alp Toker 71c53d472f 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
2014-06-01 18:49:32 +00:00
Alp Toker c2d5e61177 Fix typos
llvm-svn: 209995
2014-06-01 18:28:36 +00:00
Alp Toker 7198f529ad 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
2014-06-01 18:01:33 +00:00
Rafael Espindola 8390a257ed Don't compare an error_code with nullptr.
llvm-svn: 209993
2014-06-01 16:16:02 +00:00
Faisal Vali 3628cb9cb6 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
2014-06-01 16:11:54 +00:00
Rafael Espindola d6f11a70ab 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
2014-06-01 13:45:09 +00:00
Christian Pirker 762b2c624f ARMEB: Fix function return type f64
Reviewed at http://reviews.llvm.org/D3968

llvm-svn: 209990
2014-06-01 09:30:52 +00:00
Elena Demikhovsky 639625e9f4 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
2014-06-01 08:45:11 +00:00
Matt Arsenault 616a8e42b1 R600: Set all float vector expands in the same place
llvm-svn: 209988
2014-06-01 07:38:21 +00:00
Simon Atanasyan b635d04589 [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
2014-06-01 06:28:42 +00:00
Saleem Abdulrasool 2fd910dc72 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
2014-06-01 04:07:07 +00:00
Saleem Abdulrasool 57aa97f53a 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
2014-06-01 04:07:03 +00:00
David Blaikie 23b4ecbff4 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
2014-06-01 03:38:13 +00:00
Alp Toker 1a58ff2424 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
2014-06-01 02:02:23 +00:00
Alp Toker da0c7933cf Fix typos
llvm-svn: 209982
2014-05-31 21:26:28 +00:00
Alp Toker 322db9ea39 ExecutionEngine: avoid NDEBUG in headers
llvm-svn: 209981
2014-05-31 21:26:17 +00:00
Alp Toker 5f83e477c3 Update a couple of header inclusion guards
llvm-svn: 209980
2014-05-31 21:26:09 +00:00
Matt Arsenault b9e1eec363 R600/SI: Remove redundant patterns
These patterns are already handled in the instruction definition.

llvm-svn: 209979
2014-05-31 19:25:17 +00:00
Alp Toker e03e9e15f2 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
2014-05-31 16:32:22 +00:00
Adam Nemet b4690e3fd1 [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
2014-05-31 16:23:20 +00:00
Adam Nemet 7d39430a14 [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
2014-05-31 16:23:17 +00:00
Adam Nemet 1db90bcf1a [SelectionDAG] Remove duplicate declaration
Prefer the decl in SelectionDAGNodes.h because it's used there and
SelectionDAG.h includes SelectionDAGNodes.h.

llvm-svn: 209975
2014-05-31 16:23:13 +00:00
Benjamin Kramer 5b81765bfd Fix test on platforms where size_t is not 'unsigned long'.
llvm-svn: 209974
2014-05-31 15:06:33 +00:00
Benjamin Kramer 4968944376 [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
2014-05-31 15:01:54 +00:00
Justin Bogner ca14e2b132 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
2014-05-31 07:59:03 +00:00
Matt Arsenault aeca2fa9f7 R600/SI: Fix [s|u]int_to_fp for i1
llvm-svn: 209971
2014-05-31 06:47:42 +00:00
Alp Toker 363e7c4f42 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
2014-05-31 06:11:09 +00:00
Alp Toker 84212df7c5 Rename utility function templates
isExternCTemplate() and getLanguageLinkageTemplate() have nothing to do with
templates despite the dubious naming scheme.

llvm-svn: 209969
2014-05-31 06:11:02 +00:00
Matt Arsenault 0757607d49 Fix typos in tablegen error messages
llvm-svn: 209968
2014-05-31 05:18:52 +00:00
Simon Atanasyan f97af8a084 [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
2014-05-31 04:51:07 +00:00
Jordan Rose bc53ed1ee6 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
2014-05-31 04:12:14 +00:00
Hans Wennborg b0a8b4ac5f 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
2014-05-31 04:05:57 +00:00
Rafael Espindola e9ffe3aeb9 really fix the windows build.
llvm-svn: 209964
2014-05-31 03:40:00 +00:00
Alp Toker c5d194fcd3 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
2014-05-31 03:38:17 +00:00
Alp Toker f33619cb51 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
2014-05-31 03:38:08 +00:00
Rafael Espindola 6913f1a95c Fix windows build.
llvm-svn: 209961
2014-05-31 03:26:57 +00:00
Rafael Espindola a3f2e3f01e There is no std::errc::success, remove the llvm one.
llvm-svn: 209960
2014-05-31 03:21:04 +00:00
Rafael Espindola 3ae0620a45 There is no std::errc:success, remove the llvm one.
llvm-svn: 209959
2014-05-31 03:20:52 +00:00
Rafael Espindola a72f21d195 There is no std::errc:success, remove the llvm one.
llvm-svn: 209958
2014-05-31 03:20:37 +00:00
Rafael Espindola 882ce87b2e Turn errc and windows_error into enum classes.
llvm-svn: 209957
2014-05-31 02:29:28 +00:00
Rafael Espindola fd148d0b6f Use make_error_code in preparation for making errc an enum class.
llvm-svn: 209956
2014-05-31 02:23:01 +00:00