platform/upstream/llvm.git
11 years agoRemove unused MachineLoopRanges analysis.
Jakub Staszak [Tue, 27 Nov 2012 01:14:34 +0000 (01:14 +0000)]
Remove unused MachineLoopRanges analysis.

llvm-svn: 168659

11 years agoExtend test case for r168657.
Chad Rosier [Tue, 27 Nov 2012 01:10:48 +0000 (01:10 +0000)]
Extend test case for r168657.

llvm-svn: 168658

11 years ago[arm fast-isel] Appease the machine verifier by using the proper register
Chad Rosier [Tue, 27 Nov 2012 01:06:49 +0000 (01:06 +0000)]
[arm fast-isel] Appease the machine verifier by using the proper register
classes.  The associated test case still doesn't pass, but it does have far
fewer issues.
rdar://12719844

llvm-svn: 168657

11 years agoFast-math test for SimplifyInstruction: fold multiply by 0
Michael Ilseman [Tue, 27 Nov 2012 01:00:22 +0000 (01:00 +0000)]
Fast-math test for SimplifyInstruction: fold multiply by 0

Applied the patch, rather than committing it.

llvm-svn: 168656

11 years ago<rdar://problem/12636970>
Greg Clayton [Tue, 27 Nov 2012 00:59:26 +0000 (00:59 +0000)]
<rdar://problem/12636970>

Detect the new fixed clang that properly supports bitfields in objc classes.

llvm-svn: 168655

11 years agoRevert r168635 "Step towards implementation of pass manager with doInitialization...
Owen Anderson [Tue, 27 Nov 2012 00:53:24 +0000 (00:53 +0000)]
Revert r168635 "Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model".
It appears to have broken at least one buildbot.

llvm-svn: 168654

11 years agoRemove some Clang-specific ownership roles.
Richard Smith [Tue, 27 Nov 2012 00:48:36 +0000 (00:48 +0000)]
Remove some Clang-specific ownership roles.

llvm-svn: 168653

11 years agoFast-math flags documentation added to LangRef
Michael Ilseman [Tue, 27 Nov 2012 00:48:29 +0000 (00:48 +0000)]
Fast-math flags documentation added to LangRef

llvm-svn: 168652

11 years agollvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll: Loosen expression corresponding...
NAKAMURA Takumi [Tue, 27 Nov 2012 00:48:27 +0000 (00:48 +0000)]
llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll: Loosen expression corresponding to r168627. Win32 and *bsd were affected.

llvm-svn: 168651

11 years agoDuplicate some common owners between Clang and LLVM.
Richard Smith [Tue, 27 Nov 2012 00:48:12 +0000 (00:48 +0000)]
Duplicate some common owners between Clang and LLVM.

llvm-svn: 168650

11 years agoFast-math test for SimplifyInstruction: fold multiply by 0
Michael Ilseman [Tue, 27 Nov 2012 00:47:20 +0000 (00:47 +0000)]
Fast-math test for SimplifyInstruction: fold multiply by 0

llvm-svn: 168649

11 years agoFast-math optimization: fold multiply by zero
Michael Ilseman [Tue, 27 Nov 2012 00:46:26 +0000 (00:46 +0000)]
Fast-math optimization: fold multiply by zero

Added in first optimization using fast-math flags to serve as an example for following optimizations. SimplifyInstruction will now try to optimize an fmul observing its FastMathFlags to see if it can fold multiply by zero when 'nnan' and 'nsz' flags are set.

llvm-svn: 168648

11 years agoFast-math test case for bitcode and textual reading/writing
Michael Ilseman [Tue, 27 Nov 2012 00:45:08 +0000 (00:45 +0000)]
Fast-math test case for bitcode and textual reading/writing

llvm-svn: 168647

11 years agoFast-math flags for the bitcode
Michael Ilseman [Tue, 27 Nov 2012 00:43:38 +0000 (00:43 +0000)]
Fast-math flags for the bitcode

Added in bitcode enum for the serializing of fast-math flags. Added in the reading/writing of fast-math flags from the OptimizationFlags record for BinaryOps.

llvm-svn: 168646

