1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

15673 Commits

Author SHA1 Message Date
Andrew Trick
93005d8a61 Allow targets to select the default scheduler by name.
llvm-svn: 155090
2012-04-19 01:34:10 +00:00
Andrew Trick
543261418e whitespace
llvm-svn: 155089
2012-04-19 01:34:06 +00:00
Chandler Carruth
090e90a242 This reverts a long string of commits to the Hexagon backend. These
commits have had several major issues pointed out in review, and those
issues are not being addressed in a timely fashion. Furthermore, this
was all committed leading up to the v3.1 branch, and we don't need piles
of code with outstanding issues in the branch.

It is possible that not all of these commits were necessary to revert to
get us back to a green state, but I'm going to let the Hexagon
maintainer sort that out. They can recommit, in order, after addressing
the feedback.

Reverted commits, with some notes:

Primary commit r154616: HexagonPacketizer
  - There are lots of review comments here. This is the primary reason
    for reverting. In particular, it introduced large amount of warnings
    due to a bad construct in tablegen.
  - Follow-up commits that should be folded back into this when
    reposting:
    - r154622: CMake fixes
    - r154660: Fix numerous build warnings in release builds.
  - Please don't resubmit this until the three commits above are
    included, and the issues in review addressed.

Primary commit r154695: Pass to replace transfer/copy ...
  - Reverted to minimize merge conflicts. I'm not aware of specific
    issues with this patch.

Primary commit r154703: New Value Jump.
  - Primarily reverted due to merge conflicts.
  - Follow-up commits that should be folded back into this when
    reposting:
    - r154703: Remove iostream usage
    - r154758: Fix CMake builds
    - r154759: Fix build warnings in release builds
  - Please incorporate these fixes and and review feedback before
    resubmitting.

Primary commit r154829: Hexagon V5 (floating point) support.
  - Primarily reverted due to merge conflicts.
  - Follow-up commits that should be folded back into this when
    reposting:
    - r154841: Remove unused variable (fixing build warnings)

There are also accompanying Clang commits that will be reverted for
consistency.

llvm-svn: 155047
2012-04-18 21:31:19 +00:00
Benjamin Kramer
a6185ae07f SourceMgr: Colorize diagnostics.
Same color scheme as clang uses. The colors are only enabled if the output is a tty.

llvm-svn: 155035
2012-04-18 19:04:15 +00:00
Jim Grosbach
696af4abc7 Tidy up. Trailing whitespace.
llvm-svn: 155013
2012-04-18 17:46:37 +00:00
Jim Grosbach
33eec19f56 TableGen add warning diagnostic helper functions.
llvm-svn: 155012
2012-04-18 17:46:31 +00:00
Benjamin Kramer
ffa121d1ea SmallPtrSet: Reuse DenseMapInfo's pointer hash function instead of inventing a bad one ourselves.
DenseMap's hash function uses slightly more entropy and reduces hash collisions
significantly.  I also experimented with Hashing.h, but it didn't gave a lot of
improvement while being much more expensive to compute.

llvm-svn: 154996
2012-04-18 10:37:32 +00:00
Craig Topper
7c784d86eb Remove AVX vpermil intrinsics. I removed their uses from clang headers and builtins a while back.
llvm-svn: 154985
2012-04-18 05:24:00 +00:00
Joe Groff
cc9c07aacc fix pr12559: mark unavailable win32 math libcalls
also fix SimplifyLibCalls to use TLI rather than compile-time conditionals to enable optimizations on floor, ceil, round, rint, and nearbyint

llvm-svn: 154960
2012-04-17 23:05:54 +00:00
Seth Cantrell
1cc53344a6 platform support for counting column widths and checking isprint
llvm-svn: 154944
2012-04-17 20:03:03 +00:00
Manuel Klimek
47de8bd0ef Goodbye, JSONParser...
llvm-svn: 154930
2012-04-17 17:21:17 +00:00
Manuel Klimek
70cac8dbd0 Adding operator== for document_iterator.
llvm-svn: 154927
2012-04-17 16:38:41 +00:00
Francois Pichet
42da16cf7f Unbreak the MSVC build, that next() thing again.
llvm-svn: 154916
2012-04-17 09:37:32 +00:00
Lang Hames
c9489b786a SlotIndexes used to store the index list in a crufty custom linked-list. I can't
for the life of me remember why I wrote it this way, but I can't see any good
reason for it now. This patch replaces the custom linked list with an ilist.

This change should preserve the existing numberings exactly, so no generated code
should change (if it does, file a bug!).

llvm-svn: 154904
2012-04-17 04:15:51 +00:00
Andrew Trick
6871e5550d Typo in an unused field.
llvm-svn: 154895
2012-04-17 01:22:58 +00:00
Preston Gurd
e52a5ca15b Implement GDB integration for source level debugging of code JITed using
the MCJIT execution engine.

The GDB JIT debugging integration support works by registering a loaded
object image with a pre-defined function that GDB will monitor if GDB
is attached. GDB integration support is implemented for ELF only at this
time. This integration requires GDB version 7.0 or newer.

Patch by Andy Kaylor!

 

llvm-svn: 154868
2012-04-16 22:12:58 +00:00
Duncan Sands
518668bd76 Remove support for the special 'fast' value for fpmath accuracy for the moment.
llvm-svn: 154850
2012-04-16 19:39:33 +00:00
Sirish Pande
051c2d4395 Hexagon V5 (Floating Point) Support.
llvm-svn: 154829
2012-04-16 17:05:06 +00:00
Duncan Sands
f61d49df40 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.

