oota-llvm.git
12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 years agoAdd names for the accelerator table sections so that they can
Eric Christopher [Mon, 8 Oct 2012 21:41:30 +0000 (21:41 +0000)]
Add names for the accelerator table sections so that they can
be emitted if they're wanted on elf platforms.

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

12 years agoUpdate comment.
Eric Christopher [Mon, 8 Oct 2012 21:41:18 +0000 (21:41 +0000)]
Update comment.

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

12 years agoUse a special path to place the .o files in.
Bill Wendling [Mon, 8 Oct 2012 21:17:45 +0000 (21:17 +0000)]
Use a special path to place the .o files in.

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

12 years agoFixup comment.
Eric Christopher [Mon, 8 Oct 2012 20:48:54 +0000 (20:48 +0000)]
Fixup comment.

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

12 years agoFixup comments.
Eric Christopher [Mon, 8 Oct 2012 20:48:49 +0000 (20:48 +0000)]
Fixup comments.

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

12 years agoPR12716: PPC crashes on vector compare
Adhemerval Zanella [Mon, 8 Oct 2012 18:59:53 +0000 (18:59 +0000)]
PR12716: PPC crashes on vector compare

Vector compare using altivec 'vcmpxxx' instructions have as third argument
a vector register instead of CR one, different from integer and float-point
compares. This leads to a failure in code generation, where 'SelectSETCC'
expects a DAG with a CR register and gets vector register instead.

This patch changes the behavior by just returning a DAG with the
vector compare instruction based on the type. The patch also adds a testcase
for all vector types llvm defines.

It also included a fix on signed 5-bits predicates printing, where
signed values were not handled correctly as signed (char are unsigned by
default for PowerPC). This generates 'vspltisw' (vector splat)
instruction with SIM out of range.

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

12 years agomisched: remove the unused getSpecialAddressLatency hook.
Andrew Trick [Mon, 8 Oct 2012 18:54:00 +0000 (18:54 +0000)]
misched: remove the unused getSpecialAddressLatency hook.

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

12 years agomisched: remove forceUnitLatencies. Defaults are handled by the default SchedModel
Andrew Trick [Mon, 8 Oct 2012 18:53:57 +0000 (18:53 +0000)]
misched: remove forceUnitLatencies. Defaults are handled by the default SchedModel

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

12 years agomisched: avoid scheduling an instruction twice.
Andrew Trick [Mon, 8 Oct 2012 18:53:53 +0000 (18:53 +0000)]
misched: avoid scheduling an instruction twice.

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

12 years agoPowerPC: Fix object creation with PPC::MTCRF8 instruction
Adhemerval Zanella [Mon, 8 Oct 2012 18:25:11 +0000 (18:25 +0000)]
PowerPC: Fix object creation with PPC::MTCRF8 instruction

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

12 years agoAdd floating-point to and from integer conversion
Adhemerval Zanella [Mon, 8 Oct 2012 17:27:24 +0000 (17:27 +0000)]
Add floating-point to and from integer conversion

This patch add altivec support for v4i32 to v4f32 and for v4f32 to
v4i32 vector rounding conversion.

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

12 years agoFix the ocaml binding breakage from TargetData -> DataLayout changes.
Micah Villmow [Mon, 8 Oct 2012 17:06:25 +0000 (17:06 +0000)]
Fix the ocaml binding breakage from TargetData -> DataLayout changes.

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