platform/upstream/llvm.git
12 years agoUpdate CREDITS.TXT
Howard Hinnant [Fri, 14 Sep 2012 23:28:54 +0000 (23:28 +0000)]
Update CREDITS.TXT

llvm-svn: 163949

12 years agoformatted_raw_ostream: Fix a serious bug in tell().
Daniel Dunbar [Fri, 14 Sep 2012 23:15:56 +0000 (23:15 +0000)]
formatted_raw_ostream: Fix a serious bug in tell().
 - The current_pos function is supposed to return all the written bytes, not the
   current position of the underlying stream.
 - This caused tell() to be broken whenever the underlying stream had buffered
   content.

llvm-svn: 163948

12 years agoSome small reorganization to get read for Attributes overhaul.
Bill Wendling [Fri, 14 Sep 2012 23:05:52 +0000 (23:05 +0000)]
Some small reorganization to get read for Attributes overhaul.

llvm-svn: 163947

12 years agoFixing a potential crasher where the new C++ synthetic children can return a NULL...
Enrico Granata [Fri, 14 Sep 2012 22:41:44 +0000 (22:41 +0000)]
Fixing a potential crasher where the new C++ synthetic children can return a NULL FrontEnd and cause LLDB to crash. This patch introduces a dummy front-end which the ValueObjectSynthetic can use lacking a real FrontEnd

llvm-svn: 163946

12 years agoRemove comment.
Bill Wendling [Fri, 14 Sep 2012 22:35:49 +0000 (22:35 +0000)]
Remove comment.

llvm-svn: 163945

12 years agoFix up erroneous alignas usage while making this portable to GCC 4.7
David Blaikie [Fri, 14 Sep 2012 22:26:11 +0000 (22:26 +0000)]
Fix up erroneous alignas usage while making this portable to GCC 4.7

Review by Chandler Carruth.

llvm-svn: 163944

12 years agoRemove a duplicate frame_sp local that was shadowing the one we copied the incoming...
Jim Ingham [Fri, 14 Sep 2012 22:16:10 +0000 (22:16 +0000)]
Remove a duplicate frame_sp local that was shadowing the one we copied the incoming SBFrame into.

<rdar://problem/12304255>

llvm-svn: 163943

12 years agoPGO: preserve branch-weight metadata when simplifying a switch with a single
Manman Ren [Fri, 14 Sep 2012 21:53:06 +0000 (21:53 +0000)]
PGO: preserve branch-weight metadata when simplifying a switch with a single
case to a conditional branch and when removing dead cases.

llvm-svn: 163942

12 years agocompiler-rt/darwin: Install asan_osx_dynamic with the other runtime libraries.
Daniel Dunbar [Fri, 14 Sep 2012 21:30:17 +0000 (21:30 +0000)]
compiler-rt/darwin: Install asan_osx_dynamic with the other runtime libraries.

llvm-svn: 163941

12 years agoStylistic and 80-col fixes
Evan Cheng [Fri, 14 Sep 2012 21:25:34 +0000 (21:25 +0000)]
Stylistic and 80-col fixes

llvm-svn: 163940

12 years agoIn StringLiteral::setString make sure that we copy the number of
Argyrios Kyrtzidis [Fri, 14 Sep 2012 21:17:41 +0000 (21:17 +0000)]
In StringLiteral::setString make sure that we copy the number of
bytes of the buffer and not the size of the string, otherwise we
may overwrite the buffer if there is a mismatch between the size
of the string and the CharByteWidth, and assertions are disabled.

The bug where this could occur was fixed in r163931.
Related to rdar://12069503

llvm-svn: 163939

12 years agoSBThread::StepOut and SBThread::StepOutOfFrame should both run all threads.
Jim Ingham [Fri, 14 Sep 2012 21:07:14 +0000 (21:07 +0000)]
SBThread::StepOut and SBThread::StepOutOfFrame should both run all threads.

llvm-svn: 163938

12 years ago"thread step-out" should run all threads by default.
Jim Ingham [Fri, 14 Sep 2012 21:04:15 +0000 (21:04 +0000)]
"thread step-out" should run all threads by default.

llvm-svn: 163937

12 years agoUse the frame index passed into "thread until" rather than using the selected frame.
Jim Ingham [Fri, 14 Sep 2012 20:48:14 +0000 (20:48 +0000)]
Use the frame index passed into "thread until" rather than using the selected frame.

llvm-svn: 163936

