platform/upstream/llvm.git
10 years agoMC: Support larger COFF string tables
Nico Rieck [Mon, 29 Jul 2013 12:30:12 +0000 (12:30 +0000)]
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

10 years agoExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]
NAKAMURA Takumi [Mon, 29 Jul 2013 11:03:50 +0000 (11:03 +0000)]
ExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]

llvm-svn: 187351

10 years agoSome Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2.
Benjamin Kramer [Mon, 29 Jul 2013 11:02:08 +0000 (11:02 +0000)]
Some Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2.

PR16721.

llvm-svn: 187350

10 years agoAllow generation of vmla.f32 instructions when targeting Cortex-A15. The patch also...
Silviu Baranga [Mon, 29 Jul 2013 09:25:50 +0000 (09:25 +0000)]
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

10 years agotest commit
Robert Lytton [Mon, 29 Jul 2013 09:23:13 +0000 (09:23 +0000)]
test commit

llvm-svn: 187348

10 years agoTeach the AllocaPromoter which is wrapped around the SSAUpdater
Chandler Carruth [Mon, 29 Jul 2013 09:06:53 +0000 (09:06 +0000)]
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

10 years agoFix build error caused by r187345.
Daniel Jasper [Mon, 29 Jul 2013 08:43:57 +0000 (08:43 +0000)]
Fix build error caused by r187345.

llvm-svn: 187346

10 years agoInitial architecture for clang-tidy.
Daniel Jasper [Mon, 29 Jul 2013 08:19:24 +0000 (08:19 +0000)]
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

10 years agoReturn ExprError if both arguments to the mask form of __builtin_shufflvector don...
Craig Topper [Mon, 29 Jul 2013 06:47:04 +0000 (06:47 +0000)]
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

10 years agoRemove '-debug-only' from test case
Tobias Grosser [Mon, 29 Jul 2013 05:35:11 +0000 (05:35 +0000)]
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

10 years agoTempScop: Actually load Polly in this test case
Tobias Grosser [Mon, 29 Jul 2013 05:18:09 +0000 (05:18 +0000)]
TempScop: Actually load Polly in this test case

llvm-svn: 187342

10 years agoRemove second '-analyze' from command line
Tobias Grosser [Mon, 29 Jul 2013 05:15:33 +0000 (05:15 +0000)]
Remove second '-analyze' from command line

llvm-svn: 187341

10 years agoDon't vectorize when the attribute NoImplicitFloat is used.
Nadav Rotem [Mon, 29 Jul 2013 05:13:00 +0000 (05:13 +0000)]
Don't vectorize when the attribute NoImplicitFloat is used.

llvm-svn: 187340

10 years agoJSONImporter: Free new schedule if found invalid
Tobias Grosser [Mon, 29 Jul 2013 05:12:01 +0000 (05:12 +0000)]
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

10 years agoCodeGeneration: Fix double free in vector for
Tobias Grosser [Mon, 29 Jul 2013 01:58:07 +0000 (01:58 +0000)]
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

10 years agoclang/test/Driver/cl.c: Don't attempt slash switches on msys bash.
NAKAMURA Takumi [Mon, 29 Jul 2013 01:37:10 +0000 (01:37 +0000)]
clang/test/Driver/cl.c: Don't attempt slash switches on msys bash.

llvm-svn: 187337

10 years agoFix -Wdocumentation warnings.
Rafael Espindola [Sun, 28 Jul 2013 23:43:28 +0000 (23:43 +0000)]
Fix -Wdocumentation warnings.

llvm-svn: 187336

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

llvm-svn: 187325

10 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

10 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

10 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

10 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

10 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

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

llvm-svn: 187319

10 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

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

llvm-svn: 187317

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

llvm-svn: 187316

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

llvm-svn: 187282

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

llvm-svn: 187253

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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