oota-llvm.git
12 years agoAdd in new data types that are used by AMDIL/ANL among others.
Micah Villmow [Wed, 19 Sep 2012 22:47:07 +0000 (22:47 +0000)]
Add in new data types that are used by AMDIL/ANL among others.

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

12 years agoSoften the pattern-can-never-match error in TableGen into a warning. This pattern...
Owen Anderson [Wed, 19 Sep 2012 22:15:06 +0000 (22:15 +0000)]
Soften the pattern-can-never-match error in TableGen into a warning. This pattern can be very useful in cases where you want to define a multiclass that covers both commutative and non-commutative operators (say, add and sub).

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

12 years agoImplement a correct copy constructor for Record. Now that we're using the ID number...
Owen Anderson [Wed, 19 Sep 2012 21:34:18 +0000 (21:34 +0000)]
Implement a correct copy constructor for Record.  Now that we're using the ID number as a key in maps (for determinism), it is imperative that ID numbers be globally unique, even when we copy construct a Record.
This fixes some obscure failure cases involving registers defined inside multiclasses or foreach constructs that would not receive a unique ID, and would end up being omitted from the AsmMatcher tables.

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

12 years agoResolve conflicts involving dead vector lanes for -new-coalescer.
Jakob Stoklund Olesen [Wed, 19 Sep 2012 21:29:18 +0000 (21:29 +0000)]
Resolve conflicts involving dead vector lanes for -new-coalescer.

A common coalescing conflict in vector code is lane insertion:

  %dst = FOO
  %src = BAR
  %dst:ssub0 = COPY %src

The live range of %src interferes with the ssub0 lane of %dst, but that
lane is never read after %src would have clobbered it. That makes it
safe to merge the live ranges and eliminate the COPY:

  %dst = FOO
  %dst:ssub0 = BAR

This patch teaches the new coalescer to resolve conflicts where dead
vector lanes would be clobbered, at least as long as the clobbered
vector lanes don't escape the basic block.

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

12 years agoThis patch adds memory support functions which will later be used to implement sectio...
Andrew Kaylor [Wed, 19 Sep 2012 20:46:12 +0000 (20:46 +0000)]
This patch adds memory support functions which will later be used to implement section-specific protection handling in MCJIT.

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

12 years agoAdd support for macro parameters/arguments delimited by spaces,
Preston Gurd [Wed, 19 Sep 2012 20:36:12 +0000 (20:36 +0000)]
Add support for macro parameters/arguments delimited by spaces,
to improve compatibility with GNU as.

Based on a patch by PaX Team.

Fixed assertion failures on non-Darwin and added additional test cases.

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

12 years agoAdd support for accessing an MDNode's operands via the C binding. Patch by
Duncan Sands [Wed, 19 Sep 2012 20:29:39 +0000 (20:29 +0000)]
Add support for accessing an MDNode's operands via the C binding.  Patch by
Anthony Bryant.

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

12 years agoSupport default parameters/arguments for assembler macros.
Preston Gurd [Wed, 19 Sep 2012 20:29:04 +0000 (20:29 +0000)]
Support default parameters/arguments for assembler macros.
This patch is based on the one by PaX Team.

Patch by Andy Zhang!

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

12 years agoEnhance unmatched '.endr' directive error message in assembler.
Preston Gurd [Wed, 19 Sep 2012 20:23:43 +0000 (20:23 +0000)]
Enhance unmatched '.endr' directive error message in assembler.
The directive can be matched with directives other than '.rept'

Patch by Andy Zhang!

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

12 years agoUnify the logic in SelectAtomicLoadAdd and SelectAtomicLoadArith
Michael Liao [Wed, 19 Sep 2012 19:36:58 +0000 (19:36 +0000)]
Unify the logic in SelectAtomicLoadAdd and SelectAtomicLoadArith

- Merge the processing of LOAD_ADD with other atomic load-arith
  operations
- Separate the logic getting target constant for atomic-load-op and add
  an optimization for atomic-load-add on i16 with negative value