11 years agoFast-math flags for LLVM IR parsing and printing
Michael Ilseman [Tue, 27 Nov 2012 00:42:44 +0000 (00:42 +0000)]
Fast-math flags for LLVM IR parsing and printing

Added in the ability to read LLVM IR text that contains fast-math flags as a sequence of capital letters separated by spaces in any order. Added in the printing of the fast-math flags in a canonical order, and don't print the other flags when 'fast' is specified, as 'fast' implies all the others.

llvm-svn: 168645

11 years agoMake comment names match function names.
Eric Christopher [Tue, 27 Nov 2012 00:41:57 +0000 (00:41 +0000)]
Make comment names match function names.

llvm-svn: 168644

11 years agoAdd in sections for the fission case (no change so incorrect) and
Eric Christopher [Tue, 27 Nov 2012 00:41:54 +0000 (00:41 +0000)]
Add in sections for the fission case (no change so incorrect) and
add a TODO for starting.

llvm-svn: 168643

11 years agoFast-math interfaces for Instructions
Michael Ilseman [Tue, 27 Nov 2012 00:41:22 +0000 (00:41 +0000)]
Fast-math interfaces for Instructions

Add in getter/setter methods for Instructions, allowing them to be the interface to FPMathOperator similarly to now NUS/NSW is handled.

llvm-svn: 168642

11 years agoFast-math flags added to FPMathOperator.
Michael Ilseman [Tue, 27 Nov 2012 00:40:00 +0000 (00:40 +0000)]
Fast-math flags added to FPMathOperator.

Created FastMathFlags convenience struct for the getting and setting of fast-math flags en masse. Added SubclassOptionalData bitfields and corresponding getters/setters to FPMathOperator for the various fast-math flags.

llvm-svn: 168641

11 years agoMove Clang code owners list from llvm/ to cfe/.
Richard Smith [Tue, 27 Nov 2012 00:39:52 +0000 (00:39 +0000)]
Move Clang code owners list from llvm/ to cfe/.

llvm-svn: 168640

11 years agoMove Clang code owners list from llvm/ to cfe/.
Richard Smith [Tue, 27 Nov 2012 00:39:30 +0000 (00:39 +0000)]
Move Clang code owners list from llvm/ to cfe/.

llvm-svn: 168639

11 years agoReorder section output ordering.
Eric Christopher [Tue, 27 Nov 2012 00:13:58 +0000 (00:13 +0000)]
Reorder section output ordering.

llvm-svn: 168638

11 years agoWhitespace cleanup.
Eric Christopher [Tue, 27 Nov 2012 00:13:51 +0000 (00:13 +0000)]
Whitespace cleanup.

llvm-svn: 168637

11 years agoFrontend: Create a virtual file for named pipe inputs.
Daniel Dunbar [Tue, 27 Nov 2012 00:04:16 +0000 (00:04 +0000)]
Frontend: Create a virtual file for named pipe inputs.
 - This ensures we see the right buffer size for the file.

llvm-svn: 168636

11 years agoStep towards implementation of pass manager with doInitialization and doFinalization...
Owen Anderson [Mon, 26 Nov 2012 23:54:47 +0000 (23:54 +0000)]
Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model

Patch by Pedro Artigas, with feedback from by Chandler Carruth.

llvm-svn: 168635

11 years agoThe Function calling thread plan was replacing the stored stop info too soon, causing...
Jim Ingham [Mon, 26 Nov 2012 23:52:18 +0000 (23:52 +0000)]
The Function calling thread plan was replacing the stored stop info too soon, causing recursive entry into the
breakpoint StopInfo's PerformAction, which is bad.  Reworked this so that it is now correct.

<rdar://problem/12501259>

llvm-svn: 168634

11 years agoAdd an assertion to ensure freezeReservedRegs() is only ever called once.
Chad Rosier [Mon, 26 Nov 2012 23:37:07 +0000 (23:37 +0000)]
Add an assertion to ensure freezeReservedRegs() is only ever called once.

llvm-svn: 168633

11 years agoMake this test less sensitive.
Eli Bendersky [Mon, 26 Nov 2012 23:27:09 +0000 (23:27 +0000)]
Make this test less sensitive.

