platform/upstream/llvm.git
11 years agoMake pseudos FEXT_CCRX16_ins and FEXT_CCRXI16_ins into custom emitters.
Reed Kotler [Mon, 25 Feb 2013 02:25:47 +0000 (02:25 +0000)]
Make pseudos FEXT_CCRX16_ins and FEXT_CCRXI16_ins into custom emitters.

llvm-svn: 176007

11 years agoDocumentation: add an idea for a (weird) clang tool
Dmitri Gribenko [Mon, 25 Feb 2013 01:14:45 +0000 (01:14 +0000)]
Documentation: add an idea for a (weird) clang tool

llvm-svn: 176005

11 years agoDIBuilder: support structs with vtable pointers in the same way as classes
David Blaikie [Mon, 25 Feb 2013 01:07:18 +0000 (01:07 +0000)]
DIBuilder: support structs with vtable pointers in the same way as classes

llvm-svn: 176004

11 years agoUpdate Clang for a minor DIBuilder breaking change.
David Blaikie [Mon, 25 Feb 2013 01:07:08 +0000 (01:07 +0000)]
Update Clang for a minor DIBuilder breaking change.

llvm-svn: 176003

11 years ago Make psuedo FEXT_T8I816_ins into a custom emitter.
Reed Kotler [Sun, 24 Feb 2013 23:17:51 +0000 (23:17 +0000)]
 Make psuedo FEXT_T8I816_ins into a custom emitter.

llvm-svn: 176002

11 years agoMoving initialization into the initializer list and correcting capitalization, as...
Aaron Ballman [Sun, 24 Feb 2013 19:08:10 +0000 (19:08 +0000)]
Moving initialization into the initializer list and correcting capitalization, as suggested by Chandler.

llvm-svn: 176001

11 years agoDocumentation: add an idea for an automatic refactoring
Dmitri Gribenko [Sun, 24 Feb 2013 19:04:36 +0000 (19:04 +0000)]
Documentation: add an idea for an automatic refactoring

llvm-svn: 176000

11 years agoAllow breaking between a type and name in variable declarations.
Daniel Jasper [Sun, 24 Feb 2013 18:54:32 +0000 (18:54 +0000)]
Allow breaking between a type and name in variable declarations.

This fixes llvm.org/PR14967 and is generall necessary to avoid
situations where the column limit is exceeded. The challenge is
restricting such lines splits, otherwise clang-format suddenly starts
breaking at bad places.

Before:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string,
                   SomeOtherTemplateParameter> &ReallyReallyLongParameterName,
    const SomeType<string,
                   SomeOtherTemplateParameter> &AnotherLongParameterName) {}

After:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string, SomeOtherTemplateParameter> &
        ReallyReallyLongParameterName,
    const SomeType<string, SomeOtherTemplateParameter> &
        AnotherLongParameterName) {}

llvm-svn: 175999

11 years agoFix PR14364.
Bill Schmidt [Sun, 24 Feb 2013 17:34:50 +0000 (17:34 +0000)]
Fix PR14364.

This removes a const_cast hack from PPCRegisterInfo::hasReservedSpillSlot().
The proper place to save the frame index for the CR spill slot is in the
PPCFunctionInfo object, not the PPCRegisterInfo object.

No new test cases, as this just reimplements existing function.  Existing
tests such as test/CodeGen/PowerPC/crsave.ll are sufficient.

llvm-svn: 175998

11 years ago[ELF][Hexagon] add _SDA_BASE_(absolute symbol pointing to start of quickdata)
Shankar Easwaran [Sun, 24 Feb 2013 16:02:24 +0000 (16:02 +0000)]
[ELF][Hexagon] add _SDA_BASE_(absolute symbol pointing to start of quickdata)

llvm-svn: 175997

11 years agoAdd the testcase from PR13573, this used to crash.
Benjamin Kramer [Sun, 24 Feb 2013 15:51:32 +0000 (15:51 +0000)]
Add the testcase from PR13573, this used to crash.

The error is a bit strange tbh, but better than crashing.

llvm-svn: 175996

11 years agoCVP: If we have a PHI with an incoming select, try to skip the select.
Benjamin Kramer [Sun, 24 Feb 2013 15:34:43 +0000 (15:34 +0000)]
CVP: If we have a PHI with an incoming select, try to skip the select.