- Optimize a minor case for atomic-fetch-add i16 with negative operand. Test
  case is revised.

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

12 years agoRenaming functions to match coding style guidelines
Michael Ilseman [Wed, 19 Sep 2012 18:14:45 +0000 (18:14 +0000)]
Renaming functions to match coding style guidelines

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

12 years agoReally XFAIL test/CodeGen/PowerPC/structsinregs.ll.
Jordan Rose [Wed, 19 Sep 2012 17:03:11 +0000 (17:03 +0000)]
Really XFAIL test/CodeGen/PowerPC/structsinregs.ll.

XFAIL needs a trailing colon. Hopefully this will get the buildbots
happy again while Bill works on getting it passing.

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

12 years agoDoxygen-ify comments
Michael Ilseman [Wed, 19 Sep 2012 16:25:57 +0000 (16:25 +0000)]
Doxygen-ify comments

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

12 years agoXFAIL test/CodeGen/PowerPC/structsinregs.ll
Bill Schmidt [Wed, 19 Sep 2012 16:18:23 +0000 (16:18 +0000)]
XFAIL test/CodeGen/PowerPC/structsinregs.ll

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

12 years agoPut the * and & next to the variable, rather than the type.
Michael Ilseman [Wed, 19 Sep 2012 16:17:20 +0000 (16:17 +0000)]
Put the * and & next to the variable, rather than the type.

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

12 years agoDocument the interface for integer expansion, using doxygen-style comments
Michael Ilseman [Wed, 19 Sep 2012 16:03:57 +0000 (16:03 +0000)]
Document the interface for integer expansion, using doxygen-style comments

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

12 years agoForward declarations
Michael Ilseman [Wed, 19 Sep 2012 15:55:03 +0000 (15:55 +0000)]
Forward declarations

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

12 years agoGCC doesn't understand that OrigAliasResult having a value is correlated with
Duncan Sands [Wed, 19 Sep 2012 15:43:44 +0000 (15:43 +0000)]
GCC doesn't understand that OrigAliasResult having a value is correlated with
ArePhisAssumedNoAlias, and warns that OrigAliasResult may be used uninitialized.
Pacify GCC.

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

12 years agoSmall structs for PPC64 SVR4 must be passed right-justified in registers.
Bill Schmidt [Wed, 19 Sep 2012 15:42:13 +0000 (15:42 +0000)]
Small structs for PPC64 SVR4 must be passed right-justified in registers.

lib/Target/PowerPC/PPCISelLowering.{h,cpp}
 Rename LowerFormalArguments_Darwin to LowerFormalArguments_Darwin_Or_64SVR4.
 Rename LowerFormalArguments_SVR4 to LowerFormalArguments_32SVR4.
 Receive small structs right-justified in LowerFormalArguments_Darwin_Or_64SVR4.
 Rename LowerCall_Darwin to LowerCall_Darwin_Or_64SVR4.
 Rename LowerCall_SVR4 to LowerCall_32SVR4.
 Pass small structs right-justified in LowerCall_Darwin_Or_64SVR4.

test/CodeGen/PowerPC/structsinregs.ll
 New test.

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

12 years agoSimplifyCFG: Don't generate invalid code for switch used to initialize
Hans Wennborg [Wed, 19 Sep 2012 14:24:21 +0000 (14:24 +0000)]
SimplifyCFG: Don't generate invalid code for switch used to initialize
two variables where the first variable is returned and the second
ignored.

I don't think this occurs in practice (other passes should have cleaned
up the unused phi node), but it should still be handled correctly.

Also make the logic for determining if we should return early less
sketchy.

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

12 years agoFix minor typo in IntervalPartition.h
Will Dietz [Wed, 19 Sep 2012 13:45:43 +0000 (13:45 +0000)]
Fix minor typo in IntervalPartition.h

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

12 years agoMake MapVector a bit more expensive but harder to misuse. We now only
Rafael Espindola [Wed, 19 Sep 2012 13:42:51 +0000 (13:42 +0000)]
Make MapVector a bit more expensive but harder to misuse. We now only
provide insertion order iteration, instead of the old option of
DenseMap order iteration over keys and insertion order iteration over
values.
This is implemented by keeping two copies of each key.

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