llvm-svn: 154822
2012-04-16 16:28:59 +00:00
Duncan Sands
e0ea0f7eb6 Remove the methods for attaching metadata to instructions/retrieving metadata
from instructions.  Chandler doesn't like them being here.

llvm-svn: 154813
2012-04-16 13:44:35 +00:00
Duncan Sands
80725e26de 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'.

llvm-svn: 154811
2012-04-16 13:21:26 +00:00
Rafael Espindola
3c1722e285 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.

llvm-svn: 154807
2012-04-16 10:58:38 +00:00
Benjamin Kramer
a72a6005f8 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.

llvm-svn: 154805
2012-04-16 08:56:50 +00:00
Argyrios Kyrtzidis
4950ffbb4f Revert r154800 which breaks windows builders.
llvm-svn: 154802
2012-04-16 07:59:39 +00:00
Argyrios Kyrtzidis
3d576f296a Add reverseColor to raw_ostream.
To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell!

llvm-svn: 154800
2012-04-16 07:07:38 +00:00
Sebastian Pop
d60bf3baf0 add configure flag --with-default-sysroot
llvm-svn: 154791
2012-04-16 04:11:45 +00:00
Craig Topper
788250eec1 Remove AVX2 vpermq and vpermpd intrinsics. These can now be handled with normal shuffle vectors.
llvm-svn: 154778
2012-04-15 22:43:31 +00:00
Craig Topper
a6f7e1a202 Make member variables of AsmToken private. Remove unnecessary forward declarations. Remove an unnecessary include.
llvm-svn: 154775
2012-04-15 22:00:22 +00:00
Duncan Sands
f6cbb0b2cb Add the MDBuilder helper class for conveniently creating metadata.
llvm-svn: 154766
2012-04-15 18:03:49 +00:00
Duncan Sands
7e4fa0a115 There is no need for setIsExact to be public. Make it private.
llvm-svn: 154750
2012-04-14 15:43:22 +00:00
Duncan Sands
40d080e3b7 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.

llvm-svn: 154744
2012-04-14 12:36:06 +00:00
Benjamin Kramer
b9eb9d651b 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.

llvm-svn: 154737
2012-04-14 09:04:57 +00:00
Hal Finkel
c55edb7b35 Enhance BBVectorize to more-properly handle pointer values and vectorize GEPs.
llvm-svn: 154734
2012-04-14 07:32:43 +00:00
Andrew Trick
550cf63beb 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.

llvm-svn: 154712
2012-04-13 23:29:54 +00:00
Hal Finkel
12b4c41203 Add support to BBVectorize for vectorizing selects.
llvm-svn: 154700
2012-04-13 20:45:45 +00:00
Craig Topper
79c030996a 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.
llvm-svn: 154657
2012-04-13 05:58:19 +00:00
Dan Gohman
c0a906405e 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.

llvm-svn: 154631
2012-04-12 23:31:46 +00:00
Sirish Pande
ff74c0b4e8 HexagonPacketizer patch.
llvm-svn: 154616
2012-04-12 21:06:38 +00:00
Preston Gurd
6e9bcca355 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!

llvm-svn: 154610
2012-04-12 20:13:57 +00:00
Craig Topper
448790d566 Fix 128-bit ptest intrinsics to take v2i64 instead of v4f32 since these are integer instructions.
llvm-svn: 154580
2012-04-12 07:23:00 +00:00
Benjamin Kramer
7341ba24fa Fix pasto.
llvm-svn: 154527
2012-04-11 20:20:37 +00:00
Andrew Trick
6d7aff8241 TableGen's regpressure: emit per-registerclass weight limits.
llvm-svn: 154518
2012-04-11 18:16:28 +00:00
Benjamin Kramer
eba5ed591b 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.

llvm-svn: 154497
2012-04-11 14:06:54 +00:00
Benjamin Kramer
c1e98c85e2 FoldingSet: Push the hash through FoldingSetTraits::Equals, so clients can use it.
llvm-svn: 154496
2012-04-11 14:06:47 +00:00
Duncan Sands
da21cc27c0 Add a C binding to the Target and TargetMachine classes to allow for emitting
binary and assembly. Patch by Carlo Kok.  Emitting was inspired by but not based
on the D llvm bindings. 

llvm-svn: 154493
2012-04-11 10:25:24 +00:00
Duncan Sands
4f66d852d0 Comment typo fix.
llvm-svn: 154488
2012-04-11 08:13:47 +00:00
Bill Wendling
16712e549c The MDString class stored a StringRef to the string which was already in a
StringMap. This was redundant and unnecessarily bloated the MDString class.

Because the MDString class is a "Value" and will never have a "name", and
because the Name field in the Value class is a pointer to a StringMap entry, we
repurpose the Name field for an MDString. It stores the StringMap entry in the
Name field, and uses the normal methods to get the string (name) back.

PR12474

llvm-svn: 154429
2012-04-10 20:12:16 +00:00
David Chisnall
a098752b13 Use the correct section types on Solaris for unwind data on both x86 and x86-64.
Patch by Dmitri Shubin!

llvm-svn: 154391
2012-04-10 11:44:33 +00:00
Duncan Sands
f25460b85f Express the number of ULPs in fpaccuracy metadata as a real rather than a
rational number, eg as 2.5 rather than 5, 2.  OK'd by Peter Collingbourne.

llvm-svn: 154387
2012-04-10 08:22:43 +00:00
Andrew Trick
7230fee696 Fix 12513: Loop unrolling breaks with indirect branches.
Take this opportunity to generalize the indirectbr bailout logic for
loop transformations. CFG transformations will never get indirectbr
right, and there's no point trying.

llvm-svn: 154386
2012-04-10 05:14:42 +00:00