Commit Graph

178331 Commits

Author SHA1 Message Date
Adam Nemet 26f817497c [X86] AVX512: Improve readability of isCDisp8
No functional change.  As I was trying to understand this function, I found
that variables were reused with confusing names and the broadcast case was a
bit too implicit.  Hopefully, this is an improvement.

llvm-svn: 212795
2014-07-11 05:23:25 +00:00
Adam Nemet e311c3c836 [X86] AVX512: Simplify logic in isCDisp8
It was computing the VL/n case as:
  MemObjSize = VectorByteSize / ElemByteSize / Divider * ElemByteSize

ElemByteSize not only falls out but VectorByteSize/Divider now actually
matches the definition of VL/n.

Also some formatting fixes.

llvm-svn: 212794
2014-07-11 05:23:12 +00:00
David Blaikie de1e1a60e8 Revert "Reapply "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself.""
This reverts commit r212776.

Nope, still seems to be failing on the sanitizer bots... but hey, not
the msan self-host anymore, it's failing in asan now. I'll start looking
there next.

llvm-svn: 212793
2014-07-11 02:42:57 +00:00
Greg Clayton 205ca1e89f Enable the ability to enable debug info generation when evaluating expressions.
llvm-svn: 212792
2014-07-11 01:03:57 +00:00
Greg Clayton fb9756131e Remove code that was merged incorrectly.
llvm-svn: 212791
2014-07-11 00:51:53 +00:00
Ben Langmuir e013bdc2e7 Don't assume StringRef.data() is null-terminated
llvm-svn: 212790
2014-07-11 00:43:47 +00:00
NAKAMURA Takumi 5787cc2ccf TestAfterDivZeroChecker.cpp: Avoid member initializer. It is unsupported in msc17.
llvm-svn: 212789
2014-07-11 00:32:35 +00:00
Richard Smith dc5523d38f [modules] Don't try to merge template specializations by performing name lookup
into their container; we won't find them there. These things are already being
merged when they're added to their primary template's folding set, so this
merging is redundant (and causes us to reject-valid because we think we've
found an odr violation).

llvm-svn: 212788
2014-07-11 00:20:06 +00:00
NAKAMURA Takumi 7660d653c8 clang/test/CodeGenCXX/PR20038.cpp: Appease targeting msvc due to incompatibility of dw.
llvm-svn: 212787
2014-07-11 00:18:29 +00:00
Reid Kleckner 675d438e23 Return a FixItHint instead of taking a diagnostic builder
Addressing review comments from r212784.

llvm-svn: 212786
2014-07-11 00:16:51 +00:00
Zachary Turner 0ab4b48992 Get the python scripting interface working on Windows.
This patch fixes a number of issues with embedded Python on
Windows.  In particular:

1) The script that builds the python modules was normalizing the
   case of python filenames during copies.  The module name is
   the filename, and is case-sensitive, so this was breaking code.

2) Changes the build to not attempt to link against python27.lib
   (e.g. the release library) when linking against msvcrt debug
   library.  Doing a debug build of LLDB with embedded python
   support now requires you to provide your own self-compiled
   debug version of python.

3) Don't import termios when initializing the interpreter.  This
   is part of a larger effort to remove the dependency on termios
   since it is not available on Windows.  This particular instance
   was unnecessary and unused.

Reviewed by: Todd Fiala

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

llvm-svn: 212785
2014-07-10 23:47:42 +00:00
Reid Kleckner 0902a51baf MSVC compat: Allow lookup of friend types in enclosing namespaces
The relevant portion of C++ standard says [namespace.memdef]p3:

  If the name in a friend declaration is neither qualified nor a
  template-id and the declaration is a function or an
  elaborated-type-specifier, the lookup to determine whether the entity
  has been previously declared shall not consider any scopes outside the
  innermost enclosing namespace.

MSVC does not implement that rule for types.  If there is a type in an
enclosing namespace, they consider an unqualified tag declaration with
the same name to be a redeclaration of the type from another namespace.

Implementing compatibility is a simple matter of disabling our
implementation of this rule for types, which was added in r177473.

Reviewers: rsmith

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

