platform/upstream/llvm.git
11 years agoFix -Wdocumentation warnings.
Rafael Espindola [Sun, 28 Jul 2013 23:43:28 +0000 (23:43 +0000)]
Fix -Wdocumentation warnings.

llvm-svn: 187336

11 years agoUpdate comments for SSAUpdater to use the modern doxygen comment
Chandler Carruth [Sun, 28 Jul 2013 22:00:33 +0000 (22:00 +0000)]
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

11 years agoFix up formatting. No functional change.
Craig Topper [Sun, 28 Jul 2013 21:50:10 +0000 (21:50 +0000)]
Fix up formatting. No functional change.

llvm-svn: 187334

11 years agoRemove use of sprintf added to X86 disassembler tablegen code. Send message with...
Craig Topper [Sun, 28 Jul 2013 21:28:02 +0000 (21:28 +0000)]
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

11 years agoGlen: Minor tweaks to locale.cpp to help it compile with exceptions turned off.
Howard Hinnant [Sun, 28 Jul 2013 18:20:00 +0000 (18:20 +0000)]
Glen: Minor tweaks to locale.cpp to help it compile with exceptions turned off.

llvm-svn: 187332

11 years agoPartial revert of 187310; it seems MSVC 10 still spits out this warning, but MSVC...
Aaron Ballman [Sun, 28 Jul 2013 18:04:26 +0000 (18:04 +0000)]
Partial revert of 187310; it seems MSVC 10 still spits out this warning, but MSVC 11 does not.

llvm-svn: 187331

11 years agoTry single quotes to fix the msys bot:
Rafael Espindola [Sun, 28 Jul 2013 17:13:24 +0000 (17:13 +0000)]
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

11 years agoAvoid crashing if a directory has no pch files.
Rafael Espindola [Sun, 28 Jul 2013 13:23:37 +0000 (13:23 +0000)]
Avoid crashing if a directory has no pch files.

Should fix some of the bots that have assertions disabled.

llvm-svn: 187329

11 years agoUse a slightly smaller hammer to make this pass.
Rafael Espindola [Sun, 28 Jul 2013 11:13:49 +0000 (11:13 +0000)]
Use a slightly smaller hammer to make this pass.

When first updating this test I only noticided the first RUN line.

llvm-svn: 187328

11 years agoTemporarily revert r187323 until I update SSAUpdater to match mem2reg.
Chandler Carruth [Sun, 28 Jul 2013 09:05:49 +0000 (09:05 +0000)]
Temporarily revert r187323 until I update SSAUpdater to match mem2reg.
I forgot that we had two totally independent things here. :: sigh ::

llvm-svn: 187327

11 years agogitattributes: .png and .txt are no text files
Tobias Grosser [Sun, 28 Jul 2013 09:05:20 +0000 (09:05 +0000)]
gitattributes: .png and .txt are no text files

llvm-svn: 187326

11 years agofixed compilation issue
Elena Demikhovsky [Sun, 28 Jul 2013 08:45:12 +0000 (08:45 +0000)]
fixed compilation issue

llvm-svn: 187325

11 years agoAdded encoding prefixes for KNL instructions (EVEX).
Elena Demikhovsky [Sun, 28 Jul 2013 08:28:38 +0000 (08:28 +0000)]
Added encoding prefixes for KNL instructions (EVEX).
Added 512-bit operands printing.
Added instruction formats for KNL instructions.

llvm-svn: 187324

11 years agoNow that mem2reg understands how to cope with a slightly wider set of
Chandler Carruth [Sun, 28 Jul 2013 08:27:12 +0000 (08:27 +0000)]
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

11 years agoThread DataLayout through the callers and into mem2reg. This will be
Chandler Carruth [Sun, 28 Jul 2013 06:43:11 +0000 (06:43 +0000)]
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

11 years ago[PECOFF] Simplicy FileCOFF ctor. No functionality change.
Rui Ueyama [Sun, 28 Jul 2013 04:29:30 +0000 (04:29 +0000)]
[PECOFF] Simplicy FileCOFF ctor. No functionality change.

Member functions to read the symbol table had too many parameters to propagate
all the temporary information from one to another. By storing the information
to data members, we can simplify the function signatures and improve the
readability.

llvm-svn: 187321

11 years ago[PowerPC] Add comment explaining preprocessor directive.
Bill Schmidt [Sun, 28 Jul 2013 03:23:32 +0000 (03:23 +0000)]
[PowerPC] Add comment explaining preprocessor directive.

