oota-llvm.git
13 years agoUse TargetMachine hooks to properly print debug variable locations.
Jakob Stoklund Olesen [Fri, 6 May 2011 17:59:59 +0000 (17:59 +0000)]
Use TargetMachine hooks to properly print debug variable locations.

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

13 years agoAlso count identity copies.
Jakob Stoklund Olesen [Fri, 6 May 2011 17:59:57 +0000 (17:59 +0000)]
Also count identity copies.

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

13 years agoPass -disable-cfi.
Rafael Espindola [Fri, 6 May 2011 17:44:58 +0000 (17:44 +0000)]
Pass -disable-cfi.

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

13 years agoPost-RA scheduler compile time fix. Quadratic computation of DAG node depth.
Andrew Trick [Fri, 6 May 2011 17:09:08 +0000 (17:09 +0000)]
Post-RA scheduler compile time fix. Quadratic computation of DAG node depth.

The post-ra scheduler was explicitly updating the depth of a node's
successors after scheduling it, regardless of whether the successor
was ready. This is quadratic for DAGs with transitively redundant
edges. I simply removed the useless update of depth, which is lazilly
computed later.
Fixes <rdar://problem/9044332> compiler takes way too long to build TextInput.

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

13 years agoMove CompileUnit::getOrCreateNameSpace() and CompileUnit::addPubType() from DwarfDebu...
Devang Patel [Fri, 6 May 2011 16:57:54 +0000 (16:57 +0000)]
Move CompileUnit::getOrCreateNameSpace() and CompileUnit::addPubType() from DwarfDebug.cpp to DwarfCompileUnit.cpp

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

13 years agoNothing else uses this label.
Rafael Espindola [Fri, 6 May 2011 15:44:29 +0000 (15:44 +0000)]
Nothing else uses this label.

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

13 years agoYet more dead code.
Rafael Espindola [Fri, 6 May 2011 15:31:55 +0000 (15:31 +0000)]
Yet more dead code.

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

13 years agoUpdate comments.
Rafael Espindola [Fri, 6 May 2011 15:28:56 +0000 (15:28 +0000)]
Update comments.

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

13 years agoMore dead code elimination.
Rafael Espindola [Fri, 6 May 2011 15:22:26 +0000 (15:22 +0000)]
More dead code elimination.

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

13 years agoDead code elimination.
Rafael Espindola [Fri, 6 May 2011 14:56:22 +0000 (14:56 +0000)]
Dead code elimination.

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

13 years agoPTX: add PTX 2.3 language target
Justin Holewinski [Fri, 6 May 2011 11:40:36 +0000 (11:40 +0000)]
PTX:  add PTX 2.3 language target

Patch by Wei-Ren Chen

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

13 years agoFix PR9820: a read-only call differs from a load in that a load doesn't
Duncan Sands [Fri, 6 May 2011 10:30:37 +0000 (10:30 +0000)]
Fix PR9820: a read-only call differs from a load in that a load doesn't
return the pointer being dereferenced, it returns the pointee, but a call
might return the pointer itself.

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

13 years agoRe-revert r130877; it's apparently causing a regression on 197.parser,
Eli Friedman [Fri, 6 May 2011 05:23:07 +0000 (05:23 +0000)]
Re-revert r130877; it's apparently causing a regression on 197.parser,
possibly related to cbnz formation.

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

13 years agoThe computation of string length is not that complicated. Fix it, again. :)
Nick Lewycky [Thu, 5 May 2011 23:52:18 +0000 (23:52 +0000)]
The computation of string length is not that complicated. Fix it, again. :)

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

13 years agoRemove DwarfTableException.
Rafael Espindola [Thu, 5 May 2011 23:19:54 +0000 (23:19 +0000)]
Remove DwarfTableException.

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

13 years agoRemove the DwarfTable enum.
Rafael Espindola [Thu, 5 May 2011 22:14:31 +0000 (22:14 +0000)]
Remove the DwarfTable enum.

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

13 years agoIn debug output, clearly list new instructions without DebugLoc.
Devang Patel [Thu, 5 May 2011 22:05:57 +0000 (22:05 +0000)]
In debug output, clearly list new instructions without DebugLoc.

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