This is a common pattern with dyn_cast and similar constructs, when the
PHI no longer depends on the select it can often be turned into a simpler
construct or even get hoisted out of the loop.

PR15340.

llvm-svn: 175995

11 years agoFix invalid IR in test, missing incoming value for PHI node.
Benjamin Kramer [Sun, 24 Feb 2013 15:34:29 +0000 (15:34 +0000)]
Fix invalid IR in test, missing incoming value for PHI node.

llvm-svn: 175994

11 years ago[ELF] Change functions to virtual, in ExecutableAtoms
Shankar Easwaran [Sun, 24 Feb 2013 15:11:55 +0000 (15:11 +0000)]
[ELF] Change functions to virtual, in ExecutableAtoms

llvm-svn: 175993

11 years ago[ELF]Change name of runtime files, so that targets can change runtime files that...
Shankar Easwaran [Sun, 24 Feb 2013 14:54:02 +0000 (14:54 +0000)]
[ELF]Change name of runtime files, so that targets can change runtime files that they own

llvm-svn: 175992

11 years agoTypo
Francois Pichet [Sun, 24 Feb 2013 12:34:13 +0000 (12:34 +0000)]
Typo

llvm-svn: 175991

11 years ago[analyzer] tracking stores/constraints now works for ObjC ivars or struct fields.
Ted Kremenek [Sun, 24 Feb 2013 07:21:01 +0000 (07:21 +0000)]
[analyzer] tracking stores/constraints now works for ObjC ivars or struct fields.

This required more changes than I originally expected:

- ObjCIvarRegion implements "canPrintPretty" et al
- DereferenceChecker indicates the null pointer source is an ivar
- bugreporter::trackNullOrUndefValue() uses an alternate algorithm
  to compute the location region to track by scouring the ExplodedGraph.
  This allows us to get the actual MemRegion for variables, ivars,
  fields, etc.  We only hand construct a VarRegion for C++ references.
- ExplodedGraph no longer drops nodes for expressions that are marked
  'lvalue'.  This is to facilitate the logic in the previous bullet.
  This may lead to a slight increase in size in the ExplodedGraph,
  which I have not measured, but it is likely not to be a big deal.

I have validated each of the changed plist output.

Fixes <rdar://problem/12114812>

llvm-svn: 175988

11 years agoAdd "KnownSVal" to represent SVals that cannot be UnknownSVal.
Ted Kremenek [Sun, 24 Feb 2013 07:20:53 +0000 (07:20 +0000)]
Add "KnownSVal" to represent SVals that cannot be UnknownSVal.

This provides a few sundry cleanups, and allows us to provide
a compile-time check for a case that was a runtime assertion.

llvm-svn: 175987

11 years agoAdd regression test for serialized diagnostics for notes without locations.
Ted Kremenek [Sun, 24 Feb 2013 07:20:47 +0000 (07:20 +0000)]
Add regression test for serialized diagnostics for notes without locations.

This meant to be included in r175802.

llvm-svn: 175986

11 years agoRevert r169638 because it broke Mesa llvmpipe tests.
Nadav Rotem [Sun, 24 Feb 2013 07:09:35 +0000 (07:09 +0000)]
Revert r169638 because it broke Mesa llvmpipe  tests.

Fix PR15239.

llvm-svn: 175985

11 years agoMake psuedo FEXT_T8I816_ins a custom inserter. It should be expanded
Reed Kotler [Sun, 24 Feb 2013 06:16:39 +0000 (06:16 +0000)]
Make psuedo FEXT_T8I816_ins a custom inserter. It should be expanded
as early as possible; which means during instruction selection.

llvm-svn: 175984

11 years ago[ELF][Hexagon]add typeZeroFillFast
Shankar Easwaran [Sun, 24 Feb 2013 03:09:10 +0000 (03:09 +0000)]
[ELF][Hexagon]add typeZeroFillFast

llvm-svn: 175983

11 years agoPR15338: Don't assert if -fsanitize=bounds sees array indexing on an incomplete
Richard Smith [Sun, 24 Feb 2013 01:56:24 +0000 (01:56 +0000)]
PR15338: Don't assert if -fsanitize=bounds sees array indexing on an incomplete
array type.

llvm-svn: 175982

