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

80021 Commits

Author SHA1 Message Date
Eric Christopher
6fef6aa03e Fix typos in variable/grammar names.
llvm-svn: 238523
2015-05-28 23:07:39 +00:00
Reid Kleckner
70ba9df70b Rename Win64Exception.(cpp|h) to WinException.(cpp|h)
This is in preparation for reusing this for 32-bit x86 EH table
emission.  Also updates the type name for consistency. NFC

llvm-svn: 238521
2015-05-28 22:47:01 +00:00
Alex Lorenz
8269eba38f MIR Serialization: print and parse machine function names.
This commit introduces a serializable structure called
'llvm::yaml::MachineFunction' that stores the machine
function's name. This structure will mirror the machine 
function's state in the future.

This commit prints machine functions as YAML documents
containing a YAML mapping that stores the state of a machine
function. This commit also parses the YAML documents
that contain the machine functions.

Reviewers: Duncan P. N. Exon Smith

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

llvm-svn: 238519
2015-05-28 22:41:12 +00:00
Quentin Colombet
df910a4090 [MachineCopyPropagation] Fix a bug with undef handling when the value is actualy alive.
Test case will follow.

llvm-svn: 238518
2015-05-28 22:38:40 +00:00
Reid Kleckner
711f4eb0a1 [WinEH] Start inserting state number stores for C++ EH
This moves all the state numbering code for C++ EH to WinEHPrepare so
that we can call it from the X86 state numbering IR pass that runs
before isel.

Now we just call the same state numbering machinery and insert a bunch
of stores. It also populates MachineModuleInfo with information about
the current function.

llvm-svn: 238514
2015-05-28 22:00:24 +00:00
Rafael Espindola
c79576b357 Don't special case undefined symbol when deciding the symbol order.
ELF has no restrictions on where undefined symbols go relative to other defined
symbols. In fact, gas just sorts them together. Do the same.

This was there since r111174 probably just because the MachO writer has it.

llvm-svn: 238513
2015-05-28 21:59:34 +00:00
Wei Mi
e3bab282ea Enable exitValue rewrite only when the cost of expansion is low.
The patch evaluates the expansion cost of exitValue in indVarSimplify pass, and only does the rewriting when the expansion cost is low or loop can be deleted with the rewriting. It provides an option "-replexitval=" to control the default aggressiveness of the exitvalue rewriting. It also fixes some missing cases in SCEVExpander::isHighCostExpansionHelper to enhance the evaluation of SCEV expansion cost.

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

llvm-svn: 238507
2015-05-28 21:49:07 +00:00
Rafael Espindola
be6f69a9cc Remove a trivial forwarding function. NFC.
llvm-svn: 238506
2015-05-28 21:36:02 +00:00
David Majnemer
b213c7ba47 [SelectionDAG] Scalar shift amounts may require legalization
The shift amount may be too small to cope with promoted left hand side,
make sure to promote it as well.

This fixes PR23664.

llvm-svn: 238503
2015-05-28 21:29:59 +00:00
Reid Kleckner
4748d81d28 Remove debug prints from r238487
llvm-svn: 238501
2015-05-28 21:23:53 +00:00
Rafael Espindola
effa5fc7da Inline trivial method. NFC.
llvm-svn: 238492
2015-05-28 20:53:09 +00:00
Reid Kleckner
2c78d5e9c7 Disable x86 tail call optimizations that jump through GOT
For x86 targets, do not do sibling call optimization when materializing
the callee's address would require a GOT relocation. We can still do
tail calls to internal functions, hidden functions, and protected
functions, because they do not require this kind of relocation. It is
still possible to get GOT relocations when the user explicitly asks for
it with musttail or -tailcallopt, both of which are supposed to
guarantee TCO.

Based on a patch by Chih-hung Hsieh.

Reviewers: srhines, timmurray, danalbert, enh, void, nadav, rnk

Subscribers: joerg, davidxl, llvm-commits

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