13 years agoRemove little used statistical counter.
Devang Patel [Thu, 5 May 2011 22:00:08 +0000 (22:00 +0000)]
Remove little used statistical counter.

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

13 years agoPR9838: Fix transform introduced in r127064 to not trigger when only one side of...
Eli Friedman [Thu, 5 May 2011 21:59:18 +0000 (21:59 +0000)]
PR9838: Fix transform introduced in r127064 to not trigger when only one side of the icmp is an exact shift.

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

13 years agoMove PPC Linux to CFI.
Rafael Espindola [Thu, 5 May 2011 21:34:33 +0000 (21:34 +0000)]
Move PPC Linux to CFI.

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

13 years agoFix typo. No functional change.
Nick Lewycky [Thu, 5 May 2011 21:27:14 +0000 (21:27 +0000)]
Fix typo. No functional change.

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

13 years agoImplement a really simple DwarfSjLjException.
Rafael Espindola [Thu, 5 May 2011 20:48:31 +0000 (20:48 +0000)]
Implement a really simple DwarfSjLjException.

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

13 years agoList all exception types in a switch.
Rafael Espindola [Thu, 5 May 2011 19:48:34 +0000 (19:48 +0000)]
List all exception types in a switch.

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

13 years agoARM post RA scheduler compile time fix.
Andrew Trick [Thu, 5 May 2011 19:32:21 +0000 (19:32 +0000)]
ARM post RA scheduler compile time fix.

BuildSchedGraph was quadratic in the number of calls in the basic
block. After this fix, it keeps only a single call at the top of the
DefList so compile time doesn't blow up on large blocks. This reduces
postRA sched time on an external test case from 81s to 0.3s.  Although
r130800 (reduced ARM register alias defs) also partially fixes the
issue by reducing the constant overhead of checking call interference
by an order of magnitude.

Fixes <rdar://problem/7662664> very poor compile time with post RA scheduling.

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

13 years agowhitespace
Andrew Trick [Thu, 5 May 2011 19:24:06 +0000 (19:24 +0000)]
whitespace

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

13 years agoDon't produce a __debug_frame.
Rafael Espindola [Thu, 5 May 2011 18:43:39 +0000 (18:43 +0000)]
Don't produce a __debug_frame.
I tested both gdb on a bootstrapped clang and and the gdb testsuite on OS X (snow leopard)
and both are happy using __eh_frame.

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

13 years agoMany LLVM tests relies on standard output stream be in the binary mode. Which is...
Galina Kistanova [Thu, 5 May 2011 18:40:27 +0000 (18:40 +0000)]
Many LLVM tests relies on standard output stream be in the binary mode. Which is not always the case (on Windows in particular). The patch adds a test to verify that the standard output stream is actually in the binary mode.

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

13 years agoAllow FastISel of three-register-operand instructions.
Owen Anderson [Thu, 5 May 2011 17:59:04 +0000 (17:59 +0000)]
Allow FastISel of three-register-operand instructions.

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

13 years agoIf debug info for inlined function is missing then handle it gracefully.
Devang Patel [Thu, 5 May 2011 17:54:26 +0000 (17:54 +0000)]
If debug info for inlined function is missing then handle it gracefully.

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

13 years agoPR9848: pandn is not commutative.
Eli Friedman [Thu, 5 May 2011 17:45:31 +0000 (17:45 +0000)]
PR9848: pandn is not commutative.

No test because I can't think of any way to write one that won't break quickly.

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

13 years agoAdd some statistics to the splitting and spilling frameworks.
Jakob Stoklund Olesen [Thu, 5 May 2011 17:22:53 +0000 (17:22 +0000)]
Add some statistics to the splitting and spilling frameworks.

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

13 years agoAvoid extra vreg copies for arguments passed in registers. Specifically, this can...
Eli Friedman [Thu, 5 May 2011 16:53:34 +0000 (16:53 +0000)]
Avoid extra vreg copies for arguments passed in registers.  Specifically, this can make MachineCSE more effective in some cases (especially in small functions).  PR8361 / part of rdar://problem/8259436 .

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

