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

115607 Commits

Author SHA1 Message Date
Rafael Espindola
3e664c2fee Disable all link optimizations in a debug build.
This taking linking clang on my machine with gold from 16.980257914 to
15.933037649 seconds.

llvm-svn: 234161
2015-04-06 15:04:31 +00:00
Rafael Espindola
17068f343b Don't pass -O3 to the linker in debug builds.
This takes linking clang in a debug build with gold form 19.518925697 to
16.406388685 seconds.

llvm-svn: 234160
2015-04-06 14:51:01 +00:00
Rafael Espindola
e72663a555 Don't use -ffunction-sections -fdata-sections on debug builds.
Unfortunately, on ELF there is not used attribute on the .o files,
so there is no easy way to keep the dump function alive.

If we are not gcing, we may as well produce non gcable files and
avoid the cost.

Linking a debug clang now takes 18.856225992 seconds, before it
took 21.206897447.

I will try avoiding --gc-sections -O3 on a followup patch.

llvm-svn: 234159
2015-04-06 14:34:43 +00:00
Pawel Bylica
fc6884e53a Test commit. Improve comments in APInt. NFC.
llvm-svn: 234158
2015-04-06 13:31:39 +00:00
Rafael Espindola
5574b26c05 Store the sh_link of ARM_EXIDX directly in MCSectionELF.
This avoids some pretty horrible and broken name based section handling.

llvm-svn: 234142
2015-04-06 04:25:18 +00:00
Rafael Espindola
3d38779bcb Simplify this function a bit. NFC.
The case values are not a tidy enum we can fully cover. They even ovelap
over the various extension.

Just use a default:

llvm-svn: 234140
2015-04-06 03:16:51 +00:00
Rafael Espindola
61955a1dba Simplify mapping from relocation sections to relocated sections.
Just store the section in MCSectionELF. This avoids multiple hash lookups.

This will also be used by ARM_EXIDX.

llvm-svn: 234139
2015-04-06 03:09:30 +00:00
Lang Hames
286487f927 [Orc] Tidy up the assembly for the x86-64 resolver block.
llvm-svn: 234138
2015-04-06 03:01:29 +00:00
David Blaikie
8a470f5492 [opaque pointer type] Remove some backwards compatible GEP APIs
Just doing the two-step so I don't get so much build-bot spam... (add
new API, migrate callers, remove old API)

llvm-svn: 234132
2015-04-05 22:53:21 +00:00
David Blaikie
924235accc clang-format my last commit
llvm-svn: 234127
2015-04-05 22:44:57 +00:00
David Blaikie
80477b5659 [opaque pointer type] The last of the GEP IRBuilder API migrations
There's still lots of callers passing nullptr, of course - some because
they'll never be migrated (InstCombines for bitcasts - well they don't
make any sense when the pointer type is opaque anyway, for example) and
others that will need more engineering to pass Types around.

llvm-svn: 234126
2015-04-05 22:41:44 +00:00
Benjamin Kramer
8d06ccc89f Mark BumpPtrAllocator::Allocate as returning a noalias pointer.
The GCC attribute is curiously named 'malloc', but I think it's better
to use LLVM terminology for the wrapper macro.

llvm-svn: 234121
2015-04-05 17:02:25 +00:00
Simon Pilgrim
cab2e12c29 [DAGCombiner] Merge FMUL Scalar and Vector constant canonicalization to RHS. NFCI.
llvm-svn: 234118
2015-04-05 14:30:37 +00:00
David Blaikie
2e42346c23 [opaque pointer type] More GEP API migrations
llvm-svn: 234108
2015-04-04 21:07:10 +00:00
Sanjay Patel
c92141d527 remove function/variable names from comments; NFC
llvm-svn: 234107
2015-04-04 21:06:39 +00:00
Sanjay Patel
e84686ac07 less space; NFC
llvm-svn: 234106
2015-04-04 21:05:52 +00:00
Rafael Espindola
afb68f165d Don't mix overload and default values.
It makes it hard to see which one is being called.

llvm-svn: 234100
2015-04-04 18:16:01 +00:00
Rafael Espindola
0601e2fab8 Implement unique sections with an unique ID.
This allows the compiler/assembly programmer to switch back to a
section. This in turn fixes the bootstrap failure on powerpc (tested
on gcc110) without changing the ppc codegen at all.

I will try to cleanup the various getELFSection overloads in a  followup patch.
Just using a default argument now would lead to ambiguities.