11 years agoAdd a use of an otherwise unused variable to remove a warning in non-Asserts
Cameron Zwarich [Sun, 24 Feb 2013 01:26:05 +0000 (01:26 +0000)]
Add a use of an otherwise unused variable to remove a warning in non-Asserts
builds.

llvm-svn: 175981

11 years agoTwoAddressInstructionPass::tryInstructionTransform() only potentially returns
Cameron Zwarich [Sun, 24 Feb 2013 00:27:29 +0000 (00:27 +0000)]
TwoAddressInstructionPass::tryInstructionTransform() only potentially returns
true when shouldOnlyCommute is false, so we can remove code that checks
otherwise.

llvm-svn: 175980

11 years agoTwoAddrInstructionPass::tryInstructionTransform() has a case where it calls
Cameron Zwarich [Sun, 24 Feb 2013 00:27:26 +0000 (00:27 +0000)]
TwoAddrInstructionPass::tryInstructionTransform() has a case where it calls
itself recursively with a new instruction that has not been finalized, in order
to determine whether to keep the instruction. On 'make check' and test-suite the
only cases where the recursive invocation made any transformations were simple
instruction commutations, so I am restricting the recursive invocation to do
only this.

The other cases wouldn't work correctly when updating LiveIntervals, since the
new instructions don't have slot indices and LiveIntervals hasn't yet been
updated. If the other transformations were actually triggering in any test case
it would be possible to support it with a lot of effort, but since they don't
it's not worth it.

llvm-svn: 175979

11 years ago[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:14 +0000 (00:05 +0000)]
[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
full information about the macro (e.g if it was imported and where).

llvm-svn: 175978

11 years agoAdd comments for the MacroDirective & MacroInfo classes.
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:05 +0000 (00:05 +0000)]
Add comments for the MacroDirective & MacroInfo classes.

llvm-svn: 175977

11 years agoIn Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the consumer
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:01 +0000 (00:05 +0000)]
In Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the consumer
just using ASTConsumer::HandleCXXStaticMemberVarInstantiation(), don't pass it with
ASTConsumer::HandleTopLevelDecl.

ASTConsumer::HandleTopLevelDecl is intended for user-written top-level decls;
a consumer can treat an instantiated static data member however it wants of course.

llvm-svn: 175976

11 years agoAdd new base instruction def for cmpi, cmp, slt and sltu so that def/uses
Reed Kotler [Sat, 23 Feb 2013 23:37:03 +0000 (23:37 +0000)]
Add new base instruction def for cmpi, cmp, slt and sltu so that def/uses
proper. Fixed this already a few days ago for slti.

llvm-svn: 175975

11 years agoTargetInstrInfo::commuteInstruction() doesn't actually return a new instruction
Cameron Zwarich [Sat, 23 Feb 2013 23:13:28 +0000 (23:13 +0000)]
TargetInstrInfo::commuteInstruction() doesn't actually return a new instruction
unless it was requested to with an optional parameter that defaults to false, so
we don't need to handle that case in TwoAddressInstructionPass.

llvm-svn: 175974

11 years agoBetter formatting of conditional expressions.
Daniel Jasper [Sat, 23 Feb 2013 21:01:55 +0000 (21:01 +0000)]
Better formatting of conditional expressions.

In conditional expressions, if the condition is split over multiple
lines, also break before both operands.

This prevents formattings like:

  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ==
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c;

Which are bad, because they suggestion incorrect operator precedence:

  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ==
      (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c);

This lead to the discovery that the expression parser incorrectly
handled conditional operators and that it could also handle semicolons
(which in turn reduced the amount of special casing for for-loops). As a
side-effect, we can now apply the bin-packing configuration to the
sections of for-loops.

llvm-svn: 175973

11 years ago[ELF][Writer] Add hash table.
Michael J. Spencer [Sat, 23 Feb 2013 19:46:18 +0000 (19:46 +0000)]
[ELF][Writer] Add hash table.

llvm-svn: 175972

11 years agoReference the canonical commit (r175462) in the value casting release note.
David Blaikie [Sat, 23 Feb 2013 19:30:31 +0000 (19:30 +0000)]
Reference the canonical commit (r175462) in the value casting release note.

llvm-svn: 175971

11 years agoDocument the value casting API changes.
David Blaikie [Sat, 23 Feb 2013 19:27:10 +0000 (19:27 +0000)]
Document the value casting API changes.