13 years agoFix test to be less sensitive to coalescing.
Jakob Stoklund Olesen [Thu, 5 May 2011 16:48:00 +0000 (16:48 +0000)]
Fix test to be less sensitive to coalescing.

This should unbreak llvm-gcc-i386-linux-selfhost.

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

13 years agoSmall syntax cleanup; we don't need to #define constants in C++. No functionality...
Eli Friedman [Thu, 5 May 2011 16:25:23 +0000 (16:25 +0000)]
Small syntax cleanup; we don't need to #define constants in C++.  No functionality change intended.

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

13 years agoMinor correction to r130877; fixes PR9846 and hopefully the buildbot failures.
Eli Friedman [Thu, 5 May 2011 16:18:11 +0000 (16:18 +0000)]
Minor correction to r130877; fixes PR9846 and hopefully the buildbot failures.

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

13 years agoMinor change: Fix the typo in RegionPass.h and RegionPass.cpp.
Hongbin Zheng [Thu, 5 May 2011 13:59:38 +0000 (13:59 +0000)]
Minor change: Fix the typo in RegionPass.h and RegionPass.cpp.

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

13 years agoRemove a flag that would set the ".eh" symbol as .globl. MachO was the only one
Bill Wendling [Thu, 5 May 2011 06:49:15 +0000 (06:49 +0000)]
Remove a flag that would set the ".eh" symbol as .globl. MachO was the only one
who used this flag, and it now emits CFI and doesn't emit this anymore. All
other targets left this flag "false".
<rdar://problem/8486371>

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

13 years agollvmc: Make 'true' and 'false' instances of a 'Bool' class.
Mikhail Glushenkov [Thu, 5 May 2011 04:25:03 +0000 (04:25 +0000)]
llvmc: Make 'true' and 'false' instances of a 'Bool' class.

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

13 years agollvmc: Make it possible to provide an argument to (join).
Mikhail Glushenkov [Thu, 5 May 2011 04:24:58 +0000 (04:24 +0000)]
llvmc: Make it possible to provide an argument to (join).

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

13 years agoUpdate the gcov version used slightly, to make it stop causing modern gcov's to
Nick Lewycky [Thu, 5 May 2011 02:46:38 +0000 (02:46 +0000)]
Update the gcov version used slightly, to make it stop causing modern gcov's to
crash.

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

13 years agoRemove dead function.
Nick Lewycky [Thu, 5 May 2011 00:17:34 +0000 (00:17 +0000)]
Remove dead function.

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

13 years agoWhen the path wasn't emitted by the frontend, discard any path on the source
Nick Lewycky [Thu, 5 May 2011 00:03:30 +0000 (00:03 +0000)]
When the path wasn't emitted by the frontend, discard any path on the source
filename.

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

13 years agoDisable physical register coalescing by default.
Jakob Stoklund Olesen [Wed, 4 May 2011 23:59:00 +0000 (23:59 +0000)]
Disable physical register coalescing by default.

Joining physregs is inherently dangerous because it uses a heuristic to avoid
creating invalid code. Linear scan had an emergency spilling mechanism to deal
with those rare cases. The new greedy allocator does not.

The greedy register allocator is much better at taking hints, so this has almost
no impact on code size and quality. The few cases where it matters show up as
unit tests that now have -join-physregs enabled explicitly.

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

13 years agoSet debug loc for new instructions.
Devang Patel [Wed, 4 May 2011 23:58:50 +0000 (23:58 +0000)]
Set debug loc for new instructions.

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

13 years agoSet debug location for new PHI nodes created in exit block.
Devang Patel [Wed, 4 May 2011 23:58:22 +0000 (23:58 +0000)]
Set debug location for new PHI nodes created in exit block.

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

13 years agoPrepare remaining tests for -join-physreg going away.
Jakob Stoklund Olesen [Wed, 4 May 2011 23:54:59 +0000 (23:54 +0000)]
Prepare remaining tests for -join-physreg going away.

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

13 years agoFix X86RegisterInfo::getMatchingSuperRegClass for sub_8bit_hi.
Jakob Stoklund Olesen [Wed, 4 May 2011 23:54:54 +0000 (23:54 +0000)]
Fix X86RegisterInfo::getMatchingSuperRegClass for sub_8bit_hi.