It currently assumes register numbering and any harmless change in the X86
register naming makes it fail. It's enough to match the register names.

llvm-svn: 168632

11 years agoNow that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
Chad Rosier [Mon, 26 Nov 2012 23:25:41 +0000 (23:25 +0000)]
Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
r168627), we no longer need to call the freezeReservedRegs() function a second
time.  Previously, this pass was conservatively adding the FP to the set of
reserved registers, requiring the second update to the reserved registers.
rdar://12719844

llvm-svn: 168631

11 years agoNow that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
Chad Rosier [Mon, 26 Nov 2012 23:14:37 +0000 (23:14 +0000)]
Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
r168627), we no longer need to call the freezeReservedRegs() function a second
time.  Previously, this pass was conservatively adding the FP to the set of
reserved registers, requiring the second update to the reserved registers.
rdar://12719844

llvm-svn: 168630

11 years agoGet rid of the getPointeeAlignment helper function from
Eli Friedman [Mon, 26 Nov 2012 23:04:53 +0000 (23:04 +0000)]
Get rid of the getPointeeAlignment helper function from
InstCombineLoadStoreAlloca.cpp, which had many issues.
(At least two bugs were noted on llvm-commits, and it was overly conservative.)
Instead, use getOrEnforceKnownAlignment.

llvm-svn: 168629

11 years agodo not require cloog from configure
Sebastian Pop [Mon, 26 Nov 2012 23:03:41 +0000 (23:03 +0000)]
do not require cloog from configure

llvm-svn: 168628

11 years agoRemove the X86 Maximal Stack Alignment Check pass as it is no longer necessary.
Chad Rosier [Mon, 26 Nov 2012 22:55:05 +0000 (22:55 +0000)]
Remove the X86 Maximal Stack Alignment Check pass as it is no longer necessary.
This pass was conservative in that it always reserved the FP to enable dynamic
stack realignment, which allowed the RA to use aligned spills for vector
registers.  This happens even when spills were not necessary.  The RA has
since been improved to use unaligned spills when necessary.

The new behavior is to realign the stack if the frame pointer was already
reserved for some other reason, but don't reserve the frame pointer just
because a function contains vector virtual registers.

Part of rdar://12719844

llvm-svn: 168627

11 years agoImprove diagnostic on C++11 attribute specifiers that appear at wrong syntactic locat...
Michael Han [Mon, 26 Nov 2012 22:54:45 +0000 (22:54 +0000)]
Improve diagnostic on C++11 attribute specifiers that appear at wrong syntactic locations around class specifiers.

This change list implemented logic that explicitly detects several combinations of locations where C++11 attribute
specifiers might be incorrectly placed within a class specifier. Previously we emit generic diagnostics like
"expected identifier" for such cases; now we emit specific diagnostic against the misplaced attributes, this also
fixed a bug in old code where attributes appear at legitimate locations were incorrectly rejected.

Thanks to Richard Smith for reviewing!

llvm-svn: 168626

11 years agoAutomatically create .dSYM for libcompiler_rt.dylib when using Apple's internal build...
Nick Kledzik [Mon, 26 Nov 2012 22:48:51 +0000 (22:48 +0000)]
Automatically create .dSYM for libcompiler_rt.dylib when using Apple's internal build system

llvm-svn: 168625

11 years agofix typo
Sebastian Pop [Mon, 26 Nov 2012 22:16:19 +0000 (22:16 +0000)]
fix typo

Caught while compiling polly without cloog:

../tools/polly/lib/RegisterPasses.cpp:77: error: use of enum 'CodegenChoice' without previous declaration

llvm-svn: 168624

11 years agoremove dependence on CLOOG_FOUND for PollyVectorizerChoice
Sebastian Pop [Mon, 26 Nov 2012 22:16:17 +0000 (22:16 +0000)]
remove dependence on CLOOG_FOUND for PollyVectorizerChoice

When polly was configured with cmake without cloog, compilation stopped with:

../tools/polly/lib/CodeGen/BlockGenerators.cpp:662: error: 'PollyVectorizerChoice' was not declared in this scope
../tools/polly/lib/CodeGen/BlockGenerators.cpp:662: error: 'VECTORIZER_FIRST_NEED_GROUPED_UNROLL' was not declared in this scope

