platform/upstream/llvm.git
11 years agoRefactor file/directory path in namespace debug info to refer directly to the pair...
David Blaikie [Wed, 20 Mar 2013 19:39:15 +0000 (19:39 +0000)]
Refactor file/directory path in namespace debug info to refer directly to the pair rather than the DIFile

(paired to a Clang test - excuse the buildbot skew/fallout)

llvm-svn: 177566

11 years agorefactoring file/directory for namespace debug info
David Blaikie [Wed, 20 Mar 2013 19:38:29 +0000 (19:38 +0000)]
refactoring file/directory for namespace debug info

(this is a paired commit with an LLVM change to DIBuilder - expect some
buildbot skew/fallout)

llvm-svn: 177565

11 years ago[ELF][Reader] Add debug message to print all inputs the linker actually read.
Michael J. Spencer [Wed, 20 Mar 2013 19:26:10 +0000 (19:26 +0000)]
[ELF][Reader] Add debug message to print all inputs the linker actually read.

llvm-svn: 177564

11 years ago[ELF][Reader][Perf] Only do loookup once.
Michael J. Spencer [Wed, 20 Mar 2013 19:25:58 +0000 (19:25 +0000)]
[ELF][Reader][Perf] Only do loookup once.

llvm-svn: 177563

11 years ago[ELF][Reader] Refactor how relocations are read. Improves performance.
Michael J. Spencer [Wed, 20 Mar 2013 19:25:47 +0000 (19:25 +0000)]
[ELF][Reader] Refactor how relocations are read. Improves performance.

This changes from reading each relocation individually for each section to just
storing the range of relocations. It also counts the relocations to preallocate
the _references array.

llvm-svn: 177562

11 years ago[ELF][Reader] Remove static ordinal.
Michael J. Spencer [Wed, 20 Mar 2013 19:25:34 +0000 (19:25 +0000)]
[ELF][Reader] Remove static ordinal.

llvm-svn: 177561

11 years agoEnhance debug info namespace test to check for context/scope reference
David Blaikie [Wed, 20 Mar 2013 19:14:16 +0000 (19:14 +0000)]
Enhance debug info namespace test to check for context/scope reference

The differing file (due to the #line directive in the original source) is for
future testing improvements coming soon.

llvm-svn: 177560

11 years agoEnhance debug info namespace test to check for context/scope reference
David Blaikie [Wed, 20 Mar 2013 19:10:57 +0000 (19:10 +0000)]
Enhance debug info namespace test to check for context/scope reference

The #line directive is mostly for backend testing (keeping these files matching
should simplify maintenance somewhat) though the corresponding backend test
improvement/update doesn't verify the file information directly just yet.
Coming in a later iteration.

llvm-svn: 177559

11 years agoCleanup to the ObjC runtime to remove the now useless ClassDescriptor_Invalid
Enrico Granata [Wed, 20 Mar 2013 19:04:28 +0000 (19:04 +0000)]
Cleanup to the ObjC runtime to remove the now useless ClassDescriptor_Invalid

llvm-svn: 177558