llvm-svn: 187320

11 years agoRevert 187318
Bill Schmidt [Sun, 28 Jul 2013 02:13:24 +0000 (02:13 +0000)]
Revert 187318

llvm-svn: 187319

11 years ago[PowerPC] Remove unnecessary preprocessor checking.
Bill Schmidt [Sun, 28 Jul 2013 02:08:13 +0000 (02:08 +0000)]
[PowerPC] Remove unnecessary preprocessor checking.

The tests !defined(__ppc__) && !defined(__powerpc__) are not needed
or helpful when verifying that code is being compiled for a 64-bit
target.  The simpler test provided by this revision is sufficient to
tell if the target is 64-bit.

llvm-svn: 187318

11 years agoRemoved unnecessary parameter.
Rui Ueyama [Sun, 28 Jul 2013 01:50:24 +0000 (01:50 +0000)]
Removed unnecessary parameter.

llvm-svn: 187317

11 years agoUpdate the comment
Nadav Rotem [Sat, 27 Jul 2013 23:28:47 +0000 (23:28 +0000)]
Update the comment

llvm-svn: 187316

11 years agoReduce stack frame size by avoiding a large token vector on an error path.
Bob Wilson [Sat, 27 Jul 2013 21:59:57 +0000 (21:59 +0000)]
Reduce stack frame size by avoiding a large token vector on an error path.

Beginning with svn r186971, we noticed an internal test started to fail when
using clang built with LTO. After much investigation, it turns out that there
are no blatant bugs here, we are just running out of stack space and crashing.
Preprocessor::ReadFunctionLikeMacroArgs already has one vector of 64 Tokens,
and r186971 added another.  When built with LTO, that function is inlined into
Preprocessor::HandleMacroExpandedIdentifier, which for our internal test is
invoked in a deep recursive cycle. I'm leaving the original 64 Token vector
alone on the assumption that it is important for performance, but the new
FixedArgTokens vector is only used on an error path, so it should be OK if it
requires additional heap storage. It would be even better if we could avoid
the deep recursion, but I think this change is a good thing to do regardless.
<rdar://problem/14540345>

llvm-svn: 187315

11 years ago[APFloat] Make all arithmetic operations with NaN produce positive NaNs.
Michael Gottesman [Sat, 27 Jul 2013 21:49:25 +0000 (21:49 +0000)]
[APFloat] Make all arithmetic operations with NaN produce positive NaNs.

IEEE-754R 1.4 Exclusions states that IEEE-754R does not specify the
interpretation of the sign of NaNs. In order to remove an irrelevant
variable that most floating point implementations do not use,
standardize add, sub, mul, div, mod so that operating anything with
NaN always yields a positive NaN.

In a later commit I am going to update the APIs for creating NaNs so
that one can not even create a negative NaN.

llvm-svn: 187314

11 years ago[APFloat] Move setting fcNormal in zeroSignificand() to calling code.
Michael Gottesman [Sat, 27 Jul 2013 21:49:21 +0000 (21:49 +0000)]
[APFloat] Move setting fcNormal in zeroSignificand() to calling code.

Zeroing the significand of a floating point number does not necessarily cause a
floating point number to become finite non zero. For instance, if one has a NaN,
zeroing the significand will cause it to become +/- infinity.

llvm-svn: 187313

11 years ago[APFloat] Removed nextafter from missing operations since it is implemented in APFloa...
Michael Gottesman [Sat, 27 Jul 2013 21:49:19 +0000 (21:49 +0000)]
[APFloat] Removed nextafter from missing operations since it is implemented in APFloat::next.

llvm-svn: 187312

11 years agoRe-enabling some more MSVC warnings; all of these compile cleanly with no further...
Aaron Ballman [Sat, 27 Jul 2013 20:20:28 +0000 (20:20 +0000)]
Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.

llvm-svn: 187310

11 years agoMinor code simplification suggested by Duncan
Matt Arsenault [Sat, 27 Jul 2013 19:22:28 +0000 (19:22 +0000)]
Minor code simplification suggested by Duncan

llvm-svn: 187309

11 years agomodularize: Remove default case from fully covered switch.
Benjamin Kramer [Sat, 27 Jul 2013 15:57:46 +0000 (15:57 +0000)]
modularize: Remove default case from fully covered switch.

llvm-svn: 187306

