platform/upstream/llvm.git
11 years agoDon't make regexp commands as regular commands - they are "short cuts" and users...
Jim Ingham [Wed, 10 Oct 2012 16:51:31 +0000 (16:51 +0000)]
Don't make regexp commands as regular commands - they are "short cuts" and users should be able to override them with "unalias" but you can't unalias normal commands.

llvm-svn: 165630

11 years ago-Warc-repeated-use-of-weak: look through explicit casts on assigned values.
Jordan Rose [Wed, 10 Oct 2012 16:43:06 +0000 (16:43 +0000)]
-Warc-repeated-use-of-weak: look through explicit casts on assigned values.

Reading from a weak property, casting the result, and assigning to a
strong pointer should still be considered safe.

llvm-svn: 165629

11 years agoMove Sema::PropertyIfSetterOrGetter to ObjCMethodDecl::findPropertyDecl.
Jordan Rose [Wed, 10 Oct 2012 16:42:54 +0000 (16:42 +0000)]
Move Sema::PropertyIfSetterOrGetter to ObjCMethodDecl::findPropertyDecl.

Then, switch users of PropertyIfSetterOrGetter and LookupPropertyDecl
(the latter by name) over to findPropertyDecl. This actually makes
-Wreceiver-is-weak a bit stronger than it was before.

llvm-svn: 165628

11 years agoChange Sema::PropertyIfSetterOrGetter to make use of isPropertyAccessor.
Jordan Rose [Wed, 10 Oct 2012 16:42:38 +0000 (16:42 +0000)]
Change Sema::PropertyIfSetterOrGetter to make use of isPropertyAccessor.

Old algorithm:
1. See if the name looks like a getter or setter.
2. Use the name to look up a property in the current ObjCContainer
   and all its protocols.
3. If the current container is an interface, also look in all categories
   and superclasses (and superclass categories, and so on).

New algorithm:
1. See if the method is marked as a property accessor. If so, look through
   all properties in the current container and find one that has a matching
   selector.