llvm-svn: 234099
2015-04-04 18:02:01 +00:00
David Blaikie
ecbaf6994b [opaque pointer type] More (constant, in this instance) GEP API migrations
llvm-svn: 234096
2015-04-04 15:12:13 +00:00
Simon Pilgrim
9b09e6fee5 [DAGCombiner] Canonicalize vector constants for ADD/MUL/AND/OR/XOR re-association
Scalar integers are commuted to move constants to the RHS for re-association - this ensures vectors do the same.

llvm-svn: 234092
2015-04-04 10:20:31 +00:00
Craig Topper
fcc8191397 [X86] Apply AddedComplexity consistently for similar patterns. This keeps them together in the DAGISel tables and reduces table size slightly.
llvm-svn: 234086
2015-04-04 04:22:12 +00:00
Eric Christopher
3552769287 Fix formatting and coding style.
llvm-svn: 234084
2015-04-04 03:53:25 +00:00
Craig Topper
4b79b11952 [X86] Add a comment about the change in r234075.
llvm-svn: 234079
2015-04-04 02:31:43 +00:00
Eric Christopher
97beb00b59 Strip trailing whitespace and reword explanatory comment.
llvm-svn: 234078
2015-04-04 02:26:47 +00:00
Craig Topper
54ac1d95cd [X86] Don't use GR64 register 'and with immediate' instructions if the immediate is zero in the upper 33-bits or upper 57-bits. Use GR32 instructions instead.
Previously the patterns didn't have high enough priority and we would only use the GR32 form if the only the upper 32 or 56 bits were zero.

Fixes PR23100.

llvm-svn: 234075
2015-04-04 02:08:20 +00:00
David Majnemer
f0e072b4f9 [WinEH] Fill out CatchHigh in the TryBlockMap
Now all fields in the WinEH xdata have been filled out.

llvm-svn: 234067
2015-04-03 23:37:34 +00:00
David Blaikie
685d00cae6 [opaque pointer type] More GEP IRBuilder API migrations
llvm-svn: 234064
2015-04-03 23:03:54 +00:00
David Majnemer
4a823b111e [WinEH] Fill out .xdata for catch objects
This add support for catching an exception such that an exception object
available to the catch handler will be initialized by the runtime.

llvm-svn: 234062
2015-04-03 22:49:05 +00:00
David Majnemer
694a466675 [WinEH] Sink UnwindHelp completely out of IR
We don't need to represent UnwindHelp in IR.  Instead, we can use the
knowledge that we are emitting the parent function to decide if we
should create the UnwindHelp stack object.

llvm-svn: 234061
2015-04-03 22:32:26 +00:00
Andrew Kaylor
cecffb7afd Fixing a memory leak in WinEHPrepare
llvm-svn: 234059
2015-04-03 21:44:17 +00:00
David Blaikie
968a03f8cd [opaque pointer type] More GEP IRBuilder API migrations...
llvm-svn: 234058
2015-04-03 21:33:42 +00:00
David Blaikie
061faafe3e Use early returns to reduce indentation.
llvm-svn: 234057
2015-04-03 21:32:06 +00:00
David Majnemer
2af32ca579 Fix a typo
CHECK-LABEL had the wrong function name.

llvm-svn: 234051
2015-04-03 20:56:24 +00:00
David Majnemer
2243ffe08d [InstCombine] Use DataLayout to determine vector element width
InstCombine didn't realize that it needs to use DataLayout to determine
how wide pointers are.  This lead to assertion failures.

This fixes PR23113.

llvm-svn: 234046
2015-04-03 20:18:40 +00:00
Andrew Kaylor
4fdb9c2a2e Fixing a build error
llvm-svn: 234045
2015-04-03 19:55:30 +00:00
Andrew Kaylor
8bd817aff0 Fixing build warnings.
llvm-svn: 234043
2015-04-03 19:45:32 +00:00
David Blaikie
69c6682f8d [opaque pointer type] More GEP API migrations in IRBuilder uses
The plan here is to push the API changes out from the common components
(like Constant::getGetElementPtr and IRBuilder::CreateGEP related
functions) and just update callers to either pass the type if it's
obvious, or pass null.

Do this with LoadInst as well and anything else that comes up, then to
start porting specific uses to not pass null anymore - this may require
some refactoring in each case.

llvm-svn: 234042
2015-04-03 19:41:44 +00:00
Andrew Kaylor
cd70932cf9 [WinEH] Handle nested landing pads in outlined catch handlers
Differential Revision: http://reviews.llvm.org/D8596

llvm-svn: 234041
2015-04-03 19:37:50 +00:00
Duncan P. N. Exon Smith
054ffcf2c3 CodeGen: Assert that inlined-at locations agree
As a follow-up to r234021, assert that a debug info intrinsic variable's
`MDLocalVariable::getInlinedAt()` always matches the
`MDLocation::getInlinedAt()` of its `!dbg` attachment.