12 years agocomment typo
Andrew Trick [Fri, 14 Sep 2012 20:27:25 +0000 (20:27 +0000)]
comment typo

llvm-svn: 163935

12 years agoTargetSchedModel interface. To be implemented...
Andrew Trick [Fri, 14 Sep 2012 20:26:46 +0000 (20:26 +0000)]
TargetSchedModel interface. To be implemented...

llvm-svn: 163934

12 years agoDefine MC data tables for the new scheduling machine model.
Andrew Trick [Fri, 14 Sep 2012 20:26:41 +0000 (20:26 +0000)]
Define MC data tables for the new scheduling machine model.

llvm-svn: 163933

12 years agowhitespace
Andrew Trick [Fri, 14 Sep 2012 20:26:39 +0000 (20:26 +0000)]
whitespace

llvm-svn: 163932

12 years ago[libclang] When loading an AST file, make sure to apply the language options
Argyrios Kyrtzidis [Fri, 14 Sep 2012 20:24:53 +0000 (20:24 +0000)]
[libclang] When loading an AST file, make sure to apply the language options
to the target info.

Related to rdar://12069503.

llvm-svn: 163931

12 years agoRemove unused variable.
Bill Wendling [Fri, 14 Sep 2012 20:23:31 +0000 (20:23 +0000)]
Remove unused variable.

llvm-svn: 163930

12 years agoFix environment path problem
Sid Manning [Fri, 14 Sep 2012 20:04:36 +0000 (20:04 +0000)]
Fix environment path problem

llvm-svn: 163929

12 years agoReview feedback from Duncan Sands. Alphabetize includes and simplify
Alex Rosenberg [Fri, 14 Sep 2012 19:19:57 +0000 (19:19 +0000)]
Review feedback from Duncan Sands. Alphabetize includes and simplify
lit config.

llvm-svn: 163928

12 years agoUtilize new build system support in Xcode 4.5 for easier interposition
Ted Kremenek [Fri, 14 Sep 2012 19:06:33 +0000 (19:06 +0000)]
Utilize new build system support in Xcode 4.5 for easier interposition
of a build without needing to use ccc-analyzer.

llvm-svn: 163927

12 years agoTry to fix the bots by detecting inconsistant branch-weight metadata.
Manman Ren [Fri, 14 Sep 2012 19:05:19 +0000 (19:05 +0000)]
Try to fix the bots by detecting inconsistant branch-weight metadata.

llvm-svn: 163926

12 years agoscan-build: Determine the location of the clang binary before printing help.
Jordan Rose [Fri, 14 Sep 2012 18:59:03 +0000 (18:59 +0000)]
scan-build: Determine the location of the clang binary before printing help.

We need the clang executable to print the list of available checkers.

llvm-svn: 163925

12 years agoSBThread::StepOverUntil should run all threads. It is running to breakpoints, so...
Jim Ingham [Fri, 14 Sep 2012 18:57:14 +0000 (18:57 +0000)]
SBThread::StepOverUntil should run all threads.  It is running to breakpoints, so running one thread is likely to cause the target to stall.

llvm-svn: 163924

12 years agoAdd support for reading the GCDA file and merging the arc information.
Bill Wendling [Fri, 14 Sep 2012 18:55:32 +0000 (18:55 +0000)]
Add support for reading the GCDA file and merging the arc information.

With the advent of the __llvm_gcov_flush function, we need to be able to merge
counts into the .gcda files in an intelligent manner. This involves reading the
file if it exists, adding the counts together, and then writing the results.
<rdar://problem/12185886>

llvm-svn: 163923

12 years agoImplement getNumLDMAddresses and expose through ARMBaseInstrInfo.
Andrew Trick [Fri, 14 Sep 2012 18:48:46 +0000 (18:48 +0000)]
Implement getNumLDMAddresses and expose through ARMBaseInstrInfo.

llvm-svn: 163922

12 years agoCortex-A9 instruction-level scheduling machine model.
Andrew Trick [Fri, 14 Sep 2012 18:31:58 +0000 (18:31 +0000)]
Cortex-A9 instruction-level scheduling machine model.

This models the A9 processor at the level of instruction operands, as
opposed to the itinerary, which models each operation at the level of
pipeline stages.

The two primary motivations are:

1) Allow MachineScheduler to model A9 as an out-of-order processor. It
can now distinguish between hazards that force interlocking vs.
buffered resources.