12 years agoInlineCost: Make TotalAllocaSizeRecursiveCaller unsigned to avoid sign-compare warnings.
Benjamin Kramer [Wed, 19 Sep 2012 13:22:27 +0000 (13:22 +0000)]
InlineCost: Make TotalAllocaSizeRecursiveCaller unsigned to avoid sign-compare warnings.

It's a size, not a cost.

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

12 years agoIntegerDivision: Style cleanups, avoid warning about mixing || and && without parens.
Benjamin Kramer [Wed, 19 Sep 2012 13:03:07 +0000 (13:03 +0000)]
IntegerDivision: Style cleanups, avoid warning about mixing || and && without parens.

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

12 years agoRemove unused and broken CloneFunction wrapper.
Benjamin Kramer [Wed, 19 Sep 2012 13:03:01 +0000 (13:03 +0000)]
Remove unused and broken CloneFunction wrapper.

It converted the CodeInfo argument to bool implicitly.

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

12 years agoMove load_to_switch.ll to test/CodeGen/SPARC/
Hans Wennborg [Wed, 19 Sep 2012 09:25:03 +0000 (09:25 +0000)]
Move load_to_switch.ll to test/CodeGen/SPARC/

Because the test invokes llc -march=sparc, it needs to be in a directory
which is only run when the sparc target is built.

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

12 years agorename test
Nadav Rotem [Wed, 19 Sep 2012 09:22:17 +0000 (09:22 +0000)]
rename test

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

12 years agoPrevent inlining of callees which allocate lots of memory into a recursive caller.
Nadav Rotem [Wed, 19 Sep 2012 08:08:04 +0000 (08:08 +0000)]
Prevent inlining of callees which allocate lots of memory into a recursive caller.

Example:

void foo() {
 ... foo();   // I'm recursive!

  bar();
}

