platform/upstream/llvm.git
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

11 years agoAdded new feature for checking macro and preprocessor conditional consistency.
John Thompson [Fri, 26 Jul 2013 18:16:22 +0000 (18:16 +0000)]
Added new feature for checking macro and preprocessor conditional consistency.

llvm-svn: 187228

11 years agoRevert "cpp11-migrate: Write header replacements to disk"
Rafael Espindola [Fri, 26 Jul 2013 18:11:49 +0000 (18:11 +0000)]
Revert "cpp11-migrate: Write header replacements to disk"

This reverts commit 187204. It broke the freebsd bots:

http://lab.llvm.org:8011/builders/clang-X86_64-freebsd/builds/9561

llvm-svn: 187227

11 years agoRemove trailing whitespace.
Stephen Lin [Fri, 26 Jul 2013 18:09:50 +0000 (18:09 +0000)]
Remove trailing whitespace.

llvm-svn: 187226

11 years agoCorrect case of m_UIToFp to m_UIToFP to match instruction name, add m_SIToFP for...
Stephen Lin [Fri, 26 Jul 2013 17:55:00 +0000 (17:55 +0000)]
Correct case of m_UIToFp to m_UIToFP to match instruction name, add m_SIToFP for consistency.

llvm-svn: 187225

11 years agoCollapse conditional and add an assert for unhandled scope types.
Eric Christopher [Fri, 26 Jul 2013 17:45:19 +0000 (17:45 +0000)]
Collapse conditional and add an assert for unhandled scope types.

llvm-svn: 187224

11 years agoRe-add DataLayout pointer size convenience functions.
Matt Arsenault [Fri, 26 Jul 2013 17:37:20 +0000 (17:37 +0000)]
Re-add DataLayout pointer size convenience functions.

These were reverted in r167222 along with the rest
of the last different address space pointer size attempt.
These will be used in later commits.

llvm-svn: 187223

11 years agoMove this to the X86 directory, unfortunately the hashes are not
Eric Christopher [Fri, 26 Jul 2013 17:35:47 +0000 (17:35 +0000)]
Move this to the X86 directory, unfortunately the hashes are not
endian independent.

llvm-svn: 187222

11 years ago[PECOFF] Don't set IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE if "-fixed" is provided
Rui Ueyama [Fri, 26 Jul 2013 17:30:39 +0000 (17:30 +0000)]
[PECOFF] Don't set IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE if "-fixed" is provided

Based on Ron Ofir's patch.

llvm-svn: 187221

11 years ago[PECOFF] Replace magic number with llvm::COFF::DataDirectoryIndex value
Rui Ueyama [Fri, 26 Jul 2013 17:30:36 +0000 (17:30 +0000)]
[PECOFF] Replace magic number with llvm::COFF::DataDirectoryIndex value

Patch by Ron Ofir.

llvm-svn: 187220

11 years ago[PECOFF] Fixed a bug which caused DataDirectoryChunk to write to a wrong offset in...
Rui Ueyama [Fri, 26 Jul 2013 17:30:33 +0000 (17:30 +0000)]
[PECOFF] Fixed a bug which caused DataDirectoryChunk to write to a wrong offset in the file buffer

Patch by Ron Ofir.

llvm-svn: 187219

11 years agoOptions.td: Update HelpText of CCCDriverOpt
Hans Wennborg [Fri, 26 Jul 2013 17:18:08 +0000 (17:18 +0000)]
Options.td: Update HelpText of CCCDriverOpt

This should have been part of r186720.

llvm-svn: 187218

11 years agoRegenerate.
Eric Christopher [Fri, 26 Jul 2013 17:13:47 +0000 (17:13 +0000)]
Regenerate.

llvm-svn: 187217

11 years agoRemove trailing whitespace.
Rui Ueyama [Fri, 26 Jul 2013 17:08:12 +0000 (17:08 +0000)]
Remove trailing whitespace.

llvm-svn: 187216

11 years agoMake local variables to start with a lowercase character for consistency with the...
Rui Ueyama [Fri, 26 Jul 2013 17:03:03 +0000 (17:03 +0000)]
Make local variables to start with a lowercase character for consistency with the LLD coding style.

llvm-svn: 187215