2) Reduce long-term maintenance by allowing the itinerary and target
hooks to eventually be removed. Note that almost all of the complexity
in the new model exists to model instruction variants, which the
itinerary cannot handle. Instead the scheduler previously relied on
processor-specific target hooks which are incomplete and buggy.

llvm-svn: 163921

12 years agoFix some dead stores which the static analyzer warned about. No functionality
Richard Smith [Fri, 14 Sep 2012 18:27:01 +0000 (18:27 +0000)]
Fix some dead stores which the static analyzer warned about. No functionality
change (the problematic cases in ParseDecl.cpp are currently impossible).

llvm-svn: 163920

12 years agoWhen diagnosing multiple mem-initializers in a delegating ctor, point to the delegati...
Richard Smith [Fri, 14 Sep 2012 18:21:10 +0000 (18:21 +0000)]
When diagnosing multiple mem-initializers in a delegating ctor, point to the delegating initializer, not to the first initializer. For good measure, also highlight the other initializer.

llvm-svn: 163919

12 years agoTest removed.
Fariborz Jahanian [Fri, 14 Sep 2012 17:51:34 +0000 (17:51 +0000)]
Test removed.

llvm-svn: 163918

12 years agoobjective-C arc: remove -Warc-abi in its entirety.
Fariborz Jahanian [Fri, 14 Sep 2012 17:48:35 +0000 (17:48 +0000)]
objective-C arc: remove -Warc-abi in its entirety.
// rdar://10554025

llvm-svn: 163917

12 years agoPGO: preserve branch-weight metadata when merging two switches where
Manman Ren [Fri, 14 Sep 2012 17:29:56 +0000 (17:29 +0000)]
PGO: preserve branch-weight metadata when merging two switches where
the default target of the first switch is not the basic block the second switch
is in (PredDefault != BB).

llvm-svn: 163916

12 years agomisched: add a hook for custom DAG postprocessing.
Andrew Trick [Fri, 14 Sep 2012 17:22:42 +0000 (17:22 +0000)]
misched: add a hook for custom DAG postprocessing.

llvm-svn: 163915

12 years agoFix copy-paste error in manpage. Should be -stdlib=library.
Ted Kremenek [Fri, 14 Sep 2012 17:20:56 +0000 (17:20 +0000)]
Fix copy-paste error in manpage.  Should be -stdlib=library.

llvm-svn: 163914

12 years agoExtended the "watchpoint set variable" code to
Sean Callanan [Fri, 14 Sep 2012 17:20:18 +0000 (17:20 +0000)]
Extended the "watchpoint set variable" code to
support watchpoints on globals.

<rdar://problem/12297238>

llvm-svn: 163913

12 years agoFixed some problems with SWIG bindings.
Filipe Cabecinhas [Fri, 14 Sep 2012 17:09:15 +0000 (17:09 +0000)]
Fixed some problems with SWIG bindings.

This may (but shouldn't) break Linux (but I tested and it still worked on FreeBSD).

The same shell scripts are now used on Xcode and Makefiles, for generating
the SWIG bindings.
Some compatibility fixes were applied, too (python path, bash-isms, etc).

llvm-svn: 163912

12 years agoDon't force libc++ and c++11 on everyone.
Filipe Cabecinhas [Fri, 14 Sep 2012 17:09:06 +0000 (17:09 +0000)]
Don't force libc++ and c++11 on everyone.

Make the flags part of configure and make invocations, for now.

llvm-svn: 163911

12 years agoAdd missing test from r163874.
Douglas Gregor [Fri, 14 Sep 2012 16:38:59 +0000 (16:38 +0000)]
Add missing test from r163874.

llvm-svn: 163910

12 years agoComment parsing: don't parse comment marker followed by a digit as a command
Dmitri Gribenko [Fri, 14 Sep 2012 16:35:35 +0000 (16:35 +0000)]
Comment parsing: don't parse comment marker followed by a digit as a command
since no Doxygen command starts with a digit.

llvm-svn: 163909

12 years agoELF support for LLD writer. The writer at present emits ELF header and section
Hemant Kulkarni [Fri, 14 Sep 2012 16:11:34 +0000 (16:11 +0000)]
ELF support for LLD writer. The writer at present emits ELF header and section
table header. Skeleton code for ReferenceKinds.
Credits:
Doxygen by  Michael Spencer.
Origianl implementation from Macho by Sidney Manning.
Templatization, implementation of section header chunks, string table, ELF header by Hemant Kulkarni.

llvm-svn: 163906

12 years agoComment parsing: support the "\invariant" command.
Dmitri Gribenko [Fri, 14 Sep 2012 15:37:29 +0000 (15:37 +0000)]
Comment parsing: support the "\invariant" command.

llvm-svn: 163905

12 years agoAdd in comments that explain what the indexing and the size of the arrays is about.
Micah Villmow [Fri, 14 Sep 2012 15:36:50 +0000 (15:36 +0000)]
Add in comments that explain what the indexing and the size of the arrays is about.

llvm-svn: 163904

12 years agoDAG post-process for Hexagon MI scheduler
Sergei Larin [Fri, 14 Sep 2012 15:07:59 +0000 (15:07 +0000)]
DAG post-process for Hexagon MI scheduler

This patch introduces a possibility for Hexagon MI scheduler
to perform some target specific post- processing on the scheduling
DAG prior to scheduling.

llvm-svn: 163903

12 years agoFix Doxygen issues:
Dmitri Gribenko [Fri, 14 Sep 2012 14:57:36 +0000 (14:57 +0000)]
Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph);
* use \param instead of \arg to document parameters in order to be consistent
  with the rest of the codebase.