After changing the way several value inheritance hierarchies (TypeLoc,
CFGelement, ProgramPoint and SVal) handle casting, this documentation describes
how 3rd party code may need to be updated to compile with the new APIs.

As suggested by Sean Silva on cfe-dev.

llvm-svn: 175970

11 years agoPrefer 'and' over '&' in comments.
David Blaikie [Sat, 23 Feb 2013 19:20:56 +0000 (19:20 +0000)]
Prefer 'and' over '&' in comments.

Post commit code review feedback from Matt Beaumont-Gay on r174248.

llvm-svn: 175969

11 years agoShrink SmallPtrSet. It gets swapped a lot which copies the whole small part.
Benjamin Kramer [Sat, 23 Feb 2013 16:56:22 +0000 (16:56 +0000)]
Shrink SmallPtrSet. It gets swapped a lot which copies the whole small part.

Testing shows that it's empty in >99% of the cases and I couldn't find a case
where it contained more than 2 elements.

llvm-svn: 175967

11 years agoAdd streamed versions of getQualifiedNameAsString.
Benjamin Kramer [Sat, 23 Feb 2013 13:53:57 +0000 (13:53 +0000)]
Add streamed versions of getQualifiedNameAsString.

Move the cold virtual method getNameForDiagnostic out of line.

llvm-svn: 175966

11 years agoAdd global structure vectorization to docs
Renato Golin [Sat, 23 Feb 2013 13:25:41 +0000 (13:25 +0000)]
Add global structure vectorization to docs

llvm-svn: 175965

11 years agoSome more tests for the global structure vectorizer
Renato Golin [Sat, 23 Feb 2013 12:48:30 +0000 (12:48 +0000)]
Some more tests for the global structure vectorizer

llvm-svn: 175964

11 years agoRemove data member MSAsmStmt::AsmLoc, wrongly hiding AsmStmt::AsmLoc.
Enea Zaffanella [Sat, 23 Feb 2013 12:27:19 +0000 (12:27 +0000)]
Remove data member MSAsmStmt::AsmLoc, wrongly hiding AsmStmt::AsmLoc.

llvm-svn: 175963

11 years agoX86: Disable cmov-memory patterns on subtargets without cmov.
Benjamin Kramer [Sat, 23 Feb 2013 10:40:58 +0000 (10:40 +0000)]
X86: Disable cmov-memory patterns on subtargets without cmov.

Fixes PR15115.

llvm-svn: 175962

11 years agoMake some fixes for LiveInterval repair with debug info. Debug value
Cameron Zwarich [Sat, 23 Feb 2013 10:25:25 +0000 (10:25 +0000)]
Make some fixes for LiveInterval repair with debug info. Debug value
MachineInstrs don't have a slot index.

llvm-svn: 175961

11 years agoDon't recognize unnamed pointer parameters as casts.
Daniel Jasper [Sat, 23 Feb 2013 08:07:18 +0000 (08:07 +0000)]
Don't recognize unnamed pointer parameters as casts.

This fixes llvm.org/PR15061.

Before: virtual void f(int *)const;
After:  virtual void f(int *) const;
llvm-svn: 175960

11 years agoAllow splitting between string literals and identifiers.
Daniel Jasper [Sat, 23 Feb 2013 07:46:38 +0000 (07:46 +0000)]
Allow splitting between string literals and identifiers.

Also don't break in long include directives as that is not desired.

We can now format:

  #include "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  #define LL_FORMAT "ll"
  printf("aaaaa: %d, bbbbbbbbb: %" LL_FORMAT "d, cccccccc: %" LL_FORMAT
         "d, ddddddddd: %" LL_FORMAT "d\n");

Before, this led to weird results.

llvm-svn: 175959

11 years agoFix a bug with the LiveIntervals updating in the two-address pass found by
Cameron Zwarich [Sat, 23 Feb 2013 04:49:22 +0000 (04:49 +0000)]
Fix a bug with the LiveIntervals updating in the two-address pass found by
running ASCI_Purple/SMG2000 in the test-suite.

llvm-svn: 175957

11 years agoMake TwoAddressInstructionPass::sink3AddrInstruction() LiveIntervals-aware.
Cameron Zwarich [Sat, 23 Feb 2013 04:49:20 +0000 (04:49 +0000)]
Make TwoAddressInstructionPass::sink3AddrInstruction() LiveIntervals-aware.