llvm-svn: 168623

11 years agoDon't use iterator after being erased.
Jakub Staszak [Mon, 26 Nov 2012 22:14:19 +0000 (22:14 +0000)]
Don't use iterator after being erased.

llvm-svn: 168622

11 years agoremove dead code
Sebastian Pop [Mon, 26 Nov 2012 22:07:30 +0000 (22:07 +0000)]
remove dead code

llvm-svn: 168621

11 years agoremove unused flag
Sebastian Pop [Mon, 26 Nov 2012 22:07:27 +0000 (22:07 +0000)]
remove unused flag

llvm-svn: 168620

11 years agoCorrect copy-pasto where we're talking about function attributes and not parameter...
Bill Wendling [Mon, 26 Nov 2012 22:04:13 +0000 (22:04 +0000)]
Correct copy-pasto where we're talking about function attributes and not parameter attributes.

llvm-svn: 168619

11 years agoAdd missing "break". Thanks to Craig for spotting it.
Eli Friedman [Mon, 26 Nov 2012 21:57:28 +0000 (21:57 +0000)]
Add missing "break".  Thanks to Craig for spotting it.

I'm looking at ways to fix the relevant test so it can catch this sort of mistake.

llvm-svn: 168618

11 years agoFix comments in HexagonOperands.td.
Jyotsna Verma [Mon, 26 Nov 2012 21:56:51 +0000 (21:56 +0000)]
Fix comments in HexagonOperands.td.

llvm-svn: 168617

11 years agordar://12329730 (defect 2)
Shuxin Yang [Mon, 26 Nov 2012 21:44:25 +0000 (21:44 +0000)]
rdar://12329730 (defect 2)

Enhancement to InstCombine. Try to catch this opportunity:

 ---------------------------------------------------------------
 ((X^C1) >> C2) ^ C3  => (X>>C2) ^ ((C1>>C2)^C3)
  where the subexpression "X ^ C1" has more than one uses, and
  "(X^C1) >> C2" has single use.
 ----------------------------------------------------------------

 Reviewed by Nadav (with minor change per his request).

llvm-svn: 168615

11 years agoImprovement to TestGlobalVariables fix
Daniel Malea [Mon, 26 Nov 2012 21:23:12 +0000 (21:23 +0000)]
Improvement to TestGlobalVariables fix
- use lldb settings command instead of os.environ
- use dyldPath fixture variable instead of hardcoding LD_LIBRARY_PATH
- add tear-down hook to restore environment after testcase is run

llvm-svn: 168613

11 years agoFix for TestSharedLib.py (on Linux)
Daniel Malea [Mon, 26 Nov 2012 21:21:11 +0000 (21:21 +0000)]
Fix for TestSharedLib.py (on Linux)
- use lldb 'settings' command to help testcase find shared library
- pull up dyldPath variable from TestLoadUnload.py to fixture base class (applicable in multiple cases)

llvm-svn: 168612

11 years agoDimitry Andric: When using libc++ headers on FreeBSD, in combination with -std=c...
Howard Hinnant [Mon, 26 Nov 2012 21:18:17 +0000 (21:18 +0000)]
Dimitry Andric:  When using libc++ headers on FreeBSD, in combination with -std=c++98,
-ansi or -std=c++03, the long long type is not supported.  So in this
case, several functions and types, like lldiv_t, strtoll(), are not
declared.

llvm-svn: 168610

11 years agoRemove unneeded #includes.
Jakub Staszak [Mon, 26 Nov 2012 21:04:19 +0000 (21:04 +0000)]
Remove unneeded #includes.

llvm-svn: 168608

11 years agocheck that always_inline attribute works with -fno-inline
Sebastian Pop [Mon, 26 Nov 2012 20:44:46 +0000 (20:44 +0000)]
check that always_inline attribute works with -fno-inline

Clean up the existing test to use FileCheck.

llvm-svn: 168607