llvm-svn: 163902

12 years agoSROA: Silence unused variable warnings in Release builds.
Benjamin Kramer [Fri, 14 Sep 2012 13:08:09 +0000 (13:08 +0000)]
SROA: Silence unused variable warnings in Release builds.

The NDEBUG hack is ugly, but I see no better solution.

llvm-svn: 163900

12 years agoRemove redundant private field.
Benjamin Kramer [Fri, 14 Sep 2012 12:19:58 +0000 (12:19 +0000)]
Remove redundant private field.

clang warned about this being unused in Release builds.

llvm-svn: 163899

12 years agoDo not use "lib32" directory to create a library/object files
Simon Atanasyan [Fri, 14 Sep 2012 11:27:24 +0000 (11:27 +0000)]
Do not use "lib32" directory to create a library/object files
paths when target is MIPS 32-bit.

The patch reviewed by Chandler Carruth.

llvm-svn: 163898

12 years agoRework the computation of a sub-structure natural type. There were
Chandler Carruth [Fri, 14 Sep 2012 11:08:31 +0000 (11:08 +0000)]
Rework the computation of a sub-structure natural type. There were
pointless checks in here, bad asserts, and just confusing code. I've
also added a bit more to the comment to clarify what this function is
really trying to do as it was not obvious to Duncan when studying it.

Thanks to Duncan for helping me dig through the issue.

No real functionality changed here in practical cases, and certainly no
test case. This is just cleanup spotted by inspection.

llvm-svn: 163897

12 years agoRely on the recursive check for pointer types rather than adding an
Chandler Carruth [Fri, 14 Sep 2012 10:30:44 +0000 (10:30 +0000)]
Rely on the recursive check for pointer types rather than adding an
explicit check before recursing. A simplification requested by Duncan
during review.

llvm-svn: 163896

12 years agoBe a bit more aggressive in bailing out of this routine. Spotted by
Chandler Carruth [Fri, 14 Sep 2012 10:30:42 +0000 (10:30 +0000)]
Be a bit more aggressive in bailing out of this routine. Spotted by
inspection by Duncan during review. My suspicion is that we would still
have returned 0 anyways in this case, but doing it sooner is better.

llvm-svn: 163895

12 years agoAdd some comments clarifying that the GEP analysis for vector GEPs is
Chandler Carruth [Fri, 14 Sep 2012 10:30:40 +0000 (10:30 +0000)]
Add some comments clarifying that the GEP analysis for vector GEPs is
deeply suspicious and likely to go away eventually. Also fix a bogus
comment about one of the checks in the vector GEP analysis. Based on
review from Duncan.

llvm-svn: 163894

12 years agoMove an instance variable to a local variable based on review by Duncan.
Chandler Carruth [Fri, 14 Sep 2012 10:26:38 +0000 (10:26 +0000)]
Move an instance variable to a local variable based on review by Duncan.
Originally I had anticipated needing to thread this through more bits of
the SROA pass itself, but that ended up not happening. In the end, this
is a much simpler way to manange the variable.

llvm-svn: 163893

12 years agoAdd a comment about debug intrinsics that I *really* don't want to
Chandler Carruth [Fri, 14 Sep 2012 10:26:36 +0000 (10:26 +0000)]
Add a comment about debug intrinsics that I *really* don't want to
forget from Duncan's review as a FIXME.