It is OK for B to be any GR8_ABCD_H superclass, the returned register class
doesn't have to map surjectively onto B.

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

13 years agoFix a batch of x86 tests to be coalescer independent.
Jakob Stoklund Olesen [Wed, 4 May 2011 23:54:51 +0000 (23:54 +0000)]
Fix a batch of x86 tests to be coalescer independent.

Most of these tests require a single mov instruction that can come either before
or after a 2-addr instruction. -join-physregs changes the behavior, but the
results are equivalent.

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

13 years agoDocument the automatic alias printing of InstAliases.
Bill Wendling [Wed, 4 May 2011 23:40:14 +0000 (23:40 +0000)]
Document the automatic alias printing of InstAliases.

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

13 years agoAdd explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
Ted Kremenek [Wed, 4 May 2011 23:26:59 +0000 (23:26 +0000)]
Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.

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

13 years agoGive this test an explicit register allocator, so that it can work even if
Dan Gohman [Wed, 4 May 2011 23:14:02 +0000 (23:14 +0000)]
Give this test an explicit register allocator, so that it can work even if
the default register allocator is changed.

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

13 years agoSjLj EH could produce a machine basic block that legitimately has more than one
Bill Wendling [Wed, 4 May 2011 22:54:05 +0000 (22:54 +0000)]
SjLj EH could produce a machine basic block that legitimately has more than one
landing pad as its successor.

SjLj exception handling jumps to the correct landing pad via a switch statement
that's generated right before code-gen. Loosen the constraint in the machine
instruction verifier to allow for this. Note, this isn't the most rigorous check
since we cannot determine where that switch statement came from. But it's
marginally better than turning this check off when SjLj exceptions are used.
<rdar://problem/9187612>

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

13 years agoPreserve line number information while threading jumps.
Devang Patel [Wed, 4 May 2011 22:48:19 +0000 (22:48 +0000)]
Preserve line number information while threading jumps.

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

13 years agoCreate the parent directories to place the .gcda files in if they don't exist.
Nick Lewycky [Wed, 4 May 2011 22:34:29 +0000 (22:34 +0000)]
Create the parent directories to place the .gcda files in if they don't exist.
That's kinda weird because the .gcno files are supposed to already be there,
but libgcov does this and somehow Google has managed to depend on it.

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

13 years agoRe-commit r130862 with a minor change to avoid an iterator running off the edge in...
Eli Friedman [Wed, 4 May 2011 22:10:36 +0000 (22:10 +0000)]
Re-commit r130862 with a minor change to avoid an iterator running off the edge in some cases.

Original message:

Teach MachineCSE how to do simple cross-block CSE involving physregs.  This allows, for example, eliminating duplicate cmpl's on x86. Part of rdar://problem/8259436 .

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

13 years agoPreserve line number info.
Devang Patel [Wed, 4 May 2011 21:58:58 +0000 (21:58 +0000)]
Preserve line number info.

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

13 years agoThis test fails on ARM. The test shouldn't explicitly specify alignment (and alignmen...
Galina Kistanova [Wed, 4 May 2011 21:57:44 +0000 (21:57 +0000)]
This test fails on ARM. The test shouldn't explicitly specify alignment (and alignment 4 is wrong) and requires hard-float.

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

13 years agoIf builder is initialized using an instruction as insertion point, then use the instr...
Devang Patel [Wed, 4 May 2011 21:57:22 +0000 (21:57 +0000)]
If builder is initialized using an instruction as insertion point, then use the instruction's debug location as current debug location.

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

13 years agopreserve line number info.
Devang Patel [Wed, 4 May 2011 21:37:05 +0000 (21:37 +0000)]
preserve line number info.

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

13 years agoBack out r130862; it appears to be breaking bootstrap.
Eli Friedman [Wed, 4 May 2011 20:48:42 +0000 (20:48 +0000)]
Back out r130862; it appears to be breaking bootstrap.

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

13 years agoTeach MachineCSE how to do simple cross-block CSE involving physregs. This allows...
Eli Friedman [Wed, 4 May 2011 19:54:24 +0000 (19:54 +0000)]
Teach MachineCSE how to do simple cross-block CSE involving physregs.  This allows, for example, eliminating duplicate cmpl's on x86. Part of rdar://problem/8259436 .

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