11 years ago[PECOFF] Simplicy object allocation code. No functionality change.
Rui Ueyama [Fri, 26 Jul 2013 17:03:00 +0000 (17:03 +0000)]
[PECOFF] Simplicy object allocation code. No functionality change.

llvm-svn: 187214

11 years agoAdd preliminary support for hashing DIEs and breaking them into
Eric Christopher [Fri, 26 Jul 2013 17:02:41 +0000 (17:02 +0000)]
Add preliminary support for hashing DIEs and breaking them into
type units.

Initially this support is used in the computation of an ODR checker
for C++. For now we're attaching it to the DIE, but in the future
it will be attached to the type unit.

This also starts breaking out types into the separation for type
units, but without actually splitting the DIEs.

In preparation for hashing the DIEs this adds a DIEString type
that contains a StringRef with the string contained at the label.

llvm-svn: 187213

11 years agoAdd a way to get the context of any particular scope.
Eric Christopher [Fri, 26 Jul 2013 17:02:36 +0000 (17:02 +0000)]
Add a way to get the context of any particular scope.

llvm-svn: 187212

11 years ago[PECOFF] Ignore sections with IMAGE_SCN_LNK_REMOVE attribute.
Rui Ueyama [Fri, 26 Jul 2013 16:59:38 +0000 (16:59 +0000)]
[PECOFF] Ignore sections with IMAGE_SCN_LNK_REMOVE attribute.

llvm-svn: 187211

11 years agoclang-format: Add two new style options to support WebKit style.
Daniel Jasper [Fri, 26 Jul 2013 16:56:36 +0000 (16:56 +0000)]
clang-format: Add two new style options to support WebKit style.

New options:
* Break before the commas of constructor initializers and align
  the commas with the colon.
* Break before binary operators

Additionally, for styles without column limit, don't just accept
linebreaks done by the user, but instead remove 'invalid' (according
to the current style) linebreaks and add 'required' ones.

llvm-svn: 187210

11 years agoRemove dead or useless header checks from cmake and autoconf
Reid Kleckner [Fri, 26 Jul 2013 16:54:23 +0000 (16:54 +0000)]
Remove dead or useless header checks from cmake and autoconf

On Windows, this improves clean cmake configuration time on my
workstation from 1m58s to 1m32s, which is pretty significant.  There's
probably more that can be done here, but this is the low hanging fruit.

Eric volunteered to regenerate ./configure for me.

llvm-svn: 187209

11 years agoExtend the lifetime of the strings passed to posix_spawn_file_actions_addopen.
Rafael Espindola [Fri, 26 Jul 2013 16:21:31 +0000 (16:21 +0000)]
Extend the lifetime of the strings passed to posix_spawn_file_actions_addopen.

Thanks to Hal Finkel for finding the bug and for the initial patch.

llvm-svn: 187208

11 years ago[frontend] '-frewrite-includes' should not ignore headers included from command-line.
Argyrios Kyrtzidis [Fri, 26 Jul 2013 15:32:04 +0000 (15:32 +0000)]
[frontend] '-frewrite-includes' should not ignore headers included from command-line.

rdar://14556182

llvm-svn: 187207

11 years agoImprove our error handling on windows.
Rafael Espindola [Fri, 26 Jul 2013 14:55:36 +0000 (14:55 +0000)]
Improve our error handling on windows.

* Remove LLVM_ENABLE_CRT_REPORT. LLVM_DISABLE_CRASH_REPORT made it redundant.
* set Return to 1, so that we get a stack trace on failure.
* don't call _exit, so that we get a negative exit value and "not --crash"
  correctly differentiates crashes and regular errors.

This is a bit experimental since the documentation on this interface is sparse.
It doesn't bring up a dialog on my windows setup, but feel free to revert
if it causes problem for your setup (and let me know what it is so that I
can try to fix this patch).

llvm-svn: 187206

11 years agoNext batch of -disable-debug-info-verifier.
Rafael Espindola [Fri, 26 Jul 2013 14:16:30 +0000 (14:16 +0000)]
Next batch of -disable-debug-info-verifier.

These tests fail without it if pipefail is enabled.

llvm-svn: 187205