11 years agoTemporary disable a test until I finished the fix
Tobias Grosser [Sat, 27 Jul 2013 15:19:57 +0000 (15:19 +0000)]
Temporary disable a test until I finished the fix

llvm-svn: 187305

11 years agoDwarfDebug: MD5 is always little endian, bswap on big endian platforms.
Benjamin Kramer [Sat, 27 Jul 2013 14:14:43 +0000 (14:14 +0000)]
DwarfDebug: MD5 is always little endian, bswap on big endian platforms.

This makes LLVM emit the same signature regardless of host and target endianess.

llvm-svn: 187304

11 years agoCreate a constant pool symbol for the GOT in the ARMCGBR the same way we
Chandler Carruth [Sat, 27 Jul 2013 11:58:26 +0000 (11:58 +0000)]
Create a constant pool symbol for the GOT in the ARMCGBR the same way we
do in the SDag when lowering references to the GOT: use
ARMConstantPoolSymbol rather than creating a dummy global variable. The
computation of the alignment still feels weird (it uses IR types and
datalayout) but it preserves the exact previous behavior. This change
fixes the memory leak of the global variable detected on the valgrind
leak checking bot.

Thanks to Benjamin Kramer for pointing me at ARMConstantPoolSymbol to
handle this use case.

llvm-svn: 187303

