Andrew Trick [Sat, 11 Jun 2011 01:05:22 +0000 (01:05 +0000)]
Branch profiling: floating-point avoidance.
Patch by: Jakub Staszak!
Introduces BranchProbability. Changes unsigned to uint32_t all over and
uint64_t only when overflow is expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132867
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 11 Jun 2011 00:28:06 +0000 (00:28 +0000)]
Move the list of registers into CodeGenRegBank.
Also move the sub-register index computations from RegisterInfoEmitter
into CodeGenRegBank.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132865
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 10 Jun 2011 23:39:36 +0000 (23:39 +0000)]
Add full x86 fast-isel support for memcpy and memset.
rdar://
9431466
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132864
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 10 Jun 2011 23:05:08 +0000 (23:05 +0000)]
80-col cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132863
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 10 Jun 2011 22:30:30 +0000 (22:30 +0000)]
Initialize BasicAA's AliasCache to set it to use fewer buckets by
default, since it usually has very few elements. This speeds up
alias queries in many cases, because AliasCache.clear() doesn't
have to visit as many buckets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132862
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 10 Jun 2011 21:47:14 +0000 (21:47 +0000)]
Install libprofile_rt.dylib where it's more available for gcov support.
<rdar://problem/
9583891>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132860
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Jun 2011 21:01:53 +0000 (21:01 +0000)]
Removed tabs. Also fixed my editor...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132857
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 10 Jun 2011 20:59:24 +0000 (20:59 +0000)]
Provide an ARMCCState subclass of CCState so that ARM clients will always set
CallOrPrologue correctly and eliminate the existing setter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132856
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 10 Jun 2011 20:37:36 +0000 (20:37 +0000)]
Rename the ParmContext enum values to make a bit more sense and add a small
comment on their meaning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132854
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 10 Jun 2011 20:31:39 +0000 (20:31 +0000)]
Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132853
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 10 Jun 2011 20:30:08 +0000 (20:30 +0000)]
Remove a pointless const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132852
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Jun 2011 20:08:23 +0000 (20:08 +0000)]
Remove duplicated test.
Thanks Bob Wilson for noticing it!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132851
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 10 Jun 2011 18:40:00 +0000 (18:40 +0000)]
Move some sub-register index calculations to CodeGenRegisters.cpp
Create a new CodeGenRegBank class that will eventually hold all the code
that computes the register structure from Records.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132849
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Fri, 10 Jun 2011 12:28:24 +0000 (12:28 +0000)]
Fix example code in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132844
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 10 Jun 2011 08:26:26 +0000 (08:26 +0000)]
Add -mattr=+sse2 to make the buildbots happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132839
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Fri, 10 Jun 2011 05:35:25 +0000 (05:35 +0000)]
Reverted r132785. It seems this test needs more research.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132836
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Fri, 10 Jun 2011 03:57:02 +0000 (03:57 +0000)]
Changed condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132834
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 10 Jun 2011 02:44:19 +0000 (02:44 +0000)]
Adding a test case for revision 132825.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132830
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 10 Jun 2011 01:13:01 +0000 (01:13 +0000)]
PR10092 (second try): Don't crash on a load without a momoperand; fast-isel creates loads like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132826
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 10 Jun 2011 00:53:15 +0000 (00:53 +0000)]
Ensure that EmitGlobalVariable is correctly differentiating between declarations
and definitions when emitting global variables. This was causing global
declarations to be emitted as if they were definitions.
Fixes <rdar://problem/
9429892>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132825
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 10 Jun 2011 00:30:08 +0000 (00:30 +0000)]
Add a simple test which makes sure folding immediate float zero to a memory operand works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132824
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jun 2011 23:55:56 +0000 (23:55 +0000)]
Make the optional verification step more strict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132822
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jun 2011 23:51:45 +0000 (23:51 +0000)]
Avoid a gcc warning about multiline comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132821
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jun 2011 23:22:56 +0000 (23:22 +0000)]
On last fix to the early tail duplication.
With this I am able to bootstrap clang with early tail duplication enabled
for any small bb and setting tail-dup-size to a relatively large value(8) to
stress this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132816
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 9 Jun 2011 23:02:19 +0000 (23:02 +0000)]
Chris fixed this README a while back by changing how clang generates code for structs like the given struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132815
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jun 2011 22:53:47 +0000 (22:53 +0000)]
Also consider phi nodes when deciding if a register is live out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132814
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 9 Jun 2011 22:30:07 +0000 (22:30 +0000)]
A CCState was being created without setting whether it is in the Call or Prologue state,
causing an assertion failure downstream. This fixes <rdar://problem/
9562908>.
This really seems like it should always be set at CCState creation time, so mistakes like
this can never happen. I'll take a look at doing that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132811
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 9 Jun 2011 22:14:44 +0000 (22:14 +0000)]
Change this DAGCombine to build AND of SHR instead of SHR of AND; this matches the ordering we prefer in instcombine. Part of rdar://
9562809.
The potential DAGCombine which enforces this more generally messes up some other very fragile patterns, so I'm leaving that alone, at least for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132809
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jun 2011 21:43:25 +0000 (21:43 +0000)]
AnalyzeBranch modifies the bb, but we don't want to modify a bb with
eh edges. Swap the order of the checks to avoid it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132806
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jun 2011 20:55:41 +0000 (20:55 +0000)]
A PHI in this basic block is a use in another basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132805
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 9 Jun 2011 20:31:09 +0000 (20:31 +0000)]
When deleting a basic block, remove call edges only for non-intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132803
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Thu, 9 Jun 2011 20:25:38 +0000 (20:25 +0000)]
Fix emission of PPC64 assembler on non-darwin platforms by splitting
VK_PPC_{HA,LO}16 into darwin and gas variants.
Darwin wants {ha,lo}16(symbol) while gnu as wants symbol@{ha,l}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132802
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 9 Jun 2011 20:11:46 +0000 (20:11 +0000)]
Modify comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132800
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 9 Jun 2011 20:06:24 +0000 (20:06 +0000)]
SplitCriticalEdge can sometimes split the edge from an invoke to a landing
pad, separating the exception and selector calls from the new lpad. Teaching
it not to do that, or to properly adjust the CFG afterwards, is out of
scope because it would require the other edges to the landing pad to be split
as well (effectively). Instead, just recover from the most likely cases
during inlining. The best long-term solution is to change the exception
representation and commit to either requiring or not requiring the more
complex edge-splitting logic; this is just a shorter-term hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132799
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jun 2011 19:54:42 +0000 (19:54 +0000)]
Refactor some checks into shouldTailDuplicate. Update comments.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132798
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 9 Jun 2011 19:46:27 +0000 (19:46 +0000)]
Teach the CallGraph to ignore calls to intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132797
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 9 Jun 2011 19:33:30 +0000 (19:33 +0000)]
Revert 132789; it breaks tests. My mistake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132795
91177308-0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Thu, 9 Jun 2011 19:13:45 +0000 (19:13 +0000)]
Remove an uneeded switch - Turns out reloc results are identical w/o the switch. (face+palm)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132790
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 9 Jun 2011 18:55:00 +0000 (18:55 +0000)]
Add a check to make sure we don't crash with strange configurations where we do fast-isel, then try to fold instructions. PR10092.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132789
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 9 Jun 2011 18:42:07 +0000 (18:42 +0000)]
Move TableGen's register bank classes to their own source file.
I'll be moving some more code there to gather all of the
register-specific stuff in one place. Currently it is shared between
CodeGenTarget and RegisterInfoEmitter.
The plan is that CodeGenRegisters can compute the full register bank
structure while RegisterInfoEmitter only will handle the printing part.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132788
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Thu, 9 Jun 2011 17:18:37 +0000 (17:18 +0000)]
Added dg.exp to run FrontendC ARM-dependent tests; updated inline-asm-multichar.c test per this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132785
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 9 Jun 2011 16:57:29 +0000 (16:57 +0000)]
Add special-case range checking for VCVT_N intrinsic immediate operands.
Radar
9558930.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132782
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 9 Jun 2011 16:56:59 +0000 (16:56 +0000)]
Remove custom allocation order boilerplate that is no longer needed.
The register allocators automatically filter out reserved registers and
place the callee saved registers last in the allocation order, so custom
methods are no longer necessary just for that.
Some targets still use custom allocation orders:
ARM/Thumb: The high registers are removed from GPR in thumb mode. The
NEON allocation orders prefer to use non-VFP2 registers first.
X86: The GR8 classes omit AH-DH in x86-64 mode to avoid REX trouble.
SystemZ: Some of the allocation orders are omitting R12 aliases without
explanation. I don't understand this target well enough to fix that. It
looks like all the boilerplate could be removed by reserving the right
registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132781
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 9 Jun 2011 16:03:19 +0000 (16:03 +0000)]
Speculatively revert 132758 and 132768 to try to fix the Windows buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132777
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 9 Jun 2011 15:39:01 +0000 (15:39 +0000)]
Recommit r132764 since it didn't cause the windows buildbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132776
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jun 2011 14:38:09 +0000 (14:38 +0000)]
Improve the handling of available_externally and llvm.global_ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132775
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 9 Jun 2011 11:11:45 +0000 (11:11 +0000)]
Enable printf() to iprintf() optimization for the TCE target.
Patch by Pekka Jaaskelainen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132774
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Jun 2011 06:38:17 +0000 (06:38 +0000)]
add another sandybridge alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132772
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 9 Jun 2011 06:29:54 +0000 (06:29 +0000)]
Temporarily revert 132764 to see if it fixes the Windows buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132771
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 9 Jun 2011 05:58:50 +0000 (05:58 +0000)]
Have the JIT tutorial use IRBuilder for the IR.
Patch by Jake Waskett!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132770
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 9 Jun 2011 03:31:05 +0000 (03:31 +0000)]
Initial support for inline asm memory operand constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132768
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 9 Jun 2011 01:52:44 +0000 (01:52 +0000)]
Remove a vacuous condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132767
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 9 Jun 2011 01:45:33 +0000 (01:45 +0000)]
Fix PR10104 by adding a bounds check on a vector element access check. It was
assuming that all offsets are legal vector accesses, and thus trying to access
the float member of { <2 x float>, float } as the 3rd element of the first
member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132766
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 9 Jun 2011 00:15:19 +0000 (00:15 +0000)]
If the alignment of the byval argument is greater than the alignment
of the frame then increase the maximum alignment of the frame to
match.
Fixes PR6965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132764
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 8 Jun 2011 23:55:35 +0000 (23:55 +0000)]
Add a parameter to CCState so that it can access the MachineFunction.
No functional change.
Part of PR6965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132763
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 8 Jun 2011 22:08:31 +0000 (22:08 +0000)]
Fix an assymmetry between ConvertScalar_ExtractValue and ConvertScalar_InsertValue. The
former was using the size of the entire alloca, whereas the latter was correctly using
the allocated size of the immediate type being converted (which may differ from the size
of the alloca). This fixes PR10082.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132759
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 8 Jun 2011 21:28:09 +0000 (21:28 +0000)]
Fix bug in lowering of DYNAMIC_STACKALLOC nodes. The correct offset of the
dynamically allocated stack area was not set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132758
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 8 Jun 2011 17:39:33 +0000 (17:39 +0000)]
Reorganize code in MipsTargetLowering::LowerCall to improve readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132756
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 8 Jun 2011 15:19:49 +0000 (15:19 +0000)]
Remove a temporary test case probe in CheckForLiveRegDef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132751
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 8 Jun 2011 14:23:19 +0000 (14:23 +0000)]
Fix count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132749
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 8 Jun 2011 14:13:31 +0000 (14:13 +0000)]
Count how many phis we are creating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132748
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Tue, 7 Jun 2011 23:54:00 +0000 (23:54 +0000)]
Fix an issue where the two-address conversion pass incorrectly rewrites untied
operands to an early clobber register. This fixes <rdar://problem/
9566076>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132738
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 7 Jun 2011 23:26:45 +0000 (23:26 +0000)]
Fix a silly error I introduce in r131951.
Fixes PR10095.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132735
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 7 Jun 2011 22:20:13 +0000 (22:20 +0000)]
Create a new ARM directory for FrontendC tests and use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132734
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 7 Jun 2011 20:41:31 +0000 (20:41 +0000)]
Fixed a few illegal paths with llvm_unreachable. Patch by Cameron McInally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132732
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 7 Jun 2011 20:03:13 +0000 (20:03 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132730
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 7 Jun 2011 19:28:39 +0000 (19:28 +0000)]
Refactor MipsTargetLowering::EmitInstrWithCustomInserter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132726
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 7 Jun 2011 19:03:14 +0000 (19:03 +0000)]
Put back removed line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132725
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 7 Jun 2011 18:58:42 +0000 (18:58 +0000)]
Coding style fixes.
- Fix indentation.
- Move comments.
- Fit lines in 80 columns.
- Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132724
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 7 Jun 2011 18:16:51 +0000 (18:16 +0000)]
Use tabs to separate opcode and operand strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132718
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 7 Jun 2011 18:00:14 +0000 (18:00 +0000)]
Add comments for wrapper node patterns in MipsInstrInfo.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132717
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 7 Jun 2011 17:32:17 +0000 (17:32 +0000)]
Test that ".byte 1, 2, 3, 4" does the right thing.
Requested by nbjoerg!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132716
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 7 Jun 2011 17:31:02 +0000 (17:31 +0000)]
Make EmitIntValue() work properly on big-endian targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132715
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Tue, 7 Jun 2011 15:23:11 +0000 (15:23 +0000)]
Tweak this test for ARM-hosted 'bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132711
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 7 Jun 2011 06:05:58 +0000 (06:05 +0000)]
Switched to DenseMap for allowed sets in PBQP. Reduces total LLC time by 15% on CINT2006 for x86-32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132707
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 7 Jun 2011 05:23:58 +0000 (05:23 +0000)]
Move the legalizer tests to the X86 directory because the test uses the x86
codegen. Thanks Galina.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132706
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 7 Jun 2011 02:17:21 +0000 (02:17 +0000)]
Add test case for C++ exception handling and fix the following mistakes in MipsFrameLowering::emitPrologue:
- cfi directives are not inserted at the right location or in the right order.
- The source MachineLocation for the cfi directive that changes the cfa register
to $fp should be MachineLocation::VirtualFP.
- A PROLOG_LABEL that marks the beginning of cfi_offset directives for
callee-saved register is emitted even when no callee-saved registers are
saved.
- When a callee-saved double precision register is saved, two cfi_offset
directives, one for each of the paired single precision registers, should be
emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132703
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 7 Jun 2011 00:38:12 +0000 (00:38 +0000)]
Fix a merge bug in preRAsched for handling physreg aliases.
I've been sitting on this long enough trying to find a test case. I
think the fix should go in now, but I'll keep working on the test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132701
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 7 Jun 2011 00:08:49 +0000 (00:08 +0000)]
Fix for setjmp/longjmp exception handling on ARM. setjmp clobbers CPSR.
rdar://problem/
9556069
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132699
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 6 Jun 2011 23:55:20 +0000 (23:55 +0000)]
Simplify local live range splitting's safeguard to fix PR10070.
When local live range splitting creates a live range with the same
number of instructions as the old range, mark it as RS_Local. When such
a range is seen again, require that it be split in a way that reduces
the number of instructions. That guarantees we are making progress while
still being able to perform 3 -> 2+3 splits as required by PR10070.
This also means that the PrevSlot map is no longer needed. This was also
used to estimate new spill weights, but that is no longer necessary
after slotIndexes::insertMachineInstrInMaps() got the extra Late
insertion argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132697
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Mon, 6 Jun 2011 23:15:58 +0000 (23:15 +0000)]
Followup to 132458, omit unnecessary stack copy when x87 input is a
load. rdar://problem/
6373334
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132696
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 6 Jun 2011 22:45:46 +0000 (22:45 +0000)]
Add -O1/2/3 to bugpoint, so when you conclude opt -O2 reproduces an issue, you can just run bugpoint -O2. :) My implementation isn't precisely equivalent to what opt does, but as far as I can tell, it's close enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132695
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 6 Jun 2011 22:13:27 +0000 (22:13 +0000)]
We only do always-inlining at -O1; make opt reflect that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132693
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 6 Jun 2011 21:02:04 +0000 (21:02 +0000)]
Get allocation orders from RegisterClassInfo when possible.
Only target-dependent hints require callbacks. The RCI allocation order
has CSR aliases last according to their order of appearance in the
getCalleeSavedRegs list. This can depend on the calling convention.
This way, AllocationOrder::next doesn't have to check for reserved
registers, and CSRs are always allocated last, even with weird calling
conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132690
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 6 Jun 2011 20:55:56 +0000 (20:55 +0000)]
Add methods to support the integer-promotion of vector types. Methods to
legalize SDNodes such as BUILD_VECTOR, EXTRACT_VECTOR_ELT, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132689
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 6 Jun 2011 20:23:00 +0000 (20:23 +0000)]
This directory was missing the dg.exp to cause the tests to run. Some time since
it was added, the test has regressed, so XFAIL it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132686
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Mon, 6 Jun 2011 20:03:22 +0000 (20:03 +0000)]
Test case for PR10085.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132682
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Mon, 6 Jun 2011 16:44:31 +0000 (16:44 +0000)]
Avoid FGETSIGN of 80-bit types. Fixes PR10085.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132681
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 6 Jun 2011 16:36:30 +0000 (16:36 +0000)]
Don't try to be clever, just preserve the target's allocation order.
The order of registers returned by getCalleeSavedRegs is used to lay out
the fixed stack slots for CSRs. Some targets like their CSRs used from
one end, and some targets want them used from the other end.
When computing an allocation order, simply preserve the relative
ordering of CSRs that the target specifies in its allocation order.
Reordering CSRs would break some targets, ARM in particular.
We still place volatiles before the CSRs, providing slightly better
results with different calling conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132680
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 6 Jun 2011 05:46:34 +0000 (05:46 +0000)]
PR10077: fix fast-isel of extractvalue of aggregate constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132676
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 5 Jun 2011 18:20:05 +0000 (18:20 +0000)]
Harden tests for windows path separators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132671
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 5 Jun 2011 14:36:47 +0000 (14:36 +0000)]
Use path API for path concatenation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132668
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 5 Jun 2011 02:43:45 +0000 (02:43 +0000)]
Basic support for macros with explicit arguments.
We still don't handle
* default values
* :req
* :vararg
* \()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132656
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 5 Jun 2011 01:20:06 +0000 (01:20 +0000)]
Produce an undefined reference to _GLOBAL_OFFSET_TABLE_ if we have a
VK_GOTOFF reloc. This matches as' behavior, but it is not clear why the linker
might need this, so I added a FIXME.
I could test this by duplicating test/MC/ELF/got.s, but it doesn't look
worthwhile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132655
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 4 Jun 2011 23:34:40 +0000 (23:34 +0000)]
Fix a test that keeps breaking when allocation orders change.
Who said FileCheck couldn't handle arbitrarily complex conditions?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132654
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 4 Jun 2011 20:58:08 +0000 (20:58 +0000)]
TypeLegalizer: Add support for passing of vector-promoted types in registers (copyFromParts/copyToParts).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132649
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 4 Jun 2011 20:32:01 +0000 (20:32 +0000)]
TypeLegalizer: Fix a bug in the promotion of elements of integer vectors.
(only happens when using the -promote-elements option).
The correct legalization order is to first try to promote element. Next, we try
to widen vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132648
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 4 Jun 2011 18:16:26 +0000 (18:16 +0000)]
Refactor parsing of variable names (ie., %foo and @foo) since they have the same
rules. Also refactor "read string until quote" into its own function. No
functionality change!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132645
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 4 Jun 2011 17:38:07 +0000 (17:38 +0000)]
Add support for @GOTPTOFF in i386 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132643
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 4 Jun 2011 16:00:19 +0000 (16:00 +0000)]
Cast unused parameter to void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132641
91177308-0d34-0410-b5e6-
96231b3b80d8