Commit Graph

154607 Commits

Author SHA1 Message Date
Akira Hatanaka 52dd808bc3 [mips] Add comment and simplify function.
llvm-svn: 187371
2013-07-29 19:08:34 +00:00
John Thompson 7c6e79f395 Fixed comment issues (non-ASCII chars, typos) per review, expanded some comments.
llvm-svn: 187370
2013-07-29 19:07:00 +00:00
Howard Hinnant e5c13decbe Debug mode for unordered_multiset. The exercise spotted a few places I had missed on unordered_set, so I picked those up as well.
There are actually two debug modes:

   1.  -D_LIBCPP_DEBUG2 or -D_LIBCPP_DEBUG2=1
       This is a relatively expensive debug mode, but very thorough.  This is normally what you want to debug with, but may turn O(1) operations into O(N) operations.

   2.  -D_LIBCPP_DEBUG2=0
       This is "debug lite."  Only preconditions that can be checked with O(1) expense are checked.  For example range checking on an indexing operation.  But not iterator validity.

llvm-svn: 187369
2013-07-29 19:05:47 +00:00
Nadav Rotem 16e9dd4dd2 Add the C source code to the test to make it easier to update when debug info changes.
Thanks Eric.

llvm-svn: 187368
2013-07-29 18:47:36 +00:00
Rafael Espindola 74ca78ed9b Convert a use of status with llvm::sys::fs::getUniqueID.
llvm-svn: 187367
2013-07-29 18:43:40 +00:00
Hans Wennborg 4a9ca978b0 test/Driver/cl.c, remove quotes around /help
The quotes (from r187330) didn't really help here, the trick was to disable
the test on MSYS builds. This removes those quotes, changes back the comment
to explain why /? has to be quoted specifically, and moves the REQUIRES
line to the top of the file because that's important.

llvm-svn: 187366
2013-07-29 18:40:38 +00:00
David Blaikie 021221db7c Support for Thread Safety Analysis in C
Patch by Ethan Jackson.

llvm-svn: 187365
2013-07-29 18:24:03 +00:00
Rafael Espindola e4777f4638 Convert a use of stat with sys::fs::status.
llvm-svn: 187364
2013-07-29 18:22:23 +00:00
Nadav Rotem d9c74cc6d3 SLPVectorier: update the debug location for the new instructions.
llvm-svn: 187363
2013-07-29 18:18:46 +00:00
Manman Ren e9a52e18da Debug Info: update testing cases to pass verifier.
llvm-svn: 187362
2013-07-29 18:12:58 +00:00
Ashok Thirumurthi 6e264d39dc Adds a DW_OP_call_frame_cfa handler when evaluating DWARF 3/4 expressions
in LLDB that load the canonical frame address rather than a location list.

- Handles the simple case where a CFA can be pulled from the current stack frame.
- Fixes more than one hundred failing tests with gcc 4.8!

TODO: Use UnwindPlan::GetRowForFunctionOffset if the DWARFExpression needs
to be evaluated in a context analogous to a virtual unwind (perhaps using RegisterContextLLDB).

- Also adds some comments to DWARFCallFrameInfo whenever I got confused.

llvm-svn: 187361
2013-07-29 16:05:11 +00:00
Guillaume Papin a3eede2cc2 cpp11-migrate: Add -for-compilers command line switch.
This change add a new option command line option -for-compilers that allows the
user to enable multiple transforms automatically.

Another difference is that now all transforms are enabled by default.

llvm-svn: 187360
2013-07-29 15:58:47 +00:00
Rafael Espindola ee30546c00 Fix handling of "clang c:foo"
On windows, c:foo is a valid file path, but stat fails on just "c:". This
causes a problem for clang since its file manager wants to cache data about
the parent directory.

There are refactorings to be done in here, but this gives clang the correct
behavior and testing first.

Patch by Yunzhong Gao!

llvm-svn: 187359
2013-07-29 15:47:24 +00:00
Howard Hinnant aa5aa98eab Add operator new[] to test. Partial fix for valgrind warning in http://llvm.org/bugs/show_bug.cgi?id=16703.
llvm-svn: 187358
2013-07-29 14:43:42 +00:00
Marshall Clow 83c08b4497 Implement N3421; comparison predicates<void>
llvm-svn: 187357
2013-07-29 14:21:53 +00:00
Nico Rieck 7fdaee8f15 Use proper section suffix for COFF weak symbols
32-bit symbols have "_" as global prefix, but when forming the name of
COMDAT sections this prefix is ignored. The current behavior assumes that
this prefix is always present which is not the case for 64-bit and names
are truncated.

llvm-svn: 187356
2013-07-29 13:58:39 +00:00
Nico Rieck 06d17c80cc Proper va_arg/va_copy lowering on win64
Win64 uses CharPtrBuiltinVaList instead of X86_64ABIBuiltinVaList like
other 64-bit targets.