The goal here is to get rid of `MDLocalVariable::getInlinedAt()`
entirely (PR22778), but I'll let these assertions bake for a while
first.

If you have an out-of-tree backend that just broke, you're probably
attaching the wrong `DebugLoc` to a `DBG_VALUE` instruction.  The one
you want is the location that was attached to the corresponding
`@llvm.dbg.declare` or `@llvm.dbg.value` call that you started with.

llvm-svn: 234038
2015-04-03 19:20:26 +00:00
Reid Kleckner
629f070af4 [WinEH] Fold cast into assertion based on review feedback
llvm-svn: 234034
2015-04-03 18:18:06 +00:00
Matthias Braun
a936e46ab4 [GraphWriter] Attempt to open .dot files with xdg-open/open first
Most desktop environments let the users specify his preferred application per
file type. On mac/linux we can use open/xdg-open for that and should try this
first before starting a heuristic search for various programs.

Differential Revision: http://reviews.llvm.org/D6534

llvm-svn: 234031
2015-04-03 17:22:36 +00:00
Sanjay Patel
ac7b801edf use update_llc_test_checks.py to tighten checking; remove unnecessary testing params
llvm-svn: 234029
2015-04-03 17:17:50 +00:00
Sanjay Patel
09dfdcbcd0 use update_llc_test_checks.py to tighten checking; remove unnecessary testing params
llvm-svn: 234027
2015-04-03 17:13:31 +00:00
Duncan P. N. Exon Smith
2170816b1a SelectionDAG: Use specialized metadata nodes in EmitFuncArgumentDbgValue(), NFC
Use `MDLocalVariable` and `MDExpression` directly for the arguments of
`EmitFuncArgumentDbgValue()` to simplify a follow-up patch.

llvm-svn: 234026
2015-04-03 17:11:42 +00:00
Sanjay Patel
ad7b3271f0 use update_llc_test_checks.py to tighten checking; remove unnecessary testing params
llvm-svn: 234024
2015-04-03 17:09:37 +00:00
Sanjay Patel
682732f0ca use update_llc_test_checks.py to tighten checking
remove redundant and unnecessary test parameters

llvm-svn: 234022
2015-04-03 17:02:48 +00:00
Duncan P. N. Exon Smith
9bfb0f6678 Verifier: Check that inlined-at locations agree
Check that the `MDLocalVariable::getInlinedAt()` in a debug info
intrinsic's variable always matches the `MDLocation::getInlinedAt()` of
its `!dbg` attachment.

The goal here is to get rid of `MDLocalVariable::getInlinedAt()`
entirely (PR22778), since it's expensive and unnecessary, but I'll let
this verifier check bake for a while (a week maybe?) first.  I've
updated the testcases that had the wrong value for `inlinedAt:`.

This checks that things are sane in the IR, but currently things go out
of whack in a few places in the backend.  I'll follow shortly with
assertions in the backend (with code fixes).

If you have out-of-tree testcases that just started failing, here's how
I updated these ones:

 1. The verifier check gives you the basic block, function, instruction,
    and relevant metadata arguments (metadata numbering doesn't
    necessarily match the source file, unfortunately).
 2. Look at the `@llvm.dbg.*()` instruction, and compare the
    `inlinedAt:` fields of the variable argument (second `metadata`
    argument) and the `!dbg` attachment.
 3. Figure out based on the variable `scope:` chain and the functions in
    the file whether the variable has been inlined (and into what), so
    you can determine which `inlinedAt:` is actually correct.  In all of
    the in-tree testcases, the `!MDLocation()` was correct and the
    `!MDLocalVariable()` was wrong, but YMMV.
 4. Duplicate the metadata that you're going to change, and add/drop the
    `inlinedAt:` field from one of them.  Be careful that the other
    references to the same metadata node point at the correct one.

llvm-svn: 234021
2015-04-03 16:54:30 +00:00
Sanjay Patel
074d61ed44 add checks; remove redundant testing parameters
llvm-svn: 234020
2015-04-03 16:44:42 +00:00
Duncan P. N. Exon Smith
e27224ace5 CodeGen: Fix MachineInstr::print() for DBG_VALUE
Grab the `MDLocalVariable` from the second-to-last argument; the last
argument is an `MDExpression`, and mixing them up will crash.

llvm-svn: 234019
2015-04-03 16:23:04 +00:00
Daniel Jasper
ee5f11800e [MachineLICM] Small cleanup: Constify and rangeify.
NFC.

llvm-svn: 234018
2015-04-03 16:19:48 +00:00