11 years agoFix yet another memory leak found by the vg-leak bot. Folks (including
Chandler Carruth [Sat, 27 Jul 2013 11:23:08 +0000 (11:23 +0000)]
Fix yet another memory leak found by the vg-leak bot. Folks (including
me) should start watching this bot more as its catching lots of bugs.

The fix here is to not construct the global if we aren't going to need
it. That's cheaper anyways, and globals have highly predictable types in
practice. I've added an assert to catch skew between our manual testing
of the type and the actual type just for paranoia's sake.

Note that this pattern is actually fine in most globals because when you
build a global with a module it automatically is moved to be owned by
that module. But here, we're in isel and don't really want to do that.
The solution of not creating a global is simpler anyways.

llvm-svn: 187302

11 years agoFix a memory leak in the debug emission by simply not allocating memory.
Chandler Carruth [Sat, 27 Jul 2013 11:09:58 +0000 (11:09 +0000)]
Fix a memory leak in the debug emission by simply not allocating memory.
There doesn't appear to be any reason to put this variable on the heap.
I'm suspicious of the LexicalScope above that we stuff in a map and then
delete afterward, but I'm just trying to get the valgrind bot clean.

llvm-svn: 187301

11 years agoLooks like this test crashes. Add --crash to not for now.
Rafael Espindola [Sat, 27 Jul 2013 11:08:44 +0000 (11:08 +0000)]
Looks like this test crashes. Add --crash to not for now.

llvm-svn: 187300

11 years agoFix a memory leak in the hexagon scheduler. We call initialize here more
Chandler Carruth [Sat, 27 Jul 2013 10:48:45 +0000 (10:48 +0000)]
Fix a memory leak in the hexagon scheduler. We call initialize here more
than once, and the second time through we leaked memory. Found thanks to
the vg-leak bot, but I can't locally reproduce it with valgrind. The
debugger confirms that it is in fact leaking here.

This whole code is totally gross. Why is initialize being called on each
runOnFunction??? Why aren't these OwningPtr<>s, and why aren't their
lifetimes better defined? Anyways, this is just a surgical change to
help out the leak checking bots.

llvm-svn: 187299

11 years agoTurn off pipefail on msan tests to match the other sanitizers until
Chandler Carruth [Sat, 27 Jul 2013 10:30:39 +0000 (10:30 +0000)]
Turn off pipefail on msan tests to match the other sanitizers until
someone can go through and update the RUN lines appropriately for the
new pipefail behavior.

llvm-svn: 187298

11 years agoDon't use all the #ifdefs to hide the stats counters and instead rely on
Chandler Carruth [Sat, 27 Jul 2013 10:17:49 +0000 (10:17 +0000)]
Don't use all the #ifdefs to hide the stats counters and instead rely on
their being optimized out in debug mode. Realistically, this just isn't
going to be the slow part anyways. This also fixes unused variable
warnings that are breaking LLD build bots. =/ I didn't see these at
first, and kept losing track of the fact that they were broken.

llvm-svn: 187297

11 years agoMerge the removal of dead instructions and lifetime markers with the
Chandler Carruth [Sat, 27 Jul 2013 09:43:30 +0000 (09:43 +0000)]
Merge the removal of dead instructions and lifetime markers with the
analysis of the alloca. We don't need to visit all the users twice for
this. We build up a kill list during the analysis and then just process
it afterward. This recovers the tiny bit of performance lost by moving
to the visitor based analysis system as it removes one entire use-list
walk from mem2reg. In some cases, this is now faster than mem2reg was
previously.

llvm-svn: 187296

11 years agoFix test/Driver/cl.c.
Hans Wennborg [Sat, 27 Jul 2013 06:19:03 +0000 (06:19 +0000)]
Fix test/Driver/cl.c.

This test would fail in weird ways on systems with a one-letter filename
in the root directory, because the shell would helpfully expand /? to e.g. /n.

Make sure this doesn't happen by adding quotes.

llvm-svn: 187295

11 years agoFix formatting. No functional change.
Craig Topper [Sat, 27 Jul 2013 05:00:42 +0000 (05:00 +0000)]
Fix formatting. No functional change.

llvm-svn: 187294

11 years agoRe-enabling a warning in MSVC mode now that r187292 fixed the only instance of the...
Aaron Ballman [Sat, 27 Jul 2013 03:35:44 +0000 (03:35 +0000)]
Re-enabling a warning in MSVC mode now that r187292 fixed the only instance of the warning.

llvm-svn: 187293

11 years agoUsing the function pointer instead of the function type; this allows us to re-enable...
Aaron Ballman [Sat, 27 Jul 2013 03:34:50 +0000 (03:34 +0000)]
Using the function pointer instead of the function type; this allows us to re-enable a warning in MSVC by default.

llvm-svn: 187292

11 years agoSimplifyCFG: Add missing tests from r187278
Tom Stellard [Sat, 27 Jul 2013 02:54:44 +0000 (02:54 +0000)]
SimplifyCFG: Add missing tests from r187278

llvm-svn: 187291

11 years agoFixed checkin of wrong old files. Hopefully this is the end of the test failure.
John Thompson [Sat, 27 Jul 2013 02:06:36 +0000 (02:06 +0000)]
Fixed checkin of wrong old files. Hopefully this is the end of the test failure.

llvm-svn: 187287

11 years agoUpdate this CMakeLists.txt for r187283 too.
Nick Lewycky [Sat, 27 Jul 2013 01:26:30 +0000 (01:26 +0000)]
Update this CMakeLists.txt for r187283 too.

llvm-svn: 187286

11 years agoDebug Info Verifier: verify SPs in llvm.dbg.sp.
Manman Ren [Sat, 27 Jul 2013 01:26:08 +0000 (01:26 +0000)]
Debug Info Verifier: verify SPs in llvm.dbg.sp.

Also always add DIType, DISubprogram and DIGlobalVariable to the list
in DebugInfoFinder without checking them, so we can verify them later
on.

llvm-svn: 187285

11 years agoAlso update CMakeLists.txt for r187283.
Nick Lewycky [Sat, 27 Jul 2013 01:25:51 +0000 (01:25 +0000)]
Also update CMakeLists.txt for r187283.

llvm-svn: 187284

11 years agoReimplement isPotentiallyReachable to make nocapture deduction much stronger.
Nick Lewycky [Sat, 27 Jul 2013 01:24:00 +0000 (01:24 +0000)]
Reimplement isPotentiallyReachable to make nocapture deduction much stronger.
Adds unit tests for it too.

Split BasicBlockUtils into an analysis-half and a transforms-half, and put the
analysis bits into a new Analysis/CFG.{h,cpp}. Promote isPotentiallyReachable
into llvm::isPotentiallyReachable and move it into Analysis/CFG.

llvm-svn: 187283

11 years agoFixed missing checkin.
John Thompson [Sat, 27 Jul 2013 00:54:17 +0000 (00:54 +0000)]
Fixed missing checkin.

llvm-svn: 187282

11 years ago[PECOFF] Skip a section if there's no atom in the section.
Rui Ueyama [Sat, 27 Jul 2013 00:37:50 +0000 (00:37 +0000)]
[PECOFF] Skip a section if there's no atom in the section.

Some sections, such as with IMAGE_SCN_LNK_REMOVE attribute, is skipped
in the first pass. Such sections need to be skipped in the latter passes.

llvm-svn: 187281

11 years agoclang-cl: add support for the /? and /help options
Hans Wennborg [Sat, 27 Jul 2013 00:23:45 +0000 (00:23 +0000)]
clang-cl: add support for the /? and /help options

This establishes a new Flag in Options.td, which can be assigned to
options that should be made available in clang's cl.exe compatible
mode, and updates the Driver to make use of the flag.

(The whitespace change to CMakeLists forces the build to re-run CMake
 and pick up the include dependency on the new .td file. This makes the
 build work if someone moves backwards in commit history after this change.)

Differential Revision: http://llvm-reviews.chandlerc.com/D1215

llvm-svn: 187280

11 years agoRe-enabling some more MSVC warnings; all of these compile cleanly with no further...
Aaron Ballman [Sat, 27 Jul 2013 00:13:11 +0000 (00:13 +0000)]
Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.

llvm-svn: 187279

11 years agoSimplifyCFG: Use parallel-and and parallel-or mode to consolidate branch conditions
Tom Stellard [Sat, 27 Jul 2013 00:01:07 +0000 (00:01 +0000)]
SimplifyCFG: Use parallel-and and parallel-or mode to consolidate branch conditions

Merge consecutive if-regions if they contain identical statements.
Both transformations reduce number of branches.  The transformation
is guarded by a target-hook, and is currently enabled only for +R600,
but the correctness has been tested on X86 target using a variety of
CPU benchmarks.

Patch by: Mei Ye

llvm-svn: 187278

11 years agoFixed case change that caused the test failure. Incorporarated Sean's review changes...
John Thompson [Fri, 26 Jul 2013 23:56:42 +0000 (23:56 +0000)]
Fixed case change that caused the test failure.  Incorporarated Sean's review changes, consisting only of renaming and comment changes.

llvm-svn: 187277

11 years agoDon't build expressions for invalid casts.
Eli Friedman [Fri, 26 Jul 2013 23:47:47 +0000 (23:47 +0000)]
Don't build expressions for invalid casts.

This matches how we normally perform semantic analysis for other sorts
of invalid expressions: it means we don't have to reason about invalid
sub-expressions.

Fixes PR16680.

llvm-svn: 187276

11 years agoHandle a difference in lambda return type deduction between C++11 and C++1y: if
Richard Smith [Fri, 26 Jul 2013 23:45:07 +0000 (23:45 +0000)]
Handle a difference in lambda return type deduction between C++11 and C++1y: if
no return type is specified, C++11 will deduce a cv-qualified return type in
some cases, but C++1y never will.

llvm-svn: 187275

11 years agoDisable pipefail for lsan.
Rafael Espindola [Fri, 26 Jul 2013 23:42:16 +0000 (23:42 +0000)]
Disable pipefail for lsan.

llvm-svn: 187274

11 years agodisable pipefail for ubsan.
Rafael Espindola [Fri, 26 Jul 2013 23:40:17 +0000 (23:40 +0000)]
disable pipefail for ubsan.

llvm-svn: 187273

11 years agoDisable pipefail for ThreadSanitizer.
Rafael Espindola [Fri, 26 Jul 2013 23:38:18 +0000 (23:38 +0000)]
Disable pipefail for ThreadSanitizer.

llvm-svn: 187272

11 years agoMove the default back to pipefail. I accidentally reverted it before.
Rafael Espindola [Fri, 26 Jul 2013 23:22:43 +0000 (23:22 +0000)]
Move the default back to pipefail. I accidentally reverted it before.

llvm-svn: 187271

11 years agoDocument "show args" -> "settings show target.run-args"
Jim Ingham [Fri, 26 Jul 2013 23:20:05 +0000 (23:20 +0000)]
Document "show args" -> "settings show target.run-args"

llvm-svn: 187270

11 years agodisable pipefail on asan for now.
Rafael Espindola [Fri, 26 Jul 2013 23:19:33 +0000 (23:19 +0000)]
disable pipefail on asan for now.

llvm-svn: 187269

11 years agoPropagate pipefail when cloning.
Rafael Espindola [Fri, 26 Jul 2013 23:17:38 +0000 (23:17 +0000)]
Propagate pipefail when cloning.

llvm-svn: 187268

11 years agoSLP Vectorier: Don't vectorize really short chains because they are already handled...
Nadav Rotem [Fri, 26 Jul 2013 23:07:55 +0000 (23:07 +0000)]
SLP Vectorier:  Don't vectorize really short chains because they are already handled by the SelectionDAG store-vectorizer, which does a better job in deciding when to vectorize.

llvm-svn: 187267

11 years agoPR16708: If a lambda has an implicit return type, don't get confused if its return...
Richard Smith [Fri, 26 Jul 2013 22:53:54 +0000 (22:53 +0000)]
PR16708: If a lambda has an implicit return type, don't get confused if its return type has already been determined to be a type containing an 'auto'.

llvm-svn: 187266

11 years agoSLP Vectorizer: Disable the vectorization of non power of two chains, such as <3...
Nadav Rotem [Fri, 26 Jul 2013 22:53:11 +0000 (22:53 +0000)]
SLP Vectorizer: Disable the vectorization of non power of two chains, such as <3 x float>, because we dont have a good cost model for these types.

llvm-svn: 187265

11 years agoFix the logging messages for SBFrame::FindRegister().
Jason Molenda [Fri, 26 Jul 2013 22:52:30 +0000 (22:52 +0000)]
Fix the logging messages for SBFrame::FindRegister().

llvm-svn: 187264

11 years agoAdd not to commands that fail.
Rafael Espindola [Fri, 26 Jul 2013 22:49:25 +0000 (22:49 +0000)]
Add not to commands that fail.

Polly devs: please check if these commands really should fail.

llvm-svn: 187263

11 years ago[PATCH] [PECOFF] Fill size field of IMAGE_DATA_DIRECTORY
Rui Ueyama [Fri, 26 Jul 2013 22:33:28 +0000 (22:33 +0000)]
[PATCH] [PECOFF] Fill size field of IMAGE_DATA_DIRECTORY

Patch by Ron Ofir.

llvm-svn: 187262

11 years agoUse pipefail when available.
Rafael Espindola [Fri, 26 Jul 2013 22:32:58 +0000 (22:32 +0000)]
Use pipefail when available.

This change makes test with RUN lines like
RUN: opt ... | FileCheck

fail if opt fails, even if it prints what FileCheck wants. Enabling this
found some interesting cases of broken tests that were not being noticed
because opt (or some other tool) was crashing late.

Pipefail is used when the shell supports it or when using the internal
python based tester.

llvm-svn: 187261

11 years agonext batch of -disable-debug-info-verifier
Rafael Espindola [Fri, 26 Jul 2013 22:31:26 +0000 (22:31 +0000)]
next batch of -disable-debug-info-verifier

llvm-svn: 187260

11 years ago[PECOFF][Driver] Add ".lib" extension to the path given with /defaultlib.
Rui Ueyama [Fri, 26 Jul 2013 22:22:26 +0000 (22:22 +0000)]
[PECOFF][Driver] Add ".lib" extension to the path given with /defaultlib.

llvm-svn: 187259

11 years ago[PECOFF][Driver] Add a library file even if it does not exist.
Rui Ueyama [Fri, 26 Jul 2013 22:17:08 +0000 (22:17 +0000)]
[PECOFF][Driver] Add a library file even if it does not exist.

Missing files will be reported as errors in the later pass, so this patch
does not change the behavior of the LLD linker, but it helps writing unit
tests for the driver.

llvm-svn: 187256

11 years agoI had a buffer mismanagement bug in the demangler.
Howard Hinnant [Fri, 26 Jul 2013 22:14:53 +0000 (22:14 +0000)]
I had a buffer mismanagement bug in the demangler.

llvm-svn: 187255

11 years agoRevert "[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc."
Rafael Espindola [Fri, 26 Jul 2013 22:13:57 +0000 (22:13 +0000)]
Revert "[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc."

This reverts commit r187248. It broke many bots.

llvm-svn: 187254

11 years agoFix variable name.
Owen Anderson [Fri, 26 Jul 2013 22:06:21 +0000 (22:06 +0000)]
Fix variable name.

llvm-svn: 187253

11 years agoRe-enabling the C4065 warning for MSVC builds as it no longer fires due to tablegen.
Aaron Ballman [Fri, 26 Jul 2013 22:03:03 +0000 (22:03 +0000)]
Re-enabling the C4065 warning for MSVC builds as it no longer fires due to tablegen.

llvm-svn: 187252

11 years agoUse the new boolean to StringRef function to generate the proper StringRefs.
Bill Wendling [Fri, 26 Jul 2013 21:51:11 +0000 (21:51 +0000)]
Use the new boolean to StringRef function to generate the proper StringRefs.

llvm-svn: 187251

11 years agoUse a non-c'tor for converting a boolean into a StringRef.
Bill Wendling [Fri, 26 Jul 2013 21:50:30 +0000 (21:50 +0000)]
Use a non-c'tor for converting a boolean into a StringRef.

llvm-svn: 187250

11 years agoWhen InstCombine tries to fold away (fsub x, (fneg y)) into (fadd x, y), it is
Owen Anderson [Fri, 26 Jul 2013 21:40:29 +0000 (21:40 +0000)]
When InstCombine tries to fold away (fsub x, (fneg y)) into (fadd x, y), it is
also worthwhile for it to look through FP extensions and truncations, whose
application commutes with fneg.

llvm-svn: 187249

11 years ago[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.
Bill Schmidt [Fri, 26 Jul 2013 21:39:15 +0000 (21:39 +0000)]
[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.

Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for
all PowerPC targets, whether 32- or 64-bit.  They will both implicitly
define __ppc64__ and __powerpc64__ for 64-bit PowerPC targets, and not
for 32-bit targets.  We cannot be sure that all other possible
compilers used to compile Clang/LLVM define both __ppc__ and
__powerpc__, for example, so it is best to check for both when relying
on either inside the Clang/LLVM code base.

This patch makes sure we always check for both variants.  In addition,
it fixes one unnecessary check in lib/Target/PowerPC/PPCJITInfo.cpp.
(At least one of __ppc__ and __powerpc__ should always be defined when
compiling for a PowerPC target, no matter which compiler is used, so
testing for them is unnecessary.)

There are some places in the compiler that check for other variants,
like __POWERPC__ and _POWER, and I have left those in place.  There is
no need to add them elsewhere.  This seems to be in Apple-specific
code, and I won't take a chance on breaking it.

There is no intended change in behavior; thus, no test cases are
added.

llvm-svn: 187248

11 years agoUse more parens to clarify assert.
Eric Christopher [Fri, 26 Jul 2013 21:16:25 +0000 (21:16 +0000)]
Use more parens to clarify assert.

llvm-svn: 187247

11 years agoFix up the BUILD_CLANG_ONLY code to work properly after r184794.
Bob Wilson [Fri, 26 Jul 2013 21:08:22 +0000 (21:08 +0000)]
Fix up the BUILD_CLANG_ONLY code to work properly after r184794.

When BUILD_CLANG_ONLY is set to YES, it is supposed to simply limit the tools
that get built.  The change in r184794 broke this feature by moving libclang
and c-index-test into PARALLEL_DIRS. Those are both supposed to be in DIRS,
because c-index-test has a build dependency on libclang and cannot be
reliably built in parallel with it.

llvm-svn: 187246

11 years agoRemove addLetterToHash, no functional change.
Eric Christopher [Fri, 26 Jul 2013 21:07:18 +0000 (21:07 +0000)]
Remove addLetterToHash, no functional change.

llvm-svn: 187245

11 years ago[mips] Implement llvm.trap intrinsic.
Akira Hatanaka [Fri, 26 Jul 2013 20:58:55 +0000 (20:58 +0000)]
[mips] Implement llvm.trap intrinsic.

Patch by Sasa Stankovic.

llvm-svn: 187244

11 years ago[PECOFF][Driver] Fix a bug that -mllvm does not take any arguments.
Rui Ueyama [Fri, 26 Jul 2013 20:54:36 +0000 (20:54 +0000)]
[PECOFF][Driver] Fix a bug that -mllvm does not take any arguments.

llvm-svn: 187243

11 years ago[mips] Fix FP conditional move instructions to have explicit FP condition code
Akira Hatanaka [Fri, 26 Jul 2013 20:51:20 +0000 (20:51 +0000)]
[mips] Fix FP conditional move instructions to have explicit FP condition code
register operands.

llvm-svn: 187242

11 years agoAdd missing 'n'.
Rafael Espindola [Fri, 26 Jul 2013 20:44:45 +0000 (20:44 +0000)]
Add missing 'n'.

Thanks to Han Finkel for noticing it.

llvm-svn: 187241

11 years agoDebug Info / EmitCallArgs: arguments may modify the debug location.
Adrian Prantl [Fri, 26 Jul 2013 20:42:57 +0000 (20:42 +0000)]
Debug Info / EmitCallArgs: arguments may modify the debug location.
Restore it after each argument is emitted. This fixes the scope info for
inlined subroutines inside of function argument expressions. (E.g.,
anything STL).

rdar://problem/12592135

llvm-svn: 187240

11 years agoOptions.td: rename CCC{Driver,Debug}Opt to Internal{Driver,Debug}Opt
Hans Wennborg [Fri, 26 Jul 2013 20:30:00 +0000 (20:30 +0000)]
Options.td: rename CCC{Driver,Debug}Opt to Internal{Driver,Debug}Opt

Also rename ccc_Group, ccc_driver_Group and ccc_Debug_Group similarly.

Differential Revision: http://llvm-reviews.chandlerc.com/D1218

llvm-svn: 187239

11 years ago[mips] Fix FP branch instructions to have explicit FP condition code register
Akira Hatanaka [Fri, 26 Jul 2013 20:13:47 +0000 (20:13 +0000)]
[mips] Fix FP branch instructions to have explicit FP condition code register
operands.

llvm-svn: 187238

11 years agoDebug Info Verifier: enable verification of DICompileUnit.
Manman Ren [Fri, 26 Jul 2013 20:04:30 +0000 (20:04 +0000)]
Debug Info Verifier: enable verification of DICompileUnit.

We used to call Verify before adding DICompileUnit to the list, and now we
remove the check and always add DICompileUnit to the list in DebugInfoFinder,
so we can verify them later on.

llvm-svn: 187237

11 years agoOptions.td: remove a_Group and L_Group.
Hans Wennborg [Fri, 26 Jul 2013 19:41:43 +0000 (19:41 +0000)]
Options.td: remove a_Group and L_Group.

They don't seems to serve any purpose.

Differential Revision: http://llvm-reviews.chandlerc.com/D1227

llvm-svn: 187236

11 years agoRevert "Added new feature for checking macro and preprocessor conditional consistency."
Rafael Espindola [Fri, 26 Jul 2013 19:23:33 +0000 (19:23 +0000)]
Revert "Added new feature for checking macro and preprocessor conditional consistency."

This reverts commit r187228. It broke some bots:
http://bb.pgr.jp/builders/cmake-clang-i686-mingw32

llvm-svn: 187235

11 years ago[mips] Increase the number of floating point condition code registers to eight.
Akira Hatanaka [Fri, 26 Jul 2013 19:03:48 +0000 (19:03 +0000)]
[mips] Increase the number of floating point condition code registers to eight.

llvm-svn: 187234

11 years ago[mips] Fix floating point branch, comparison, and conditional move instructions
Akira Hatanaka [Fri, 26 Jul 2013 19:01:56 +0000 (19:01 +0000)]
[mips] Fix floating point branch, comparison, and conditional move instructions
to have register FCC0 (the first floating point condition code register) in
their Uses/Defs list.

No intended functionality change.

llvm-svn: 187233

11 years agoAdd matcher for float literals.
Daniel Jasper [Fri, 26 Jul 2013 18:52:58 +0000 (18:52 +0000)]
Add matcher for float literals.

Patch by Chris Gray! Thanks!

llvm-svn: 187232

11 years ago[mips] Delete register print method MipsInstPrinter::printCPURegs that is not
Akira Hatanaka [Fri, 26 Jul 2013 18:50:42 +0000 (18:50 +0000)]
[mips] Delete register print method MipsInstPrinter::printCPURegs that is not
needed. The generic method printOperand will do.

No functionality change.

llvm-svn: 187231

11 years ago[libclang] Remove comma from the blacklist of characters that prevent a comment to...
Argyrios Kyrtzidis [Fri, 26 Jul 2013 18:38:12 +0000 (18:38 +0000)]
[libclang] Remove comma from the blacklist of characters that prevent a comment to be attached to a decl.

It's common to use an availability function macro at the start of a decl.
rdar://13965065

llvm-svn: 187230

11 years ago[mips] Print instructions "beq", "bne" and "or" using assembler pseudo
Akira Hatanaka [Fri, 26 Jul 2013 18:34:25 +0000 (18:34 +0000)]
[mips] Print instructions "beq", "bne" and "or" using assembler pseudo
instructions "beqz", "bnez" and "move", when possible.

beq $2, $zero, $L1 => beqz $2, $L1
bne $2, $zero, $L1 => bnez $2, $L1
or  $2, $3, $zero  => move $2, $3

llvm-svn: 187229