11 years agomemcpy instead of copy_n. Faster than copy_n on MSVC :(.
Michael J. Spencer [Wed, 20 Mar 2013 18:58:07 +0000 (18:58 +0000)]
memcpy instead of copy_n. Faster than copy_n on MSVC :(.

llvm-svn: 177557

11 years agoDevirtualize Reference::kind.
Michael J. Spencer [Wed, 20 Mar 2013 18:57:52 +0000 (18:57 +0000)]
Devirtualize Reference::kind.

Improves performance.

llvm-svn: 177556

11 years agoDevirtualize File::kind.
Michael J. Spencer [Wed, 20 Mar 2013 18:57:27 +0000 (18:57 +0000)]
Devirtualize File::kind.

This is the standard way of implementing LLVM RTTI.

llvm-svn: 177555

11 years agoSet ordinals correctly.
Michael J. Spencer [Wed, 20 Mar 2013 18:56:57 +0000 (18:56 +0000)]
Set ordinals correctly.

This actually doesn't change behavior with the current LinkerInvocation, but
it's needed when you make reading parallel.

llvm-svn: 177554

11 years agoDo the error recovery for @end only.
Fariborz Jahanian [Wed, 20 Mar 2013 18:45:49 +0000 (18:45 +0000)]
Do the error recovery for @end only.
I am not sure how much we can improve for
when a randon ObjC keyword is thrown into the
ivar decl. block. // rdar://6854840

llvm-svn: 177553

11 years ago[docs] Point inquisitive users to existing module.map files.
Sean Silva [Wed, 20 Mar 2013 18:37:47 +0000 (18:37 +0000)]
[docs] Point inquisitive users to existing module.map files.

llvm-svn: 177552

11 years ago[docs] Prominently note that modules are expemental.
Sean Silva [Wed, 20 Mar 2013 18:37:42 +0000 (18:37 +0000)]
[docs] Prominently note that modules are expemental.

And ask for people to try it out and send us bug reports!

llvm-svn: 177551

11 years agoRemove blank line before block comment.
Eric Christopher [Wed, 20 Mar 2013 18:25:12 +0000 (18:25 +0000)]
Remove blank line before block comment.

llvm-svn: 177550

11 years agoObjective-C [qoi] more gracefull recovery when
Fariborz Jahanian [Wed, 20 Mar 2013 18:09:33 +0000 (18:09 +0000)]
Objective-C [qoi] more gracefull recovery when
'}' is missing for the ivar declarations.
// rdar://6854840

llvm-svn: 177549

11 years agoRemove dependence on canonical induction variable
Tobias Grosser [Wed, 20 Mar 2013 18:03:18 +0000 (18:03 +0000)]
Remove dependence on canonical induction variable

When using the scev based code generation, we now do not rely on the presence
of a canonical induction variable any more. This commit prepares the path to
(conditionally) disable the induction variable canonicalization pass.

llvm-svn: 177548

11 years agoDIBuilder: allow linkage name to be specified for global variables
David Blaikie [Wed, 20 Mar 2013 17:49:48 +0000 (17:49 +0000)]
DIBuilder: allow linkage name to be specified for global variables

Patch by Kai Nacke (kai@redstar.de)

llvm-svn: 177547

11 years agoPR7256: Provide a fixit for incorrect destructor declarations
David Blaikie [Wed, 20 Mar 2013 17:42:13 +0000 (17:42 +0000)]
PR7256: Provide a fixit for incorrect destructor declarations

Fix by Ismail Pazarbasi (ismail.pazarbasi@gmail.com), review by Dmitri Gribenko.

llvm-svn: 177546

11 years agoMake target-specific test case in r177474 only run when that target is built
David Blaikie [Wed, 20 Mar 2013 17:39:02 +0000 (17:39 +0000)]
Make target-specific test case in r177474 only run when that target is built

llvm-svn: 177545

11 years agoFix typo and grammaro in modules documentation
Douglas Gregor [Wed, 20 Mar 2013 17:11:13 +0000 (17:11 +0000)]
Fix typo and grammaro in modules documentation

llvm-svn: 177544

11 years agoAdd timing of the IR parsing code with a new -time-ir-parsing flag
Eli Bendersky [Wed, 20 Mar 2013 17:00:25 +0000 (17:00 +0000)]
Add timing of the IR parsing code with a new -time-ir-parsing flag

llvm-svn: 177543

11 years agoOnly introduce the SDKSettings.plist dependency in modules/PCH files that don't depen...
Douglas Gregor [Wed, 20 Mar 2013 16:59:53 +0000 (16:59 +0000)]
Only introduce the SDKSettings.plist dependency in modules/PCH files that don't depend on any other modules or PCH files.

llvm-svn: 177542

11 years agoExploit this-return of a callsite in a this-return function.
Manman Ren [Wed, 20 Mar 2013 16:59:38 +0000 (16:59 +0000)]
Exploit this-return of a callsite in a this-return function.

For constructors/desctructors that return 'this', if there exists a callsite
that returns 'this' and is immediately before the return instruction, make
sure we are using the return value from the callsite.

We don't need to keep 'this' alive through the callsite. It also enables
optimizations in the backend, such as tail call optimization.

Updated from r177211.
rdar://12818789

llvm-svn: 177541

11 years agoAdd some missing SSE annotations.
Jakob Stoklund Olesen [Wed, 20 Mar 2013 16:56:39 +0000 (16:56 +0000)]
Add some missing SSE annotations.

llvm-svn: 177540

11 years agoAnnotate remaining IIC_BIN_* instructions.
Jakob Stoklund Olesen [Wed, 20 Mar 2013 16:56:36 +0000 (16:56 +0000)]
Annotate remaining IIC_BIN_* instructions.

llvm-svn: 177539

11 years agoSupport for pointers-to-members usage via .*
Alexander Kornienko [Wed, 20 Mar 2013 16:41:56 +0000 (16:41 +0000)]
Support for pointers-to-members usage via .*

Summary: Added support for pointers-to-members usage via .* and a few tests.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D556

llvm-svn: 177537

11 years agoRemove assertion that can be triggered on bad input.
Daniel Jasper [Wed, 20 Mar 2013 15:58:10 +0000 (15:58 +0000)]
Remove assertion that can be triggered on bad input.

clang-format can't do anything useful, so it should leave the remainder
of the line unchanged, but it should not assert/segfault.

llvm-svn: 177530

11 years agoRevert "pre-RA-sched: fix TargetOpcode usage"
Christian Konig [Wed, 20 Mar 2013 15:43:00 +0000 (15:43 +0000)]
Revert "pre-RA-sched: fix TargetOpcode usage"

This reverts commit 06091513c283c863296f01cc7c2e86b56bb50d02.

The code is obviously wrong, but the trivial fix causes
inefficient code generation on X86. Somebody with more
knowledge of the code needs to take a look here.

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 177529

11 years agoRemove unnecessary explicit typing in std::make_pair
Andy Gibbs [Wed, 20 Mar 2013 15:42:59 +0000 (15:42 +0000)]
Remove unnecessary explicit typing in std::make_pair

llvm-svn: 177528

11 years agoFix infinite-loop in unwrapped line parser.
Daniel Jasper [Wed, 20 Mar 2013 15:12:38 +0000 (15:12 +0000)]
Fix infinite-loop in unwrapped line parser.

Discovered when accidentally formatting a python file :-).

llvm-svn: 177527

11 years agotsan: correct sizes of signal-related data structures
Dmitry Vyukov [Wed, 20 Mar 2013 14:57:28 +0000 (14:57 +0000)]
tsan: correct sizes of signal-related data structures

llvm-svn: 177526

11 years agoMove SDNode order propagation to SDNodeOrdering, which also fixes a missed
Justin Holewinski [Wed, 20 Mar 2013 14:51:01 +0000 (14:51 +0000)]
Move SDNode order propagation to SDNodeOrdering, which also fixes a missed
case of order propagation during isel.

Thanks Owen for the suggestion!

llvm-svn: 177525

11 years agoDo not consider comments when adjusting to local indent style.
Daniel Jasper [Wed, 20 Mar 2013 14:31:47 +0000 (14:31 +0000)]
Do not consider comments when adjusting to local indent style.

Before (when only reformatting "int b"):
int a; // comment
       // comment
       int b;

After:
int a; // comment
       // comment
int b;

This also fixes llvm.org/PR15433.

llvm-svn: 177524

11 years agotsan: add missing stat descriptions
Dmitry Vyukov [Wed, 20 Mar 2013 14:04:23 +0000 (14:04 +0000)]
tsan: add missing stat descriptions

llvm-svn: 177523

11 years agotsan: call fflush(0) on exit again
Dmitry Vyukov [Wed, 20 Mar 2013 14:01:10 +0000 (14:01 +0000)]
tsan: call fflush(0) on exit again

llvm-svn: 177522

11 years agoReduce penalty for breaks after "(" for functions with parameters.
Daniel Jasper [Wed, 20 Mar 2013 13:53:11 +0000 (13:53 +0000)]
Reduce penalty for breaks after "(" for functions with parameters.

Before:
  aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
                    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
After:
  aaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

llvm-svn: 177521

11 years agotsan: reduce size of mutexsets from 64 to 16 mutexes
Dmitry Vyukov [Wed, 20 Mar 2013 13:50:47 +0000 (13:50 +0000)]
tsan: reduce size of mutexsets from 64 to 16 mutexes
overflow is handled anyway
saves memory because each thread holds 1024 mutexsets

llvm-svn: 177520

11 years agotsan: fix incorrect test
Dmitry Vyukov [Wed, 20 Mar 2013 13:49:45 +0000 (13:49 +0000)]
tsan: fix incorrect test

llvm-svn: 177519

11 years agopre-RA-sched: fix TargetOpcode usage
Christian Konig [Wed, 20 Mar 2013 13:49:22 +0000 (13:49 +0000)]
pre-RA-sched: fix TargetOpcode usage

TargetOpcodes need to be treaded as Machine- and not ISD-Opcodes.

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 177518

11 years agotsan: special handling of .rodata (don't try to find races, don't keep shadow, dont...
Dmitry Vyukov [Wed, 20 Mar 2013 13:21:50 +0000 (13:21 +0000)]
tsan: special handling of .rodata (don't try to find races, don't keep shadow, dont' put into traces)

llvm-svn: 177517

11 years agoAdd option -polly-code-generator=none
Tobias Grosser [Wed, 20 Mar 2013 13:03:26 +0000 (13:03 +0000)]
Add option -polly-code-generator=none

This allows us to test Polly and the Polly optimizer without actually doing
code generation at the end. By enabling this option, we can also measure the
compile time overhead due to code generation and the cost of LLVM optimizing the
newly generated code.t

llvm-svn: 177516

11 years agoSilence 'variable unused' warning in release mode
Tobias Grosser [Wed, 20 Mar 2013 13:03:25 +0000 (13:03 +0000)]
Silence 'variable unused' warning in release mode

llvm-svn: 177515

11 years agoAdd extra indentation for multiline comparisons.
Daniel Jasper [Wed, 20 Mar 2013 12:37:50 +0000 (12:37 +0000)]
Add extra indentation for multiline comparisons.

This seems to be generally more desired.

Before:
if (aaaaaaaa &&
    bbbbbbbb >
    cccccccc) {}
After:
if (aaaaaaaa &&
    bbbbbbbb >
        cccccccc) {}

Also: Some formatting cleanup on clang-format's files.
llvm-svn: 177514

11 years agotsan: fix build
Dmitry Vyukov [Wed, 20 Mar 2013 11:22:03 +0000 (11:22 +0000)]
tsan: fix build

llvm-svn: 177513

11 years agotsan: move trace header into 0x600000000000 range
Dmitry Vyukov [Wed, 20 Mar 2013 10:31:53 +0000 (10:31 +0000)]
tsan: move trace header into 0x600000000000 range
eliminat thread "dead info" altogether

llvm-svn: 177512

11 years agoUpdate source/DataFormatters/CMakeLists.txt to reflect actual source files.
Andy Gibbs [Wed, 20 Mar 2013 10:30:02 +0000 (10:30 +0000)]
Update source/DataFormatters/CMakeLists.txt to reflect actual source files.

llvm-svn: 177511

11 years agotsan: add internal_unlink() function
Dmitry Vyukov [Wed, 20 Mar 2013 10:28:36 +0000 (10:28 +0000)]
tsan: add internal_unlink() function

llvm-svn: 177510

11 years agoDon't remove all indentation when in #defines.
Daniel Jasper [Wed, 20 Mar 2013 10:23:53 +0000 (10:23 +0000)]
Don't remove all indentation when in #defines.

Otherwise, this can become hard to read.

Before: #define A \
        case 1:
After:  #define A \
           case 1:
llvm-svn: 177509

11 years ago[ASan] Move malloc stats collection away from AsanThreadRegistry class.
Alexey Samsonov [Wed, 20 Mar 2013 10:11:24 +0000 (10:11 +0000)]
[ASan] Move malloc stats collection away from AsanThreadRegistry class.

llvm-svn: 177508

11 years agoFix Makefile.
Daniel Jasper [Wed, 20 Mar 2013 10:02:35 +0000 (10:02 +0000)]
Fix Makefile.

llvm-svn: 177507

11 years agoAdd clang-format binary to cfe.
Daniel Jasper [Wed, 20 Mar 2013 09:53:23 +0000 (09:53 +0000)]
Add clang-format binary to cfe.

llvm-svn: 177506

11 years agoImprove formatting of function types in template parameters.
Daniel Jasper [Wed, 20 Mar 2013 09:53:18 +0000 (09:53 +0000)]
Improve formatting of function types in template parameters.

Before: A<int * (int)>;
After:  A<int *(int)>;
llvm-svn: 177505

11 years agoRemove clang-format from clang-tools-extra.
Daniel Jasper [Wed, 20 Mar 2013 09:52:50 +0000 (09:52 +0000)]
Remove clang-format from clang-tools-extra.

llvm-svn: 177504

11 years agoUpdate source/Expression/CMakeLists.txt to reflect actual source files.
Andy Gibbs [Wed, 20 Mar 2013 09:34:46 +0000 (09:34 +0000)]
Update source/Expression/CMakeLists.txt to reflect actual source files.

llvm-svn: 177503

11 years agoasan/tsan: reduce per-thread memory allocator caches
Dmitry Vyukov [Wed, 20 Mar 2013 09:26:46 +0000 (09:26 +0000)]
asan/tsan: reduce per-thread memory allocator caches
256 blocks (which is 512 in reallity) seems to be too big cache,
reducing the size reduces memory consumption but does not degrade performance.

llvm-svn: 177502

11 years ago[ASan] Move GetCurrentThread/SetCurrentThread from AsanThreadRegistry class into...
Alexey Samsonov [Wed, 20 Mar 2013 09:23:28 +0000 (09:23 +0000)]
[ASan] Move GetCurrentThread/SetCurrentThread from AsanThreadRegistry class into plain functions: they don't actually use registry

llvm-svn: 177501

11 years agotsan: fix flaky test
Dmitry Vyukov [Wed, 20 Mar 2013 09:22:13 +0000 (09:22 +0000)]
tsan: fix flaky test

llvm-svn: 177500

11 years agotsan: fix incorrect test
Dmitry Vyukov [Wed, 20 Mar 2013 09:21:49 +0000 (09:21 +0000)]
tsan: fix incorrect test

llvm-svn: 177499

11 years agoFix a silly search-and-replace goof with r177495 that only broke
Chandler Carruth [Wed, 20 Mar 2013 07:40:56 +0000 (07:40 +0000)]
Fix a silly search-and-replace goof with r177495 that only broke
non-release builds.

llvm-svn: 177498

11 years ago[sanitizer] Enable prctl interceptor on Android.
Evgeniy Stepanov [Wed, 20 Mar 2013 07:35:52 +0000 (07:35 +0000)]
[sanitizer] Enable prctl interceptor on Android.

llvm-svn: 177497

11 years agoFix redundant comparison in gcc::Common::ConstructJob.
Hans Wennborg [Wed, 20 Mar 2013 07:34:27 +0000 (07:34 +0000)]
Fix redundant comparison in gcc::Common::ConstructJob.

We were checking "Arch == llvm::Triple::x86_64 || Arch
== llvm::Triple::x86_64", but the rhs should actually check for
powerpc64.

Found while experimenting with a potential new Clang warning.

llvm-svn: 177496

11 years ago[SROA] Don't preserve the IR names in release builds.
Chandler Carruth [Wed, 20 Mar 2013 07:30:36 +0000 (07:30 +0000)]
[SROA] Don't preserve the IR names in release builds.

This is espcially important because the new SROA pass goes to great
lengths to provide helpful names for debugging, and as a consequence
they can become very slow to render.

Good for between 5% and 15% of the SROA runtime on some slow test cases
such as the one in PR15412.

llvm-svn: 177495

11 years agoMove the endif to the correct line so we don't have warnings about
Chandler Carruth [Wed, 20 Mar 2013 06:47:00 +0000 (06:47 +0000)]
Move the endif to the correct line so we don't have warnings about
unused statistics variables.

llvm-svn: 177494

11 years agoIntroduce some new statistics to help track the exact behavior of the
Chandler Carruth [Wed, 20 Mar 2013 06:30:46 +0000 (06:30 +0000)]
Introduce some new statistics to help track the exact behavior of the
new SROA pass.

llvm-svn: 177493

11 years agoReorder the DIFile parameter in DINameSpace
David Blaikie [Wed, 20 Mar 2013 06:27:06 +0000 (06:27 +0000)]
Reorder the DIFile parameter in DINameSpace

Moving the DIFile parameter to immediately proceed the tag so that it will be a
common prefix with other DIScopes (once the DIFile is replaced with the raw
file/directory pair).

llvm-svn: 177492

11 years agoWork-in-progress documentation on the experimental modules feature.
Douglas Gregor [Wed, 20 Mar 2013 06:25:14 +0000 (06:25 +0000)]
Work-in-progress documentation on the experimental modules feature.

llvm-svn: 177491

11 years agoRemove some dead code.
John McCall [Wed, 20 Mar 2013 06:22:14 +0000 (06:22 +0000)]
Remove some dead code.

Patch by Stephen Lin!

llvm-svn: 177490

11 years agoAdd a test case for PR15318 fixed in r177472
Hao Liu [Wed, 20 Mar 2013 06:18:06 +0000 (06:18 +0000)]
Add a test case for PR15318 fixed in r177472

llvm-svn: 177489

11 years agoDon't assume the test directory is writable, use %T to find a writable
Nick Lewycky [Wed, 20 Mar 2013 05:59:40 +0000 (05:59 +0000)]
Don't assume the test directory is writable, use %T to find a writable
directory.

llvm-svn: 177488

11 years agoTest DW_TAG_namespace support in the backend
David Blaikie [Wed, 20 Mar 2013 05:15:37 +0000 (05:15 +0000)]
Test DW_TAG_namespace support in the backend

This is the backend portion of a Clang test case
(clang/test/CodeGenCXX/debug-info-namespace.cpp) that was roughly/coarsely
testing LLVM.

llvm-svn: 177487

11 years agoProvide more details for DINameSpace debug info in the IR comment annotations
David Blaikie [Wed, 20 Mar 2013 05:14:14 +0000 (05:14 +0000)]
Provide more details for DINameSpace debug info in the IR comment annotations

Sorry for the version skew - I should've committed this before the
corresponding Clang test case.

llvm-svn: 177486

11 years agoMake front-end debug info namespace test frontend-only & more specific without overco...
David Blaikie [Wed, 20 Mar 2013 05:12:06 +0000 (05:12 +0000)]
Make front-end debug info namespace test frontend-only & more specific without overconstraining it

The backend portion of this test will be committed to LLVM's test suite.

llvm-svn: 177485

11 years ago[ELF][Hexagon] Add Hexagon dynamic relocations
Shankar Easwaran [Wed, 20 Mar 2013 05:10:02 +0000 (05:10 +0000)]
[ELF][Hexagon] Add Hexagon dynamic relocations

llvm-svn: 177484

11 years ago[ELF] Interp section is only needed in dynamic executables
Shankar Easwaran [Wed, 20 Mar 2013 05:06:40 +0000 (05:06 +0000)]
[ELF] Interp section is only needed in dynamic executables

llvm-svn: 177483

11 years ago[ELF] Order .got.plt properly
Shankar Easwaran [Wed, 20 Mar 2013 04:52:08 +0000 (04:52 +0000)]
[ELF] Order .got.plt properly

llvm-svn: 177482

11 years agoMake sure that Module::ConfigMacrosExhaustive gets initialized and deserialized corre...
Douglas Gregor [Wed, 20 Mar 2013 03:59:18 +0000 (03:59 +0000)]
Make sure that Module::ConfigMacrosExhaustive gets initialized and deserialized correctly.

This fixes regressions introduced in r177466 that caused several
module tests to fail sporadically.

llvm-svn: 177481

11 years agoTeach statement / declaration disambiguation about C++11-style generalized initializers.
Richard Smith [Wed, 20 Mar 2013 03:35:02 +0000 (03:35 +0000)]
Teach statement / declaration disambiguation about C++11-style generalized initializers.

llvm-svn: 177480

11 years agoRemove the Tools DensMap from the toolchain.
Rafael Espindola [Wed, 20 Mar 2013 03:05:54 +0000 (03:05 +0000)]
Remove the Tools DensMap from the toolchain.

Each toolchain has a set of tools, but they are all of known types. It can
have a linker, an assembler, a "clang" (compile, analyze, ...) a non-clang
compiler, etc.

Instead of keeping a map, just have member variable for each type of tool.

llvm-svn: 177479

11 years agoFix PR15296
Michael Liao [Wed, 20 Mar 2013 02:33:21 +0000 (02:33 +0000)]
Fix PR15296

- Move SRA/SRL/SHL lowering support from DAG combination to DAG lowering
  to support extended 256-bit integer in AVX but not AVX2.

llvm-svn: 177478

11 years agoMark all variable shifts needing customizing
Michael Liao [Wed, 20 Mar 2013 02:28:20 +0000 (02:28 +0000)]
Mark all variable shifts needing customizing

- Prepare moving logic from DAG combining into DAG lowering. There's no
  functionality change.

llvm-svn: 177477

11 years agoMove scalar immediate shift lowering into a dedicated func
Michael Liao [Wed, 20 Mar 2013 02:20:36 +0000 (02:20 +0000)]
Move scalar immediate shift lowering into a dedicated func

- no functionality change

llvm-svn: 177476

11 years agoThe flag "-coverage-function-names-in-data" is actually backwards -- we do
Nick Lewycky [Wed, 20 Mar 2013 02:14:38 +0000 (02:14 +0000)]
The flag "-coverage-function-names-in-data" is actually backwards -- we do
emit function names in .gcda files by default, and the flag turns that off!
Rename the flag to make it match what it actually does. This keeps the default
format compatible with gcc 4.2.

Also add a test for this flag.

llvm-svn: 177475

11 years agoFix test case regression on ARM & PPC introduced r177239
David Blaikie [Wed, 20 Mar 2013 01:55:11 +0000 (01:55 +0000)]
Fix test case regression on ARM & PPC introduced r177239

llvm-svn: 177474

11 years agoDon't look outside the innermost enclosing namespace when
John McCall [Wed, 20 Mar 2013 01:53:00 +0000 (01:53 +0000)]
Don't look outside the innermost enclosing namespace when
performing unqualified lookup for a friend class declaration.

rdar://13393749

llvm-svn: 177473

11 years agoFix AsmPrinter crashes with assertion. Bug 15318 in Bugzilla
Hao Liu [Wed, 20 Mar 2013 01:46:36 +0000 (01:46 +0000)]
Fix AsmPrinter crashes with assertion. Bug 15318 in Bugzilla

llvm-svn: 177472

11 years ago[ms-cxxabi] Fix assertion on unhandled function template arg types
Reid Kleckner [Wed, 20 Mar 2013 01:40:23 +0000 (01:40 +0000)]
[ms-cxxabi] Fix assertion on unhandled function template arg types

This code was changed in r158376 to get template argument source info
for better diagnostics, but the current code asserts for any kind of
unsupported template argument before it can issue a diagnostic.  This change
goes back to the Itanium implementation of isTemplate() and puts the argument
index into the diagnostic instead of a source location.

Review URL: http://llvm-reviews.chandlerc.com/D553

llvm-svn: 177471

11 years agoMake clang emit linkage names in debug info for subprograms when coverage info
Nick Lewycky [Wed, 20 Mar 2013 01:38:16 +0000 (01:38 +0000)]
Make clang emit linkage names in debug info for subprograms when coverage info
is enabled. Also add a new -test-coverage cc1 flag which makes testing coverage
possible and add our first clang-side coverage test.

llvm-svn: 177470

11 years ago[analyzer] Re-apply "Do part of the work to find shortest bug paths up front".
Jordan Rose [Wed, 20 Mar 2013 00:35:37 +0000 (00:35 +0000)]
[analyzer] Re-apply "Do part of the work to find shortest bug paths up front".

With the assurance that the trimmed graph does not contain cycles,
this patch is safe (with a few tweaks), and provides the performance
boost it was intended to.

Part of performance work for <rdar://problem/13433687>.

llvm-svn: 177469

11 years ago[analyzer] Break cycles (optionally) when trimming an ExplodedGraph.
Jordan Rose [Wed, 20 Mar 2013 00:35:31 +0000 (00:35 +0000)]
[analyzer] Break cycles (optionally) when trimming an ExplodedGraph.

Having a trimmed graph with no cycles (a DAG) is much more convenient for
trying to find shortest paths, which is exactly what BugReporter needs to do.

Part of the performance work for <rdar://problem/13433687>.

llvm-svn: 177468

11 years agoRefactor the DIFile (2nd) parameter to DITypes to be an MDNode reference to a raw...
David Blaikie [Wed, 20 Mar 2013 00:26:26 +0000 (00:26 +0000)]
Refactor the DIFile (2nd) parameter to DITypes to be an MDNode reference to a raw directory/file pair

This makes DIType's first non-tag parameter the same as DIFile's, allowing them
to both share the common implementation of getFilename/getDirectory in DIScope.

llvm-svn: 177467

11 years ago<rdar://problem/10796651> Introduce configuration macros into module maps.
Douglas Gregor [Wed, 20 Mar 2013 00:22:05 +0000 (00:22 +0000)]
<rdar://problem/10796651> Introduce configuration macros into module maps.

Configuration macros are macros that are intended to alter how a
module works, such that we need to build different module variants
for different values of these macros. A module can declare its
configuration macros, in which case we will complain if the definition
of a configation macro on the command line (or lack thereof) differs
from the current preprocessor state at the point where the module is
imported. This should eliminate some surprises when enabling modules,
because "#define CONFIG_MACRO ..." followed by "#include
<module/header.h>" would silently ignore the CONFIG_MACRO setting. At
least it will no longer be silent about it.

Configuration macros are eventually intended to help reduce the number
of module variants that need to be built. When the list of
configuration macros for a module is exhaustive, we only need to
consider the settings for those macros when building/finding the
module, which can help isolate modules for various project-specific -D
flags that should never affect how modules are build (but currently do).

llvm-svn: 177466

11 years agoPropagate DAG node ordering during type legalization and instruction selection
Justin Holewinski [Wed, 20 Mar 2013 00:10:32 +0000 (00:10 +0000)]
Propagate DAG node ordering during type legalization and instruction selection

A node's ordering is only propagated during legalization if (a) the new node does
not have an ordering (is not a CSE'd node), or (b) the new node has an ordering
that is higher than the node being legalized.

llvm-svn: 177465

11 years agoFix bug in test; found by AddressSanitizer
Marshall Clow [Wed, 20 Mar 2013 00:01:48 +0000 (00:01 +0000)]
Fix bug in test; found by AddressSanitizer

llvm-svn: 177464

11 years agoFix pr13145 - Naming a function like a register name confuses the asm parser.
Chad Rosier [Tue, 19 Mar 2013 23:44:03 +0000 (23:44 +0000)]
Fix pr13145 - Naming a function like a register name confuses the asm parser.
Patch by Stepan Dyatkovskiy <stpworld@narod.ru>
rdar://13457826

llvm-svn: 177463

11 years agoMove the DIFile operand to DITypes from the 4th operand to the 2nd.
David Blaikie [Tue, 19 Mar 2013 23:25:22 +0000 (23:25 +0000)]
Move the DIFile operand to DITypes from the 4th operand to the 2nd.

This is another step along the way to making all DIScopes have a common prefix
which can be added to in a general manner to support using directives
(DW_TAG_imported_module).

llvm-svn: 177462

11 years agoAnnotate various null idioms with SchedRW lists.
Jakob Stoklund Olesen [Tue, 19 Mar 2013 23:23:31 +0000 (23:23 +0000)]
Annotate various null idioms with SchedRW lists.

llvm-svn: 177461

11 years agoAnnotate SSE float conversions with SchedRW lists.
Jakob Stoklund Olesen [Tue, 19 Mar 2013 23:23:29 +0000 (23:23 +0000)]
Annotate SSE float conversions with SchedRW lists.

llvm-svn: 177460