llvm-svn: 175956

11 years agoMake rescheduleMIBelowKill() and rescheduleKillAboveMI() LiveIntervals-aware in
Cameron Zwarich [Sat, 23 Feb 2013 04:49:13 +0000 (04:49 +0000)]
Make rescheduleMIBelowKill() and rescheduleKillAboveMI() LiveIntervals-aware in
TwoAddressInstructionPass. The code in rescheduleMIBelowKill() is a bit tricky,
since multiple instructions need to be moved down, one-at-a-time, in reverse
order.

llvm-svn: 175955

11 years agoImplement __builtin_eh_return_data_regno() for ARM and MIPS.
Logan Chien [Sat, 23 Feb 2013 04:24:36 +0000 (04:24 +0000)]
Implement __builtin_eh_return_data_regno() for ARM and MIPS.

llvm-svn: 175954

11 years ago<rdar://problem/13265297>
Greg Clayton [Sat, 23 Feb 2013 04:12:47 +0000 (04:12 +0000)]
<rdar://problem/13265297>

StackFrame assumes m_sc is additive, but m_sc can lose its target. So now the SymbolContext::Clear() method takes a bool that indicates if the target should be cleared. Modified all existing code to properly set the bool argument.

llvm-svn: 175953

11 years agoclang/AST/Decl.h: Add "raw_ostream.h" to appease msvc.
NAKAMURA Takumi [Sat, 23 Feb 2013 03:59:16 +0000 (03:59 +0000)]
clang/AST/Decl.h: Add "raw_ostream.h" to appease msvc.

llvm-svn: 175952

11 years ago[ELF][Writer] Add a PHDR program table entry for dynamic files.
Michael J. Spencer [Sat, 23 Feb 2013 03:58:06 +0000 (03:58 +0000)]
[ELF][Writer] Add a PHDR program table entry for dynamic files.

llvm-svn: 175951

11 years agoExpand pseudos/macros for Selt. This is the last of the complex
Reed Kotler [Sat, 23 Feb 2013 03:09:56 +0000 (03:09 +0000)]
Expand pseudos/macros for Selt. This is the last of the complex
macros.The rest is some small misc. stuff.

llvm-svn: 175950

11 years agoubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple...
Richard Smith [Sat, 23 Feb 2013 02:53:19 +0000 (02:53 +0000)]
ubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information.

llvm-svn: 175949

11 years agoubsan: Runtime handlers for array indexing checks.
Richard Smith [Sat, 23 Feb 2013 02:40:07 +0000 (02:40 +0000)]
ubsan: Runtime handlers for array indexing checks.

llvm-svn: 175948

11 years agoFix a handful of remaining assumptions that thread IDs were 32-bits
Jason Molenda [Sat, 23 Feb 2013 02:04:45 +0000 (02:04 +0000)]
Fix a handful of remaining assumptions that thread IDs were 32-bits
in the gdb-remote Process plugin files.

llvm-svn: 175947

11 years agoThis should get clang/gcc decorators working
Enrico Granata [Sat, 23 Feb 2013 01:35:21 +0000 (01:35 +0000)]
This should get clang/gcc decorators working

llvm-svn: 175946

11 years agoFixing issues in previous checkin - still figuring out how to make expectedFailureCla...
Enrico Granata [Sat, 23 Feb 2013 01:28:30 +0000 (01:28 +0000)]
Fixing issues in previous checkin - still figuring out how to make expectedFailureClang take the bugnumber

llvm-svn: 175945

11 years agoRemove no-op code (since r175842)
Dmitri Gribenko [Sat, 23 Feb 2013 01:20:07 +0000 (01:20 +0000)]
Remove no-op code (since r175842)

llvm-svn: 175944

11 years agoTest that attribute(availability) doesn't override private_extern.
John McCall [Sat, 23 Feb 2013 01:15:17 +0000 (01:15 +0000)]
Test that attribute(availability) doesn't override private_extern.

rdar://12399248

llvm-svn: 175943

11 years ago<rdar://problem/12362092>
Enrico Granata [Sat, 23 Feb 2013 01:05:23 +0000 (01:05 +0000)]
<rdar://problem/12362092>