2. Find all overrides of the method using ObjCMethodDecl's
   getOverriddenMethods. This collects methods in superclasses and protocols
   (as well as superclass categories, which isn't really necessary), and
   checks if THEY are accessors. This part is not done recursively, since
   getOverriddenMethods is already recursive.

This lets us handle getters and setters that do not match the property
names.

llvm-svn: 165627

11 years agoRename ObjCMethodDecl::isSynthesized to isPropertyAccessor.
Jordan Rose [Wed, 10 Oct 2012 16:42:25 +0000 (16:42 +0000)]
Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.

This more accurately reflects its use: this flag is set when a method
matches the getter or setter name for a property in the same class,
and does not actually specify whether or not the definition of the method
will be synthesized (either implicitly or explicitly with @synthesize).

This renames the setter and backing field as well, and changes the
(soon-to-be-obsolete?) XML dump format to use 'property_accessor'
instead of 'synthesized'.

llvm-svn: 165626

11 years agoAdd alternative support for FP_ROUND from v2f32 to v2f64
Michael Liao [Wed, 10 Oct 2012 16:32:15 +0000 (16:32 +0000)]
Add alternative support for FP_ROUND from v2f32 to v2f64

- Due to the current matching vector elements constraints in ISD::FP_EXTEND,
  rounding from v2f32 to v2f64 is scalarized. Add a customized v2f32 widening
  to convert it into a target-specific X86ISD::VFPEXT to work around this
  constraints. This patch also reverts a previous attempt to fix this issue by
  recovering the scalarized ISD::FP_EXTEND pattern and thus significantly
  reduces the overhead of supporting non-power-2 vector FP extend.

llvm-svn: 165625

11 years agoFix stack overflow when trying to create an implicit moving
Argyrios Kyrtzidis [Wed, 10 Oct 2012 16:14:06 +0000 (16:14 +0000)]
Fix stack overflow when trying to create an implicit moving
constructor with invalid code.

rdar://12240916

llvm-svn: 165623

11 years agoRemove a trailing blank line, test commit.
NAKAMURA Takumi [Wed, 10 Oct 2012 14:06:15 +0000 (14:06 +0000)]
Remove a trailing blank line, test commit.

llvm-svn: 165621

11 years ago[CMake] clang/tools/extra may be included by LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.
NAKAMURA Takumi [Wed, 10 Oct 2012 13:46:18 +0000 (13:46 +0000)]
[CMake] clang/tools/extra may be included by LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.

LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=/path/to/llvm-srcroot/tools/clang/tools/extra, by default.

llvm-svn: 165620

11 years ago[CMake] check-all: Don't include check-llvm into check-all without LLVM_BUILD_TOOLS.
NAKAMURA Takumi [Wed, 10 Oct 2012 13:33:00 +0000 (13:33 +0000)]
[CMake] check-all: Don't include check-llvm into check-all without LLVM_BUILD_TOOLS.

FIXME: Would you like to run llvm/unittests w/o LLVM_BUILD_TESTS regardless of LLVM_BUILD_TOOLS?
llvm-svn: 165619

11 years ago[CMake] add_lit_testsuite: EXCLUDE_FROM_ALL excludes the test ${target} out of check...
NAKAMURA Takumi [Wed, 10 Oct 2012 13:32:55 +0000 (13:32 +0000)]
[CMake] add_lit_testsuite: EXCLUDE_FROM_ALL excludes the test ${target} out of check-all.

llvm-svn: 165618

11 years agoFix for LDRB instruction:
Stepan Dyatkovskiy [Wed, 10 Oct 2012 11:43:40 +0000 (11:43 +0000)]
Fix for LDRB instruction:
SDNode for LDRB_POST_IMM is invalid: number of registers added to SDNode fewer
that described in .td.

7 ops is needed, but SDNode with only 6 is created.

In more details:
In ARMInstrInfo.td, in multiclass AI2_ldridx, in definition _POST_IMM, offset
operand is defined as am2offset_imm. am2offset_imm is complex parameter type,
and actually it consists from dummy register and imm itself. As I understood
trick with dummy reg was made for AsmParser. In ARMISelLowering.cpp, this dummy
register was not added to SDNode, and it cause crash in Peephole Optimizer pass.

The problem fixed by setting up additional dummy reg when emitting
LDRB_POST_IMM instruction.

llvm-svn: 165617

11 years agoIssue description:
Stepan Dyatkovskiy [Wed, 10 Oct 2012 11:37:36 +0000 (11:37 +0000)]
Issue description:
SchedulerDAGInstrs::buildSchedGraph ignores dependencies between FixedStack
objects and byval parameters. So loading byval parameters from stack may be
inserted *before* it will be stored, since these operations are treated as
independent.

Fix:
Currently ARMTargetLowering::LowerFormalArguments saves byval registers with
FixedStack MachinePointerInfo. To fix the problem we need to store byval
registers with MachinePointerInfo referenced to first the "byval" parameter.

Also commit adds two new fields to the InputArg structure: Function's argument
index and InputArg's part offset in bytes relative to the start position of
Function's argument. E.g.: If function's argument is 128 bit width and it was
splitted onto 32 bit regs, then we got 4 InputArg structs with same arg index,
but different offset values.

llvm-svn: 165616

11 years agoApply the same fundamental fix for PR14048 as was applied for PR11905.
Chandler Carruth [Wed, 10 Oct 2012 11:29:08 +0000 (11:29 +0000)]
Apply the same fundamental fix for PR14048 as was applied for PR11905.

The issue arises when coercing to/from types of different sizes. We need
to be certain that the allocation on either end has sufficient room for
the coerced type. When it doesn't, we need to make room, copy across,
and then proceed. PR11905 handled the case of storing function arguments
back into allocas in the function prolog, this patch handles the case of
setting up the function arguments in a call expression.

This is actually significantly simpler than the fix for PR11905. It ends
up being a trivial change to create a temporary alloca when the source
is too small and memcpy across. This should preserve the compile-time
fast-isel benefits of doing gep+load sequences and avoiding FCAs.

Reviewed by Benjamin and Evgeniy (who fixed PR11905).

llvm-svn: 165615

11 years agoCleanup. Get rid of now dead code.
Bill Wendling [Wed, 10 Oct 2012 08:03:34 +0000 (08:03 +0000)]
Cleanup. Get rid of now dead code.

llvm-svn: 165613

11 years agoRemove the final bits of Attributes being declared in the Attribute
Bill Wendling [Wed, 10 Oct 2012 07:36:56 +0000 (07:36 +0000)]
Remove the final bits of Attributes being declared in the Attribute
namespace. Use the attribute's enum value instead. No functionality change
intended.

llvm-svn: 165611

11 years agoRemove the final bits of Attributes being declared in the Attribute
Bill Wendling [Wed, 10 Oct 2012 07:36:45 +0000 (07:36 +0000)]
Remove the final bits of Attributes being declared in the Attribute
namespace. Use the attribute's enum value instead. No functionality change
intended.

llvm-svn: 165610

11 years agoFix PR 11709: Change the definition of va_list to meet AAPCS requirement
Logan Chien [Wed, 10 Oct 2012 06:56:20 +0000 (06:56 +0000)]
Fix PR 11709: Change the definition of va_list to meet AAPCS requirement

AAPCS ABI Section 7.1.4 [1] specifies that va_list
should be defined as struct __va_list { void *__ap;};
And in C++, it is defined in namespace std.

[1] http://infocenter.arm.com/help/topic
         /com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf

Patch by Weiming Zhao.

llvm-svn: 165609

11 years agoMy earlier "fix" for PBQP (see r165201) was incorrect. The real issue was that
Lang Hames [Wed, 10 Oct 2012 06:39:48 +0000 (06:39 +0000)]
My earlier "fix" for PBQP (see r165201) was incorrect. The real issue was that
checkRegMaskInterference only initializes the bitmask on the first interference.

This fixes PR14027 and (re)fixes PR13945.

llvm-svn: 165608

11 years agoPass into the AttributeWithIndex::get method an ArrayRef of attribute
Bill Wendling [Wed, 10 Oct 2012 06:13:42 +0000 (06:13 +0000)]
Pass into the AttributeWithIndex::get method an ArrayRef of attribute
enums. These are then created via the correct Attributes creation method.

llvm-svn: 165607

11 years agomisched: fall-back to a target hook for instr bundles.
Andrew Trick [Wed, 10 Oct 2012 05:43:18 +0000 (05:43 +0000)]
misched: fall-back to a target hook for instr bundles.

llvm-svn: 165606

11 years agoTODO comment
Andrew Trick [Wed, 10 Oct 2012 05:43:16 +0000 (05:43 +0000)]
TODO comment

llvm-svn: 165605

11 years agoTableGen subtarget emitter cleanup.
Andrew Trick [Wed, 10 Oct 2012 05:43:13 +0000 (05:43 +0000)]
TableGen subtarget emitter cleanup.

Consistently evaluate Aliases and Sequences recursively.

llvm-svn: 165604

11 years agomisched: Use the TargetSchedModel interface wherever possible.
Andrew Trick [Wed, 10 Oct 2012 05:43:09 +0000 (05:43 +0000)]
misched: Use the TargetSchedModel interface wherever possible.

Allows the new machine model to be used for NumMicroOps and OutputLatency.

Allows the HazardRecognizer to be disabled along with itineraries.

llvm-svn: 165603

11 years agomisched: Generate IsBuffered flag for machine resources.
Andrew Trick [Wed, 10 Oct 2012 05:43:04 +0000 (05:43 +0000)]
misched: Generate IsBuffered flag for machine resources.

llvm-svn: 165602

11 years agowhitespace
Andrew Trick [Wed, 10 Oct 2012 05:43:01 +0000 (05:43 +0000)]
whitespace

llvm-svn: 165601

11 years agoPlace temporary LTO files into their own subdirectory.
Bill Wendling [Wed, 10 Oct 2012 05:30:49 +0000 (05:30 +0000)]
Place temporary LTO files into their own subdirectory.

llvm-svn: 165600

11 years agoPlace temporary LTO files into their own subdirectory.
Bill Wendling [Wed, 10 Oct 2012 05:29:15 +0000 (05:29 +0000)]
Place temporary LTO files into their own subdirectory.

llvm-svn: 165599

11 years agoFree the opcode_data malloc'ed memory instead of leaking it - thanks for catching...
Jason Molenda [Wed, 10 Oct 2012 03:47:23 +0000 (03:47 +0000)]
Free the opcode_data malloc'ed memory instead of leaking it - thanks for catching that, Chris.

llvm-svn: 165597

11 years agoHave 'addFnAttr' take the attribute enum value. Then have it build the attribute...
Bill Wendling [Wed, 10 Oct 2012 03:13:20 +0000 (03:13 +0000)]
Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.

llvm-svn: 165596

11 years agoHave 'addFnAttr' take the attribute enum value. Then have it build the attribute...
Bill Wendling [Wed, 10 Oct 2012 03:12:49 +0000 (03:12 +0000)]
Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.

llvm-svn: 165595

11 years agoTest case for r165480.
Craig Topper [Wed, 10 Oct 2012 02:54:23 +0000 (02:54 +0000)]
Test case for r165480.

llvm-svn: 165594

11 years agoDisable the preprocessing record when indexing a source file
Argyrios Kyrtzidis [Wed, 10 Oct 2012 02:12:50 +0000 (02:12 +0000)]
Disable the preprocessing record when indexing a source file
and modules are not enabled.

llvm-svn: 165593

11 years agoWhen indexing a module file, for the ppIncludedFile callback give
Argyrios Kyrtzidis [Wed, 10 Oct 2012 02:12:47 +0000 (02:12 +0000)]
When indexing a module file, for the ppIncludedFile callback give
an invalid location if the location points to the synthetic buffer
for the module input.

llvm-svn: 165592

11 years ago[modules] Consistently construct a buffer as input to build the module.
Argyrios Kyrtzidis [Wed, 10 Oct 2012 02:12:39 +0000 (02:12 +0000)]
[modules] Consistently construct a buffer as input to build the module.
This means the main file for modules will always be a virtual one.

llvm-svn: 165591

11 years agoReorder some parts of the td file to by in alphabetical order
Reed Kotler [Wed, 10 Oct 2012 01:58:16 +0000 (01:58 +0000)]
Reorder some parts of the td file to by in alphabetical order

llvm-svn: 165590

11 years agoAdding comments to clarify the reason for non-standard style in these files.
Andrew Kaylor [Wed, 10 Oct 2012 01:48:52 +0000 (01:48 +0000)]
Adding comments to clarify the reason for non-standard style in these files.
Patch committed on behalf of Kirill Uhanov

llvm-svn: 165589

11 years agoCosmetic changes
Andrew Kaylor [Wed, 10 Oct 2012 01:45:52 +0000 (01:45 +0000)]
Cosmetic changes

llvm-svn: 165588

11 years agoChange the x86 unwinder from using edis as its disassembler
Jason Molenda [Wed, 10 Oct 2012 01:45:33 +0000 (01:45 +0000)]
Change the x86 unwinder from using edis as its disassembler
API (to get the length of x86 instructions) to using the LLVM-MC
disassembler.
<rdar://problem/12411000>

llvm-svn: 165587

11 years agoThis patch adds new functions to the SectionRef and ObjectFile interfaces to determin...
Andrew Kaylor [Wed, 10 Oct 2012 01:41:33 +0000 (01:41 +0000)]
This patch adds new functions to the SectionRef and ObjectFile interfaces to determine whether or not a section is meant to be read-only.  These functions will be used by the MCJIT RuntimeDyld to give hints to the memory manager during the object loading process in a future patch.

Patch by Ashok Thirumurthi.

llvm-svn: 165586

11 years agoImplement MipsTargetLowering::CanLowerReturn.
Akira Hatanaka [Wed, 10 Oct 2012 01:27:09 +0000 (01:27 +0000)]
Implement MipsTargetLowering::CanLowerReturn.

Patch by Sasa Stankovic.

llvm-svn: 165585

11 years agoTidy up formatting.
Richard Smith [Wed, 10 Oct 2012 01:12:11 +0000 (01:12 +0000)]
Tidy up formatting.

llvm-svn: 165584

11 years ago-fcatch-undefined-behavior: catch a VLA bound which evalutes to a non-positive value.
Richard Smith [Wed, 10 Oct 2012 01:11:12 +0000 (01:11 +0000)]
-fcatch-undefined-behavior: catch a VLA bound which evalutes to a non-positive value.

llvm-svn: 165583

11 years ago-fcatch-undefined-behavior: handler for VLA bound which evaluates to a non-positive...
Richard Smith [Wed, 10 Oct 2012 01:10:59 +0000 (01:10 +0000)]
-fcatch-undefined-behavior: handler for VLA bound which evaluates to a non-positive value.

llvm-svn: 165582

11 years agoFix test broken by r165572.
Richard Smith [Wed, 10 Oct 2012 01:02:07 +0000 (01:02 +0000)]
Fix test broken by r165572.

llvm-svn: 165581

11 years agoSomeone was using vi and left a little something in the code.
Greg Clayton [Wed, 10 Oct 2012 00:58:07 +0000 (00:58 +0000)]
Someone was using vi and left a little something in the code.

llvm-svn: 165580

11 years agoSwitched AppleObjCRuntimeV2::CreateClassDescriptor
Sean Callanan [Wed, 10 Oct 2012 00:46:46 +0000 (00:46 +0000)]
Switched AppleObjCRuntimeV2::CreateClassDescriptor
over to simply update its cache and then look up
the descriptor in the cache.  This is fine because
the cache now builds much faster (since descriptors
are minimal).

Metaclasses aren't in the cache, so I switched
the Describe method for class descriptors from using
GetClassDescriptor to manually creating an automatic
ClassDescriptorV2.

llvm-svn: 165579

11 years agoRevert "Use a special path to place the .o files in."
Bob Wilson [Tue, 9 Oct 2012 23:59:01 +0000 (23:59 +0000)]
Revert "Use a special path to place the .o files in."

This reverts commit 165428 in an attempt to get our buildbots going.

llvm-svn: 165574

11 years agoRevert "Use a special path to place the .o files in."
Bob Wilson [Tue, 9 Oct 2012 23:57:08 +0000 (23:57 +0000)]
Revert "Use a special path to place the .o files in."

This reverts commit 165429 in an attempt to get our buildbots going.

llvm-svn: 165573

11 years ago-fcatch-undefined-behavior: store the type name directly at the end of a type descrip...
Richard Smith [Tue, 9 Oct 2012 23:55:19 +0000 (23:55 +0000)]
-fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.

llvm-svn: 165572

11 years ago-fcatch-undefined-behavior: store the type name directly at the end of a type descrip...
Richard Smith [Tue, 9 Oct 2012 23:55:18 +0000 (23:55 +0000)]
-fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.

llvm-svn: 165571

11 years agoAdd extra vim swap file pattern
Michael Liao [Tue, 9 Oct 2012 23:48:58 +0000 (23:48 +0000)]
Add extra vim swap file pattern

llvm-svn: 165570

11 years agoAdd extra vim swap file pattern
Michael Liao [Tue, 9 Oct 2012 23:48:34 +0000 (23:48 +0000)]
Add extra vim swap file pattern

llvm-svn: 165569

11 years agoWhen expanding atomic load arith instructions, do not lose target flags. rdar://12453106
Evan Cheng [Tue, 9 Oct 2012 23:48:33 +0000 (23:48 +0000)]
When expanding atomic load arith instructions, do not lose target flags. rdar://12453106

llvm-svn: 165568

11 years agoThinned the AppleObjCRuntimeV2's class descriptors.
Sean Callanan [Tue, 9 Oct 2012 23:45:42 +0000 (23:45 +0000)]
Thinned the AppleObjCRuntimeV2's class descriptors.
The following are now derived lazily:

- The name of the class (cached);
- the instance size of the class (not cached);

The following have been removed entirely:

- Whether the class is realized.  This is an
  implementation detail.
- The contents of the objc_class object.  That
  object can be read as needed.
- Whether the class is valid.  The fact that
  we vended a class to begin with means it's
  valid.  We will only give up looking parts
  of it up if they are not in the format we
  expect.

llvm-svn: 165567

11 years agomisched: Add computeInstrLatency to TargetSchedModel.
Andrew Trick [Tue, 9 Oct 2012 23:44:32 +0000 (23:44 +0000)]
misched: Add computeInstrLatency to TargetSchedModel.

llvm-svn: 165566

11 years agomisched: Doxument the TargetSchedule API.
Andrew Trick [Tue, 9 Oct 2012 23:44:29 +0000 (23:44 +0000)]
misched: Doxument the TargetSchedule API.

llvm-svn: 165565

11 years agomisched: Allow flags to disable hasInstrSchedModel/hasInstrItineraries for external...
Andrew Trick [Tue, 9 Oct 2012 23:44:26 +0000 (23:44 +0000)]
misched: Allow flags to disable hasInstrSchedModel/hasInstrItineraries for external users of TargetSchedule.

llvm-svn: 165564

11 years agomisched: Remove LoopDependencies heuristic.
Andrew Trick [Tue, 9 Oct 2012 23:44:23 +0000 (23:44 +0000)]
misched: Remove LoopDependencies heuristic.

This wasn't contributing anything significant to postRA heuristics except compile time (by my measurements) and will be replaced by a more general heuristic for cross-region dependencies within the scheduler itself.

llvm-svn: 165563

11 years agoUse the attribute builder to add attributes to call/invoke instruction. No functional...
Bill Wendling [Tue, 9 Oct 2012 23:40:31 +0000 (23:40 +0000)]
Use the attribute builder to add attributes to call/invoke instruction. No functionality change intended.

llvm-svn: 165562

11 years agoInitial assembler implementation of Mips load address macro
Jack Carter [Tue, 9 Oct 2012 23:29:45 +0000 (23:29 +0000)]
Initial assembler implementation of Mips load address macro

This patch provides initial implementation of load address
macro instruction for Mips. We have implemented two kinds
of expansions with their variations depending on the size
of immediate operand:

 1) load address with immediate value directly:
    * la d,j => addiu d,$zero,j   (for -32768 <= j <= 65535)
    * la d,j => lui d,hi16(j)
                ori d,d,lo16(j)   (for any other 32 bit value of j)

 2) load load address with register offset value
    * la d,j(s) => addiu d,s,j     (for -32768 <= j <= 65535)
    * la d,j(s) => lui d,hi16(j)   (for any other 32 bit value of j)
                   ori d,d,lo16(j)
                   addu d,d,s