llvm-svn: 238487
2015-05-28 20:44:28 +00:00
Daniel Sanders
82a2ed16ac Revert r238427 - [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
It caused a smaller number of failures than the previous attempt at committing but still caused a couple on the llvm-linux-mips builder. Reverting while I investigate the remainder.

llvm-svn: 238483
2015-05-28 20:30:32 +00:00
Rafael Espindola
2addfe8ca6 Remove structure field that can be computed just before use.
llvm-svn: 238480
2015-05-28 20:25:29 +00:00
Rafael Espindola
1b6358631c Avoid warnings when building without asserts.
llvm-svn: 238479
2015-05-28 20:19:31 +00:00
Rafael Espindola
7335e39983 Move these vectors to the only function where they are used.
llvm-svn: 238477
2015-05-28 20:11:34 +00:00
Peter Collingbourne
688547e6fc Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM.
We were previously codegen'ing these as regular load/store operations and
hoping that the register allocator would allocate registers in ascending order
so that we could apply an LDM/STM combine after register allocation. According
to the commit that first introduced this code (r37179), we planned to teach
the register allocator to allocate the registers in ascending order. This
never got implemented, and up to now we've been stuck with very poor codegen.

A much simpler approach for achiveing better codegen is to create LDM/STM
instructions with identical sets of virtual registers, let the register
allocator pick arbitrary registers and order register lists when printing an
MCInst. This approach also avoids the need to repeatedly calculate offsets
which ultimately ought to be eliminated pre-RA in order to decrease register
pressure.

This is implemented by lowering the memcpy intrinsic to a series of SD-only
MCOPY pseudo-instructions which performs a memory copy using a given number
of registers. During SD->MI lowering, we lower MCOPY to LDM/STM. This is a
little unusual, but it avoids the need to encode register lists in the SD,
and we can take advantage of SD use lists to decide whether to use the _UPD
variant of the instructions.

Fixes PR9199.

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

llvm-svn: 238473
2015-05-28 20:02:45 +00:00
Reid Kleckner
dbcfffa4e5 [WinEH] Remove debugging dump() call
llvm-svn: 238472
2015-05-28 20:02:05 +00:00
Rafael Espindola
b57f3b4cc5 Merge redundant loops. NFC.
llvm-svn: 238471
2015-05-28 20:00:13 +00:00
Duncan P. N. Exon Smith
9ba8af76a1 AsmPrinter: Stop exposing underlying DIE children list, NFC
Update `DIE` API to hide the implementation of `DIE::Children` so we can
swap it out.

llvm-svn: 238468
2015-05-28 19:56:34 +00:00
Rafael Espindola
2fdca8e81e Simplify LastLocalSymbolIndex computation. NFC.
llvm-svn: 238465
2015-05-28 19:46:36 +00:00
Rafael Espindola
341a6b15d6 Use range loops. NFC.
llvm-svn: 238463
2015-05-28 19:43:20 +00:00
Pete Cooper
e64f416a13 Add BranchProbabilityInfo::releaseMemory to clear the Weights field.
BranchProbabilityInfo was leaking 3MB of memory when running 'opt -O2 verify-uselistorder.lto.bc'.  This was due to the Weights member not being cleared once the pass is no longer needed.

This adds the releaseMemory override to clear that field.  The other fields are cleared at the end of runOnFunction so can stay there.

llvm-svn: 238462
2015-05-28 19:43:06 +00:00
Rafael Espindola
bb70fe86e9 Remove temporary FileSymbolData. NFC.
llvm-svn: 238461
2015-05-28 19:29:15 +00:00
Duncan P. N. Exon Smith
0c791a688f AsmPrinter: Rename begin_values() => values_begin(), NFC
llvm-svn: 238456
2015-05-28 18:55:38 +00:00
Colin LeMahieu
b63fdb630a [llvm] Parameterizing the output stream for dumpbytes and outputting directly to stream.
llvm-svn: 238453
2015-05-28 18:39:50 +00:00
David Majnemer
514ab73614 [InstCombine] Fold IntToPtr and PtrToInt into preceding loads.
Currently we only fold a BitCast into a Load when the BitCast is its
only user.

Do the same for any no-op cast.

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

llvm-svn: 238452
2015-05-28 18:39:17 +00:00
Chad Rosier
74573e63bc Reuse Loc variable. NFC.
llvm-svn: 238448
2015-05-28 18:18:21 +00:00
Rafael Espindola
cea3662074 Use range loops for accessing file names. NFC.
llvm-svn: 238446
2015-05-28 18:03:20 +00:00
Rafael Espindola
7a39767414 Merge computeSymbolTable and writeSymbolTable.
For now this just saves a few loops, but it will allow more simplifications
in the future.

llvm-svn: 238444
2015-05-28 17:54:01 +00:00
Kai Nacke
59a31f2f53 [mips] Add new format for dmtc2/dmfc2 for Octeon CPUs.
Octeon CPUs use dmtc2 rt,imm16 and dmfcp2 rt,imm16 for the crypto coprocessor.
E.g. dmtc2 rt,0x4057 starts calculation of sha-1.

I had to introduce a new deconding namespace to avoid a decoding conflict.

Reviewed By: dsanders

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

llvm-svn: 238439
2015-05-28 16:23:16 +00:00
Ed Maste
33815a24e8 DebugInfo: .debug_line DWARF64 support
This adds support for the 64-bit DWARF format, but is still limited to
less than 4GB of debug data by the DataExtractor class.  Some versions
of the GNU MIPS toolchain generate 64-Bit DWARF even though it isn't
actually necessary.

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

llvm-svn: 238434
2015-05-28 15:38:17 +00:00
Rafael Espindola
bde36f1a15 Don't create an unused _GLOBAL_OFFSET_TABLE_.
This was a bug for bug compatibility with gas that is completely unnecessary.
If a _GLOBAL_OFFSET_TABLE_ symbol is used, it will already be created by
the time we get to the ELF writer.

llvm-svn: 238432
2015-05-28 15:20:00 +00:00
Renato Golin
321a55f6a3 [ARMTargetParser] Adding sub-arch information for Clang. NFC
llvm-svn: 238429
2015-05-28 15:05:18 +00:00
Daniel Sanders
bb2be43a35 [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
Summary:
Following on from r209907 which made personality encodings indirect, do the
same for TType encodings. This fixes the case where a try/catch block needs
to generate references to, for example, std::exception in the
.gcc_except_table.

Reviewers: petarj

Reviewed By: petarj

Subscribers: srhines, joerg, tberghammer, llvm-commits

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

llvm-svn: 238427
2015-05-28 14:52:15 +00:00
Petar Jovanovic
e26f67279e [Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6
Add support for resolving MIPS64r2 and MIPS64r6 relocations in MCJIT.

Patch by Vladimir Radosavljevic.

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

llvm-svn: 238424
2015-05-28 13:48:41 +00:00
Benjamin Kramer
c6e6778781 [AsmPrinter] Destroy allocated DIEAbbrevs on teardown.
DIEAbbrev contains a SmallVector that can leak for overly large abbrevs. They
used to be owned by the DIE, but after the recent refactoring DWARFFile
allocates its own abbrevs.

Leak found by asan.

llvm-svn: 238418
2015-05-28 12:55:43 +00:00
Renato Golin
0cdb09cf96 [ARMTargetParser] Adding a few more CPUs for Clang CPU detection. NFC.
llvm-svn: 238415
2015-05-28 12:10:37 +00:00
Benjamin Kramer
2f0759b0f8 [MC] Replace custom string join function with the one from StringExtras.
NFC.

llvm-svn: 238414
2015-05-28 11:45:32 +00:00
Benjamin Kramer
5a56e44e39 Don't call utostr in Twine/raw_ostream contexts.
Creating temporary std::strings there is unnecessary.

llvm-svn: 238412
2015-05-28 11:24:24 +00:00
Renato Golin
b027528ed0 Fix comments in ARMTargetParser. NFC.
llvm-svn: 238404
2015-05-28 08:59:03 +00:00
Yury Gribov
87f3324fce [ASan] Fix previous commit. Patch by Max Ostapenko!
llvm-svn: 238403
2015-05-28 08:03:28 +00:00
Yury Gribov
a62d222d1e [ASan] New approach to dynamic allocas unpoisoning. Patch by Max Ostapenko!
Differential Revision: http://reviews.llvm.org/D7098

llvm-svn: 238402
2015-05-28 07:51:49 +00:00
Craig Topper
2f56a2767c [TableGen] Use DefInit::getAsString instead of getDef()->getName(). NFC
llvm-svn: 238399
2015-05-28 06:38:32 +00:00
Craig Topper
af60fb90dd [TableGen] Don't convert types to strings to query what they are. Just use 'isa'
llvm-svn: 238398
2015-05-28 06:38:28 +00:00
David Majnemer
6666bdd7cf [Reassociate] Canonicalizing 'x [+-] (-Constant * y)' isn't always a win
Canonicalizing 'x [+-] (-Constant * y)' is not a win if we don't *know*
we will open up CSE opportunities.

If the multiply was 'nsw', then negating 'y' requires us to clear the
'nsw' flag.  If this is actually worth pursuing, it is probably more
appropriate to do so in GVN or EarlyCSE.

This fixes PR23675.

llvm-svn: 238397
2015-05-28 06:16:39 +00:00
Jingyue Wu
6c391c6619 [NaryReassociate] Run EarlyCSE after NaryReassociate
Summary:
This patch made two improvements to NaryReassociate and the NVPTX pipeline

1. Run EarlyCSE/GVN after NaryReassociate to get rid of redundant common
expressions.

2. When adding an instruction to SeenExprs, maps both the SCEV before and after
reassociation to that instruction.

Test Plan: updated @reassociate_gep_nsw in nary-gep.ll

Reviewers: meheff, broune

Reviewed By: broune

Subscribers: dberlin, jholewinski, llvm-commits

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

llvm-svn: 238396
2015-05-28 04:56:52 +00:00
Duncan P. N. Exon Smith
a9e27d82be AsmPrinter: Avoid a warning in NDEBUG, NFC
Should fix the -Werror release build:
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11113

llvm-svn: 238375
2015-05-27 23:02:36 +00:00
Duncan P. N. Exon Smith
78ae127736 AsmPrinter: Return added DIE from DIE::addChild()
Change `DIE::addChild()` to return a reference to the just-added node,
and update consumers to use it directly.  An upcoming commit will
abstract away (and eventually change) the underlying storage of
`DIE::Children`.

llvm-svn: 238372
2015-05-27 22:59:03 +00:00
Fiona Glaser
2f28b93375 RegisterPressure: fix debug prints in case of physical registers
llvm-svn: 238371
2015-05-27 22:51:47 +00:00