1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
Commit Graph

122277 Commits

Author SHA1 Message Date
Kostya Serebryany
6e1f94e9cd [libFuzzer] fix 32-bit build
llvm-svn: 249646
2015-10-08 00:59:25 +00:00
Diego Novillo
87a89a64fa Handle inline stacks in gcov-encoded sample profiles.
This patch adds support for reading sample profiles with inline stacks.
Inline stacks in a profile are generated when the sampled binary has
samples in inlined functions.

For instance, if main() calls foo() and foo() calls bar(), and bar() is
inlined into foo() and foo() inlined into main(), the profile may look
something like:

main total:364084 head:0
  [ ... ]
  2.3: _Z3fool total:243786
    1: 60149
    1.2: 38568
    1.4: 46511
    1.7: _Z3bari total:98558
      1.1: 52672
      1.2: 45886

At line 2, discriminator 3, main() calls foo(). In turn, foo() calls
bar() at line 1, discriminator 7.

In the textual format, this stacking of inline calls is represented
with indentation.

With this change, LLVM can now read sample profile files generated by
the create_gcov tool from https://github.com/google/autofdo.

llvm-svn: 249644
2015-10-08 00:39:11 +00:00
Justin Bogner
43aff57984 CodeGen: print and verify after TargetPassConfig::insertPass by default
In r224059, we started verifying after addPass, but missed doing so on
insertPass. There isn't a good reason for the discrepancy, and
skipping the verifier in these cases causes bugs.

This also exposes a verifier error that was introduced in r249087, but
the verifier doesn't run until after the register coalescer, when the
issue happens to have been resolved. I've skipped the verifier after
SIFixSGPRLiveRangesID to avoid the failures for now and will follow up
with Matt for a proper fix.

llvm-svn: 249643
2015-10-08 00:36:22 +00:00
Reid Kleckner
bf9b3647f6 [WinEH] Add missing test case for llvm.eh.exceptioncode
llvm-svn: 249638
2015-10-07 23:55:06 +00:00
Reid Kleckner
65e461dfc5 [WinEH] Fix 32-bit funclet epilogues in the presence of dynamic allocas
In particular, passing non-trivially copyable objects by value on win32
uses a dynamic alloca (inalloca). We would clobber ESP in the epilogue
and end up returning to outer space.

llvm-svn: 249637
2015-10-07 23:55:01 +00:00
Pete Cooper
c0f6f791b4 Stop linking all target libraries in llvm-nm and llvm-objdump.
llvm-nm only needs the target to parse module level assembly in bitcode.  It doesn't need a disassembler or codegen.

llvm-objdump needs to be able to disassemble a file, but doesn't need asm parsers or codegen.

This reduces the sizes of these tools by a few MB each, depending on how many backends are linked in.

llvm-svn: 249632
2015-10-07 22:39:17 +00:00
Lang Hames
c41c667ccd [Orc] Enable user supplied partitioning functors in the CompileOnDemand layer.
Previously the CompileOnDemand layer always created single-function partitions.
In theory this new API allows for more interesting partitions, though this has
not been well tested yet.

llvm-svn: 249623
2015-10-07 21:53:41 +00:00
David Majnemer
accdd1b3f0 [WinEH] Refer to filter funclets using their symbol-table symbol
The relocation for the filter funclet will be against a symbol table
entry for a function instead of the section, making it easier to
understand what is going on.

llvm-svn: 249621
2015-10-07 21:34:00 +00:00
Sanjoy Das
09f968822a [RS4GC] Use AssertingVH for RematerializedValueMapTy, NFCI
Reviewers: reames, swaroop.sridhar

Subscribers: llvm-commits

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

llvm-svn: 249620
2015-10-07 21:32:35 +00:00
Reid Kleckner
60b6b390d5 [WinEH] Undo the effect of r249578 for 32-bit
The __CxxFrameHandler3 tables for 32-bit are supposed to hold stack
offsets relative to EBP, not ESP. I blindly updated the win-catchpad.ll
test case, and immediately noticed that 32-bit catching stopped working.

While I'm at it, move the frame index to frame offset WinEH table logic
out of PEI.  PEI shouldn't have to know about WinEHFuncInfo. I realized
we can calculate frame index offsets just fine from the table printer.