This patch does not cover the case when the address is loaded
from the value of the label or function.

Contributer: Vladimir Medic
llvm-svn: 165561

11 years agoRework the (de-)serialization of macros, as stored in
Douglas Gregor [Tue, 9 Oct 2012 23:05:51 +0000 (23:05 +0000)]
Rework the (de-)serialization of macros, as stored in
MacroInfo*. Instead of simply dumping an offset into the current file,
give each macro definition a proper ID with all of the standard
modules-remapping facilities. Additionally, when a macro is modified
in a subsequent AST file (e.g., #undef'ing a macro loaded from another
module or from a precompiled header), provide a macro update record
rather than rewriting the entire macro definition. This gives us
greater consistency with the way we handle declarations, and ties
together macro definitions much more cleanly.

Note that we're still not actually deserializing macro history (we
never were), but it's far easy to do properly now.

llvm-svn: 165560

11 years agoAdd count() method to MapVector
Douglas Gregor [Tue, 9 Oct 2012 23:02:47 +0000 (23:02 +0000)]
Add count() method to MapVector

llvm-svn: 165559

11 years agoPeople put pragmas in crazy places; add more handling. PR14046.
Eli Friedman [Tue, 9 Oct 2012 22:46:54 +0000 (22:46 +0000)]
People put pragmas in crazy places; add more handling.  PR14046.

