oota-llvm.git
11 years agotblgen: Compile TableGen without RTTI.
Sean Silva [Wed, 10 Oct 2012 20:27:18 +0000 (20:27 +0000)]
tblgen: Compile TableGen without RTTI.

TableGen no longer needs RTTI!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165651 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agotblgen: Move mini Type hierarchy to LLVM-style RTTI.
Sean Silva [Wed, 10 Oct 2012 20:24:49 +0000 (20:24 +0000)]
tblgen: Move mini Type hierarchy to LLVM-style RTTI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165648 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agotblgen: Use semantically correct RTTI functions.
Sean Silva [Wed, 10 Oct 2012 20:24:47 +0000 (20:24 +0000)]
tblgen: Use semantically correct RTTI functions.

Also, some minor cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165647 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agotblgen: Mechanically move dynamic_cast<> to dyn_cast<>.
Sean Silva [Wed, 10 Oct 2012 20:24:43 +0000 (20:24 +0000)]
tblgen: Mechanically move dynamic_cast<> to dyn_cast<>.

Some of these dyn_cast<>'s would be better phrased as isa<> or cast<>.
That will happen in a future patch.

There are also two dyn_cast_or_null<>'s slipped in instead of
dyn_cast<>'s, since they were causing crashes with just dyn_cast<>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165646 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agotblgen: Put dyn_cast<> machinery in place for Init hierarchy.
Sean Silva [Wed, 10 Oct 2012 20:24:40 +0000 (20:24 +0000)]
tblgen: Put dyn_cast<> machinery in place for Init hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165645 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd the testcase from pr13254 (the old scalarreply pass handles this wrong;
Duncan Sands [Wed, 10 Oct 2012 18:41:19 +0000 (18:41 +0000)]
Add the testcase from pr13254 (the old scalarreply pass handles this wrong;
the new sroa pass handles it right).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165644 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove dead variable.
Bill Wendling [Wed, 10 Oct 2012 18:20:49 +0000 (18:20 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165639 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSpecify CPU model to avoid breaking ATOM builds
Michael Liao [Wed, 10 Oct 2012 18:04:52 +0000 (18:04 +0000)]
Specify CPU model to avoid breaking ATOM builds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165638 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unused argument.
Bill Wendling [Wed, 10 Oct 2012 18:02:57 +0000 (18:02 +0000)]
Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165636 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Propagate fix from r165632 to other docs.
Sean Silva [Wed, 10 Oct 2012 17:21:39 +0000 (17:21 +0000)]
docs: Propagate fix from r165632 to other docs.

There are only two other instances of using `.. code::` instead of
`..  code-block::`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165633 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Attempt to fix PR14053.
Sean Silva [Wed, 10 Oct 2012 17:07:23 +0000 (17:07 +0000)]
docs: Attempt to fix PR14053.

Hypothesis 1: use of `.. code::` directive instead of `.. code-block::`
is causing Sphinx to discard the block. On my machine, `.. code::`
renders fine. However, I don't think that `..  code::` is actually a
legit Sphinx directive. I believe that on my machine Sphinx is falling
back to just displaying it monospace with no syntax, whereas llvm.org's
Sphinx is just discarding it.

This is truly "remote debugging" since I can't reproduce this on my
machine. It would be helpful to be able to see the llvm.org Sphinx
build logs; if that's possible please let me know.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165632 91177308-0d34-0410-b5e6-96231b3b80d8

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

- Due to the current matching vector elements constraints in
  ISD::FP_ROUND, rounding from v2f64 to v4f32 (after legalization from
  v2f32) is scalarized. Add a customized v2f32 widening to convert it
  into a target-specific X86ISD::VFPROUND to work around this
  constraints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165631 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165625 91177308-0d34-0410-b5e6-96231b3b80d8

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?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165619 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165618 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165617 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165616 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165613 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165610 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165608 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165607 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165606 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165605 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165604 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165603 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165602 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165601 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165599 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165595 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165594 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165590 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165589 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165588 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165586 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165585 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165574 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165569 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165568 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165566 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165565 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165564 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165563 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165562 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165561 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165559 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165554 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165551 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165550 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165548 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165547 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165544 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165543 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165542 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165541 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165540 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165539 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165535 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165530 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165517 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165514 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165512 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165511 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165510 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165509 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoNew value_op_iterator for User. This allows other code to iterate over the User's...
Michael Ilseman [Tue, 9 Oct 2012 16:55:14 +0000 (16:55 +0000)]
New value_op_iterator for User. This allows other code to iterate over the User's operands directly as values, which can be convenient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165508 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImprovements to MIPS64 assembler:
David Chisnall [Tue, 9 Oct 2012 16:27:43 +0000 (16:27 +0000)]
Improvements to MIPS64 assembler:

- Teach it about dadd[i] instructions and move pseudo-instruction
- Make it parse the register names correctly (for N32 / N64)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165506 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd in the first step of the multiple pointer support. This adds in support to the...
Micah Villmow [Tue, 9 Oct 2012 16:06:12 +0000 (16:06 +0000)]
Add in the first step of the multiple pointer support. This adds in support to the data layout for specifying a per address space pointer size.
The next step is to update the optimizers to allow them to optimize the different address spaces with this information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165505 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFixup for r165490: Use DenseMap instead of std::map. Simplify the loop in CollectFunc...
Alexey Samsonov [Tue, 9 Oct 2012 10:34:52 +0000 (10:34 +0000)]
Fixup for r165490: Use DenseMap instead of std::map. Simplify the loop in CollectFunctionDIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165498 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove the 'ParameterOnly' variable inside of the Attributes class and make it a method.
Bill Wendling [Tue, 9 Oct 2012 09:51:10 +0000 (09:51 +0000)]
Move the 'ParameterOnly' variable inside of the Attributes class and make it a method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165497 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove the now dead VarArgsIncompatible variable.
Bill Wendling [Tue, 9 Oct 2012 09:33:01 +0000 (09:33 +0000)]
Remove the now dead VarArgsIncompatible variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165496 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse the enum value of the attributes when removing them from the attributes builder.
Bill Wendling [Tue, 9 Oct 2012 09:17:28 +0000 (09:17 +0000)]
Use the enum value of the attributes when removing them from the attributes builder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165495 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse the enum value of the attributes when adding them to the attributes builder.
Bill Wendling [Tue, 9 Oct 2012 09:11:20 +0000 (09:11 +0000)]
Use the enum value of the attributes when adding them to the attributes builder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165494 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix PR14016.
Alexey Samsonov [Tue, 9 Oct 2012 08:13:15 +0000 (08:13 +0000)]
Fix PR14016.
DeadArgumentElimination pass can replace one LLVM function with another,
invalidating a pointer stored in debug info metadata entry for this function.
To fix this, we collect debug info descriptors for functions before
running a DeadArgumentElimination pass and "patch" pointers in metadata nodes
if we replace a function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165490 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCreate enums for the different attributes.
Bill Wendling [Tue, 9 Oct 2012 07:45:08 +0000 (07:45 +0000)]
Create enums for the different attributes.

We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165488 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove some dead methods.
Bill Wendling [Tue, 9 Oct 2012 05:54:39 +0000 (05:54 +0000)]
Remove some dead methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165485 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove ifdef'd code.
Bill Wendling [Tue, 9 Oct 2012 05:36:15 +0000 (05:36 +0000)]
Remove ifdef'd code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165484 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSeparate AVXCC and SSECC printing for cmpps/pd/ss/sd and add masking before the switc...
Craig Topper [Tue, 9 Oct 2012 05:26:13 +0000 (05:26 +0000)]
Separate AVXCC and SSECC printing for cmpps/pd/ss/sd and add masking before the switch statement. This keeps the unreachable default case from being hit if the instruction was created with an intrinsic with too large of an immediate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165483 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert r117093, "test/Makefile: Force lit -j1 on Cygwin."
NAKAMURA Takumi [Tue, 9 Oct 2012 05:07:18 +0000 (05:07 +0000)]
Revert r117093, "test/Makefile: Force lit -j1 on Cygwin."

lit -jN works on cygwin in most cases, but still sometimes I can see stalls with iterative run on the buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165482 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIn parseMSRMaskOperand, add an explicit check for the operand being an identifier...
Craig Topper [Tue, 9 Oct 2012 04:55:28 +0000 (04:55 +0000)]
In parseMSRMaskOperand, add an explicit check for the operand being an identifier instead of just having an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165480 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove some dead code from ARMAsmPrinter. Add virtual and LLVM_OVERRIDE to the other...
Craig Topper [Tue, 9 Oct 2012 04:23:49 +0000 (04:23 +0000)]
Remove some dead code from ARMAsmPrinter. Add virtual and LLVM_OVERRIDE to the other methods. Mark some of the helper methods as private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165479 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove some unused code in the X86AsmPrinter. Add LLVM_OVERRIDE and virtual keywords...
Craig Topper [Tue, 9 Oct 2012 03:50:37 +0000 (03:50 +0000)]
Remove some unused code in the X86AsmPrinter. Add LLVM_OVERRIDE and virtual keywords to the remaining interface methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165478 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix PR14034, an infloop / heap corruption / crash bug in the new SROA.
Chandler Carruth [Tue, 9 Oct 2012 01:58:35 +0000 (01:58 +0000)]
Fix PR14034, an infloop / heap corruption / crash bug in the new SROA.
Thanks to Benjamin for the raw test case. This one took about 50 times
longer to reduce than to fix. =/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165476 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agowhitespace
Nadav Rotem [Tue, 9 Oct 2012 01:56:07 +0000 (01:56 +0000)]
whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165475 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove misplaced comment.
Sean Silva [Tue, 9 Oct 2012 01:47:16 +0000 (01:47 +0000)]
Move misplaced comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165474 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove a couple more 'hasAttrSomewhere' calls.
Bill Wendling [Tue, 9 Oct 2012 01:03:48 +0000 (01:03 +0000)]
Remove a couple more 'hasAttrSomewhere' calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165470 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix. Apply the no capture attribute to the correct parameter.
Bill Wendling [Tue, 9 Oct 2012 00:51:40 +0000 (00:51 +0000)]
Fix. Apply the no capture attribute to the correct parameter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165469 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert to using the Attributes::Builder class to create attributes.
Bill Wendling [Tue, 9 Oct 2012 00:47:36 +0000 (00:47 +0000)]
Convert to using the Attributes::Builder class to create attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165468 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse an iterator and proper query method instead of the 'hasAttrSomewhere' method.
Bill Wendling [Tue, 9 Oct 2012 00:34:19 +0000 (00:34 +0000)]
Use an iterator and proper query method instead of the 'hasAttrSomewhere' method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165467 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove more uses of the attribute enums by supplying appropriate query methods for...
Bill Wendling [Tue, 9 Oct 2012 00:28:54 +0000 (00:28 +0000)]
Remove more uses of the attribute enums by supplying appropriate query methods for them.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165466 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert to using the Attributes::Builder interface.
Bill Wendling [Tue, 9 Oct 2012 00:01:21 +0000 (00:01 +0000)]
Convert to using the Attributes::Builder interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165465 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix typo in docs.
Eric Christopher [Mon, 8 Oct 2012 23:54:10 +0000 (23:54 +0000)]
Fix typo in docs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165464 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix up comment to be more clear.
Eric Christopher [Mon, 8 Oct 2012 23:53:45 +0000 (23:53 +0000)]
Fix up comment to be more clear.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165463 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate comment.
Bill Wendling [Mon, 8 Oct 2012 23:51:19 +0000 (23:51 +0000)]
Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165461 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse the Attributes::Builder to build the attributes in the parser.
Bill Wendling [Mon, 8 Oct 2012 23:27:46 +0000 (23:27 +0000)]
Use the Attributes::Builder to build the attributes in the parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165458 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse DataTypes.h
Nadav Rotem [Mon, 8 Oct 2012 23:14:28 +0000 (23:14 +0000)]
Use DataTypes.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165457 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRefactor the AddrMode class out of TLI to its own header file.
Nadav Rotem [Mon, 8 Oct 2012 23:06:34 +0000 (23:06 +0000)]
Refactor the AddrMode class out of TLI to its own header file.
This class is used by LSR and a number of places in the codegen.
This is the first step in de-coupling LSR from TLI, and creating
a new interface in between them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165455 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert the LLVM parser over to using the new Attributes::Builder to build its
Bill Wendling [Mon, 8 Oct 2012 22:20:14 +0000 (22:20 +0000)]
Convert the LLVM parser over to using the new Attributes::Builder to build its
attributes objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165436 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGive CaptureTracker::shouldExplore a base implementation. Most users want to do
Nick Lewycky [Mon, 8 Oct 2012 22:12:48 +0000 (22:12 +0000)]
Give CaptureTracker::shouldExplore a base implementation. Most users want to do
the same thing. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165435 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't crash on extra evil irreducible control flow.
Jakob Stoklund Olesen [Mon, 8 Oct 2012 22:06:44 +0000 (22:06 +0000)]
Don't crash on extra evil irreducible control flow.

When the CFG contains a loop with multiple entry blocks, the traces
computed by MachineTraceMetrics don't always have the same nice
properties. Loop back-edges are normally excluded from traces, but
MachineLoopInfo doesn't recognize loops with multiple entry blocks, so
those back-edges may be included.

Avoid asserting when that happens by adding an isEarlierInSameTrace()
function that accurately determines if a dominating block is part of the
same trace AND is above the currrent block in the trace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165434 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoBegin the transition to using the AttributesImpl object for the Attributes ivar.
Bill Wendling [Mon, 8 Oct 2012 21:47:17 +0000 (21:47 +0000)]
Begin the transition to using the AttributesImpl object for the Attributes ivar.

Start using the AttributesImpl object to hold the value of the attributes. All
queries go through the interfaces now.

This has one unfortunate consequence. I needed to move the AttributesImpl.h file
into include/llvm. But this is only temporary! Otherwise, the changes needed to
support this would be too large.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165433 91177308-0d34-0410-b5e6-96231b3b80d8