11 years ago<rdar://problem/12723044> For 'process plugin packet send…', we just send it async...
Han Ming Ong [Mon, 26 Nov 2012 20:42:03 +0000 (20:42 +0000)]
<rdar://problem/12723044> For 'process plugin packet send…', we just send it async by default

There is no good reason not to use async.

llvm-svn: 168606

11 years agoFix a comment bug in toascii simplifier
Meador Inge [Mon, 26 Nov 2012 20:37:23 +0000 (20:37 +0000)]
Fix a comment bug in toascii simplifier

When I migrated the toascii simplifier in r168580 Benjamin Kramer noticed
a bug in one of the comments that I migrated.

llvm-svn: 168605

11 years agoinstcombine: Migrate printf optimizations
Meador Inge [Mon, 26 Nov 2012 20:37:20 +0000 (20:37 +0000)]
instcombine: Migrate printf optimizations

This patch migrates the printf optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168604

11 years ago[analyzer] SATestBuild.py: allow make builds to disable parallelization
Jordan Rose [Mon, 26 Nov 2012 19:59:57 +0000 (19:59 +0000)]
[analyzer] SATestBuild.py: allow make builds to disable parallelization

Before, SATestBuild unilaterally added '-j<n>' to every project built with
'make'. Now, we check and see if there's a -j option already specified, which
allows a project to explicitly be marked '-j1'.

llvm-svn: 168603

11 years agoMissing “if (log)” on a log printf.
Jim Ingham [Mon, 26 Nov 2012 19:54:04 +0000 (19:54 +0000)]
Missing “if (log)” on a log printf.

llvm-svn: 168602

11 years agoMove the code that uses SCEVs prior to creating the new loops.
Nadav Rotem [Mon, 26 Nov 2012 19:51:46 +0000 (19:51 +0000)]
Move the code that uses SCEVs prior to creating the new loops.

llvm-svn: 168601

11 years agoNormalize splat 256bit vectors with 8 elements.
Jakub Staszak [Mon, 26 Nov 2012 19:24:31 +0000 (19:24 +0000)]
Normalize splat 256bit vectors with 8 elements.

llvm-svn: 168600

11 years ago[analyzer] Fix a crash reported in PR 14400.
Anna Zaks [Mon, 26 Nov 2012 19:11:46 +0000 (19:11 +0000)]
[analyzer] Fix a crash reported in PR 14400.

The AllocaRegion did not have the superRegion (based on LocationContext)
as part of it's hash. As a consequence, the AllocaRegions from
different frames were uniqued to be the same region.

llvm-svn: 168599

11 years agoMSPGCC renamed ISR vectors from vector_<address> to __isr_<number>. This patch makes...
Anton Korobeynikov [Mon, 26 Nov 2012 18:59:10 +0000 (18:59 +0000)]
MSPGCC renamed ISR vectors from vector_<address> to __isr_<number>. This patch makes Clang reflect this scheme.
Patch by Job Noorman!

llvm-svn: 168598

11 years agoDecouple MCInstBuilder from the streamer per Eli's request.
Benjamin Kramer [Mon, 26 Nov 2012 18:05:52 +0000 (18:05 +0000)]
Decouple MCInstBuilder from the streamer per Eli's request.

llvm-svn: 168597

11 years agoFix TestGlobalVariables.py (on Linux)
Daniel Malea [Mon, 26 Nov 2012 16:54:53 +0000 (16:54 +0000)]
Fix TestGlobalVariables.py (on Linux)
- setting LD_LIBRARY_PATH required for the test program to run correctly

llvm-svn: 168595

11 years agoRemove stray trailing backslash
Matt Beaumont-Gay [Mon, 26 Nov 2012 16:27:22 +0000 (16:27 +0000)]
Remove stray trailing backslash

llvm-svn: 168592

11 years agotsan: fix lint warnings
Dmitry Vyukov [Mon, 26 Nov 2012 14:55:26 +0000 (14:55 +0000)]
tsan: fix lint warnings

llvm-svn: 168590

11 years agotsan: explicitly mark symbols referenced from assembly as hidden
Dmitry Vyukov [Mon, 26 Nov 2012 14:20:26 +0000 (14:20 +0000)]
tsan: explicitly mark symbols referenced from assembly as hidden
this allows to build tsan runtime as dynamic library