I think our general framework for parser pragmas needs a bit more work,
but I'm not planning on working on it at the moment.

llvm-svn: 165558

11 years ago<rdar://problem/12462575> Refactoring a block of shared code in the NSString data...
Enrico Granata [Tue, 9 Oct 2012 22:44:18 +0000 (22:44 +0000)]
<rdar://problem/12462575> Refactoring a block of shared code in the NSString data formatter

llvm-svn: 165557

11 years agoAdd in some interfaces that will allow easier access to the pointer address space.
Micah Villmow [Tue, 9 Oct 2012 22:27:29 +0000 (22:27 +0000)]
Add in some interfaces that will allow easier access to the pointer address space.

llvm-svn: 165554

11 years agoUse the attribute enums to query if a function has an attribute.
Bill Wendling [Tue, 9 Oct 2012 21:49:51 +0000 (21:49 +0000)]
Use the attribute enums to query if a function has an attribute.

llvm-svn: 165551

11 years agoUse the attribute enums to query if a parameter has an attribute.
Bill Wendling [Tue, 9 Oct 2012 21:38:14 +0000 (21:38 +0000)]
Use the attribute enums to query if a parameter has an attribute.

llvm-svn: 165550

11 years agoCleanup in the AppleObjCRuntimeV2 to make descriptors
Sean Callanan [Tue, 9 Oct 2012 21:21:35 +0000 (21:21 +0000)]
Cleanup in the AppleObjCRuntimeV2 to make descriptors
lighter-weight so that the cache can be populated
faster.