llvm-svn: 249618
2015-10-07 21:13:15 +00:00
David Majnemer
76231ec372 [WinEH] Remove unreachable blocks before preparation
We remove unreachable blocks because it is pointless to consider them
for coloring.  However, we still had stale pointers to these blocks in
some data structures after we removed them from the function.

Instead, remove the unreachable blocks before attempting to do anything
with the function.

This fixes PR25099.

llvm-svn: 249617
2015-10-07 21:08:25 +00:00
Duncan P. N. Exon Smith
b5929cfe1f Support: Stop using iplist in Recycler
Recycler just needs a singly-linked list, and it takes less (and
simpler) code to hand-roll one of those than to build up the equivalent
`iplist_traits`.  In theory, this should speed things up a bit too, but
this is really just a drive-by cleanup so I haven't measured.

llvm-svn: 249615
2015-10-07 20:49:09 +00:00
Rafael Espindola
cb545e4c47 git-clang-format r249548.
Sorry for missing this the first time.

llvm-svn: 249610
2015-10-07 20:32:24 +00:00
Vasileios Kalintiris
c12cddb5fb [mips][FastISel] Factor out common code from switch statement. NFC
llvm-svn: 249603
2015-10-07 20:06:30 +00:00
Duncan P. N. Exon Smith
d8033eebd6 IR: Create SymbolTableList wrapper around iplist, NFC
Create `SymbolTableList`, a wrapper around `iplist` for lists that
automatically manage a symbol table.  This commit reduces a ton of code
duplication between the six traits classes that were used previously.

As a drive by, reduce the number of template parameters from 2 to 1 by
using a SymbolTableListParentType metafunction (I originally had this as
a separate commit, but it touched most of the same lines so I squashed
them).