The decorators @expectedFailure (plain and special-case like i386, clang, ...) are modified to optionally take a bugnumber argument
If such an argument is specified, the failure report (or unexpected success report) will include the information passed in as part of the message
This is mostly useful for associating failures to issue IDs in issue management systems (e.g. the LLVM bugzilla)

llvm-svn: 175942

11 years ago[ELF][Writer] Add dynamic string and symbol table.
Michael J. Spencer [Sat, 23 Feb 2013 01:02:31 +0000 (01:02 +0000)]
[ELF][Writer] Add dynamic string and symbol table.

llvm-svn: 175941

11 years agoARM: Convenience aliases for 'srs*' instructions.
Jim Grosbach [Sat, 23 Feb 2013 00:52:09 +0000 (00:52 +0000)]
ARM: Convenience aliases for 'srs*' instructions.

Handle an implied 'sp' operand.

rdar://11466783

llvm-svn: 175940

11 years agoFixed a careless mistake.
Michael Gottesman [Sat, 23 Feb 2013 00:31:32 +0000 (00:31 +0000)]
Fixed a careless mistake.

rdar://13273675.

llvm-svn: 175939

11 years agoRemove the CFGElement "Invalid" state.
David Blaikie [Sat, 23 Feb 2013 00:29:34 +0000 (00:29 +0000)]
Remove the CFGElement "Invalid" state.

Use Optional<CFG*> where invalid states were needed previously. In the one case
where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy
CFGAutomaticObjDtor.

Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek
and Doug Gregor.

Post commit code review feedback on r175796 by Ted Kremenek.

llvm-svn: 175938

11 years agoRemove the hack that avoided mangling static functions in extern C contexts.
Rafael Espindola [Sat, 23 Feb 2013 00:26:28 +0000 (00:26 +0000)]
Remove the hack that avoided mangling static functions in extern C contexts.

Weather we should give C language linkage to functions and variables with
internal linkage probably depends on how much code assumes it. The standard
says they should have no language linkage, but gcc and msvc assign them
C language linkage.

This commit removes the hack that was preventing the mangling on static
functions declare in extern C contexts. It is an experiment to see if we
can implement the rules in the standard.

If it turns out that many users depend on these functions and variables
having C language linkage, we should change isExternC instead and try
to convince the CWG to change the standard.

llvm-svn: 175937

11 years agoRevert r175912, "Add support for coldcc to clang" at John's request.
Peter Collingbourne [Sat, 23 Feb 2013 00:06:18 +0000 (00:06 +0000)]
Revert r175912, "Add support for coldcc to clang" at John's request.

llvm-svn: 175936

11 years agoPropagate the split dwarf file information through into the backend
Eric Christopher [Fri, 22 Feb 2013 23:50:16 +0000 (23:50 +0000)]
Propagate the split dwarf file information through into the backend
and through to the debug info in the module. In order to make the
testcase a bit more efficient allow the filename to go through
compilation for compile and not assemble jobs and turn off the
extract for cases where we don't create an object.

llvm-svn: 175935

11 years agoUse getSplitDebugFilename when constructing the skeleton cu and
Eric Christopher [Fri, 22 Feb 2013 23:50:08 +0000 (23:50 +0000)]
Use getSplitDebugFilename when constructing the skeleton cu and
update testcase accordingly to give the correct name to the cu.

llvm-svn: 175934

11 years agoAdd a field to the compile unit of where we plan on splitting out
Eric Christopher [Fri, 22 Feb 2013 23:50:04 +0000 (23:50 +0000)]
Add a field to the compile unit of where we plan on splitting out
the debug info for -gsplit-dwarf so we can encode that location
in the skeleton cu.

llvm-svn: 175933

11 years agoAdd a TODO and explain when we can get rid of the isMain field.
Eric Christopher [Fri, 22 Feb 2013 23:50:01 +0000 (23:50 +0000)]
Add a TODO and explain when we can get rid of the isMain field.

llvm-svn: 175932

11 years agoFormatting.
Eric Christopher [Fri, 22 Feb 2013 23:49:58 +0000 (23:49 +0000)]
Formatting.

llvm-svn: 175931

11 years ago[docs] Rename Makefile.
Daniel Dunbar [Fri, 22 Feb 2013 23:44:49 +0000 (23:44 +0000)]
[docs] Rename Makefile.

llvm-svn: 175930