- I Added a ProcessWP to the runtime so I can
  take it out of the individual descriptors, saving
  space;
- I made the constructors for the descriptors
  private so that only the runtime can invoke them;
  and
- I removed the constructor that takes a ValueObject
  since the logic for using a ValueObject is in the
  runtime.

llvm-svn: 165549

11 years agoRevert r165547 to fix build.
Bill Wendling [Tue, 9 Oct 2012 20:56:48 +0000 (20:56 +0000)]
Revert r165547 to fix build.

llvm-svn: 165548

11 years agoUse a single location for calculating the alignments.
Bill Wendling [Tue, 9 Oct 2012 20:55:16 +0000 (20:55 +0000)]
Use a single location for calculating the alignments.

llvm-svn: 165547

11 years agoInitialize the end loc in ObjCInterfaceTypeLoc.
Benjamin Kramer [Tue, 9 Oct 2012 20:49:29 +0000 (20:49 +0000)]
Initialize the end loc in ObjCInterfaceTypeLoc.

Found by valgrind.

llvm-svn: 165546

11 years agoThe clang driver has a fairly fancy support for executing gcc instead of
Rafael Espindola [Tue, 9 Oct 2012 20:46:28 +0000 (20:46 +0000)]
The clang driver has a fairly fancy support for executing gcc instead of
clang itself. This dates back to clang's early days and while it looks like
some of it is still used (for kext for example), other parts are probably dead.

