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

11 years agolibLTO: Add a utility method to initialize the disassemblers.
Benjamin Kramer [Sat, 24 Nov 2012 16:59:10 +0000 (16:59 +0000)]
libLTO: Add a utility method to initialize the disassemblers.

Necessary to give disassembler users (like darwin's otool) a possibility to
dlopen libLTO and still initialize the required LLVM bits. This used to go
through libMCDisassembler but that's a gross layering violation, the MC layer
can't pull in functions from the targets. Adding a function to libLTO is a bit
of a hack but not worse than exposing other disassembler bits from libLTO.

Fixes PR14362.

llvm-svn: 168545

11 years agoPPC: Reinstate the fatal error when trying to emit a macho file.
Benjamin Kramer [Sat, 24 Nov 2012 15:23:49 +0000 (15:23 +0000)]
PPC: Reinstate the fatal error when trying to emit a macho file.

llvm-svn: 168543

11 years agoARM: Share applyFixup between ELF and Darwin.
Benjamin Kramer [Sat, 24 Nov 2012 14:36:43 +0000 (14:36 +0000)]
ARM: Share applyFixup between ELF and Darwin.

The implementations already diverged a bit, merge them back together.

llvm-svn: 168542

11 years agoPPC: MCize most of the darwin PIC emission.
Benjamin Kramer [Sat, 24 Nov 2012 13:18:25 +0000 (13:18 +0000)]
PPC: MCize most of the darwin PIC emission.

The last remaining bit is "bcl 20, 31, AnonSymbol", which I couldn't find the
instruction definition for. Only whitespace changes in assembly output.

llvm-svn: 168541

11 years agoPPC: Share applyFixup between ELF and Darwin.
Benjamin Kramer [Sat, 24 Nov 2012 13:18:17 +0000 (13:18 +0000)]
PPC: Share applyFixup between ELF and Darwin.

llvm-svn: 168540

11 years agoPPC: Simplify code with Twines.
Benjamin Kramer [Sat, 24 Nov 2012 13:18:11 +0000 (13:18 +0000)]
PPC: Simplify code with Twines.

No functionality change.

llvm-svn: 168539

11 years agoFactor some common code out of individual if blocks.
Craig Topper [Sat, 24 Nov 2012 08:22:37 +0000 (08:22 +0000)]
Factor some common code out of individual if blocks.

llvm-svn: 168538

11 years ago[asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This...
Kostya Serebryany [Sat, 24 Nov 2012 05:03:11 +0000 (05:03 +0000)]
[asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This makes the code friendly to more platforms

llvm-svn: 168537

11 years agoChange the representation of MCCFIInstruction.
Rafael Espindola [Sat, 24 Nov 2012 04:33:48 +0000 (04:33 +0000)]
Change the representation of MCCFIInstruction.

We now store the Register and Offset directly. MachineLocation is gone (from
this file)!

llvm-svn: 168536

11 years agoMake err_module_expected_semi consistent with all the other expected_semi diags.
Nico Weber [Sat, 24 Nov 2012 03:20:20 +0000 (03:20 +0000)]
Make err_module_expected_semi consistent with all the other expected_semi diags.

llvm-svn: 168535

11 years agoGive each MCCFIInstruction its own opcode.
Rafael Espindola [Sat, 24 Nov 2012 03:10:54 +0000 (03:10 +0000)]
Give each MCCFIInstruction its own opcode.
This untangles the switch cases of the old Move and RelMove opcodes a bit
and makes it clear how to add new instructions.

llvm-svn: 168534

11 years agoMove a bit of duplicated code into a helper function.
Rafael Espindola [Sat, 24 Nov 2012 02:18:49 +0000 (02:18 +0000)]
Move a bit of duplicated code into a helper function.

llvm-svn: 168533

11 years agoRefactor how MCCFIInstructions are created.
Rafael Espindola [Sat, 24 Nov 2012 02:01:08 +0000 (02:01 +0000)]
Refactor how MCCFIInstructions are created.

Give MCCFIInstruction a single, private constructor and add helper static
methods that create each type of cfi instruction. This is is preparation
for changing its representation. The representation with a pair
MachineLocations older than MC and has been abused quiet a bit to support
more cfi instructions.

llvm-svn: 168532

11 years agoSkip objC test on non-darwin platforms
Daniel Malea [Fri, 23 Nov 2012 22:15:09 +0000 (22:15 +0000)]
Skip objC test on non-darwin platforms

llvm-svn: 168531

11 years agoRemove decorator to skip event tests
Daniel Malea [Fri, 23 Nov 2012 22:10:20 +0000 (22:10 +0000)]
Remove decorator to skip event tests
- hang resolved in r168503

llvm-svn: 168530

11 years agoUpdate test status on Linux
Daniel Malea [Fri, 23 Nov 2012 21:59:29 +0000 (21:59 +0000)]
Update test status on Linux
- add decorators @expectedFailLinux and @skipOnLinux
- skip/mark xfail cases due to open bugzillas # 14323, 14416, 14423, 14424, 14425, 14426

Patch by Ashok Thirumurthi!

llvm-svn: 168529

11 years agoCodeGenPrepare: Move ret duplication out of the instruction iteration loop.
Benjamin Kramer [Fri, 23 Nov 2012 19:17:06 +0000 (19:17 +0000)]
CodeGenPrepare: Move ret duplication out of the instruction iteration loop.

It can delete the block, and the loop continues on free'd memory.
No change in output. Found by valgrind.

llvm-svn: 168525

11 years agoRefactor a bit to make some helper functions static.
Craig Topper [Fri, 23 Nov 2012 18:38:31 +0000 (18:38 +0000)]
Refactor a bit to make some helper functions static.

llvm-svn: 168524

11 years agoFix Linux bug that leaves lldb in invalid state after expression evaluation times...
Daniel Malea [Fri, 23 Nov 2012 18:09:58 +0000 (18:09 +0000)]
Fix Linux bug that leaves lldb in invalid state after expression evaluation times out.
- Handle EINVAL return code from ptrace(GETSIGINFO, ...): not an error, but 'group-stop' state on Linux
- propagate SIGSTOP to inferior in above case
- this commit resolves the failure in expression_command/timeout testcase

Thanks to Sean Callanan & Matt Kopec for helping debug this problem

llvm-svn: 168523

11 years agoAdd a -disable-cfi option to llvm-mc. This is useful for debugging as
Rafael Espindola [Fri, 23 Nov 2012 17:37:34 +0000 (17:37 +0000)]
Add a -disable-cfi option to llvm-mc. This is useful for debugging as
it will expand any .cfi_* directives in the input assembly.

Unfortunately this cannot replace elf-dump in tests as the asm streamer
cannot relax the line advance opcodes.

llvm-svn: 168522

11 years agoSema: Provide a valid source location when instantiating templates based on a CXXDefa...
Benjamin Kramer [Fri, 23 Nov 2012 17:04:52 +0000 (17:04 +0000)]
Sema: Provide a valid source location when instantiating templates based on a CXXDefaultArgExpr.

Fixes PR13758.

llvm-svn: 168521

11 years agoImplement .cfi_undefined. Based on a patch from PaX team, updated by
Rafael Espindola [Fri, 23 Nov 2012 16:59:41 +0000 (16:59 +0000)]
Implement .cfi_undefined. Based on a patch from PaX team, updated by
Roman Divacky. I just added the testcase.

llvm-svn: 168520

11 years agoMerge used flags so that we don't have to iterate on isUsed. With this change
Rafael Espindola [Fri, 23 Nov 2012 16:26:30 +0000 (16:26 +0000)]
Merge used flags so that we don't have to iterate on isUsed. With this change
"clang -cc1 -fsyntax-only" on the preprocessed output of

#define M extern int a;
#define M2 M M
#define M4 M2 M2
#define M8 M4 M4
#define M16 M8 M8
#define M32 M16 M16
#define M64 M32 M32
#define M128 M64 M64
#define M256 M128 M128
#define M512 M256 M256
#define M1024 M512 M512
#define M2048 M1024 M1024
#define M4096 M2048 M2048
#define M8192 M4096 M4096
#define M16384 M8192 M8192
M16384

goes from 2.994s to 1.416s. GCC is at 0.022s, so we still have a long way to go.

llvm-svn: 168519

11 years agotsan: add failure memory order to atomic compare exchange functions
Dmitry Vyukov [Fri, 23 Nov 2012 15:51:45 +0000 (15:51 +0000)]
tsan: add failure memory order to atomic compare exchange functions

llvm-svn: 168518

11 years ago[asan] get rid of some of the uses of kPageSize. The intent is to get rid of it compl...
Kostya Serebryany [Fri, 23 Nov 2012 15:38:49 +0000 (15:38 +0000)]
[asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.

llvm-svn: 168517

11 years agoDisallow the undocumented practice of starting the datalayout string with '-'.
Patrik Hägglund [Fri, 23 Nov 2012 14:51:42 +0000 (14:51 +0000)]
Disallow the undocumented practice of starting the datalayout string with '-'.

Update some test cases accordingly.

llvm-svn: 168516

11 years agoRemove redundant check.
Rafael Espindola [Fri, 23 Nov 2012 14:29:54 +0000 (14:29 +0000)]
Remove redundant check.

llvm-svn: 168515

11 years agoCheck that we don't warn on this testcase. This is basically a test that
Rafael Espindola [Fri, 23 Nov 2012 13:54:40 +0000 (13:54 +0000)]
Check that we don't warn on this testcase. This is basically a test that
Decl::isUsed checks the attribute. If the function had a body just the check
is DeclMustBeEmitted would be sufficient.

llvm-svn: 168514

11 years ago[ASan] move swapcontext_test to Linux-specific tests
Alexey Samsonov [Fri, 23 Nov 2012 11:20:54 +0000 (11:20 +0000)]
[ASan] move swapcontext_test to Linux-specific tests

llvm-svn: 168513

11 years agoUpdate call to the new syntax.
Bill Wendling [Fri, 23 Nov 2012 11:05:35 +0000 (11:05 +0000)]
Update call to the new syntax.

llvm-svn: 168512

11 years agoRemove unused parameter Penalty from the BoundsChecking pass.
Joey Gouly [Fri, 23 Nov 2012 10:47:35 +0000 (10:47 +0000)]
Remove unused parameter Penalty from the BoundsChecking pass.

llvm-svn: 168511

11 years agoPR14306: Move -fbounds-checking to -fsanitize=bounds.
Joey Gouly [Fri, 23 Nov 2012 10:39:49 +0000 (10:39 +0000)]
PR14306: Move -fbounds-checking to -fsanitize=bounds.

llvm-svn: 168510

11 years ago[ASan] intercept swapcontext on Linux only
Alexey Samsonov [Fri, 23 Nov 2012 10:14:44 +0000 (10:14 +0000)]
[ASan] intercept swapcontext on Linux only

llvm-svn: 168509

11 years ago[ASan] Add interceptor for swapcontext to fight with false positives in some of its...
Alexey Samsonov [Fri, 23 Nov 2012 09:46:34 +0000 (09:46 +0000)]
[ASan] Add interceptor for swapcontext to fight with false positives in some of its use cases.

llvm-svn: 168508

11 years agoCleanup: Simplify loop end logic in computeRegisterProperties().
Patrik Hägglund [Fri, 23 Nov 2012 08:35:04 +0000 (08:35 +0000)]
Cleanup: Simplify loop end logic in computeRegisterProperties().

llvm-svn: 168507

11 years agotsan: ensure than func entry/exit are inlined
Dmitry Vyukov [Fri, 23 Nov 2012 07:14:11 +0000 (07:14 +0000)]
tsan: ensure than func entry/exit are inlined

llvm-svn: 168506

11 years agoReapply a subset of r167567 to clean up Darwin-specific code for invoking gcc.
Bob Wilson [Fri, 23 Nov 2012 06:14:39 +0000 (06:14 +0000)]
Reapply a subset of r167567 to clean up Darwin-specific code for invoking gcc.

Unlike my previous attempt at this, this patch leaves intact the check for
whether clang can handle the input file type, and for non-Darwin toolchains it
will invoke gcc for things it cannot handle. For Darwin toolchains, the
behavior reported in pr14338 still occurs with this patch, but that is a
definite improvement from what happens currently, where it just crashes with
an assertion failure.

llvm-svn: 168505

11 years agoAdded me as the owner of the Sparc backend
Venkatraman Govindaraju [Thu, 22 Nov 2012 22:14:48 +0000 (22:14 +0000)]
Added me as the owner of the Sparc backend

llvm-svn: 168504

11 years agoRemove call to StopMonitor() from ProcessMonitor::Detach()
Daniel Malea [Thu, 22 Nov 2012 18:21:05 +0000 (18:21 +0000)]
Remove call to StopMonitor() from ProcessMonitor::Detach()
- StopMonitor() is called anyways from ProcessMonitor destructor later
- resolves hang in TestEvents.py

Patch by Matt Kopec!

llvm-svn: 168503

11 years agoMark me as the owner of the gold plugin.
Rafael Espindola [Thu, 22 Nov 2012 16:43:44 +0000 (16:43 +0000)]
Mark me as the owner of the gold plugin.

llvm-svn: 168502

11 years agoAdd more functions to the target library information.
Meador Inge [Thu, 22 Nov 2012 15:36:42 +0000 (15:36 +0000)]
Add more functions to the target library information.

I discovered a few more missing functions while migrating optimizations
from the simplify-libcalls pass to the instcombine (I already added some
in r167659).

llvm-svn: 168501

11 years agoMake helpers static/anonymous.
Benjamin Kramer [Thu, 22 Nov 2012 15:02:44 +0000 (15:02 +0000)]
Make helpers static/anonymous.

llvm-svn: 168500

11 years agollvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp: Prune AddressSanitizerCreat...
NAKAMURA Takumi [Thu, 22 Nov 2012 14:18:25 +0000 (14:18 +0000)]
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp: Prune AddressSanitizerCreateGlobalRedzonesPass::ID. [-Wunused-variable]

llvm-svn: 168499

11 years agoFix 80-col violation
Eli Bendersky [Thu, 22 Nov 2012 14:10:40 +0000 (14:10 +0000)]
Fix 80-col violation

llvm-svn: 168498

11 years agotsan: fix more bugs in signal handling
Dmitry Vyukov [Thu, 22 Nov 2012 13:53:54 +0000 (13:53 +0000)]
tsan: fix more bugs in signal handling

llvm-svn: 168497

11 years agotsan: add missing \n in report
Dmitry Vyukov [Thu, 22 Nov 2012 13:38:28 +0000 (13:38 +0000)]
tsan: add missing \n in report

llvm-svn: 168496

11 years agoIntelJITEventsWrapper.h: Prune two members, FinalizeThreadFunc and FinalizeProcessFun...
NAKAMURA Takumi [Thu, 22 Nov 2012 13:18:37 +0000 (13:18 +0000)]
IntelJITEventsWrapper.h: Prune two members, FinalizeThreadFunc and FinalizeProcessFunc, for now. [-Wunused-private-field]

llvm-svn: 168495

11 years agoDocumentation: convert SourceLevelDebugging.html to reST
Dmitri Gribenko [Thu, 22 Nov 2012 11:56:02 +0000 (11:56 +0000)]
Documentation: convert SourceLevelDebugging.html to reST

llvm-svn: 168493

11 years agoRemove 'sretpromotion' pass from the documentation. This pass is long
Chandler Carruth [Thu, 22 Nov 2012 11:17:08 +0000 (11:17 +0000)]
Remove 'sretpromotion' pass from the documentation. This pass is long
dead.

Patch by Stephan Falke.

llvm-svn: 168492