Chandler Carruth [Mon, 16 Apr 2012 13:49:09 +0000 (13:49 +0000)]
Remove an overly brittle test. This test will no longer be interesting
once we start changing the block layout, so just nuke it. If anyone has
ideas about how to craft a code layout agnostic form of the test please
let me know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154815
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 16 Apr 2012 13:44:35 +0000 (13:44 +0000)]
Remove the methods for attaching metadata to instructions/retrieving metadata
from instructions. Chandler doesn't like them being here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154813
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 16 Apr 2012 13:33:36 +0000 (13:33 +0000)]
Add a somewhat hacky heuristic to do something different from whole-loop
rotation. When there is a loop backedge which is an unconditional
branch, we will end up with a branch somewhere no matter what. Try
placing this backedge in a fallthrough position above the loop header as
that will definitely remove at least one branch from the loop iteration,
where whole loop rotation may not.
I haven't seen any benchmarks where this is important but loop-blocks.ll
tests for it, and so this will be covered when I flip the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154812
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 16 Apr 2012 13:21:26 +0000 (13:21 +0000)]
Add convenience methods to MDBuilder for attaching metadata to instructions,
and retrieving it from instructions. I don't have a use for this but is seems
logical for it to exist. While there, remove some 'const' markings from methods
which are in fact 'const' in practice, but aren't logically 'const'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154811
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 16 Apr 2012 12:39:17 +0000 (12:39 +0000)]
Fix style violation in BBVectorize (pointed out by Bill Wendling)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154810
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Mon, 16 Apr 2012 11:32:10 +0000 (11:32 +0000)]
Add -disassemble support for -show-inst and -show-encode capability llvm-mc. Also refactor so all MC paraphernalia are created once for all uses as much as possible.
The test change is to account for the fact that the default disassembler behaviour has changed with regards to specifying the assembly syntax to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154809
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Apr 2012 10:58:38 +0000 (10:58 +0000)]
Remove lto_codegen_set_whole_program_optimization. It is a work in progress,
so we don't want it to show up in the stable 3.1 interface.
While at it, add a comment about why LTOCodeGenerator manually creates the
internalize pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 16 Apr 2012 09:31:23 +0000 (09:31 +0000)]
Tweak the loop rotation logic to check whether the loop is naturally
laid out in a form with a fallthrough into the header and a fallthrough
out of the bottom. In that case, leave the loop alone because any
rotation will introduce unnecessary branches. If either side looks like
it will require an explicit branch, then the rotation won't add any, do
it to ensure the branch occurs outside of the loop (if possible) and
maximize the benefit of the fallthrough in the bottom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154806
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 16 Apr 2012 08:56:50 +0000 (08:56 +0000)]
Reapply 'Add reverseColor to raw_ostream'.
To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell, with a minor fix for mingw by me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154805
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 16 Apr 2012 08:42:55 +0000 (08:42 +0000)]
Documentation fixes to LLVMBuild.html [PR 11563]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154804
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 16 Apr 2012 07:59:39 +0000 (07:59 +0000)]
Revert r154800 which breaks windows builders.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154802
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 16 Apr 2012 07:13:00 +0000 (07:13 +0000)]
Replace vpermd/vpermps intrinic patterns with custom lowering to target specific nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154801
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 16 Apr 2012 07:07:38 +0000 (07:07 +0000)]
Add reverseColor to raw_ostream.
To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154800
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 16 Apr 2012 06:43:40 +0000 (06:43 +0000)]
Change type profile for vpermv back to using operand type for the mask argument to match intrinsic behavior. Add a bitcast to the lowering code to convert mask from v8i32 to v8f32 for vpermps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154798
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 16 Apr 2012 06:26:15 +0000 (06:26 +0000)]
Flip the arguments when converting vpermd/vpermps intrinsics into instructions. The intrinsic has the mask as the last operand, but the instruction has it as the second.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154797
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 16 Apr 2012 05:24:52 +0000 (05:24 +0000)]
Add credit and release notes for r150307. By Kai Nacke.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154796
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 16 Apr 2012 04:23:52 +0000 (04:23 +0000)]
Add a Fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154793
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Mon, 16 Apr 2012 04:11:45 +0000 (04:11 +0000)]
add configure flag --with-default-sysroot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154791
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 16 Apr 2012 03:49:43 +0000 (03:49 +0000)]
Say something about -vectorize in the release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154788
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 16 Apr 2012 03:49:42 +0000 (03:49 +0000)]
Simplify checking for pointer types in BBVectorize (this change was suggested by Duncan).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154787
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 16 Apr 2012 03:33:22 +0000 (03:33 +0000)]
Remove dead SD nodes after the combining pass. Fixes PR12201.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154786
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 16 Apr 2012 01:12:56 +0000 (01:12 +0000)]
Rewrite how machine block placement handles loop rotation.
This is a complex change that resulted from a great deal of
experimentation with several different benchmarks. The one which proved
the most useful is included as a test case, but I don't know that it
captures all of the relevant changes, as I didn't have specific
regression tests for each, they were more the result of reasoning about
what the old algorithm would possibly do wrong. I'm also failing at the
moment to craft more targeted regression tests for these changes, if
anyone has ideas, it would be welcome.
The first big thing broken with the old algorithm is the idea that we
can take a basic block which has a loop-exiting successor and a looping
successor and use the looping successor as the layout top in order to
get that particular block to be the bottom of the loop after layout.
This happens to work in many cases, but not in all.
The second big thing broken was that we didn't try to select the exit
which fell into the nearest enclosing loop (to which we exit at all). As
a consequence, even if the rotation worked perfectly, it would result in
one of two bad layouts. Either the bottom of the loop would get
fallthrough, skipping across a nearer enclosing loop and thereby making
it discontiguous, or it would be forced to take an explicit jump over
the nearest enclosing loop to earch its successor. The point of the
rotation is to get fallthrough, so we need it to fallthrough to the
nearest loop it can.
The fix to the first issue is to actually layout the loop from the loop
header, and then rotate the loop such that the correct exiting edge can
be a fallthrough edge. This is actually much easier than I anticipated
because we can handle all the hard parts of finding a viable rotation
before we do the layout. We just store that, and then rotate after
layout is finished. No inner loops get split across the post-rotation
backedge because we check for them when selecting the rotation.
That fix exposed a latent problem with our exitting block selection --
we should allow the backedge to point into the middle of some inner-loop
chain as there is no real penalty to it, the whole point is that it
*won't* be a fallthrough edge. This may have blocked the rotation at all
in some cases, I have no idea and no test case as I've never seen it in
practice, it was just noticed by inspection.
Finally, all of these fixes, and studying the loops they produce,
highlighted another problem: in rotating loops like this, we sometimes
fail to align the destination of these backwards jumping edges. Fix this
by actually walking the backwards edges rather than relying on loopinfo.
This fixes regressions on heapsort if block placement is enabled as well
as lots of other cases where the previous logic would introduce an
abundance of unnecessary branches into the execution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154783
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 16 Apr 2012 00:41:45 +0000 (00:41 +0000)]
Merge vpermps/vpermd and vpermpd/vpermq SD nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154782
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 16 Apr 2012 00:12:20 +0000 (00:12 +0000)]
Fix SDTypeProfile for vpermps. The mask operand should be v8i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154781
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 15 Apr 2012 23:48:57 +0000 (23:48 +0000)]
Spacing fixes and 80 column fixes. Use 0 instead of 0x80 for undef indices in vpermps/vpermd. Hardware only looks at lower 3-bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154780
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 15 Apr 2012 22:43:31 +0000 (22:43 +0000)]
Remove AVX2 vpermq and vpermpd intrinsics. These can now be handled with normal shuffle vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154778
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 15 Apr 2012 22:00:22 +0000 (22:00 +0000)]
Make member variables of AsmToken private. Remove unnecessary forward declarations. Remove an unnecessary include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154775
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sun, 15 Apr 2012 20:22:36 +0000 (20:22 +0000)]
Fix class name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154773
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 15 Apr 2012 20:17:14 +0000 (20:17 +0000)]
Do not convert between fp128 <-> ppc_fp128 since there is no legal cast conversion between the two.
Patch by nobled <nobled@dreamwidth.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154772
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sun, 15 Apr 2012 20:13:47 +0000 (20:13 +0000)]
Fix filename and register numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154771
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 15 Apr 2012 19:36:44 +0000 (19:36 +0000)]
Fix PR12529. The Vxx family of instructions are only supported by AVX.
Use non-vex instructions for SSE4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154770
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 15 Apr 2012 18:03:49 +0000 (18:03 +0000)]
Add the MDBuilder helper class for conveniently creating metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154766
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Apr 2012 17:04:27 +0000 (17:04 +0000)]
Wire up support for diagnostic ranges in the ARMAsmParser.
As an example, attach range info to the "invalid instruction" message:
$ clang -arch arm -c asm.c
asm.c:2:11: error: invalid instruction
__asm__("foo r0");
^
<inline asm>:1:2: note: instantiated into assembly here
foo r0
^~~
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154765
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 15 Apr 2012 15:08:09 +0000 (15:08 +0000)]
When emulating vselect using OR/AND/XOR make sure to bitcast the result back to the original type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154764
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 15 Apr 2012 11:18:59 +0000 (11:18 +0000)]
Added VPERM optimization for AVX2 shuffles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154761
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 15 Apr 2012 05:33:43 +0000 (05:33 +0000)]
HexagonCopyToCombine.cpp: Silence two warnings, -Wunused-variable, with -Asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154759
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 15 Apr 2012 05:09:09 +0000 (05:09 +0000)]
Target/Hexagon: Tweak to fix msvc build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154758
91177308-0d34-0410-b5e6-
96231b3b80d8
Anshuman Dasgupta [Sat, 14 Apr 2012 20:59:13 +0000 (20:59 +0000)]
Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154755
91177308-0d34-0410-b5e6-
96231b3b80d8
Anshuman Dasgupta [Sat, 14 Apr 2012 20:57:13 +0000 (20:57 +0000)]
Add VLIW packetizer to ReleaseNotes.html and CREDITS.TXT. Committing patch
by Sundeep Kushwaha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154754
91177308-0d34-0410-b5e6-
96231b3b80d8
Brendon Cahoon [Sat, 14 Apr 2012 16:54:12 +0000 (16:54 +0000)]
Add the loop unrolling info to ReleaseNotes.html and CREDITS.TXT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154752
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 14 Apr 2012 15:43:22 +0000 (15:43 +0000)]
There is no need for setIsExact to be public. Make it private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154750
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 14 Apr 2012 12:36:06 +0000 (12:36 +0000)]
Rename "fpaccuracy" metadata to the more generic "fpmath". That's because I'm
thinking of generalizing it to be able to specify other freedoms beyond accuracy
(such as that NaN's don't have to be respected). I'd like the 3.1 release (the
first one with this metadata) to have the more generic name already rather than
having to auto-upgrade it in 3.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154744
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 14 Apr 2012 09:04:57 +0000 (09:04 +0000)]
Make StringMap's copy ctor non-explicit.
Without this gcc doesn't allow us to put a StringMap into a
std::map. Works with clang though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154737
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 14 Apr 2012 07:32:50 +0000 (07:32 +0000)]
Fix an error in BBVectorize important for vectorizing pointer types.
When vectorizing pointer types it is important to realize that potential
pairs cannot be connected via the address pointer argument of a load or store.
This is because even after vectorization, the address is still a scalar because
the address of the higher half of the pair is implicit from the address of the
lower half (it need not be, and should not be, explicitly computed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154735
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 14 Apr 2012 07:32:43 +0000 (07:32 +0000)]
Enhance BBVectorize to more-properly handle pointer values and vectorize GEPs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154734
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 13 Apr 2012 23:29:54 +0000 (23:29 +0000)]
misched: Added CanHandleTerminators.
This is a special flag for targets that really want their block
terminators in the DAG. The default scheduler cannot handle this
correctly, so it becomes the specialized scheduler's responsibility to
schedule terminators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154712
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 13 Apr 2012 22:58:53 +0000 (22:58 +0000)]
Remove old code to strip out unwanted PPC slices for Apple llvmCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154706
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 13 Apr 2012 22:47:00 +0000 (22:47 +0000)]
Fix X86 codegen for 'atomicrmw nand' to generate *x = ~(*x & y), not *x = ~*x & y.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154705
91177308-0d34-0410-b5e6-
96231b3b80d8
Sirish Pande [Fri, 13 Apr 2012 21:01:35 +0000 (21:01 +0000)]
Remove iostream from New Value Jump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154703
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 13 Apr 2012 20:45:45 +0000 (20:45 +0000)]
Add support to BBVectorize for vectorizing selects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154700
91177308-0d34-0410-b5e6-
96231b3b80d8
Sirish Pande [Fri, 13 Apr 2012 20:22:31 +0000 (20:22 +0000)]
Add support for Hexagon Architectural feature, New Value Jump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154696
91177308-0d34-0410-b5e6-
96231b3b80d8
Sirish Pande [Fri, 13 Apr 2012 20:22:19 +0000 (20:22 +0000)]
Pass to replace tranfer/copy instructions into combine instruction where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154695
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 13 Apr 2012 20:06:17 +0000 (20:06 +0000)]
Reduce malloc traffic in DwarfAccelTable
- Don't copy offsets into HashData, the underlying vector won't change once the table is finalized.
- Allocate HashData and HashDataContents in a BumpPtrAllocator.
- Allocate string map entries in the same allocator.
- Random cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154694
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Linthicum [Fri, 13 Apr 2012 19:09:44 +0000 (19:09 +0000)]
Support for Hexagon backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154692
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Linthicum [Fri, 13 Apr 2012 19:09:18 +0000 (19:09 +0000)]
Support for Hexagon backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154691
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 13 Apr 2012 18:59:28 +0000 (18:59 +0000)]
On Darwin targets, only use vfma etc. if the source use fma() intrinsic explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154689
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 18:57:48 +0000 (18:57 +0000)]
Add some comments, and fix a few places that missed setting Changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154687
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 13 Apr 2012 18:46:37 +0000 (18:46 +0000)]
For ARM disassembly only print 32 unsigned bits for the address of branch
targets so if the branch target has the high bit set it does not get printed as:
beq 0xffffffff8008c404
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154685
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 18:28:58 +0000 (18:28 +0000)]
Consider ObjC runtime calls objc_storeWeak and others which make a copy of
their argument as "escape" points for objc_retainBlock optimization.
This fixes rdar://
11229925.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154682
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 13 Apr 2012 17:15:33 +0000 (17:15 +0000)]
By default, use Early-CSE instead of GVN for vectorization cleanup.
As has been suggested by Duncan and others, Early-CSE and GVN should
do similar redundancy elimination, but Early-CSE is much less expensive.
Most of my autovectorization benchmarks show a performance regresion, but
all of these are < 0.1%, and so I think that it is still worth using
the less expensive pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154673
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Fri, 13 Apr 2012 11:22:18 +0000 (11:22 +0000)]
Catch the Python exception when subprocess.Popen is failing.
For example, if llc cannot be found, the full python stacktrace is displayed
and no interesting information are provided.
+ fail the process when an exception occurs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154665
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 13 Apr 2012 08:09:12 +0000 (08:09 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154661
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Apr 2012 06:38:11 +0000 (06:38 +0000)]
Silence various build warnings from Hexagon backend that show up in release builds. Mostly converting 'assert(0)' to 'llvm_unreachable' to silence warnings about missing returns. Also fold some variable declarations into asserts to prevent the variables from being unused in release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154660
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Apr 2012 06:14:57 +0000 (06:14 +0000)]
Fix target specific intrinsic handling to adjust intrinsic number before doing attribute table lookup. Also fix attribute table lookup to handle 'invalid' intrinsic correctly. Fixes PR12542
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154658
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Apr 2012 05:58:19 +0000 (05:58 +0000)]
Remove getElfArchType from ELF.h. It's only used in ELFObjectFile.cpp and there's already a copy there. ELF.h was hiding the one there and causing an unused function warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154657
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 01:08:28 +0000 (01:08 +0000)]
Use the new Use-aware dominates method to apply the objc runtime
library return value optimization for phi uses. Even when the
phi itself is not dominated, the specific use may be dominated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154647
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 13 Apr 2012 01:06:27 +0000 (01:06 +0000)]
Code-gen may inject code into the IR before it emits the ASM. The linker
obviously cannot know that this code is present, let alone used. So prevent the
internalize pass from internalizing those global values which code-gen may
insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154645
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 00:59:57 +0000 (00:59 +0000)]
Don't move objc_autorelease calls past autorelease pool boundaries when
optimizing autorelease calls on phi nodes with null operands.
This fixes rdar://
11207070.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154642
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 00:50:57 +0000 (00:50 +0000)]
Def here is an Instruction, so !isa<Instruction>(Def) is always false,
as Eli noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Apr 2012 23:31:46 +0000 (23:31 +0000)]
Add forms of dominates and isReachableFromEntry that accept a Use
directly instead of a user Instruction. This allows them to test
whether a def dominates a particular operand if the user instruction
is a PHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154631
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 12 Apr 2012 23:13:34 +0000 (23:13 +0000)]
Fix a few more places in the ARM disassembler so that branches get
symbolic operands added when using the C disassembler API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154628
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Apr 2012 22:15:23 +0000 (22:15 +0000)]
Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154622
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Thu, 12 Apr 2012 21:44:58 +0000 (21:44 +0000)]
Hexagon: fix CMake error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154620
91177308-0d34-0410-b5e6-
96231b3b80d8
Sirish Pande [Thu, 12 Apr 2012 21:06:54 +0000 (21:06 +0000)]
Disable Hexagon test temporarily.
There is an assert at line 558 in ScheduleDAGInstrs::buildSchedGraph(AliasAnalysis *AA).
This assert needs to addressed for post RA scheduler. Until that assert is addressed,
any passes that uses post ra scheduler will fail. So, I am temporarily disabling the
hexagon tests until that fix is in.
The assert is as follows:
assert(!MI->isTerminator() && !MI->isLabel() &&
"Cannot schedule terminators or labels!");
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154617
91177308-0d34-0410-b5e6-
96231b3b80d8
Sirish Pande [Thu, 12 Apr 2012 21:06:38 +0000 (21:06 +0000)]
HexagonPacketizer patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154616
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Thu, 12 Apr 2012 20:13:57 +0000 (20:13 +0000)]
This patch improves the MCJIT runtime dynamic loader by adding new handling
of zero-initialized sections, virtual sections and common symbols
and preventing the loading of sections which are not required for
execution such as debug information.
Patch by Andy Kaylor!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154610
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Apr 2012 19:14:21 +0000 (19:14 +0000)]
Generalize r153635 to deal with TokenFactor chains; also clean up the logic and fix the tests. rdar://
11069732, rdar://
11236106
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154604
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Thu, 12 Apr 2012 17:55:53 +0000 (17:55 +0000)]
Hexagon: enable assembler output through the MC layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154597
91177308-0d34-0410-b5e6-
96231b3b80d8
Anshuman Dasgupta [Thu, 12 Apr 2012 15:17:35 +0000 (15:17 +0000)]
Add DFA generator for VLIW targets to ReleaseNotes.html and CREDITS.TXT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154590
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Apr 2012 12:47:29 +0000 (12:47 +0000)]
Remove README entry obsoleted by register masks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154588
91177308-0d34-0410-b5e6-
96231b3b80d8
Jean-Daniel Dupas [Thu, 12 Apr 2012 12:02:39 +0000 (12:02 +0000)]
Remove a remaining reference to the obsolete C backend in configure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154587
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 12 Apr 2012 07:23:00 +0000 (07:23 +0000)]
Fix 128-bit ptest intrinsics to take v2i64 instead of v4f32 since these are integer instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154580
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 12 Apr 2012 01:19:35 +0000 (01:19 +0000)]
ARM 'adr' fixups don't need the interworking addend tweaking.
They reference the PC directly, so things work properly that way.
rdar://
11231229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154576
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 23:19:55 +0000 (23:19 +0000)]
Revert changes that were accidentally committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154563
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 23:11:33 +0000 (23:11 +0000)]
Fix string that is being checked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154547
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 22:59:08 +0000 (22:59 +0000)]
Emit neg.s or neg.d only if -enable-no-nans-fp-math is supplied by user,
otherwise expand FNEG during legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154546
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 22:49:04 +0000 (22:49 +0000)]
Emit abs.s or abs.d only if -enable-no-nans-fp-math is supplied by user.
Invalid operation is signaled if the operand of these instructions is NaN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154545
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 11 Apr 2012 22:40:17 +0000 (22:40 +0000)]
Fixed a case of ARM disassembly getting an assert on a bad encoding
of a VST instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154544
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 22:13:04 +0000 (22:13 +0000)]
Fix bugs in lowering of FCOPYSIGN nodes.
- FCOPYSIGN nodes that have operands of different types were not handled.
- Different code was generated depending on the endianness of the target.
Additionally, code is added that emits INS and EXT instructions, if they are
supported by target (they are R2 instructions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154540
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 21:09:54 +0000 (21:09 +0000)]
Remove incorrect comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154533
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 21:02:33 +0000 (21:02 +0000)]
Tidy up. Remove hard tab characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154532
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 21:02:30 +0000 (21:02 +0000)]
Tidy up. Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154531
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Apr 2012 20:20:37 +0000 (20:20 +0000)]
Fix pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154527
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 11 Apr 2012 19:21:58 +0000 (19:21 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154522
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 11 Apr 2012 18:16:28 +0000 (18:16 +0000)]
TableGen's regpressure: emit per-registerclass weight limits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154518
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 17:40:18 +0000 (17:40 +0000)]
ARM 'vuzp.32 Dd, Dm' is a pseudo-instruction.
While there is an encoding for it in VUZP, the result of that is undefined,
so we should avoid it. Define the instruction as a pseudo for VTRN.32
instead, as the ARM ARM indicates.
rdar://
11222366
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154511
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 11 Apr 2012 17:35:26 +0000 (17:35 +0000)]
TableGen'd regpressure: register unit set pruning.
The pruning is more complete if it is not done incrementally. The code
is also a tad less convluted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154510
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 16:53:25 +0000 (16:53 +0000)]
ARM 'vzip.32 Dd, Dm' is a pseudo-instruction.
While there is an encoding for it in VZIP, the result of that is undefined,
so we should avoid it. Define the instruction as a pseudo for VTRN.32
instead, as the ARM ARM indicates.
rdar://
11221911
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154505
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Wed, 11 Apr 2012 15:35:36 +0000 (15:35 +0000)]
Fix the build under Debian GNU/Hurd.
Thanks to Pino Toscano for the patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154500
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Apr 2012 14:06:54 +0000 (14:06 +0000)]
Cache the hash value of the operands in the MDNode.
FoldingSet is implemented as a chained hash table. When there is a hash
collision during insertion, which is common as we fill the table until a
load factor of 2.0 is hit, we walk the chained elements, comparing every
operand with the new element's operands. This can be very expensive if the
MDNode has many operands.
We sacrifice a word of space in MDNode to cache the full hash value, reducing
compares on collision to a minimum. MDNode grows from 28 to 32 bytes + operands
on x86. On x86_64 the new bits fit nicely into existing padding, not growing
the struct at all.
The actual speedup depends a lot on the test case and is typically between
1% and 2% for C++ code with clang -c -O0 -g.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154497
91177308-0d34-0410-b5e6-
96231b3b80d8