llvm-svn: 212784
2014-07-10 23:44:52 +00:00
Greg Clayton 3f19ada88e Cleanup the iOS simulator code.
Fixes include:
- Don't say that "<arch>-apple-ios" is compatible with "<arch>-apple-macosx"
- Fixed DynamicLoaderMacOSXDYLD so specify an architecture that was converted solely from a cputype and subtype, just specify the file + UUID.
- Fixed PlatformiOSSimulator::GetSupportedArchitectureAtIndex() so it returns the correct archs
- Fixed SymbolFileDWARFDebugMap to load .o files correctly by just specifying the architecture without the vendor and OS now that "<arch>-apple-ios" is not compatible with "<arch>-apple-macosx" so we can load .o files correctly for DWARF with debug map
- Fixed the coded in TargetList::CreateTarget() so it does the right thing with an underspecified triple where just the arch is specified.

llvm-svn: 212783
2014-07-10 23:33:37 +00:00
Mark Heffernan 675d401a26 Partially fix PR20058: reduce compile time for loop unrolling with very high count by reducing calls to SE->forgetLoop
llvm-svn: 212782
2014-07-10 23:30:06 +00:00
Diego Novillo 94b276deba Enable -gcolumn-info by default.
This patch flips the default value for -gcolumn-info to be on by
default. I discussed the rationale and provided compile/size data
in:

http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/074290.html

This also updates the documentation and some tests that relied on
the lack of column information. Some tests had column information
in the expected output, but it was wrong (the tsan tests). Others
were using the driver to execute.

llvm-svn: 212781
2014-07-10 23:29:28 +00:00
Lang Hames 87c025bb17 [RuntimeDyld] Replace a crufty old ARM RuntimeDyld test with a new one that uses
RuntimeDyldChecker.

This allows us to remove one of the six remaining object files in the LLVM
source tree.

llvm-svn: 212780
2014-07-10 23:29:11 +00:00
Diego Novillo 89360191c8 Fix expected column numbers in two tests.
This is a minor fix to two tsan tests that were expecting the wrong
column information. Now that clang emits column information by default
in its debugging output, the tests had started failing.

llvm-svn: 212779
2014-07-10 23:29:10 +00:00
Lang Hames 16086b984e [RuntimeDyld] Improve error diagnostic in RuntimeDyldChecker.
The compiler often emits assembler-local labels (beginning with 'L') for use in
relocation expressions, however these aren't included in the object files.
Teach RuntimeDyldChecker to warn the user if they try to use one of these in an
expression, since it will never work.

llvm-svn: 212777
2014-07-10 23:26:20 +00:00
David Blaikie 3ca92d2406 Reapply "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself."
Committed in r212205 and reverted in r212226 due to msan self-hosting
failure, I believe I've got that fixed by r212761 to Clang.

Original commit message:

"Originally committed in r211723, reverted in r211724 due to failure
cases found and fixed (ArgumentPromotion: r211872, Inlining: r212065),
committed again in r212085 and reverted again in r212089 after fixing
some other cases, such as debug info subprogram lists not keeping track
of the function they represent (r212128) and then short-circuiting
things like LiveDebugVariables that build LexicalScopes for functions
that might not have full debug info.

And again, I believe the invariant actually holds for some reasonable
amount of code (but I'll keep an eye on the buildbots and see what
happens... ).

Original commit message:

PR20038: DebugInfo: Inlined call sites where the caller has debug info
but the call itself has no debug location.

This situation does bad things when inlined, so I've fixed Clang not to
produce inlinable call sites without locations when the caller has debug
info (in the one case where I could find that this occurred). This
updates the PR20038 test case to be what clang now produces, and readds
the assertion that had to be removed due to this bug.

I've also beefed up the debug info verifier to help diagnose these
issues in the future, and I hope to add checks to the inliner to just
assert-fail if it encounters this situation. If, in the future, we
decide we have to cope with this situation, the right thing to do is
probably to just remove all the DebugLocs from the inlined
instructions."

llvm-svn: 212776
2014-07-10 22:59:39 +00:00
David Blaikie d9bdaf00ff This test case doesn't actually need the inliner to reproduce the input.
llvm-svn: 212775
2014-07-10 22:57:40 +00:00
Richard Smith d9967cccfb Add AST dumping for VarDecl init kind.
llvm-svn: 212774
2014-07-10 22:54:03 +00:00
Jan Vesely 2cb62ce2a0 R600: Implement float to long/ulong
Use alg. from LegalizeDAG.cpp
Move Expand setting to SIISellowering