llvm-svn: 163892

12 years agoAdd two asserts that Duncan thought would help ensure things don't rot
Chandler Carruth [Fri, 14 Sep 2012 10:26:34 +0000 (10:26 +0000)]
Add two asserts that Duncan thought would help ensure things don't rot
unexpectedly in the future. More fixes from his code review.

llvm-svn: 163891

12 years agoActually keep the flag default-off for now. =/ That's what I get for
Chandler Carruth [Fri, 14 Sep 2012 10:18:54 +0000 (10:18 +0000)]
Actually keep the flag default-off for now. =/ That's what I get for
being busy testing this...

llvm-svn: 163890

12 years agoRemove some dead, commented out code Duncan spotted in review.
Chandler Carruth [Fri, 14 Sep 2012 10:18:53 +0000 (10:18 +0000)]
Remove some dead, commented out code Duncan spotted in review.

llvm-svn: 163889

12 years agoWrap the dumping and printing routines in NDEBUG and LLVM_ENABLE_DUMP macros.
Chandler Carruth [Fri, 14 Sep 2012 10:18:51 +0000 (10:18 +0000)]
Wrap the dumping and printing routines in NDEBUG and LLVM_ENABLE_DUMP macros.

llvm-svn: 163888

12 years agoLots of comment fixes and cleanups from Duncan's review.
Chandler Carruth [Fri, 14 Sep 2012 10:18:49 +0000 (10:18 +0000)]
Lots of comment fixes and cleanups from Duncan's review.

llvm-svn: 163887

12 years agoSROA.cpp: Unbreak gcc, sorry!
NAKAMURA Takumi [Fri, 14 Sep 2012 10:06:10 +0000 (10:06 +0000)]
SROA.cpp: Unbreak gcc, sorry!

llvm-svn: 163886

12 years agoSROA.cpp: Appease msvc. LLVM_ATTRIBUTE(s) should come front of "const".
NAKAMURA Takumi [Fri, 14 Sep 2012 09:55:22 +0000 (09:55 +0000)]
SROA.cpp: Appease msvc. LLVM_ATTRIBUTE(s) should come front of "const".

llvm-svn: 163885

12 years agoSpeculative change to try to fix older GCC versions that can't handle
Chandler Carruth [Fri, 14 Sep 2012 09:30:33 +0000 (09:30 +0000)]
Speculative change to try to fix older GCC versions that can't handle
the injected class name of a dependent base class here.

llvm-svn: 163884

12 years agoIntroduce a new SROA implementation.
Chandler Carruth [Fri, 14 Sep 2012 09:22:59 +0000 (09:22 +0000)]
Introduce a new SROA implementation.

This is essentially a ground up re-think of the SROA pass in LLVM. It
was initially inspired by a few problems with the existing pass:
- It is subject to the bane of my existence in optimizations: arbitrary
  thresholds.
- It is overly conservative about which constructs can be split and
  promoted.
- The vector value replacement aspect is separated from the splitting
  logic, missing many opportunities where splitting and vector value
  formation can work together.
- The splitting is entirely based around the underlying type of the
  alloca, despite this type often having little to do with the reality
  of how that memory is used. This is especially prevelant with unions
  and base classes where we tail-pack derived members.
- When splitting fails (often due to the thresholds), the vector value
  replacement (again because it is separate) can kick in for
  preposterous cases where we simply should have split the value. This
  results in forming i1024 and i2048 integer "bit vectors" that
  tremendously slow down subsequnet IR optimizations (due to large
  APInts) and impede the backend's lowering.

The new design takes an approach that fundamentally is not susceptible
to many of these problems. It is the result of a discusison between
myself and Duncan Sands over IRC about how to premptively avoid these
types of problems and how to do SROA in a more principled way. Since
then, it has evolved and grown, but this remains an important aspect: it
fixes real world problems with the SROA process today.

First, the transform of SROA actually has little to do with replacement.
It has more to do with splitting. The goal is to take an aggregate
alloca and form a composition of scalar allocas which can replace it and
will be most suitable to the eventual replacement by scalar SSA values.
The actual replacement is performed by mem2reg (and in the future
SSAUpdater).

The splitting is divided into four phases. The first phase is an
analysis of the uses of the alloca. This phase recursively walks uses,
building up a dense datastructure representing the ranges of the
alloca's memory actually used and checking for uses which inhibit any
aspects of the transform such as the escape of a pointer.