13 years agoRemove an unused variable.
Duncan Sands [Wed, 4 May 2011 19:13:01 +0000 (19:13 +0000)]
Remove an unused variable.

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

13 years agoFix more register and coalescing dependencies.
Jakob Stoklund Olesen [Wed, 4 May 2011 19:02:11 +0000 (19:02 +0000)]
Fix more register and coalescing dependencies.

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

13 years agoExplicitly request physreg coalesing for a bunch of Thumb2 unit tests.
Jakob Stoklund Olesen [Wed, 4 May 2011 19:02:07 +0000 (19:02 +0000)]
Explicitly request physreg coalesing for a bunch of Thumb2 unit tests.

These tests all follow the same pattern:

mov r2, r0
movs r0, #0
$CMP r2, r1
it eq
moveq r0, #1
bx lr

The first 'mov' can be eliminated by rematerializing 'movs r0, #0' below the
test instruction:

$CMP r0, r1
mov.w r0, #0
it eq
moveq r0, #1
bx lr

So far, only physreg coalescing can do that. The register allocators won't yet
split live ranges just to eliminate copies. They can learn, but this particular
problem is not likely to show up in real code. It only appears because r0 is
used for both the function argument and return value.

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

13 years agoImplement SystemZRegisterInfo::getMatchingSuperRegClass to enable cross-class joins.
Jakob Stoklund Olesen [Wed, 4 May 2011 19:02:04 +0000 (19:02 +0000)]
Implement SystemZRegisterInfo::getMatchingSuperRegClass to enable cross-class joins.

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

13 years agoFileCheckize and break dependence on coalescing order.
Jakob Stoklund Olesen [Wed, 4 May 2011 19:02:01 +0000 (19:02 +0000)]
FileCheckize and break dependence on coalescing order.

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

13 years agoExplicitly request -join-physregs for some tests that depend on it.
Jakob Stoklund Olesen [Wed, 4 May 2011 19:01:59 +0000 (19:01 +0000)]
Explicitly request -join-physregs for some tests that depend on it.

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

13 years agoDo not emit location expression size twice.
Devang Patel [Wed, 4 May 2011 19:00:57 +0000 (19:00 +0000)]
Do not emit location expression size twice.

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

13 years agoFix cmake build.
Rafael Espindola [Wed, 4 May 2011 18:46:56 +0000 (18:46 +0000)]
Fix cmake build.

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

13 years agoRemove LLVM IR metadata in test case committed in r130847.
Akira Hatanaka [Wed, 4 May 2011 18:28:36 +0000 (18:28 +0000)]
Remove LLVM IR metadata in test case committed in r130847.

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

13 years agoPrevent instructions using $gp from being placed between a jalr and the instruction...
Akira Hatanaka [Wed, 4 May 2011 17:54:27 +0000 (17:54 +0000)]
Prevent instructions using $gp from being placed between a jalr and the instruction that restores the clobbered $gp.

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

13 years agoProducing a DW_FORM_addr for DW_AT_stmt_list is probably correct, but
Rafael Espindola [Wed, 4 May 2011 17:44:06 +0000 (17:44 +0000)]
Producing a DW_FORM_addr for DW_AT_stmt_list is probably correct, but
it is both inefficient and unexpected by dwarfdump. Change to
a DW_FORM_data4.

While in here, change the predicate name to reflect that the position
is not really absolute (it is an offset), just that the linker needs a
relocation.

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

13 years agoRename -disable-physical-join to -join-physregs and invert it.
Jakob Stoklund Olesen [Wed, 4 May 2011 16:45:05 +0000 (16:45 +0000)]
Rename -disable-physical-join to -join-physregs and invert it.

Physreg joining is still on by default, but I will turn it off shortly.

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

13 years agoTighten up check for empty (i.e. no meaningful debug info) module. This fixes dwarf...
Devang Patel [Wed, 4 May 2011 16:34:02 +0000 (16:34 +0000)]
Tighten up check for empty (i.e. no meaningful debug info) module. This fixes dwarf-die2.c test case from gcc test suite.

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

