Commit Graph

81807 Commits

Author SHA1 Message Date
Sirish Pande
87eb92d913 Hexagon V5 (Floating Point) Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154829 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 17:05:06 +00:00
Bill Wendling
57ca13ecc4 Move to X86 directory because this fails on non-X86 platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154825 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 16:38:48 +00:00
Duncan Sands
8883c43ddc Make it possible to indicate relaxed floating point requirements at the IR level
through the use of 'fpmath' metadata.  Currently this only provides a 'fpaccuracy'
value, which may be a number in ULPs or the keyword 'fast', however the intent is
that this will be extended with additional information about NaN's, infinities
etc later.  No optimizations have been hooked up to this so far.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154822 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 16:28:59 +00:00
Chandler Carruth
9e67db4af1 Flip the new block-placement pass to be on by default.
This is mostly to test the waters. I'd like to get results from FNT
build bots and other bots running on non-x86 platforms.

This feature has been pretty heavily tested over the last few months by
me, and it fixes several of the execution time regressions caused by the
inlining work by preventing inlining decisions from radically impacting
block layout.

I've seen very large improvements in yacr2 and ackermann benchmarks,
along with the expected noise across all of the benchmark suite whenever
code layout changes. I've analyzed all of the regressions and fixed
them, or found them to be impossible to fix. See my email to llvmdev for
more details.

I'd like for this to be in 3.1 as it complements the inliner changes,
but if any failures are showing up or anyone has concerns, it is just
a flag flip and so can be easily turned off.

I'm switching it on tonight to try and get at least one run through
various folks' performance suites in case SPEC or something else has
serious issues with it. I'll watch bots and revert if anything shows up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154816 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 13:49:17 +00:00
Chandler Carruth
0de089a4d0 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
2012-04-16 13:49:09 +00:00
Duncan Sands
0b36bb37d0 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
2012-04-16 13:44:35 +00:00
Chandler Carruth
e773e8c3e5 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
2012-04-16 13:33:36 +00:00
Duncan Sands
656dc62606 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
2012-04-16 13:21:26 +00:00
Hal Finkel
05bc5087a2 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
2012-04-16 12:39:17 +00:00
Richard Barton
d0c478d95f 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
2012-04-16 11:32:10 +00:00
Rafael Espindola
4d2e9d9a1c 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
2012-04-16 10:58:38 +00:00
Chandler Carruth
16295fc20b 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
2012-04-16 09:31:23 +00:00
Benjamin Kramer
246de858e3 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
2012-04-16 08:56:50 +00:00
Eli Bendersky
4d66f4cc6e Documentation fixes to LLVMBuild.html [PR 11563]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154804 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 08:42:55 +00:00
Argyrios Kyrtzidis
c9413c745b Revert r154800 which breaks windows builders.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154802 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 07:59:39 +00:00
Craig Topper
ffa6c40ecf 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
2012-04-16 07:13:00 +00:00
Argyrios Kyrtzidis
7d31d75a77 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
2012-04-16 07:07:38 +00:00
Craig Topper
9204074598 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
2012-04-16 06:43:40 +00:00
Craig Topper
7e9f7fbc11 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
2012-04-16 06:26:15 +00:00
Bill Wendling
59fc1664ab 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
2012-04-16 05:24:52 +00:00
Bill Wendling
ab3a9193b1 Add a Fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154793 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 04:23:52 +00:00
Sebastian Pop
7e5c316b05 add configure flag --with-default-sysroot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154791 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 04:11:45 +00:00
Hal Finkel
9068bf5dd0 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
2012-04-16 03:49:43 +00:00
Hal Finkel
831a6e86d5 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
2012-04-16 03:49:42 +00:00
Hal Finkel
31490baf38 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
2012-04-16 03:33:22 +00:00
Chandler Carruth
70daea90af 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
2012-04-16 01:12:56 +00:00
Craig Topper
8325c11d47 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
2012-04-16 00:41:45 +00:00
Craig Topper
ca9ee66e36 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
2012-04-16 00:12:20 +00:00
Craig Topper
095c528f30 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
2012-04-15 23:48:57 +00:00
Craig Topper
2cb1e9dc7d 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
2012-04-15 22:43:31 +00:00
Craig Topper
fb22ede033 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
2012-04-15 22:00:22 +00:00
Jakub Staszak
082d475fc9 Fix class name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154773 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-15 20:22:36 +00:00
Nadav Rotem
7d719a5237 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
2012-04-15 20:17:14 +00:00
Jakub Staszak
00920f68a4 Fix filename and register numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154771 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-15 20:13:47 +00:00
Nadav Rotem
f16af0a053 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
2012-04-15 19:36:44 +00:00
Duncan Sands
e747fadedf 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
2012-04-15 18:03:49 +00:00
Benjamin Kramer
362a05a635 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
2012-04-15 17:04:27 +00:00
Nadav Rotem
3ab32ea49e 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
2012-04-15 15:08:09 +00:00
Elena Demikhovsky
73c504af9d Added VPERM optimization for AVX2 shuffles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154761 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-15 11:18:59 +00:00
NAKAMURA Takumi
8a81df1b7f 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
2012-04-15 05:33:43 +00:00
NAKAMURA Takumi
8c67cf44c5 Target/Hexagon: Tweak to fix msvc build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154758 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-15 05:09:09 +00:00
Anshuman Dasgupta
3c1ded2691 Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154755 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-14 20:59:13 +00:00
Anshuman Dasgupta
cff391a825 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
2012-04-14 20:57:13 +00:00
Brendon Cahoon
ff730398c0 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
2012-04-14 16:54:12 +00:00
Duncan Sands
35de7619a0 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
2012-04-14 15:43:22 +00:00
Duncan Sands
5e5c5f8259 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
2012-04-14 12:36:06 +00:00
Benjamin Kramer
164dfb094d 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
2012-04-14 09:04:57 +00:00
Hal Finkel
bba23ed672 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
2012-04-14 07:32:50 +00:00
Hal Finkel
f3f5a1e6f7 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
2012-04-14 07:32:43 +00:00
Andrew Trick
0070792012 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
2012-04-13 23:29:54 +00:00