llvm-svn: 168589

11 years agoRewrite test to not use a FileCheck variable and redefine it on the same line.
Eli Bendersky [Mon, 26 Nov 2012 14:09:46 +0000 (14:09 +0000)]
Rewrite test to not use a FileCheck variable and redefine it on the same line.

In preparation for the FileCheck functionality change which will allow using
a variable later on the same line.

No functionality change.

llvm-svn: 168588

11 years agoAdd MCInstBuilder, a utility class to simplify MCInst creation similar to MachineInst...
Benjamin Kramer [Mon, 26 Nov 2012 13:34:22 +0000 (13:34 +0000)]
Add MCInstBuilder, a utility class to simplify MCInst creation similar to MachineInstrBuilder.

Simplify some repetitive code with it. No functionality change.

llvm-svn: 168587

11 years ago[tsan] add fail order to compare_exchange
Dmitry Vyukov [Mon, 26 Nov 2012 11:36:19 +0000 (11:36 +0000)]
[tsan] add fail order to compare_exchange

llvm-svn: 168586

11 years ago[asan] fix Android build by not calling GetPageSizeCached in a test (no need for...
Kostya Serebryany [Mon, 26 Nov 2012 11:23:30 +0000 (11:23 +0000)]
[asan] fix Android build by not calling GetPageSizeCached in a test (no need for the page size anyway)

llvm-svn: 168585

11 years agotsan: add atomic nand operation
Dmitry Vyukov [Mon, 26 Nov 2012 09:42:56 +0000 (09:42 +0000)]
tsan: add atomic nand operation

llvm-svn: 168584

11 years agoFix PR14413 - incorrect mangling of anonymous namespaces with -cxx-abi microsoft
Timur Iskhodzhanov [Mon, 26 Nov 2012 08:55:48 +0000 (08:55 +0000)]
Fix PR14413 - incorrect mangling of anonymous namespaces with -cxx-abi microsoft

llvm-svn: 168583

11 years agoPR14428: When instantiating a 'new' expression, if we had a non-dependent
Richard Smith [Mon, 26 Nov 2012 08:32:48 +0000 (08:32 +0000)]
PR14428: When instantiating a 'new' expression, if we had a non-dependent
initialization, don't rebuild it. Remove a couple of hacks which were trying to
work around this. Fix the special case for one-argument CXXConstructExprs to
not apply if the one argument is a default argument.

llvm-svn: 168582

11 years agoFix a PassManager pointer use-after-free bug.
Zhou Sheng [Mon, 26 Nov 2012 05:45:53 +0000 (05:45 +0000)]
Fix a PassManager pointer use-after-free bug.
The bug can be triggered when we require LoopInfo analysis ahead of DominatorTree construction in a Module Pass. The cause is that the LoopInfo analysis itself also invokes DominatorTree construction, therefore, when PassManager schedules LoopInfo, it will add DominatorTree first. Then after that, when the PassManger turns to schedule DominatorTree invoked by the above ModulePass, it finds there is already a DominatorTree, so it delete the redundant one. However, somehow it still try to access that pass pointer after free as code pasted below, which results in segment fault.

llvm-svn: 168581

11 years agoinstcombine: Migrate toascii optimizations
Meador Inge [Mon, 26 Nov 2012 03:38:52 +0000 (03:38 +0000)]
instcombine: Migrate toascii optimizations

This patch migrates the toascii optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168580

11 years agoinstcombine: Migrate isascii optimizations
Meador Inge [Mon, 26 Nov 2012 03:10:07 +0000 (03:10 +0000)]
instcombine: Migrate isascii optimizations

This patch migrates the isascii optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168579

11 years agoinstcombine: Migrate isdigit optimizations
Meador Inge [Mon, 26 Nov 2012 02:31:59 +0000 (02:31 +0000)]
instcombine: Migrate isdigit optimizations

This patch migrates the isdigit optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168578

11 years agoRemoving SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
Joe Abbey [Mon, 26 Nov 2012 02:02:08 +0000 (02:02 +0000)]
Removing SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG

Adding CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
       C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG

This is to handle the wackiness on a Mac host where cmake detects:

CMAKE_CXX_COMPILER == "/usr/bin/c++"
CMAKE_C_COMPILER == "/usr/bin/gcc"

llvm-svn: 168577

11 years agoFix gcc's -Wunused-but-set-variable warnings.
Rafael Espindola [Mon, 26 Nov 2012 00:56:44 +0000 (00:56 +0000)]
Fix gcc's -Wunused-but-set-variable warnings.

llvm-svn: 168576

11 years agoFix bogus comment; no functional change.
Meador Inge [Mon, 26 Nov 2012 00:25:33 +0000 (00:25 +0000)]
Fix bogus comment;  no functional change.

llvm-svn: 168575

11 years agoinstcombine: Migrate *abs optimizations
Meador Inge [Mon, 26 Nov 2012 00:24:07 +0000 (00:24 +0000)]
instcombine: Migrate *abs optimizations

This patch migrates the *abs optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168574

11 years agoinstcombine: Migrate ffs* optimizations
Meador Inge [Sun, 25 Nov 2012 20:45:27 +0000 (20:45 +0000)]
instcombine: Migrate ffs* optimizations

This patch migrates the ffs* optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168571

11 years agoMove the max vector width to a constant parameter. No functionality change.
Nadav Rotem [Sun, 25 Nov 2012 16:48:08 +0000 (16:48 +0000)]
Move the max vector width to a constant parameter. No functionality change.

llvm-svn: 168570

11 years agoFix the document style.
Nadav Rotem [Sun, 25 Nov 2012 16:39:01 +0000 (16:39 +0000)]
Fix the document style.

llvm-svn: 168569

11 years agoRefactor the ptr runtime check generation code. No functionality change.
Nadav Rotem [Sun, 25 Nov 2012 16:27:16 +0000 (16:27 +0000)]
Refactor the ptr runtime check generation code. No functionality change.

llvm-svn: 168568

11 years agotsan: faster memory reset for Go
Dmitry Vyukov [Sun, 25 Nov 2012 16:05:42 +0000 (16:05 +0000)]
tsan: faster memory reset for Go

llvm-svn: 168567

11 years agoCode Custodian:
Joe Abbey [Sun, 25 Nov 2012 15:23:39 +0000 (15:23 +0000)]
Code Custodian:
  - Widespread trailing space removal
  - A dash of OCD spacing to block align enums
  - joined a line that probably needed 80 cols a while back

llvm-svn: 168566

11 years agoAdd support for .cfi_register now that it is easy to extent the representation
Rafael Espindola [Sun, 25 Nov 2012 15:14:49 +0000 (15:14 +0000)]
Add support for .cfi_register now that it is easy to extent the representation
to support it. Original patch with the parsing and plumbing by the PaX team and
Roman Divacky. I added the bits in MCDwarf.cpp and the test.

llvm-svn: 168565

11 years agoAdd r168519 back, but with a fix to also merge the used flag in variables.
Rafael Espindola [Sun, 25 Nov 2012 14:07:59 +0000 (14:07 +0000)]
Add r168519 back, but with a fix to also merge the used flag in variables.

llvm-svn: 168564

11 years agoAdd a basic testcase for the "variable is not needed" warning and one that
Rafael Espindola [Sun, 25 Nov 2012 14:00:51 +0000 (14:00 +0000)]
Add a basic testcase for the "variable is not needed" warning and one that
regressed in r168519.

llvm-svn: 168563

11 years agoFix test case for linking with sanitizer opts added in r168428.
Alexey Samsonov [Sun, 25 Nov 2012 13:40:21 +0000 (13:40 +0000)]
Fix test case for linking with sanitizer opts added in r168428.

llvm-svn: 168562

11 years agoMove semantics are great, don't destroy the optimization opportunity with trivial...
Benjamin Kramer [Sun, 25 Nov 2012 11:52:03 +0000 (11:52 +0000)]
Move semantics are great, don't destroy the optimization opportunity with trivial copy ctors.

No functionality change.

llvm-svn: 168561

11 years agoRename method. No functionality change.
Nadav Rotem [Sun, 25 Nov 2012 09:13:57 +0000 (09:13 +0000)]
Rename method. No functionality change.

llvm-svn: 168560

11 years agoThe induction-pointer work is inspired by a research paper. This commit adds a reference.
Nadav Rotem [Sun, 25 Nov 2012 09:09:26 +0000 (09:09 +0000)]
The induction-pointer work is inspired by a research paper. This commit adds a reference.

llvm-svn: 168559

11 years agoAdd support for pointer induction variables even when there is no integer induction...
Nadav Rotem [Sun, 25 Nov 2012 08:41:35 +0000 (08:41 +0000)]
Add support for pointer induction variables even when there is no integer induction variable.

llvm-svn: 168558

11 years agoRefactor to make helper method static.
Craig Topper [Sun, 25 Nov 2012 08:08:58 +0000 (08:08 +0000)]
Refactor to make helper method static.

llvm-svn: 168557

11 years agoFurther cleanups. Thanks for Sean Silva for noticing it.
Rafael Espindola [Sun, 25 Nov 2012 02:50:32 +0000 (02:50 +0000)]
Further cleanups. Thanks for Sean Silva for noticing it.

llvm-svn: 168556

11 years agoAdd an extra slash so doxygen comments will be properly recognized.
Craig Topper [Sun, 25 Nov 2012 00:59:59 +0000 (00:59 +0000)]
Add an extra slash so doxygen comments will be properly recognized.

llvm-svn: 168554

11 years agoRemove duplicate check of LimitFloatPrecision. It was already checked earlier before...
Craig Topper [Sun, 25 Nov 2012 00:48:58 +0000 (00:48 +0000)]
Remove duplicate check of LimitFloatPrecision. It was already checked earlier before IsExp10 could be set to true.

llvm-svn: 168553

11 years agoFactor common code out of individual if blocks into common tail.
Craig Topper [Sun, 25 Nov 2012 00:15:07 +0000 (00:15 +0000)]
Factor common code out of individual if blocks into common tail.

llvm-svn: 168551

11 years agoRevert r168519, "Merge used flags so that we don't have to iterate on isUsed. With...
NAKAMURA Takumi [Sat, 24 Nov 2012 23:17:09 +0000 (23:17 +0000)]
Revert r168519, "Merge used flags so that we don't have to iterate on isUsed. With this change"

It brought bunch of (possibly false) warnings.

llvm/unittests/VMCore/PassManagerTest.cpp:60:22: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    char ModuleNDNM::ID=0;
                     ^
llvm/unittests/VMCore/PassManagerTest.cpp:86:22: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    char ModuleNDM2::ID=0;
                     ^
llvm/unittests/VMCore/PassManagerTest.cpp:106:21: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    char ModuleDNM::ID=0;
                    ^
llvm/unittests/VMCore/PassManagerTest.cpp:217:16: warning: variable 'initcount' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    int LPass::initcount=0;
               ^
llvm/unittests/VMCore/PassManagerTest.cpp:218:16: warning: variable 'fincount' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    int LPass::fincount=0;
               ^
llvm/unittests/VMCore/PassManagerTest.cpp:259:16: warning: variable 'inited' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    int BPass::inited=0;
               ^
llvm/unittests/VMCore/PassManagerTest.cpp:260:16: warning: variable 'fin' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    int BPass::fin=0;
               ^
llvm/unittests/VMCore/PassManagerTest.cpp:283:24: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    char OnTheFlyTest::ID=0;
                       ^
8 warnings generated.

llvm-svn: 168549

11 years agoRemove redundant calls to getCurDebugLoc in visitIntrinsicCall. It's already called...
Craig Topper [Sat, 24 Nov 2012 23:05:23 +0000 (23:05 +0000)]
Remove redundant calls to getCurDebugLoc in visitIntrinsicCall. It's already called at the start of the function and captured in a local variable.

llvm-svn: 168548

11 years agoRefactor a bit to make some helper methods static.
Craig Topper [Sat, 24 Nov 2012 18:52:06 +0000 (18:52 +0000)]
Refactor a bit to make some helper methods static.

llvm-svn: 168546