13 years agoAdd variations on: max(x,y) >= min(x,z) folds to true. This isn't that common,
Duncan Sands [Wed, 4 May 2011 16:05:05 +0000 (16:05 +0000)]
Add variations on: max(x,y) >= min(x,z) folds to true.  This isn't that common,
but according to my super-optimizer there are only two missed simplifications
of -instsimplify kind when compiling bzip2, and this is one of them.  It amuses
me to have bzip2 be perfectly optimized as far as instsimplify goes!

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

13 years agoEmit gcov data files to the directory specified in the metadata produced by the
Nick Lewycky [Wed, 4 May 2011 04:03:04 +0000 (04:03 +0000)]
Emit gcov data files to the directory specified in the metadata produced by the
frontend, if applicable.

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

13 years agoFix crash when not setting GCOV_PREFIX.
Nick Lewycky [Wed, 4 May 2011 03:58:45 +0000 (03:58 +0000)]
Fix crash when not setting GCOV_PREFIX.

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

13 years agoRemove dead intrinsics.
Bill Wendling [Wed, 4 May 2011 02:40:54 +0000 (02:40 +0000)]
Remove dead intrinsics.

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

13 years agoindvars: Added DisableIVRewrite and WidenIVs.
Andrew Trick [Wed, 4 May 2011 02:10:13 +0000 (02:10 +0000)]
indvars: Added DisableIVRewrite and WidenIVs.

This adds functionality to remove size/zero extension during indvars
without generating a canonical IV and rewriting all IV users. It's
disabled by default so should have no effect on codegen. Work in progress.

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

13 years agoThe system suppression file should catch these, but since they *once again* are
Nick Lewycky [Wed, 4 May 2011 01:03:02 +0000 (01:03 +0000)]
The system suppression file should catch these, but since they *once again* are
not, I'll just add them here and be done with it.

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

13 years agoDon't depend on the physreg coalescing order.
Jakob Stoklund Olesen [Wed, 4 May 2011 01:01:47 +0000 (01:01 +0000)]
Don't depend on the physreg coalescing order.

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

13 years agoDon't run this test through -regalloc=basic.
Jakob Stoklund Olesen [Wed, 4 May 2011 01:01:44 +0000 (01:01 +0000)]
Don't run this test through -regalloc=basic.

The basic allocator is really bad about hinting, so it doesn't eliminate all
copies when physreg joining is disabled.

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

13 years agoFix register-dependent XCore tests
Jakob Stoklund Olesen [Wed, 4 May 2011 01:01:41 +0000 (01:01 +0000)]
Fix register-dependent XCore tests

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

13 years agoFix register-dependent test in MSP430.
Jakob Stoklund Olesen [Wed, 4 May 2011 01:01:39 +0000 (01:01 +0000)]
Fix register-dependent test in MSP430.

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

13 years agoImplement MSP430RegisterInfo::getMatchingSuperRegClass to enable cross-class
Jakob Stoklund Olesen [Wed, 4 May 2011 01:01:36 +0000 (01:01 +0000)]
Implement MSP430RegisterInfo::getMatchingSuperRegClass to enable cross-class
coalescing.

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

13 years agoRemove some random comments that snuck in from somewhere.
Eric Christopher [Wed, 4 May 2011 00:48:02 +0000 (00:48 +0000)]
Remove some random comments that snuck in from somewhere.

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

13 years agoMark ultra-super-registers QQQQ as call-clobbered instead of the D sub-registers.
Jakob Stoklund Olesen [Tue, 3 May 2011 22:31:24 +0000 (22:31 +0000)]
Mark ultra-super-registers QQQQ as call-clobbered instead of the D sub-registers.

LiveVariables doesn't understand that clobbering D0 and D1 completely overwrites
Q0, so if Q0 is live-in to a function, its live range will extend beyond a
function call that only clobbers D0 and D1. This shows up in the
ARM/2009-11-01-NeonMoves test case.

LiveVariables should probably implement the much stricter rules for physreg
liveness that RAFast imposes - a physreg is killed by the first use of any
alias.

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

13 years agoFix a bunch of ARM tests to be register allocation independent.
Jakob Stoklund Olesen [Tue, 3 May 2011 22:31:21 +0000 (22:31 +0000)]
Fix a bunch of ARM tests to be register allocation independent.

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