Remove the -ccc-clang-archs option and associated code. I don't think there
is any remaining setup where clang doesn't support an architecture but it can
expect an working gcc cross compiler to be available.

A nice side effect is that tests no longer need to differentiate architectures
that are included in production builds of clang and those that are not.

llvm-svn: 165545

11 years agotblgen: Rename handleDependencies -> createDependencyFile
Sean Silva [Tue, 9 Oct 2012 20:39:28 +0000 (20:39 +0000)]
tblgen: Rename handleDependencies -> createDependencyFile

llvm-svn: 165544

11 years agoRemove this now unused variable macro.
Bill Wendling [Tue, 9 Oct 2012 20:35:11 +0000 (20:35 +0000)]
Remove this now unused variable macro.

llvm-svn: 165543

11 years agotblgen: Move dependency file output to a separate function.
Sean Silva [Tue, 9 Oct 2012 20:29:03 +0000 (20:29 +0000)]
tblgen: Move dependency file output to a separate function.

This keeps it out of the main flow of TableGenMain.

llvm-svn: 165542

11 years agoUse appropriate method calls to get the alignment value.
Bill Wendling [Tue, 9 Oct 2012 20:28:54 +0000 (20:28 +0000)]
Use appropriate method calls to get the alignment value.

llvm-svn: 165541