Once we have a mapping of the ranges of the alloca used by individual
operations, we compute a partitioning of the used ranges. Some uses are
inherently splittable (such as memcpy and memset), while scalar uses are
not splittable. The goal is to build a partitioning that has the minimum
number of splits while placing each unsplittable use in its own
partition. Overlapping unsplittable uses belong to the same partition.
This is the target split of the aggregate alloca, and it maximizes the
number of scalar accesses which become accesses to their own alloca and
candidates for promotion.

Third, we re-walk the uses of the alloca and assign each specific memory
access to all the partitions touched so that we have dense use-lists for
each partition.

Finally, we build a new, smaller alloca for each partition and rewrite
each use of that partition to use the new alloca. During this phase the
pass will also work very hard to transform uses of an alloca into a form
suitable for promotion, including forming vector operations, speculating
loads throguh PHI nodes and selects, etc.

After splitting is complete, each newly refined alloca that is
a candidate for promotion to a scalar SSA value is run through mem2reg.

There are lots of reasonably detailed comments in the source code about
the design and algorithms, and I'm going to be trying to improve them in
subsequent commits to ensure this is well documented, as the new pass is
in many ways more complex than the old one.

Some of this is still a WIP, but the current state is reasonbly stable.
It has passed bootstrap, the nightly test suite, and Duncan has run it
successfully through the ACATS and DragonEgg test suites. That said, it
remains behind a default-off flag until the last few pieces are in
place, and full testing can be done.

Specific areas I'm looking at next:
- Improved comments and some code cleanup from reviews.
- SSAUpdater and enabling this pass inside the CGSCC pass manager.
- Some datastructure tuning and compile-time measurements.
- More aggressive FCA splitting and vector formation.

Many thanks to Duncan Sands for the thorough final review, as well as
Benjamin Kramer for lots of review during the process of writing this
pass, and Daniel Berlin for reviewing the data structures and algorithms
and general theory of the pass. Also, several other people on IRC, over
lunch tables, etc for lots of feedback and advice.

llvm-svn: 163883

12 years agoRemove silly dead store. Patch by Ettl Martin.
Duncan Sands [Fri, 14 Sep 2012 09:00:11 +0000 (09:00 +0000)]
Remove silly dead store.  Patch by Ettl Martin.

llvm-svn: 163882

12 years agoRemove some debugging code.
Evgeniy Stepanov [Fri, 14 Sep 2012 08:57:50 +0000 (08:57 +0000)]
Remove some debugging code.

llvm-svn: 163881

12 years agoAllow the second opcode info table to be 8, 16, or 32-bits as needed to represent...
Craig Topper [Fri, 14 Sep 2012 08:33:11 +0000 (08:33 +0000)]
Allow the second opcode info table to be 8, 16, or 32-bits as needed to represent additional fragments. This recovers some space on ATT X86 syntax and PowerPC which only need 40-bits instead of 48-bits. This also increases ARM to 64-bits to fully encode all of its operands.

llvm-svn: 163880

12 years ago[asan] fix the va_arg usage
Kostya Serebryany [Fri, 14 Sep 2012 06:52:46 +0000 (06:52 +0000)]
[asan] fix the va_arg usage

llvm-svn: 163879

12 years agoReduce size of register name index tables by using uint16_t for all in tree targets...
Craig Topper [Fri, 14 Sep 2012 06:37:49 +0000 (06:37 +0000)]
Reduce size of register name index tables by using uint16_t for all in tree targets. If more than 16-bits are needed for any out of tree targets, code will detect and use uint32_t instead.

llvm-svn: 163878

12 years agomisched: Generic tablegen classes for the new machine model.
Andrew Trick [Fri, 14 Sep 2012 06:18:55 +0000 (06:18 +0000)]
misched: Generic tablegen classes for the new machine model.

This is mostly documentation for the new machine model. It is designed
to be flexible, easy to incrementally refine for a subtarget, and
provide all the information that MachineScheduler will need.

If all goes well, I will follow up with an example of the new model in
use for ARM.

llvm-svn: 163877

12 years agocomment
Andrew Trick [Fri, 14 Sep 2012 06:18:52 +0000 (06:18 +0000)]
comment

llvm-svn: 163876

12 years agocomment
Andrew Trick [Fri, 14 Sep 2012 06:18:50 +0000 (06:18 +0000)]
comment

llvm-svn: 163875

12 years agoFix warning on qualified typedef with 'unused' attribute, from Jason Haslam!
Douglas Gregor [Fri, 14 Sep 2012 05:10:40 +0000 (05:10 +0000)]
Fix warning on qualified typedef with 'unused' attribute, from Jason Haslam!