llvm-svn: 187355
2013-07-29 13:07:06 +00:00
Aaron Ballman f5aacd34e4 Re-application of 187310. Re-enabling warning C4275 for MSVC 11 and up, but not MSVC 10 since it is still required there.
llvm-svn: 187354
2013-07-29 13:02:08 +00:00
Rafael Espindola b6b5f52ee8 Add support for the 's' operation to llvm-ar.
If no other operation is specified, 's' becomes an operation instead of an
modifier. The s operation just creates a symbol table. It is the same as
running ranlib.

We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and
if the symbol table is present, then it is current. We use that to optimize
the most common case: a broken build system that thinks it has to run ranlib.

llvm-svn: 187353
2013-07-29 12:40:31 +00:00
Nico Rieck 2c9c89b21d MC: Support larger COFF string tables
Single-slash encoded entries do not require a terminating null. This bumps
the maximum table size from ~1MB to ~9.5MB.

llvm-svn: 187352
2013-07-29 12:30:12 +00:00
NAKAMURA Takumi 1373b743bb ExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]
llvm-svn: 187351
2013-07-29 11:03:50 +00:00
Benjamin Kramer fb34989a82 Some Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2.
PR16721.

llvm-svn: 187350
2013-07-29 11:02:08 +00:00
Silviu Baranga 91ddaa1b48 Allow generation of vmla.f32 instructions when targeting Cortex-A15. The patch also adds the VFP4 feature to Cortex-A15 and fixes the DontUseFusedMAC predicate so that we can still generate vmla.f32 instructions on non-darwin targets with VFP4.
llvm-svn: 187349
2013-07-29 09:25:50 +00:00
Robert Lytton 862b04516f test commit
llvm-svn: 187348
2013-07-29 09:23:13 +00:00
Chandler Carruth cd7c8cdfa1 Teach the AllocaPromoter which is wrapped around the SSAUpdater
infrastructure to do promotion without a domtree the same smarts about
looking through GEPs, bitcasts, etc., that I just taught mem2reg about.
This way, if SROA chooses to promote an alloca which still has some
noisy instructions this code can cope with them.

I've not used as principled of an approach here for two reasons:
1) This code doesn't really need it as we were already set up to zip
   through the instructions used by the alloca.
2) I view the code here as more of a hack, and hopefully a temporary one.

The SSAUpdater path in SROA is a real sore point for me. It doesn't make
a lot of architectural sense for many reasons:
- We're likely to end up needing the domtree anyways in a subsequent
  pass, so why not compute it earlier and use it.
- In the future we'll likely end up needing the domtree for parts of the
  inliner itself.
- If we need to we could teach the inliner to preserve the domtree. Part
  of the re-work of the pass manager will allow this to be very powerful
  even in large SCCs with many functions.
- Ultimately, computing a domtree has gotten significantly faster since
  the original SSAUpdater-using code went into ScalarRepl. We no longer
  use domfrontiers, and much of domtree is lazily done based on queries
  rather than eagerly.
- At this point keeping the SSAUpdater-based promotion saves a total of
  0.7% on a build of the 'opt' tool for me. That's not a lot of
  performance given the complexity!

So I'm leaving this a bit ugly in the hope that eventually we just
remove all of this nonsense.

I can't even readily test this because this code isn't reachable except
through SROA. When I re-instate the patch that fast-tracks allocas
already suitable for promotion, I'll add a testcase there that failed
before this change. Before that, SROA will fix any test case I give it.

llvm-svn: 187347
2013-07-29 09:06:53 +00:00
Daniel Jasper 03524b774a Fix build error caused by r187345.
llvm-svn: 187346
2013-07-29 08:43:57 +00:00
Daniel Jasper d07c840e6a Initial architecture for clang-tidy.
This is the first version of a possible clang-tidy architecture. The
purpose of clang-tidy is to detect errors in adhering to common coding
patterns, e.g. described in the LLVM Coding Standards.

This is still heavily in flux.

Review: http://llvm-reviews.chandlerc.com/D884
llvm-svn: 187345
2013-07-29 08:19:24 +00:00
Craig Topper baca389e28 Return ExprError if both arguments to the mask form of __builtin_shufflvector don't have the same number of elements or the mask isn't an integer vector.
Previously a diagnostic was issued, but the code went ahead and built the ShuffleVectorExpr. While I'm here also simplify a couple lines by wrapping the return ExprError around the Diag calls.

llvm-svn: 187344
2013-07-29 06:47:04 +00:00
Tobias Grosser 96ef078583 Remove '-debug-only' from test case
This flags was not used in the test case, but caused failures when LLVM was
built without debugging. We can savely remove it.