v2: Extend existing tests instead of creating new ones
v3: use separate LowerFPTOSINT function
v4: use TargetLowering::expandFP_TO_SINT
    add comment about using FP_TO_SINT for uints

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 212773
2014-07-10 22:40:21 +00:00
Jan Vesely eca89d283e SelectionDAG: Factor FP_TO_SINT lower code out of DAGLegalizer
Move the code to a helper function to allow calls from TypeLegalizer.

No functionality change intended

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
Reviewed-by: Owen Anderson <resistor@mac.com>
llvm-svn: 212772
2014-07-10 22:40:18 +00:00
Brad Smith 733cb6437d Use the integrated assembler by default on OpenBSD.
llvm-svn: 212771
2014-07-10 22:37:28 +00:00
Alexey Samsonov 848560125d [UBSan] Introduce type-based blacklisting.
Teach UBSan vptr checker to ignore technically invalud down-casts on
blacklisted types.

Based on http://reviews.llvm.org/D4407 by Byoungyoung Lee!

llvm-svn: 212770
2014-07-10 22:34:19 +00:00
Zoran Jovanovic f34b454219 [mips] Emit two CFI offset directives per double precision SDC1/LDC1
instead of just one for FR=1 registers
Differential Revision: http://reviews.llvm.org/D4310

llvm-svn: 212769
2014-07-10 22:23:30 +00:00
Dan Albert 3c4780e8c3 Make cmake cxxflags match those in lib/buildit.
llvm-svn: 212768
2014-07-10 22:23:03 +00:00
Alexey Samsonov b2cc23df20 Be more specific about return types of some methods.
This would allow to call addCompilerUsedGlobal on some
Clang-generated globals.

llvm-svn: 212767
2014-07-10 22:18:36 +00:00
Rui Ueyama aea2bcf559 [PECOFF] s/context/ctx/ for consistency.
llvm-svn: 212766
2014-07-10 21:55:28 +00:00
Rui Ueyama 8cb0f1e3c0 [PECOFF] Set resource table entry in header.
The resource table entry should have the RVA of the
embedded resource file.

llvm-svn: 212765
2014-07-10 21:43:19 +00:00
Richard Smith 95b83e917e PR20256: don't accidentally instantiate non-dependent default-initialization as
value-initialization.

llvm-svn: 212764
2014-07-10 20:53:43 +00:00
Rui Ueyama 31fd9d09b2 [PECOFF] Invoke cvtres.exe in the driver.
Previously we invoked cvtres.exe for each compiled Windows
resource file. The generated files were then concatenated
and embedded to the executable.

That was not the correct way to merge compiled Windows
resource files. If you just concatenate generated files,
only the first file would be recognized and the rest would
be ignored as trailing garbage.

The right way to merge them is to call cvtres.exe with
multiple input files. In this patch we do that in the
Windows driver.

llvm-svn: 212763
2014-07-10 20:53:37 +00:00
Todd Fiala 57cacb013f Flipped intermittent test failures from skip to XFAIL.
The following intermittently-failing tests have been flipped from
skip to XFAIL on some combo of Linux and MacOSX:

TestCallStopAndContinue.py (Linux, MacOSX)
TestCallWithTimeout.py (Linux)
TestConvenienceVariables.py (Linux)
TestStopHookMultipleThreads.py (Linux)

The following new tests have been marked XFAIL but are just
intermittently failing:

TestMultipleDebug.py (definitely intermittent on MacOSX, not sure I've seen
it pass yet on Linux)

llvm-svn: 212762
2014-07-10 20:52:08 +00:00
David Blaikie 1b5adb82d9 Fix the dtor location issues in PR20038 harder.
Originally committed in r211722, this fixed one case of dtor calls being
emitted without locations (this causes problems for debug info if the
call is then inlined), this caught only some of the cases.

Instead of trying to re-enable the location before the cleanup, simply
re-enable the location immediately after the unconditional branches in
question using a scoped device to ensure the no-location state doesn't
leak out arbitrarily.

llvm-svn: 212761
2014-07-10 20:42:59 +00:00
Zachary Turner 026861b87d Move the post-build step that creates lldb.py.
Being in lldb\source, ${CMAKE_CURRENT_BINARY_DIR} would resolve to
the build\tools\lldb\source directory.  For correct operation, and
parity with the shell script, it needs to resolve to the
build\tools\lldb\scripts directory.