llvm-svn: 163874

12 years agoIn debugger mode, allow comparisons between pointers and integers
Douglas Gregor [Fri, 14 Sep 2012 04:35:37 +0000 (04:35 +0000)]
In debugger mode, allow comparisons between pointers and integers
without a cast. Fixes <rdar://problem/11830912>.

llvm-svn: 163873

12 years ago[asan] add asan option log_path=PATH to let users redirect asan reports to a file...
Kostya Serebryany [Fri, 14 Sep 2012 04:35:14 +0000 (04:35 +0000)]
[asan] add asan option log_path=PATH to let users redirect asan reports to a file PATH.PID instead of stderr

llvm-svn: 163872

12 years agoAs we do with base and member initializers in a dependent class, delay
Douglas Gregor [Fri, 14 Sep 2012 04:20:37 +0000 (04:20 +0000)]
As we do with base and member initializers in a dependent class, delay
type checking for non-static data member initializers in a dependent
class, because our ASTs lose too much information to when
type-checking an initializer. Fixes <rdar://problem/11974632>,
although the result is still rather unsatisfactory.

llvm-svn: 163871

12 years agoImprove the driver title as shown in the --help message. <rdar://12297538>
Bob Wilson [Fri, 14 Sep 2012 03:35:42 +0000 (03:35 +0000)]
Improve the driver title as shown in the --help message. <rdar://12297538>

llvm-svn: 163870

12 years agomips16 fixes.
Akira Hatanaka [Fri, 14 Sep 2012 03:21:56 +0000 (03:21 +0000)]
mips16 fixes.

1. Add MoveR3216
2. Correct spelling for Move32R16

Patch by Reed Kotler.

llvm-svn: 163869

12 years ago<rdar://problem/11374963>
Greg Clayton [Fri, 14 Sep 2012 02:41:36 +0000 (02:41 +0000)]
<rdar://problem/11374963>

When attaching on ARM hosted debuggers we were incorrectly setting the triple to "arm-apple-ios". This was happening because in the post attach code, we would lookup the process info through the platform, and if successful, we would get the architecture of the process. This code uses sysctl() calls, but we can only get the CPU type, not the subtype, so we would get ARM for CPU type and nothing for the cpu subtype, so this would map to "arm-apple-ios". I fixed the code to get the cpu subtype from "hw.cpusubtype" which is what we really want for ARM, and not the architecture is already correct. "add-dsym" then works like a charm. I also improved the command output when the architecture changes to show the entire triple instead of just the arch name.

llvm-svn: 163868

12 years agoMake the unwinding of the stack part of "thread return" work, and add the thread...
Jim Ingham [Fri, 14 Sep 2012 02:14:15 +0000 (02:14 +0000)]
Make the unwinding of the stack part of "thread return" work, and add the thread return command.

llvm-svn: 163867

12 years agoFix thunk emission for covariant virtual functions in cases which require
Eli Friedman [Fri, 14 Sep 2012 01:45:09 +0000 (01:45 +0000)]
Fix thunk emission for covariant virtual functions in cases which require
both a virtual and a non-virtual offset. PR13832.

llvm-svn: 163866

12 years agoFix line endings.
Eli Friedman [Fri, 14 Sep 2012 01:19:01 +0000 (01:19 +0000)]
Fix line endings.

llvm-svn: 163865

12 years agoUpdated the demangler to take the fix for a crasher.
Sean Callanan [Fri, 14 Sep 2012 00:52:49 +0000 (00:52 +0000)]
Updated the demangler to take the fix for a crasher.

<rdar://problem/12293231>

llvm-svn: 163864

12 years agoFix abbreviation for CharacterLiteral in AST serialization. PR13806.
Eli Friedman [Fri, 14 Sep 2012 00:51:36 +0000 (00:51 +0000)]
Fix abbreviation for CharacterLiteral in AST serialization.  PR13806.

llvm-svn: 163863

12 years agoDimitry Andric: many visibility fixes. Howard: Much appreciated. Can you send...
Howard Hinnant [Fri, 14 Sep 2012 00:39:16 +0000 (00:39 +0000)]
Dimitry Andric:  many visibility fixes.  Howard:  Much appreciated.  Can you send me a patch to CREDITS.TXT?

llvm-svn: 163862