11 years agocpp11-migrate: Write header replacements to disk
Tareq A. Siraj [Fri, 26 Jul 2013 14:11:45 +0000 (14:11 +0000)]
cpp11-migrate: Write header replacements to disk

Header replacements are now written to disk in YAML format for an external tool
to merge. A unique file will be created in the same directory as the header
with all replacements that came from a source file that included the header
file. The YAML file will have:
 - Name of the file
 - Transform ID that generated the replacement
 - Offset
 - Length
 - Replacement text

Any tool reading these replacements should read them using the TransformDocument
struct.

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

llvm-svn: 187204

11 years agoAdd not to a command that is expected to fail.
Rafael Espindola [Fri, 26 Jul 2013 14:10:55 +0000 (14:10 +0000)]
Add not to a command that is expected to fail.

llvm-svn: 187203

11 years agoAdd a target legalize hook for SplitVectorOperand (again)
Justin Holewinski [Fri, 26 Jul 2013 13:28:29 +0000 (13:28 +0000)]
Add a target legalize hook for SplitVectorOperand (again)

CustomLowerNode was not being called during SplitVectorOperand,
meaning custom legalization could not be used by targets.

This also adds a test case for NVPTX that depends on this custom
legalization.

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

Attempt to fix the buildbots by making the X86 test I just added platform independent

llvm-svn: 187202

11 years agoRevert "Add a target legalize hook for SplitVectorOperand"
Rafael Espindola [Fri, 26 Jul 2013 13:18:16 +0000 (13:18 +0000)]
Revert "Add a target legalize hook for SplitVectorOperand"

This reverts commit 187198. It broke the bots.

The soft float test probably needs a -triple because of name differences.
On the hard float test I am getting a "roundss $1, %xmm0, %xmm0", instead of
"vroundss $1, %xmm0, %xmm0, %xmm0".

llvm-svn: 187201

11 years agoAdd missing integer min/max definitions
Aaron Watry [Fri, 26 Jul 2013 13:02:02 +0000 (13:02 +0000)]
Add missing integer min/max definitions

Found in CL 1.1 spec section 6.11.3

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 187200

11 years agoFix tests on targets that don't support thread_local
Pavel Labath [Fri, 26 Jul 2013 12:50:30 +0000 (12:50 +0000)]
Fix tests on targets that don't support thread_local

This also reverts r187197.

llvm-svn: 187199

11 years agoAdd a target legalize hook for SplitVectorOperand
Justin Holewinski [Fri, 26 Jul 2013 12:46:39 +0000 (12:46 +0000)]
Add a target legalize hook for SplitVectorOperand

CustomLowerNode was not being called during SplitVectorOperand,
meaning custom legalization could not be used by targets.

This also adds a test case for NVPTX that depends on this custom
legalization.

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

llvm-svn: 187198

11 years agoAdd a triple. Should fix the windows bots.
Rafael Espindola [Fri, 26 Jul 2013 12:40:55 +0000 (12:40 +0000)]
Add a triple. Should fix the windows bots.

llvm-svn: 187197

11 years ago[analyzer] Fix FP warnings when binding a temporary to a local static variable
Pavel Labath [Fri, 26 Jul 2013 11:50:42 +0000 (11:50 +0000)]
[analyzer] Fix FP warnings when binding a temporary to a local static variable

Summary:
When binding a temporary object to a static local variable, the analyzer would
complain about a dangling reference even though the temporary's lifetime should
be extended past the end of the function. This commit tries to detect these
cases and construct them in a global memory region instead of a local one.

Reviewers: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1133

llvm-svn: 187196

11 years agotest commit
Richard Osborne [Fri, 26 Jul 2013 10:19:02 +0000 (10:19 +0000)]
test commit

llvm-svn: 187195

11 years agoRework r187192, to tweak expressions to be tolerant of DOSish paths. XFAILs can be...
NAKAMURA Takumi [Fri, 26 Jul 2013 10:13:27 +0000 (10:13 +0000)]
Rework r187192, to tweak expressions to be tolerant of DOSish paths. XFAILs can be removed.

llvm-svn: 187194

11 years ago[XCore] Add TODO regarding byval structs
Richard Osborne [Fri, 26 Jul 2013 09:50:55 +0000 (09:50 +0000)]
[XCore] Add TODO regarding byval structs

llvm-svn: 187193