llvm-svn: 212760
2014-07-10 20:37:47 +00:00
Zachary Turner 454955e1b3 Add better logging to the new Python-based SWIG generation scripts.
llvm-svn: 212759
2014-07-10 20:25:18 +00:00
Simon Atanasyan d092f0e64a [Mips] Make rel-dynamic-10.test test case independent from external input files.
llvm-svn: 212758
2014-07-10 19:47:23 +00:00
Ulrich Weigand b4153254b7 Fix (and reenable) ppc64-align-struct.c test for non-assert builds.
llvm-svn: 212757
2014-07-10 19:19:03 +00:00
Andrea Di Biagio 2f6d821b88 Extend the test coverage in combine-vec-shuffle-2.ll adding some negative tests.
Add test cases where we don't expect to trigger the combine optimizations
introduced at revision 212748.

No functional change intended.

llvm-svn: 212756
2014-07-10 18:59:41 +00:00
Tobias Grosser 0fcf3cce2b [doc] Fix incorrect reference to clang-format -> clang-tidy
llvm-svn: 212755
2014-07-10 18:59:25 +00:00
David Blaikie 40f842de9c Remove use of uniform initialization ({}) introduced in r212725 since this isn't supported in MSVC.
llvm-svn: 212754
2014-07-10 18:46:15 +00:00
Ehsan Akhgari f3a896bd22 Avoid definining more GCC specific predefined macros in clang-cl
Reviewers: hansw, rnk

Subscribers: cfe-commits

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

llvm-svn: 212753
2014-07-10 18:44:24 +00:00
David Blaikie cceed090d2 Quick (attempted) fix for non-asserts builds for a test introduced in r212743.
llvm-svn: 212752
2014-07-10 18:40:54 +00:00
Argyrios Kyrtzidis 2e81dfc5cd [Driver/Unittests] Follow up for r212666, add unit test for the newly exposed getARMCPUForMArch() function.
llvm-svn: 212751
2014-07-10 18:38:38 +00:00
Matt Arsenault 3332b70627 Revert "Revert r212640, "Add trunc (select c, a, b) -> select c (trunc a), (trunc b) combine.""
Don't try to convert the select condition type.

llvm-svn: 212750
2014-07-10 18:21:04 +00:00
Alexey Samsonov 3a2cb3ad41 [TSan] Fix a bug in libcxx-tsan build conditions spotted by Ryuta Suzuki
llvm-svn: 212749
2014-07-10 18:17:51 +00:00
Andrea Di Biagio b2921c7ca0 [DAG] Further improve the logic in DAGCombiner that folds a pair of shuffles into a single shuffle if the resulting mask is legal.
This patch teaches the DAGCombiner how to fold shuffles according to the
following new rules:
  1. shuffle(shuffle(x, y), undef) -> x
  2. shuffle(shuffle(x, y), undef) -> y
  3. shuffle(shuffle(x, y), undef) -> shuffle(x, undef)
  4. shuffle(shuffle(x, y), undef) -> shuffle(y, undef)

The backend avoids to combine shuffles according to rules 3. and 4. if
the resulting shuffle does not have a legal mask. This is to avoid introducing
illegal shuffles that are potentially expanded into a sub-optimal sequence of
target specific dag nodes during vector legalization.

Added test case combine-vec-shuffle-2.ll to verify that we correctly triggers
the new rules when combining shuffles.

llvm-svn: 212748
2014-07-10 18:04:55 +00:00
Akira Hatanaka 7cc27649a6 [X86] Mark pseudo instruction TEST8ri_NOEREX as hasSIdeEffects=0.
Also, add a case clause in X86InstrInfo::shouldScheduleAdjacent to enable
macro-fusion.

<rdar://problem/15680770>

llvm-svn: 212747
2014-07-10 18:00:53 +00:00
Eric Christopher 54fe1b260c Add the CSR company and the Kalimba DSP processor to Triple.
Patch by Matthew Gardiner with fixes by me.

llvm-svn: 212745
2014-07-10 17:26:54 +00:00
Eric Christopher 22405e4bbf Make it possible for the Subtarget to change between function
passes in the mips back end. This, unfortunately, required a
bit of churn in the various predicates to use a pointer rather
than a reference.

llvm-svn: 212744
2014-07-10 17:26:51 +00:00