11 years agoWhitespace.
Chad Rosier [Tue, 9 Oct 2012 20:15:02 +0000 (20:15 +0000)]
Whitespace.

llvm-svn: 165540

11 years agoInline the checks for mutually exclusive attributes since they're used in only one...
Bill Wendling [Tue, 9 Oct 2012 20:11:19 +0000 (20:11 +0000)]
Inline the checks for mutually exclusive attributes since they're used in only one module.

llvm-svn: 165539

11 years agoSimplify the code using SmallVector::append(), as suggested by Benjamin Kramer.
Argyrios Kyrtzidis [Tue, 9 Oct 2012 20:08:43 +0000 (20:08 +0000)]
Simplify the code using SmallVector::append(), as suggested by Benjamin Kramer.

llvm-svn: 165538

11 years ago[driver] Remove redundant cases due to overlapping commits between Ted (r165531,...
Chad Rosier [Tue, 9 Oct 2012 20:01:58 +0000 (20:01 +0000)]
[driver] Remove redundant cases due to overlapping commits between Ted (r165531, 165532) and I
(r165534), but leave the test case in place.

llvm-svn: 165537

11 years ago-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the...
Richard Smith [Tue, 9 Oct 2012 19:52:38 +0000 (19:52 +0000)]
-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.

llvm-svn: 165536

11 years agoEnable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplified
Rafael Espindola [Tue, 9 Oct 2012 19:52:10 +0000 (19:52 +0000)]
Enable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplified
the test.

llvm-svn: 165535

11 years ago[driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]
Chad Rosier [Tue, 9 Oct 2012 19:43:33 +0000 (19:43 +0000)]
[driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]
options when clang invokes cc1plus for i386 kexts.
rdar://12459188

llvm-svn: 165534

11 years agoAdd a runtime diagnostics library for Clang's -fcatch-undefined-behavior.
Richard Smith [Tue, 9 Oct 2012 19:34:32 +0000 (19:34 +0000)]
Add a runtime diagnostics library for Clang's -fcatch-undefined-behavior.

llvm-svn: 165533

11 years agoDon't forward -Wenum-conversion to cc1plus.
Ted Kremenek [Tue, 9 Oct 2012 19:29:48 +0000 (19:29 +0000)]
Don't forward -Wenum-conversion to cc1plus.

llvm-svn: 165532

11 years agoDon't forward -Wint-conversion to cc1plus.
Ted Kremenek [Tue, 9 Oct 2012 19:29:46 +0000 (19:29 +0000)]
Don't forward -Wint-conversion to cc1plus.

llvm-svn: 165531

11 years agoMove the 'FunctionOnly' attributes thingy inside of the Attributes class.
Bill Wendling [Tue, 9 Oct 2012 19:01:18 +0000 (19:01 +0000)]
Move the 'FunctionOnly' attributes thingy inside of the Attributes class.

llvm-svn: 165530

11 years agoCreate variable for warning group -Wshorten-64-to-32.
Ted Kremenek [Tue, 9 Oct 2012 18:46:14 +0000 (18:46 +0000)]
Create variable for warning group -Wshorten-64-to-32.

llvm-svn: 165521

11 years agoPatch from Dan Malea to fix a build break I introduced yesterday.
Jason Molenda [Tue, 9 Oct 2012 18:40:44 +0000 (18:40 +0000)]
Patch from Dan Malea to fix a build break I introduced yesterday.
Thanks again Dan!

llvm-svn: 165519

11 years agoMove the functionality that looks for ObjC overridden methods from
Argyrios Kyrtzidis [Tue, 9 Oct 2012 18:19:01 +0000 (18:19 +0000)]
Move the functionality that looks for ObjC overridden methods from
ASTContext to the ObjCMethodDecl, and have the more generic
ASTContext::getOverriddenMethods() use the ObjCMethodDecl::getOverriddenMethods()
function.

llvm-svn: 165518

11 years agoNot everyone uses C++11, apparently
Douglas Gregor [Tue, 9 Oct 2012 17:51:56 +0000 (17:51 +0000)]
Not everyone uses C++11, apparently

llvm-svn: 165517

11 years agoChanges to clean up the runtime and how the ISA caches are managed.
Greg Clayton [Tue, 9 Oct 2012 17:51:53 +0000 (17:51 +0000)]
Changes to clean up the runtime and how the ISA caches are managed.

llvm-svn: 165516

11 years agoMake the order of visitation of the pending bodies in the AST reader
Douglas Gregor [Tue, 9 Oct 2012 17:50:23 +0000 (17:50 +0000)]
Make the order of visitation of the pending bodies in the AST reader
deterministic.

llvm-svn: 165515

11 years agoAllow MapVector clients to specify the map and vector types, and add a
Douglas Gregor [Tue, 9 Oct 2012 17:49:42 +0000 (17:49 +0000)]
Allow MapVector clients to specify the map and vector types, and add a
clear() method.

llvm-svn: 165514

11 years agoWhen we load a function or method body from an AST file, we check
Douglas Gregor [Tue, 9 Oct 2012 17:21:28 +0000 (17:21 +0000)]
When we load a function or method body from an AST file, we check
whether that function/method already has a body (loaded from some
other AST file), as introduced in r165137. Delay this check until
after the redeclaration chains have been wired up.

While I'm here, make the loading of method bodies lazy.

llvm-svn: 165513

11 years agoMore descriptive, doxygen-ed comments
Michael Ilseman [Tue, 9 Oct 2012 17:05:59 +0000 (17:05 +0000)]
More descriptive, doxygen-ed comments

llvm-svn: 165512

11 years agotblgen: Remove pointless method call.
Sean Silva [Tue, 9 Oct 2012 17:03:11 +0000 (17:03 +0000)]
tblgen: Remove pointless method call.

llvm-svn: 165511

11 years agoNew EarlyCSE tests for CSE-ing across commutativity.
Michael Ilseman [Tue, 9 Oct 2012 16:58:13 +0000 (16:58 +0000)]
New EarlyCSE tests for CSE-ing across commutativity.

llvm-svn: 165510

11 years agoUpdate EarlyCSE's SimpleValues to use Hashing.h for their hashes. Expanded the hashin...
Michael Ilseman [Tue, 9 Oct 2012 16:57:38 +0000 (16:57 +0000)]
Update EarlyCSE's SimpleValues to use Hashing.h for their hashes. Expanded the hashing and equality to allow for equality modulo commutativity for binary ops, and comparisons with swapping of predicates.

llvm-svn: 165509