12 years agoTest commit
Hemant Kulkarni [Fri, 14 Sep 2012 00:00:39 +0000 (00:00 +0000)]
Test commit

llvm-svn: 163861

12 years agoPatch by Sean Silva!
Galina Kistanova [Thu, 13 Sep 2012 23:51:08 +0000 (23:51 +0000)]
Patch by Sean Silva!
The patch converts the "How to add a builder" document over to reStructuredText..

llvm-svn: 163860

12 years agoSpecifically disallow primary-expressions of the form LT_... on the basis of this...
Howard Hinnant [Thu, 13 Sep 2012 23:49:59 +0000 (23:49 +0000)]
Specifically disallow primary-expressions of the form LT_... on the basis of this decition: sourcerytools.com/pipermail/cxx-abi-dev/2011-August/002422.html .  Failure to disallow this was causing infinite recursion in the demangler when these symbols show up due to mangling bugs.  This patch causes the demangler to return an invalid mangled name result rather than crash in infinite recursion.

llvm-svn: 163859

12 years agoWhen computing the decltype of an expression, consider Objective-C
Douglas Gregor [Thu, 13 Sep 2012 23:40:46 +0000 (23:40 +0000)]
When computing the decltype of an expression, consider Objective-C
ivar and property references as member accesses and produce the actual
type of the declaration. Fixes <rdar://problem/12031582>.

llvm-svn: 163858

12 years agoFixed the #defines for YES and NO, and centralized
Sean Callanan [Thu, 13 Sep 2012 23:35:30 +0000 (23:35 +0000)]
Fixed the #defines for YES and NO, and centralized
them in one place rather than having them replicated
across all the potential function wrappers.

<rdar://problem/12293880>

llvm-svn: 163857

12 years agoFix both the test for zero and what we do if we have a zero for
Eric Christopher [Thu, 13 Sep 2012 23:24:02 +0000 (23:24 +0000)]
Fix both the test for zero and what we do if we have a zero for
umulo legalization.

Fixes PR13839

llvm-svn: 163856

12 years agoReformat, remove a couple unused variables and move some variables
Eric Christopher [Thu, 13 Sep 2012 23:23:58 +0000 (23:23 +0000)]
Reformat, remove a couple unused variables and move some variables
closer to where they're needed.

llvm-svn: 163855

12 years agoAssembler: Darwin variables defined via .set are no-dead-strip.
Jim Grosbach [Thu, 13 Sep 2012 23:11:31 +0000 (23:11 +0000)]
Assembler: Darwin variables defined via .set are no-dead-strip.

For gas compatibility.

rdar://12219394

llvm-svn: 163854

12 years agoMachO: Correctly mark symbol-difference variables as N_ABS.
Jim Grosbach [Thu, 13 Sep 2012 23:11:25 +0000 (23:11 +0000)]
MachO: Correctly mark symbol-difference variables as N_ABS.

.set a, b - c + CONSTANT
d = b - c + CONSTANT

Both 'a' and 'd' should be marked as absolute symbols (N_ABS).

rdar://12219394

llvm-svn: 163853

12 years agoFixing a typo
Enrico Granata [Thu, 13 Sep 2012 23:06:00 +0000 (23:06 +0000)]
Fixing a typo

llvm-svn: 163852

12 years agoFixed an error with a static enum definition where it wasn't NULL terminate and could...
Greg Clayton [Thu, 13 Sep 2012 23:03:20 +0000 (23:03 +0000)]
Fixed an error with a static enum definition where it wasn't NULL terminate and could crash.

llvm-svn: 163851

12 years agoFix incorrect comment.
Richard Smith [Thu, 13 Sep 2012 22:10:19 +0000 (22:10 +0000)]
Fix incorrect comment.

llvm-svn: 163850

12 years agoFix up after r163846. Sorry!
Richard Smith [Thu, 13 Sep 2012 22:03:58 +0000 (22:03 +0000)]
Fix up after r163846. Sorry!

llvm-svn: 163849

12 years agoActually rebuild function types properly when adjusting the function
Douglas Gregor [Thu, 13 Sep 2012 22:01:49 +0000 (22:01 +0000)]
Actually rebuild function types properly when adjusting the function
type of an instantiation.

llvm-svn: 163848

12 years agoRevert r163829. The world (or libstdc++, at least) is not ready.
Richard Smith [Thu, 13 Sep 2012 22:00:12 +0000 (22:00 +0000)]
Revert r163829. The world (or libstdc++, at least) is not ready.

llvm-svn: 163846