llvm-svn: 187343
2013-07-29 05:35:11 +00:00
Tobias Grosser 6e358c067a TempScop: Actually load Polly in this test case
llvm-svn: 187342
2013-07-29 05:18:09 +00:00
Tobias Grosser 7032ea6f5b Remove second '-analyze' from command line
llvm-svn: 187341
2013-07-29 05:15:33 +00:00
Nadav Rotem 750e42cba3 Don't vectorize when the attribute NoImplicitFloat is used.
llvm-svn: 187340
2013-07-29 05:13:00 +00:00
Tobias Grosser 85f7421731 JSONImporter: Free new schedule if found invalid
In case we detect that the schedule the user wants to import is invalid we
refuse it _and_ free the isl_maps containing it.

Another bug found thanks to Rafael.

llvm-svn: 187339
2013-07-29 05:12:01 +00:00
Tobias Grosser 880c52f56a CodeGeneration: Fix double free in vector for
We now use __isl_take to annotate the uses of the isl_set where we got the
memory management wrong.

Thanks to Rafael! His pipefail work hardened our test environment and exposed
this bug nicely.

llvm-svn: 187338
2013-07-29 01:58:07 +00:00
NAKAMURA Takumi c91dd312a4 clang/test/Driver/cl.c: Don't attempt slash switches on msys bash.
llvm-svn: 187337
2013-07-29 01:37:10 +00:00
Rafael Espindola caa776be91 Fix -Wdocumentation warnings.
llvm-svn: 187336
2013-07-28 23:43:28 +00:00
Chandler Carruth 6b55dbea86 Update comments for SSAUpdater to use the modern doxygen comment
standards for LLVM. Remove duplicated comments on the interface from the
implementation file (implementation comments are left there of course).
Also clean up, re-word, and fix a few typos and errors in the commenst
spotted along the way.

This is in preparation for changes to these files and to keep the
uninteresting tidying in a separate commit.

llvm-svn: 187335
2013-07-28 22:00:33 +00:00
Craig Topper 304602acc9 Fix up formatting. No functional change.
llvm-svn: 187334
2013-07-28 21:50:10 +00:00
Craig Topper 9469e906a5 Remove use of sprintf added to X86 disassembler tablegen code. Send message with instruction name to errs() instead and use a generic message for the llvm_unreachable. Consistent with other places in this file.
llvm-svn: 187333
2013-07-28 21:28:02 +00:00
Howard Hinnant 55d5e76fdb Glen: Minor tweaks to locale.cpp to help it compile with exceptions turned off.
llvm-svn: 187332
2013-07-28 18:20:00 +00:00
Aaron Ballman d1594bdaa9 Partial revert of 187310; it seems MSVC 10 still spits out this warning, but MSVC 11 does not.
llvm-svn: 187331
2013-07-28 18:04:26 +00:00
Rafael Espindola 9f0da2f152 Try single quotes to fix the msys bot:
It was still failing with double quotes:

http://bb.pgr.jp/builders/clang-i686-msys/builds/698/steps/test_clang/logs/Clang%20%3A%3A%20Driver__cl.c

llvm-svn: 187330
2013-07-28 17:13:24 +00:00
Rafael Espindola 5150f2f558 Avoid crashing if a directory has no pch files.
Should fix some of the bots that have assertions disabled.

llvm-svn: 187329
2013-07-28 13:23:37 +00:00
Rafael Espindola cd61afb4ee Use a slightly smaller hammer to make this pass.
When first updating this test I only noticided the first RUN line.

llvm-svn: 187328
2013-07-28 11:13:49 +00:00
Chandler Carruth d31370e060 Temporarily revert r187323 until I update SSAUpdater to match mem2reg.
I forgot that we had two totally independent things here. :: sigh ::

llvm-svn: 187327
2013-07-28 09:05:49 +00:00
Tobias Grosser 983e785f17 gitattributes: .png and .txt are no text files
llvm-svn: 187326
2013-07-28 09:05:20 +00:00
Elena Demikhovsky baf51e3e61 fixed compilation issue
llvm-svn: 187325
2013-07-28 08:45:12 +00:00
Elena Demikhovsky 003e7d73b9 Added encoding prefixes for KNL instructions (EVEX).
Added 512-bit operands printing.
Added instruction formats for KNL instructions.

llvm-svn: 187324
2013-07-28 08:28:38 +00:00
Chandler Carruth 9d96100ff0 Now that mem2reg understands how to cope with a slightly wider set of
uses of an alloca, we can pre-compute promotability while analyzing an
alloca for splitting in SROA. That lets us short-circuit the common case
of a bunch of trivially promotable allocas. This cuts 20% to 30% off the
run time of SROA for typical frontend-generated IR sequneces I'm seeing.
It gets the new SROA to within 20% of ScalarRepl for such code. My
current benchmark for these numbers is PR15412, but it fits the general
pattern of IR emitted by Clang so it should be widely applicable.

llvm-svn: 187323
2013-07-28 08:27:12 +00:00
Chandler Carruth d5b806a27f Thread DataLayout through the callers and into mem2reg. This will be
useful in a subsequent patch, but causes an unfortunate amount of noise,
so I pulled it out into a separate patch.

llvm-svn: 187322
2013-07-28 06:43:11 +00:00