11 years agoSelectionDAG compile time improvement.
Nadav Rotem [Fri, 22 Feb 2013 23:33:30 +0000 (23:33 +0000)]
SelectionDAG compile time improvement.

One of the phases of SelectionDAG is LegalizeVectors. We don't need to sort the DAG and copy nodes around if there are no vector ops.

Speeds up the compilation time of SelectionDAG on a big scalar workload by ~8%.

llvm-svn: 175929

11 years ago<rdar://problem/13277100>
Han Ming Ong [Fri, 22 Feb 2013 23:26:59 +0000 (23:26 +0000)]
<rdar://problem/13277100>

Need host_statistics on profile data to get host's user/system/idle clicks

llvm-svn: 175928

11 years agoCorrect the logic in DumpCommandHistory when the end index is UINT32_MAX.
Jim Ingham [Fri, 22 Feb 2013 23:23:42 +0000 (23:23 +0000)]
Correct the logic in DumpCommandHistory when the end index is UINT32_MAX.

<rdar://problem/13270229>

llvm-svn: 175927

11 years agoCall el_resize when the window size changes.
Jim Ingham [Fri, 22 Feb 2013 22:56:55 +0000 (22:56 +0000)]
Call el_resize when the window size changes.

<rdar://problem/13270100>

llvm-svn: 175926

11 years ago[libclang] Fix assertion hit when code-completing inside a function macro with more
Argyrios Kyrtzidis [Fri, 22 Feb 2013 22:28:58 +0000 (22:28 +0000)]
[libclang] Fix assertion hit when code-completing inside a function macro with more
arguments than it should accept.

llvm-svn: 175925

11 years ago<rdar://problem/13190981>
Greg Clayton [Fri, 22 Feb 2013 22:23:55 +0000 (22:23 +0000)]
<rdar://problem/13190981>

Fixed an issue where if we got a 'A' async packet back from debugserver, we would resend the last continue command. We now correctly identify the packet as async (just like the 'O' stdout async packet) and we don't resend the continue command.

llvm-svn: 175924

11 years agoobjective-C arg: provide fixit support when
Fariborz Jahanian [Fri, 22 Feb 2013 22:02:53 +0000 (22:02 +0000)]
objective-C arg: provide fixit support when
c++'s named cast need be replaced for bridge casting.
// rdar://12788838

llvm-svn: 175923

11 years agoThe thread plans run before the event is broadcast, so they should be calling ShouldS...
Jim Ingham [Fri, 22 Feb 2013 21:23:43 +0000 (21:23 +0000)]
The thread plans run before the event is broadcast, so they should be calling ShouldStopSynchronous on any Stop Info's
they want to check.  The full ShouldStop should only be called on the public side of the event system.

llvm-svn: 175922

11 years agoUpdate tests so that we don't test for function-only attributes on call sites.
Bill Wendling [Fri, 22 Feb 2013 21:12:51 +0000 (21:12 +0000)]
Update tests so that we don't test for function-only attributes on call sites.

llvm-svn: 175921

11 years ago[mips] Emit call16 operator instead of got_disp. The former allows lazy binding.
Akira Hatanaka [Fri, 22 Feb 2013 21:10:03 +0000 (21:10 +0000)]
[mips] Emit call16 operator instead of got_disp. The former allows lazy binding.

llvm-svn: 175920

11 years agoDriver: Pass down the -march setting down to -cc1as on x86 too.
Benjamin Kramer [Fri, 22 Feb 2013 20:55:17 +0000 (20:55 +0000)]
Driver: Pass down the -march setting down to -cc1as on x86 too.

The assembler historically didn't make use of any target features, but this has
changed when support for old CPUs that don't support long nops was added.

llvm-svn: 175919

11 years agoMake sure we apply attributes to correct places.
Bill Wendling [Fri, 22 Feb 2013 20:53:29 +0000 (20:53 +0000)]
Make sure we apply attributes to correct places.

Some attributes make sense only on the function or on the call site, but not
both. Make this distinction here.

llvm-svn: 175918

11 years agoMark last known Linux failure as XFAIL to see if there's any other problems with...
Daniel Malea [Fri, 22 Feb 2013 20:23:34 +0000 (20:23 +0000)]
Mark last known Linux failure as XFAIL to see if there's any other problems with buildbots.

llvm-svn: 175917