I'm in the process of trying to remove the UB in `createSentinel()` (see
the FIXMEs I added for `ilist_embedded_sentinel_traits` and
`ilist_half_embedded_sentinel_traits`).  My eventual goal is to separate
the list logic into a base class layer that knows nothing about (and
isn't templated on) the downcasted nodes -- removing the need to invoke
UB -- but for now I'm just trying to get a handle on all the current use
cases (and cleaning things up as I see them).

Besides these six SymbolTable lists, there are two others that use the
addNode/removeNode/transferNodes() hooks: the `MachineInstruction` and
`MachineBasicBlock` lists.  Ideally there'll be a way to factor these
hooks out of the low-level API entirely, but I'm not quite there yet.

llvm-svn: 249602
2015-10-07 20:05:10 +00:00
Sanjoy Das
f6945cd657 [IRBuilder] Add gc.statepoint related methods to IRBuilder
Summary:
This adds some more routines to `IRBuilder` around creating calls and
invokes to `gc.statepoint`.  These will be used later.

Reviewers: reames, swaroop.sridhar

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 249596
2015-10-07 19:52:12 +00:00
Vasileios Kalintiris
a61c0e284b [mips][FastISel] Use ternary operator to select opcode. NFC
llvm-svn: 249594
2015-10-07 19:43:31 +00:00
Joseph Tremoulet
82c481c800 [WinEH] Set NoModuleLevelChanges in clone flags
Summary:
This is necessary to keep the cloner from making bogus copies of debug
metadata attached to the IR it is cloning.
Also, avoid running RemapInstruction over all instructions in the common
case that no cloning was performed.

Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: llvm-commits

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

llvm-svn: 249591
2015-10-07 19:29:56 +00:00
Rafael Espindola
36d866a4db Use SpecificBumpPtrAllocator to simplify the MCSeciton destruction.
llvm-svn: 249589
2015-10-07 19:08:19 +00:00
Kevin B. Smith
04562a6b38 [X86]Update test to use FileCheck.
Updates this test to use FileCheck and a single llc invocation rather than
3 llc invocations and grep.

llvm-svn: 249583
2015-10-07 18:21:41 +00:00
Mehdi Amini
5e51102a9d Revert "Revert "This patch builds on top of D13378 to handle constant condition.""
This reverts commit r249528 and reapply r249431. The fix for the
fallout has been commited in r249575.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 249581
2015-10-07 18:14:25 +00:00
Vasileios Kalintiris
64a0dc84c2 [mips][FastISel] Simple refactoring of MipsFastISel::emitLogicalOP(). NFC.
llvm-svn: 249580
2015-10-07 18:14:24 +00:00
Chad Rosier
1b95669ac4 [AArch64] Fold a floating-point divide by power of two into fp conversion.
Part of http://reviews.llvm.org/D13442

llvm-svn: 249579
2015-10-07 17:51:37 +00:00
Reid Kleckner
b2e3d5ab9f [WinEH] Fix two minor issues in __CxxFrameHandler3 tables
There was an off-by-one bug in ip2state tables which manifested when one
call immediately preceded the try-range of the next. The return address
of the previous call would appear to be within the try range of the next
scope, resulting in extra destructors or catches running.

We also computed the wrong offset for catch parameter stack objects. The
offset should be from RSP, not from RBP.

llvm-svn: 249578
2015-10-07 17:49:32 +00:00
Matt Arsenault
628b85dd0f AMDGPU: Fix missing implicit m0 uses on movrel instructions
llvm-svn: 249577
2015-10-07 17:46:32 +00:00
Chad Rosier
7d818bf9a9 [AArch64] Fold a floating-point multiply by power of two into fp conversion.
Part of http://reviews.llvm.org/D13442

llvm-svn: 249576
2015-10-07 17:39:18 +00:00
Sanjoy Das
893f0ae303 [IndVars] Preserve LCSSA in eliminateIdentitySCEV
Summary:
After r249211, SCEV can see through some LCSSA phis.  Add a
`replacementPreservesLCSSAForm` check before replacing uses of these phi
nodes with a simplified use of the induction variable to avoid breaking
LCSSA.

Fixes 25047.

Depends on D13460.

Reviewers: atrick, hfinkel

Subscribers: llvm-commits

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

llvm-svn: 249575
2015-10-07 17:38:31 +00:00
Sanjoy Das
50208dda96 [SCEV] Use some C++11'ism, NFC
Summary:

Subscribers: llvm-commits

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

llvm-svn: 249574
2015-10-07 17:38:25 +00:00
Chad Rosier
b1d0ead796 [ARM] Promote helper function to SelectionDAG.
I'll be using the function in a similar combine for AArch64.  The helper was
also improved to handle undef values.

Part of http://reviews.llvm.org/D13442

llvm-svn: 249572
2015-10-07 17:28:58 +00:00
Kevin B. Smith
598f5e1bea Test commit access. Fixed comment to have correct input parameter name and
period termination.

llvm-svn: 249571
2015-10-07 17:24:25 +00:00
Joseph Tremoulet
3ce8c76249 [WinEH] Update CoreCLR EH for catchpad MBBs
Summary:
Set the pad MBB as a funclet entry for CoreCLR as well as MSVCCXX, and
update state numbering to put the catchpad block rather than its normal
successor into the unwind map.

Reviewers: majnemer

Subscribers: llvm-commits

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

llvm-svn: 249569
2015-10-07 17:16:25 +00:00
Oliver Stannard
3ac1a01f35 [ARM] Use correct half-precision functions in EABI mode
The ARM RTABI defines the half- to single-precision float conversion functions
with an __aeabi prefix, but libgcc only has them with a __gnu prefix. Therefore
we need to emit the __aeabi version when compiling with an eabi or eabihf
triple, and the __gnu version with a gnueabi or gnueabihf triple.

llvm-svn: 249565
2015-10-07 16:58:49 +00:00
David Blaikie
a50fced9c8 Move test back to Generic now it's fixed the right way (thanks Eric!)
I knee-jerk tried to fix this in completely the wrong way - it's not an
CPU limitation, but an OS/object file type one, so moving it
into a CPU-specific classification didn't help at all.

llvm-svn: 249562
2015-10-07 16:26:28 +00:00
Chad Rosier
9072b17685 [ARM] Prevent PerformVDIVCombine from combining a vcvt/vdiv with 8 lanes.
This would result in a crash since the vcvt used does not support v8i32 types.

llvm-svn: 249560
2015-10-07 16:15:40 +00:00
Artur Pilipenko
8b3cc14fdc Teach computeKnownBits to use new align attribute/metadata
Reviewed By: reames

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

llvm-svn: 249557
2015-10-07 16:01:18 +00:00
Jeroen Ketema
18e0c425d4 [ARM][AArch64] Only lower to interleaved load/store if the target has NEON
Without an additional check for NEON, the compiler crashes during
legalization of NEON ldN/stN.

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

llvm-svn: 249550
2015-10-07 14:53:29 +00:00
Rafael Espindola
a975b17d63 Use non virtual destructors for sections.
llvm-svn: 249548
2015-10-07 13:46:06 +00:00
Chad Rosier
bd3f2b9213 [ARM] Push more complex check down to reduce compile time. NFC.
llvm-svn: 249547
2015-10-07 13:40:44 +00:00
Rafael Espindola
b78be1a0b6 Don't repeat names in comments and don't indent in namespaces. NFC.
llvm-svn: 249546
2015-10-07 13:38:49 +00:00
Scott Egerton
13e6761ff5 Revert: r249536 - Testing commit access with a trival whitespace change.
llvm-svn: 249537
2015-10-07 10:57:06 +00:00
Scott Egerton
452ce77409 Testing commit access with a trival whitespace change.
llvm-svn: 249536
2015-10-07 10:49:49 +00:00
James Molloy
0e044652c2 Revert "This patch builds on top of D13378 to handle constant condition."
This reverts commit r249431. This caused failures in sqlite3: http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/14453

llvm-svn: 249528
2015-10-07 09:03:34 +00:00
Arnaud A. de Grandmaison
d8693073cb [EarlyCSE] Fix handling of target memory intrinsics for CSE'ing loads.
Summary:
Some target intrinsics can access multiple elements, using the pointer as a
base address (e.g. AArch64 ld4). When trying to CSE such instructions,
it must be checked the available value comes from a compatible instruction
because the pointer is not enough to discriminate whether the value is
correct.

Reviewers: ssijaric

Subscribers: mcrosier, llvm-commits, aemerson

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

llvm-svn: 249523
2015-10-07 07:41:29 +00:00
Michael Kuperstein
203878427e [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls
When outgoing function arguments are passed using push instructions, and EH
is enabled, we may need to indicate to the stack unwinder that the stack
pointer was adjusted before the call.

This should fix the exception handling issues in PR24792.

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

llvm-svn: 249522
2015-10-07 07:01:31 +00:00
Igor Breger
495e2a8625 AVX512: Change encoding of vpshuflw and vpshufhw instructions. Implement WIG as W0 and not W1, like all other instruction have been implemented.
Add encoding tests.

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

llvm-svn: 249521
2015-10-07 06:31:18 +00:00
Sanjoy Das
7e8958514b [RS4GC] Remove an unnecessary assert & related variables
I don't think this assert adds much value, and removing it and related
variables avoids an "unused variable" warning in release builds.

llvm-svn: 249511
2015-10-07 02:39:27 +00:00
Sanjoy Das
a9789b67ff [OperandBundles] Add an accessor to get an operand bundle by tag
Not used at the moment, but will be used in a later change to
RewriteStatepointsForGC.

llvm-svn: 249510
2015-10-07 02:39:24 +00:00
Sanjoy Das
01d951e9b2 [OperandBundles] Remove a useless accessor from OperandBundleUser
Since the `const` version of `getOperandBundle` returns a value of the
same type as the non-`const` version, the non-`const` version is
redundant.

llvm-svn: 249509
2015-10-07 02:39:21 +00:00
Sanjoy Das
3621ece8f2 [RS4GC] Cosmetic cleanup, NFC
Summary:
A series of cosmetic cleanup changes to RewriteStatepointsForGC:

  - Rename variables to LLVM style
  - Remove some redundant asserts
  - Remove an unsued `Pass *` parameter
  - Remove unnecessary variables
  - Use C++11 idioms where applicable
  - Pass CallSite by value, not reference

Reviewers: reames, swaroop.sridhar

Subscribers: llvm-commits, sanjoy

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

llvm-svn: 249508
2015-10-07 02:39:18 +00:00
Eric Christopher
f1cabed0b6 Remove the comdat-ness from the testcase as it won't lower properly
on darwin with it since darwin doesn't have comdat and it isn't
necessary for the testcase.

llvm-svn: 249504
2015-10-07 01:52:33 +00:00