bar() {  int a[1000];  // large stack size }

rdar://10853263

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

12 years agoCodeGenPrep: turn lookup tables into switches for some targets.
Hans Wennborg [Wed, 19 Sep 2012 07:48:16 +0000 (07:48 +0000)]
CodeGenPrep: turn lookup tables into switches for some targets.

This is a follow-up from r163302, which added a transformation to
SimplifyCFG that turns some switches into loads from lookup tables.

It was pointed out that some targets, such as GPUs and deeply embedded
targets, might not find this appropriate, but SimplifyCFG doesn't have
enough information about the target to decide this.

This patch adds the reverse transformation to CodeGenPrep: it turns
loads from lookup tables back into switches for targets where we do not
build jump tables (assuming these are also the targets where lookup
tables are inappropriate).

Hopefully we will eventually get to have target information in
SimplifyCFG, and then this CodeGenPrep transformation can be removed.

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

12 years agoRemove code for setting the VEX L-bit as a function of operand size from the code...
Craig Topper [Wed, 19 Sep 2012 06:37:45 +0000 (06:37 +0000)]
Remove code for setting the VEX L-bit as a function of operand size from the code emitters and the disassembler table builder. Fix a couple instructions that were still missing VEX_L.

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

12 years agowhitespace.
Nadav Rotem [Wed, 19 Sep 2012 06:24:00 +0000 (06:24 +0000)]
whitespace.

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

12 years agoAdd explicit VEX_L tags to all 256-bit instructions. This will allow us to remove...
Craig Topper [Wed, 19 Sep 2012 06:06:34 +0000 (06:06 +0000)]
Add explicit VEX_L tags to all 256-bit instructions. This will allow us to remove code from the code emitters that examined operands to set the L-bit.

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

12 years agoSilence -Wnon-virtual-dtor in llvm-stress.
Andrew Trick [Wed, 19 Sep 2012 05:08:30 +0000 (05:08 +0000)]
Silence -Wnon-virtual-dtor in llvm-stress.

This was making it hard to scan my builds for new warnings. The
warning still fires with ToT clang. But if my workaround is unnecessary
for whatever reason, feel free to revert.

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

12 years agoSchedMachineModel: compress the CPU's WriteLatencyTable.
Andrew Trick [Wed, 19 Sep 2012 04:43:19 +0000 (04:43 +0000)]
SchedMachineModel: compress the CPU's WriteLatencyTable.

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

12 years agoDe-nest if's and fix mix-up
Sean Silva [Wed, 19 Sep 2012 02:14:59 +0000 (02:14 +0000)]
De-nest if's and fix mix-up

Two deeply nested if's obscured that the sense of the conditions was
mixed up. Amazingly, TableGen's output is exactly the same even with the
sense of the tests fixed; it seems that all of TableGen's conversions
are symmetric so that the inverted sense was nonetheless correct "by
accident". As such, I couldn't come up with a test case.

If there does in fact exist a non-symmetric conversion in TableGen's
type system, then a test case should be prepared.

Despite the symmetry, both if's are left in place for robustness in the
face of future changes.

Review by Jakob.

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

12 years agoIterate deterministicaly over ClassInfo*'s
Sean Silva [Wed, 19 Sep 2012 01:47:03 +0000 (01:47 +0000)]
Iterate deterministicaly over ClassInfo*'s

Fixes an observed instance of nondeterministic TableGen output.

Review by Jakob.

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

12 years agoIterate deterministically over register classes
Sean Silva [Wed, 19 Sep 2012 01:47:01 +0000 (01:47 +0000)]
Iterate deterministically over register classes

Fixes an observed instance of nondeterministic TableGen output.

Review by Jakob.

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

12 years agoRefactor Record* by-ID comparator to Record.h
Sean Silva [Wed, 19 Sep 2012 01:47:00 +0000 (01:47 +0000)]
Refactor Record* by-ID comparator to Record.h

This is a generally useful utility; there's no reason to have it hidden
in CodeGenDAGPatterns.cpp.

Also, rename it to fit the other comparators in Record.h

Review by Jakob.

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

12 years agollvm/test/MC/X86/x86_nop.s: Make sure -arch=x86 when -mcpu=geode.
NAKAMURA Takumi [Wed, 19 Sep 2012 00:56:20 +0000 (00:56 +0000)]
llvm/test/MC/X86/x86_nop.s: Make sure -arch=x86 when -mcpu=geode.

-mcpu doesn't infer -arch. Consider non-x86 host.

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

12 years agoTidy up. Minor formatting.
Jim Grosbach [Tue, 18 Sep 2012 23:05:18 +0000 (23:05 +0000)]
Tidy up. Minor formatting.

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

12 years agoTidy up. 80 columns.
Jim Grosbach [Tue, 18 Sep 2012 23:05:12 +0000 (23:05 +0000)]
Tidy up. 80 columns.

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

12 years agocomment typo
Andrew Trick [Tue, 18 Sep 2012 22:57:42 +0000 (22:57 +0000)]
comment typo

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

12 years agoFix the last crasher I've gotten a reproduction for in SROA. This one
Chandler Carruth [Tue, 18 Sep 2012 22:37:19 +0000 (22:37 +0000)]
Fix the last crasher I've gotten a reproduction for in SROA. This one
from the dragonegg build bots when we turned on the full version of the
pass. Included a much reduced test case for this pesky bug, despite
bugpoint's uncooperative behavior.

Also, I audited all the similar code I could find and didn't spot any
other cases where this mistake cropped up.

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

12 years agoTest commit
Sean Silva [Tue, 18 Sep 2012 22:21:43 +0000 (22:21 +0000)]
Test commit

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

12 years agoNew utility for expanding integer division for targets that don't support it.
Michael Ilseman [Tue, 18 Sep 2012 22:02:40 +0000 (22:02 +0000)]
New utility for expanding integer division for targets that don't support it.

Implementation derived from compiler-rt's implementation of signed and unsigned integer division.

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

12 years agoMOVi16 (movw) is only legal on cpus with V6T2 support. rdar://12300648
Evan Cheng [Tue, 18 Sep 2012 21:24:16 +0000 (21:24 +0000)]
MOVi16 (movw) is only legal on cpus with V6T2 support. rdar://12300648

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

12 years agoFileCheck: Fix off-by-one bug that made CHECK-NOT: ignore the next character after...
Benjamin Kramer [Tue, 18 Sep 2012 20:51:39 +0000 (20:51 +0000)]
FileCheck: Fix off-by-one bug that made CHECK-NOT: ignore the next character after the colon.

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

12 years agoAdd test for r164155 and remove two tests superseded by ppc64-calls.ll.
Roman Divacky [Tue, 18 Sep 2012 19:51:44 +0000 (19:51 +0000)]
Add test for r164155 and remove two tests superseded by ppc64-calls.ll.

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

12 years agoAdd hidden flag to exclude aliases from output.
Jan Sjödin [Tue, 18 Sep 2012 18:47:58 +0000 (18:47 +0000)]
Add hidden flag to exclude aliases from output.

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

12 years agoAdd a MapVector class. It provides a regular set iteration, but
Rafael Espindola [Tue, 18 Sep 2012 18:43:21 +0000 (18:43 +0000)]
Add a MapVector class. It provides a regular set iteration, but
also provides a insertion order iteration over the values.

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

12 years agoFix the isLocalCall() by checking for linker weakness as well.
Roman Divacky [Tue, 18 Sep 2012 18:27:49 +0000 (18:27 +0000)]
Fix the isLocalCall() by checking for linker weakness as well.

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

12 years agoTargetSchedule: cleanup computeOperandLatency logic & diagnostics.
Andrew Trick [Tue, 18 Sep 2012 18:20:02 +0000 (18:20 +0000)]
TargetSchedule: cleanup computeOperandLatency logic & diagnostics.

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

12 years agomisched: Make ScheduleDAGInstrs use the TargetSchedule interface.
Andrew Trick [Tue, 18 Sep 2012 18:20:00 +0000 (18:20 +0000)]
misched: Make ScheduleDAGInstrs use the TargetSchedule interface.

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

12 years agoRevert r164051.
Akira Hatanaka [Tue, 18 Sep 2012 18:08:25 +0000 (18:08 +0000)]
Revert r164051.

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

12 years agoLSR critical edge splitting fix for PR13756.
Andrew Trick [Tue, 18 Sep 2012 17:51:33 +0000 (17:51 +0000)]
LSR critical edge splitting fix for PR13756.

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

12 years agoFix getCommonType in a different way from the way I fixed it when
Chandler Carruth [Tue, 18 Sep 2012 17:49:37 +0000 (17:49 +0000)]
Fix getCommonType in a different way from the way I fixed it when
working on FCA splitting. Instead of refusing to form a common type when
there are uses of a subsection of the alloca as well as a use of the
entire alloca, just skip the subsection uses and continue looking for
a whole-alloca use with a type that we can use.

This produces slightly prettier IR I think, and also fixes the other
failure in the test.

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

12 years agoFix build for compilers that don't understand injected class names properly.
Benjamin Kramer [Tue, 18 Sep 2012 17:11:47 +0000 (17:11 +0000)]
Fix build for compilers that don't understand injected class names properly.

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

12 years agoAvoid symbol name clash when filling TOC.
Roman Divacky [Tue, 18 Sep 2012 17:10:37 +0000 (17:10 +0000)]
Avoid symbol name clash when filling TOC.

Patch by Adhemerval Zanella.

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

12 years agoSROA: Use CRTP for OpSplitter to get rid of virtual dispatch and the virtual-dtor...
Benjamin Kramer [Tue, 18 Sep 2012 17:06:32 +0000 (17:06 +0000)]
SROA: Use CRTP for OpSplitter to get rid of virtual dispatch and the virtual-dtor warnings that come with it.

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

12 years agoOn PPC64 emit the environment pointer. Patch by Adhemerval Zanella.
Roman Divacky [Tue, 18 Sep 2012 16:55:29 +0000 (16:55 +0000)]
On PPC64 emit the environment pointer. Patch by Adhemerval Zanella.

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

12 years agoOptimize local func calls to not emit nop for TOC restoration.
Roman Divacky [Tue, 18 Sep 2012 16:47:58 +0000 (16:47 +0000)]
Optimize local func calls to not emit nop for TOC restoration.

Patch by Adhemerval Zanella.

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

12 years agoAdd PowerPC64 relocation definitions. Patch by Adhemerval Zanella!
Roman Divacky [Tue, 18 Sep 2012 16:38:02 +0000 (16:38 +0000)]
Add PowerPC64 relocation definitions. Patch by Adhemerval Zanella!

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

12 years agoSROA: Replace the member function template contraption for recursively splitting...
Benjamin Kramer [Tue, 18 Sep 2012 16:20:46 +0000 (16:20 +0000)]
SROA: Replace the member function template contraption for recursively splitting aggregates into a real class.

No intended functionality change.

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

12 years agoAdd test for r164132.
Roman Divacky [Tue, 18 Sep 2012 16:19:10 +0000 (16:19 +0000)]
Add test for r164132.

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

12 years agoWhen creating MCAsmBackend pass the CPU string as well. In X86AsmBackend
Roman Divacky [Tue, 18 Sep 2012 16:08:49 +0000 (16:08 +0000)]
When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend
store this and use it to not emit long nops when the CPU is geode which
doesnt support them.

Fixes PR11212.

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

12 years agoSROA.cpp: Appease msvc.
NAKAMURA Takumi [Tue, 18 Sep 2012 15:29:02 +0000 (15:29 +0000)]
SROA.cpp: Appease msvc.

...I don't know why this could appease msvc...baad.

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

12 years agollvm/test/DebugInfo: Move two tests, 2010-04-13-PubType.ll and linkage-name.ll to...
NAKAMURA Takumi [Tue, 18 Sep 2012 14:57:11 +0000 (14:57 +0000)]
llvm/test/DebugInfo: Move two tests, 2010-04-13-PubType.ll and linkage-name.ll to X86.

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

12 years agoXFAIL SROA test until Chandler can get to it.
Benjamin Kramer [Tue, 18 Sep 2012 14:27:53 +0000 (14:27 +0000)]
XFAIL SROA test until Chandler can get to it.

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

12 years agoCoding standards: fix typo: '= deleted' -> '= delete'.
Dmitri Gribenko [Tue, 18 Sep 2012 14:00:58 +0000 (14:00 +0000)]
Coding standards: fix typo: '= deleted' -> '= delete'.

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

12 years agoMake MachinePostDominatorTree::DT private
Tom Stellard [Tue, 18 Sep 2012 13:49:54 +0000 (13:49 +0000)]
Make MachinePostDominatorTree::DT private

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

12 years agoLNT builders have picked up new SROA, disable it to get the remaining builders green...
Benjamin Kramer [Tue, 18 Sep 2012 13:43:00 +0000 (13:43 +0000)]
LNT builders have picked up new SROA, disable it to get the remaining builders green again.

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

12 years agoFix a warning in release builds and a test case I forgot to update with
Chandler Carruth [Tue, 18 Sep 2012 13:02:06 +0000 (13:02 +0000)]
Fix a warning in release builds and a test case I forgot to update with
a fix to getCommonType in the previous patch.

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

12 years agoAdd a major missing piece to the new SROA pass: aggressive splitting of
Chandler Carruth [Tue, 18 Sep 2012 12:57:43 +0000 (12:57 +0000)]
Add a major missing piece to the new SROA pass: aggressive splitting of
FCAs. This is essential in order to promote allocas that are used in
struct returns by frontends like Clang. The FCA load would block the
rest of the pass from firing, resulting is significant regressions with
the bullet benchmark in the nightly test suite.

Thanks to Duncan for repeated discussions about how best to do this, and
to both him and Benjamin for review.

This appears to have blocked many places where the pass tries to fire,
and so I'm expect somewhat different results with this fix added.

As with the last big patch, I'm including a change to enable the SROA by
default *temporarily*. Ben is going to remove this as soon as the LNT
bots pick up the patch. I'm just trying to get a round of LNT numbers
from the stable machines in the lab.

NOTE: Four clang tests are expected to fail in the brief window where
this is enabled. Sorry for the noise!

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

12 years agoFix instcombine to obey requested alignment when merging allocas.
Richard Osborne [Tue, 18 Sep 2012 09:31:44 +0000 (09:31 +0000)]
Fix instcombine to obey requested alignment when merging allocas.

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

12 years agoMore domain conversion; convert VFP VMOVS to NEON instructions in more cases - when...
James Molloy [Tue, 18 Sep 2012 08:31:15 +0000 (08:31 +0000)]
More domain conversion; convert VFP VMOVS to NEON instructions in more cases - when we may clobber the other S-lane by converting an S to a D instruction, make an effort to work out if the S lane is clobberable or not.

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

12 years agoMake custom operand parsing mnemonic indices use the same mnemonic table as the match...
Craig Topper [Tue, 18 Sep 2012 07:02:21 +0000 (07:02 +0000)]
Make custom operand parsing mnemonic indices use the same mnemonic table as the match table. Reorder fields in OperandMatchEntry to provide the least amount of padding for in tree targets.

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

12 years agoUse variable type for index into mnemonic table. Shrinks size of index field on in...
Craig Topper [Tue, 18 Sep 2012 06:10:45 +0000 (06:10 +0000)]
Use variable type for index into mnemonic table. Shrinks size of index field on in tree targets. Saving static data space.

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

12 years agoReplaced ReInitMCSubtargetInfo with InitMCProcessor.
Andrew Trick [Tue, 18 Sep 2012 05:33:15 +0000 (05:33 +0000)]
Replaced ReInitMCSubtargetInfo with InitMCProcessor.

Now where we used to call ReInitMCSubtargetInfo, we actually recompute
the same information as InitMCSubtargetInfo instead of only setting
the feature bits.

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

12 years agoAdd LLVM_DELETED_FUNCTION to coding standards.
Craig Topper [Tue, 18 Sep 2012 04:43:40 +0000 (04:43 +0000)]
Add LLVM_DELETED_FUNCTION to coding standards.

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

12 years agoFix a typo. No functional change.
Craig Topper [Tue, 18 Sep 2012 04:43:05 +0000 (04:43 +0000)]
Fix a typo. No functional change.

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

12 years agoLet NULL slip through again.
Andrew Trick [Tue, 18 Sep 2012 04:18:39 +0000 (04:18 +0000)]
Let NULL slip through again.

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

12 years agoTargetSchedModel API. Implement latency lookup, disabled.
Andrew Trick [Tue, 18 Sep 2012 04:03:34 +0000 (04:03 +0000)]
TargetSchedModel API. Implement latency lookup, disabled.

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

12 years agocomment typo
Andrew Trick [Tue, 18 Sep 2012 04:03:30 +0000 (04:03 +0000)]
comment typo

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

12 years agoTableGen subtarget emitter. Use getSchedClassIdx.
Andrew Trick [Tue, 18 Sep 2012 03:55:55 +0000 (03:55 +0000)]
TableGen subtarget emitter. Use getSchedClassIdx.

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

12 years agoTableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving...
Andrew Trick [Tue, 18 Sep 2012 03:41:43 +0000 (03:41 +0000)]
TableGen subtarget emitter. Generate resolveSchedClass generated hook for resolving instruction variants.

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

12 years agoTableGen subtarget emitter. Remove unnecessary header dependence.
Andrew Trick [Tue, 18 Sep 2012 03:32:57 +0000 (03:32 +0000)]
TableGen subtarget emitter. Remove unnecessary header dependence.

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

12 years agoMark unimplemented operator new as LLVM_DELETED_FUNCTION.
Craig Topper [Tue, 18 Sep 2012 03:25:49 +0000 (03:25 +0000)]
Mark unimplemented operator new as LLVM_DELETED_FUNCTION.

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

12 years agoTableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.
Andrew Trick [Tue, 18 Sep 2012 03:18:56 +0000 (03:18 +0000)]
TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine model.

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

12 years agoMark constructors, destructors, and operator new commented as 'do not implement'...
Craig Topper [Tue, 18 Sep 2012 02:05:45 +0000 (02:05 +0000)]
Mark constructors, destructors, and operator new commented as 'do not implement' with LLVM_DELETED_FUNCTION instead.

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

12 years agoMark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FU...
Craig Topper [Tue, 18 Sep 2012 02:01:41 +0000 (02:01 +0000)]
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.

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

12 years agoUse vld1 / vst2 for unaligned v2f64 load / store. e.g. Use vld1.16 for 2-byte
Evan Cheng [Tue, 18 Sep 2012 01:42:45 +0000 (01:42 +0000)]
Use vld1 / vst2 for unaligned v2f64 load / store. e.g. Use vld1.16 for 2-byte
aligned address. Based on patch by David Peixotto.

Also use vld1.64 / vst1.64 with 128-bit alignment to take advantage of alignment
hints. rdar://12090772, rdar://12238782

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

12 years agoMark asm matcher conversion table as const.
Craig Topper [Tue, 18 Sep 2012 01:41:49 +0000 (01:41 +0000)]
Mark asm matcher conversion table as const.

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

12 years agoFix some funky indentation.
Evan Cheng [Tue, 18 Sep 2012 01:34:40 +0000 (01:34 +0000)]
Fix some funky indentation.

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

12 years agoFix typo in comment. No functional change.
Craig Topper [Tue, 18 Sep 2012 01:13:36 +0000 (01:13 +0000)]
Fix typo in comment. No functional change.

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

12 years agoPGO: preserve branch-weight metadata when simplifying Switch to a sub, an icmp
Manman Ren [Tue, 18 Sep 2012 00:47:33 +0000 (00:47 +0000)]
PGO: preserve branch-weight metadata when simplifying Switch to a sub, an icmp
and a conditional branch; also when removing dead cases from a switch.

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

12 years agoBackout the wrong subtarget emitter fix
Andrew Trick [Mon, 17 Sep 2012 23:14:15 +0000 (23:14 +0000)]
Backout the wrong subtarget emitter fix

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

12 years agoPGO: preserve branch-weight metadata when simplifying Switch
Manman Ren [Mon, 17 Sep 2012 23:07:43 +0000 (23:07 +0000)]
PGO: preserve branch-weight metadata when simplifying Switch

Hanlde the case when we split the default edge if the default target has "icmp"
and unconditinal branch.

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

12 years agoFix release build after reverting
Andrew Trick [Mon, 17 Sep 2012 23:05:04 +0000 (23:05 +0000)]
Fix release build after reverting

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

12 years agoMerge into undefined lanes under -new-coalescer.
Jakob Stoklund Olesen [Mon, 17 Sep 2012 23:03:25 +0000 (23:03 +0000)]
Merge into undefined lanes under -new-coalescer.

Add LIS::pruneValue() and extendToIndices(). These two functions are
used by the register coalescer when merging two live ranges requires
more than a trivial value mapping as supported by LiveInterval::join().

The pruneValue() function can remove the part of a value number that is
going to conflict in join(). Afterwards, extendToIndices can restore the
live range, using any new dominating value numbers and updating the SSA
form.

Use this complex value mapping to support merging a register into a
vector lane that has a conflicting value, but the clobbered lane is
undef.

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

12 years agoStop adding <imp-def> operands when expanding REG_SEQUENCE.
Jakob Stoklund Olesen [Mon, 17 Sep 2012 23:03:21 +0000 (23:03 +0000)]
Stop adding <imp-def> operands when expanding REG_SEQUENCE.

These extra operands are not needed by register allocators using
VirtRegRewriter, and RAFast don't need them any longer.

By omitting the <imp-def> operands, it becomes possible for the new
register coalescer to track which lanes are valid and which are undef.

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