11 years agoSplit out the command handling for split debug info, we're going
Eric Christopher [Fri, 22 Feb 2013 20:12:52 +0000 (20:12 +0000)]
Split out the command handling for split debug info, we're going
to want to propagate some information through the module into
the back end and so need to pass it through to codegen.

Also make the methods file static so we can use them in other places.

llvm-svn: 175916

11 years agoIf we crash while making a Python summary, the crash info will tell us more about it
Enrico Granata [Fri, 22 Feb 2013 20:01:15 +0000 (20:01 +0000)]
If we crash while making a Python summary, the crash info will tell us more about it

llvm-svn: 175915

11 years agoFix test by matching movaps instead of AVX-only vmovaps
Peter Collingbourne [Fri, 22 Feb 2013 19:53:30 +0000 (19:53 +0000)]
Fix test by matching movaps instead of AVX-only vmovaps

llvm-svn: 175914

11 years ago[analyzer] Don't canonicalize the RecordDecl used in CXXBaseObjectRegion.
Jordan Rose [Fri, 22 Feb 2013 19:33:13 +0000 (19:33 +0000)]
[analyzer] Don't canonicalize the RecordDecl used in CXXBaseObjectRegion.

This Decl shouldn't be the canonical Decl; it should be the Decl used by
the CXXBaseSpecifier in the subclass. Unfortunately, that means continuing
to throw getCanonicalDecl() on all comparisons.

This fixes MemRegion::getAsOffset's use of ASTRecordLayout when redeclarations
are involved.

llvm-svn: 175913

11 years agoAdd support for coldcc to clang
Peter Collingbourne [Fri, 22 Feb 2013 19:24:35 +0000 (19:24 +0000)]
Add support for coldcc to clang

llvm-svn: 175912

11 years agox86_64: designate most general purpose and SSE registers as callee save under coldcc
Peter Collingbourne [Fri, 22 Feb 2013 19:19:44 +0000 (19:19 +0000)]
x86_64: designate most general purpose and SSE registers as callee save under coldcc

llvm-svn: 175911

11 years agoRevert "Test commit"
Peter Collingbourne [Fri, 22 Feb 2013 19:19:41 +0000 (19:19 +0000)]
Revert "Test commit"

llvm-svn: 175910

11 years agoTest commit
Peter Collingbourne [Fri, 22 Feb 2013 19:18:15 +0000 (19:18 +0000)]
Test commit

llvm-svn: 175909

11 years agoAn Optional<T> is pod-like if the inner type is.
Benjamin Kramer [Fri, 22 Feb 2013 18:58:26 +0000 (18:58 +0000)]
An Optional<T> is pod-like if the inner type is.

llvm-svn: 175908

11 years ago[preprocessing record] Have the MacroDefinitions map point to the MacroDefinition...
Argyrios Kyrtzidis [Fri, 22 Feb 2013 18:35:59 +0000 (18:35 +0000)]
[preprocessing record] Have the MacroDefinitions map point to the MacroDefinition object instead
its index in the preprocessed entities vector.

This is because the order of the entities in the vector can change in some (uncommon) cases.

llvm-svn: 175907

11 years agoReplace some typically large vectors with SmallVector.
Benjamin Kramer [Fri, 22 Feb 2013 18:29:39 +0000 (18:29 +0000)]
Replace some typically large vectors with SmallVector.

This may seem counter-intuitive but the POD-like optimization helps when the
vectors grow into multimegabyte buffers. SmallVector calls realloc which knows
how to twiddle virtual memory bits and avoids large copies.

llvm-svn: 175906

11 years agoRemove unused CHECK lines copied from another test
Pete Cooper [Fri, 22 Feb 2013 18:16:21 +0000 (18:16 +0000)]
Remove unused CHECK lines copied from another test

llvm-svn: 175905

11 years agosort quickdata for the hexagon target
Shankar Easwaran [Fri, 22 Feb 2013 18:01:08 +0000 (18:01 +0000)]
sort quickdata for the hexagon target

llvm-svn: 175904

11 years agoMake sure pragmas don't attach visibility attributes to auto variables with
Rafael Espindola [Fri, 22 Feb 2013 17:59:16 +0000 (17:59 +0000)]
Make sure pragmas don't attach visibility attributes to auto variables with
internal linkage.

llvm-svn: 175903