13 years agoindvars: Added canExpandBackEdgeTakenCount.
Andrew Trick [Tue, 3 May 2011 22:24:10 +0000 (22:24 +0000)]
indvars: Added canExpandBackEdgeTakenCount.

Only create a canonical IV for backedge taken count if it will
actually be used by LinearFunctionTestReplace. And some related
cleanup, preparing to reduce dependence on canonical IVs.
No significant effect on x86 or arm in the test-suite.

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

13 years agoEven if the subprogram is going to use AT_specification, emit DW_AT_MIPS_linkage_name...
Devang Patel [Tue, 3 May 2011 21:50:34 +0000 (21:50 +0000)]
Even if the subprogram is going to use AT_specification, emit DW_AT_MIPS_linkage_name. This helps gdb and fixes var-path-expr.exp regression reported by gdb testsuite.

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

13 years agoMCDwarf: Don't save Twine to local variable, this is almost never safe to do
Daniel Dunbar [Tue, 3 May 2011 21:33:37 +0000 (21:33 +0000)]
MCDwarf: Don't save Twine to local variable, this is almost never safe to do
(and should thus never be done).
 - Should fix a crash on win32.

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

13 years agoReplace the "movnt" intrinsics with a native store + nontemporal metadata bit.
Bill Wendling [Tue, 3 May 2011 21:11:17 +0000 (21:11 +0000)]
Replace the "movnt" intrinsics with a native store + nontemporal metadata bit.
<rdar://problem/8460511>

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

13 years agoGracefully handle invalid live ranges. Fix PR9831.
Jakob Stoklund Olesen [Tue, 3 May 2011 20:42:13 +0000 (20:42 +0000)]
Gracefully handle invalid live ranges. Fix PR9831.

Register coalescing can sometimes create live ranges that end in the middle of a
basic block without any killing instruction. When SplitKit detects this, it will
repair the live range by shrinking it to its uses.

Live range splitting also needs to know about this. When the range shrinks so
much that it becomes allocatable, live range splitting fails because it can't
find a good split point. It is paranoid about making progress, so an allocatable
range is considered an error.

The coalescer should really not be creating these bad live ranges. They appear
when coalescing dead copies.

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

13 years agoImplement some basic simplifications involving min/max, for example
Duncan Sands [Tue, 3 May 2011 19:53:10 +0000 (19:53 +0000)]
Implement some basic simplifications involving min/max, for example
max(a,b) >= a -> true.  According to my super-optimizer, these are
by far the most common simplifications (of the -instsimplify kind)
that occur in the testsuite and aren't caught by -std-compile-opts.

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

13 years agoTidy up. Add missing newline to generated file.
Jim Grosbach [Tue, 3 May 2011 19:09:56 +0000 (19:09 +0000)]
Tidy up. Add missing newline to generated file.

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

13 years agoMake the test less likely to fail with minor changes.
Evan Cheng [Tue, 3 May 2011 19:09:32 +0000 (19:09 +0000)]
Make the test less likely to fail with minor changes.

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

13 years agoFix function MipsRegisterInfo::getRegisterNumbering.
Akira Hatanaka [Tue, 3 May 2011 18:41:54 +0000 (18:41 +0000)]
Fix function  MipsRegisterInfo::getRegisterNumbering.

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

13 years agoRemove test for iOS divmod function, since that is disabled for now.
Bob Wilson [Tue, 3 May 2011 17:54:49 +0000 (17:54 +0000)]
Remove test for iOS divmod function, since that is disabled for now.

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

13 years agoTemporarily disable use of divmod compiler-rt functions for iOS.
Bob Wilson [Tue, 3 May 2011 17:33:22 +0000 (17:33 +0000)]
Temporarily disable use of divmod compiler-rt functions for iOS.

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

13 years agoFold ARM coprocessor intrinsics patterns into the instructions defs whenever
Bruno Cardoso Lopes [Tue, 3 May 2011 17:29:29 +0000 (17:29 +0000)]
Fold ARM coprocessor intrinsics patterns into the instructions defs whenever
it's possible.

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